summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Ignore dbg info intrinsics when folding conditional branch to Zhou Sheng2009-02-26
| | | | | | | conditional branch predecessors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65509 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable stack slot coloring DCE. Evan's spiller fixes were needed before ↵Owen Anderson2009-02-26
| | | | | | this could happen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65501 91177308-0d34-0410-b5e6-96231b3b80d8
* ADDS{D|S}rr_Int and MULS{D|S}rr_Int are not commutable. The users of these ↵Evan Cheng2009-02-26
| | | | | | intrinsics expect the high bits will not be modified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65499 91177308-0d34-0410-b5e6-96231b3b80d8
* The last commit was overly conservative. It's ok to reuse value that's ↵Evan Cheng2009-02-26
| | | | | | already marked livein. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65498 91177308-0d34-0410-b5e6-96231b3b80d8
* If an available register falls through to a succ block, unset the last kill. ↵Evan Cheng2009-02-26
| | | | | | Sorry, it's impossible to reduce a sensible test case. It basically requires the moon and stars to align in order to cause a failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65497 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.Evan Cheng2009-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65482 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix big-endian codegen bug. We're splitting upDale Johannesen2009-02-25
| | | | | | | | | | | | | overly long ints, e.g. i96, into pieces at PHIs and the nodes that feed into them; however big-endian reverses the order of the pieces (for some reason), and wasn't doing it the same way on both sides, so the pieces didn't match and runtime failures ensued. Fixes 188.ammp and sqlite3 on ppc32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65481 91177308-0d34-0410-b5e6-96231b3b80d8
* Print variable's display name in dwarf DIE.Devang Patel2009-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65468 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3667Chris Lattner2009-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65464 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't block basic block with only SwitchInst to fold into predecessors.Zhou Sheng2009-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65456 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up dwarf writer, part 1. This eliminated the horrible recursive ↵Evan Cheng2009-02-25
| | | | | | | | | getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior. This is a very minor compile time win. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65438 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a totally synthetic situation I came up with while looking at a bug inNick Lewycky2009-02-25
| | | | | | | related code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65437 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand tabs to spaces (overlooked in previous commit)Scott Michel2009-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65427 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove all "cached" data from BuildVectorSDNode, preferring to retrieveScott Michel2009-02-25
| | | | | | | | | | results via reference parameters. This patch also appears to fix Evan's reported problem supplied as a reduced bugpoint test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65426 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to have TableGen provide information if an intrinsic (coreMon P Wang2009-02-24
| | | | | | | or target) can be overloaded or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65404 91177308-0d34-0410-b5e6-96231b3b80d8
* If compile unit's language is not set then don't crash while dump'ing ↵Devang Patel2009-02-24
| | | | | | compile unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65402 91177308-0d34-0410-b5e6-96231b3b80d8
* Extension of GEP in constant folder was broken (apparently this codeDaniel Dunbar2009-02-24
| | | | | | | | has never been run!). - Sorry, don't know how to make an LLVM test case for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65383 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ScalarEvolution's getIterationCount to getBackedgeTakenCount,Dan Gohman2009-02-24
| | | | | | | | | | to more accurately describe what it does. Expand its doxygen comment to describe what the backedge-taken count is and how it differs from the actual iteration count of the loop. Adjust names and comments in associated code accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65382 91177308-0d34-0410-b5e6-96231b3b80d8
* Overhaul my earlier submission due to feedback. It's a large patch, but most ofBill Wendling2009-02-24
| | | | | | | | | | | | | them are generic changes. - Use the "fast" flag that's already being passed into the asm printers instead of shoving it into the DwarfWriter. - Instead of calling "MI->getParent()->getParent()" for every MI, set the machine function when calling "runOnMachineFunction" in the asm printers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65379 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a debugging option for SSC DCE.Owen Anderson2009-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65375 91177308-0d34-0410-b5e6-96231b3b80d8
* - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emitBill Wendling2009-02-24
| | | | | | | | | | | a DBG_LABEL or not. We want to fall back to the original way of emitting debug info when we're in -O0/-fast mode. - Add plumbing in to pass the "Fast" flag to places that need it. - XFAIL DebugInfo/deaddebuglabel.ll. This is finding 11 labels instead of 8. I need to investigate still. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65367 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simpleDan Gohman2009-02-24
| | | | | | | | ashr instcombine to help expose this code. And apply the fix to SelectionDAG's copy of this code too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65364 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize the ChangeCompareStride code, in preparation forDan Gohman2009-02-24
| | | | | | | handling non-constant strides. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65363 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve the DominanceFrontier analysis in the LoopDeletion pass.Dan Gohman2009-02-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65359 91177308-0d34-0410-b5e6-96231b3b80d8
* gdb uses DW_AT_prototyped to identify K&R style in C based languages.Devang Patel2009-02-24
| | | | | | | This fixes objc.dg/dwarf-prototypes.m scan-assembler DW_AT_prototyped from llvmgcc42 test suite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65357 91177308-0d34-0410-b5e6-96231b3b80d8
* While folding unconditional return move DbgRegionEndInst into the ↵Devang Patel2009-02-24
| | | | | | | | | | | | | predecessor, instead of removing it. This fixes following tests from llvmgcc42 testsuite. gcc.c-torture/execute/20000605-3.c gcc.c-torture/execute/20020619-1.c gcc.c-torture/execute/20030920-1.c gcc.c-torture/execute/loop-ivopts-1.c git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65353 91177308-0d34-0410-b5e6-96231b3b80d8
* If there is not any debug info available for any global variables and any ↵Devang Patel2009-02-24
| | | | | | subprograms then there is not any debug info to emit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65352 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out the change in 64918 that used sign-extensions when promotingDan Gohman2009-02-23
| | | | | | | | | | trip counts that use signed comparisons. It's not obviously the best approach for preserving trip count information, and at any rate there isn't anything in the tree right now that makes use of that, so for now always using zero-extensions is preferable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65347 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast-isel can't do TLS yet, so it should fall back to SDISelDan Gohman2009-02-23
| | | | | | | if it sees TLS addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65341 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopDeletion needs to inform ScalarEvolution when a loop is deleted,Dan Gohman2009-02-23
| | | | | | | | | so that ScalarEvolution doesn't hang onto a dangling Loop*, which could be a problem if another Loop happens to get allocated at the same address. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65323 91177308-0d34-0410-b5e6-96231b3b80d8
* IndVarSimplify preserves ScalarEvolution. In theDan Gohman2009-02-23
| | | | | | | | -std-compile-opts sequence, this avoids the need for ScalarEvolution to be rerun before LoopDeletion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65318 91177308-0d34-0410-b5e6-96231b3b80d8
* Should reset DBI_Prev if DBI_Next == 0.Zhou Sheng2009-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65314 91177308-0d34-0410-b5e6-96231b3b80d8
* Only v1i16 (i.e. _m64) is returned via RAX / RDX.Evan Cheng2009-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65313 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate better code for v8i16 shuffles on SSE2Nate Begeman2009-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate better code for v16i8 shuffles on SSE2 (avoids stack) Generate pshufb for v8i16 and v16i8 shuffles on SSSE3 where it is fewer uops. Document the shuffle matching logic and add some FIXMEs for later further cleanups. New tests that test the above. Examples: New: _shuf2: pextrw $7, %xmm0, %eax punpcklqdq %xmm1, %xmm0 pshuflw $128, %xmm0, %xmm0 pinsrw $2, %eax, %xmm0 Old: _shuf2: pextrw $2, %xmm0, %eax pextrw $7, %xmm0, %ecx pinsrw $2, %ecx, %xmm0 pinsrw $3, %eax, %xmm0 movd %xmm1, %eax pinsrw $4, %eax, %xmm0 ret ========= New: _shuf4: punpcklqdq %xmm1, %xmm0 pshufb LCPI1_0, %xmm0 Old: _shuf4: pextrw $3, %xmm0, %eax movsd %xmm1, %xmm0 pextrw $3, %xmm1, %ecx pinsrw $4, %ecx, %xmm0 pinsrw $5, %eax, %xmm0 ======== New: _shuf1: pushl %ebx pushl %edi pushl %esi pextrw $1, %xmm0, %eax rolw $8, %ax movd %xmm0, %ecx rolw $8, %cx pextrw $5, %xmm0, %edx pextrw $4, %xmm0, %esi pextrw $3, %xmm0, %edi pextrw $2, %xmm0, %ebx movaps %xmm0, %xmm1 pinsrw $0, %ecx, %xmm1 pinsrw $1, %eax, %xmm1 rolw $8, %bx pinsrw $2, %ebx, %xmm1 rolw $8, %di pinsrw $3, %edi, %xmm1 rolw $8, %si pinsrw $4, %esi, %xmm1 rolw $8, %dx pinsrw $5, %edx, %xmm1 pextrw $7, %xmm0, %eax rolw $8, %ax movaps %xmm1, %xmm0 pinsrw $7, %eax, %xmm0 popl %esi popl %edi popl %ebx ret Old: _shuf1: subl $252, %esp movaps %xmm0, (%esp) movaps %xmm0, 16(%esp) movaps %xmm0, 32(%esp) movaps %xmm0, 48(%esp) movaps %xmm0, 64(%esp) movaps %xmm0, 80(%esp) movaps %xmm0, 96(%esp) movaps %xmm0, 224(%esp) movaps %xmm0, 208(%esp) movaps %xmm0, 192(%esp) movaps %xmm0, 176(%esp) movaps %xmm0, 160(%esp) movaps %xmm0, 144(%esp) movaps %xmm0, 128(%esp) movaps %xmm0, 112(%esp) movzbl 14(%esp), %eax movd %eax, %xmm1 movzbl 22(%esp), %eax movd %eax, %xmm2 punpcklbw %xmm1, %xmm2 movzbl 42(%esp), %eax movd %eax, %xmm1 movzbl 50(%esp), %eax movd %eax, %xmm3 punpcklbw %xmm1, %xmm3 punpcklbw %xmm2, %xmm3 movzbl 77(%esp), %eax movd %eax, %xmm1 movzbl 84(%esp), %eax movd %eax, %xmm2 punpcklbw %xmm1, %xmm2 movzbl 104(%esp), %eax movd %eax, %xmm1 punpcklbw %xmm1, %xmm0 punpcklbw %xmm2, %xmm0 movaps %xmm0, %xmm1 punpcklbw %xmm3, %xmm1 movzbl 127(%esp), %eax movd %eax, %xmm0 movzbl 135(%esp), %eax movd %eax, %xmm2 punpcklbw %xmm0, %xmm2 movzbl 155(%esp), %eax movd %eax, %xmm0 movzbl 163(%esp), %eax movd %eax, %xmm3 punpcklbw %xmm0, %xmm3 punpcklbw %xmm2, %xmm3 movzbl 188(%esp), %eax movd %eax, %xmm0 movzbl 197(%esp), %eax movd %eax, %xmm2 punpcklbw %xmm0, %xmm2 movzbl 217(%esp), %eax movd %eax, %xmm4 movzbl 225(%esp), %eax movd %eax, %xmm0 punpcklbw %xmm4, %xmm0 punpcklbw %xmm2, %xmm0 punpcklbw %xmm3, %xmm0 punpcklbw %xmm1, %xmm0 addl $252, %esp ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65311 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed option name from inline-threshold to basic-inline-threshold becauseMon P Wang2009-02-23
| | | | | | | inline-threshold option is used by the inliner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65309 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some typos that Duncan noticedChris Lattner2009-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65306 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate debug loc info through prologue/epilogue.Bill Wendling2009-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65298 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce the BuildVectorSDNode class that encapsulates the ISD::BUILD_VECTORScott Michel2009-02-22
| | | | | | | | | | instruction. The class also consolidates the code for detecting constant splats that's shared across PowerPC and the CellSPU backends (and might be useful for other backends.) Also introduces SelectionDAG::getBUID_VECTOR() for generating new BUILD_VECTOR nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65296 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the part of 64623 that attempted to align the source in aDan Gohman2009-02-22
| | | | | | | | | | | | | | | | memcpy to match the alignment of the destination. It isn't necessary for making loads and stores handled like the SSE loadu/storeu intrinsics, and it was causing a performance regression in MultiSource/Applications/JM/lencod. The problem appears to have been a memcpy that copies from some highly aligned array into an alloca; the alloca was then being assigned a large alignment, which required codegen to perform dynamic stack-pointer re-alignment, which forced the enclosing function to have a frame pointer, which led to increased spilling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65289 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly parenthesize this expression, fixing a real bug in the newDan Gohman2009-02-22
| | | | | | | -full-lsr code, as well as a GCC warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65288 91177308-0d34-0410-b5e6-96231b3b80d8
* If a use operand is marked isKill, don't forget to add kill to its live ↵Evan Cheng2009-02-22
| | | | | | interval as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65279 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a note.Evan Cheng2009-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65275 91177308-0d34-0410-b5e6-96231b3b80d8
* Be bug compatible with gcc by returning MMX values in RAX.Evan Cheng2009-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65274 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not consider MMX_MOVD64rr a move instructions. The source register is in ↵Evan Cheng2009-02-22
| | | | | | GR32, the destination is VR64. They are not compatible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65273 91177308-0d34-0410-b5e6-96231b3b80d8
* Only try to sink immediate when TLI is not null. It needs to check if ↵Evan Cheng2009-02-22
| | | | | | immediate would fit in target addressing field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65268 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't sign extend the char when expanding char -> int duringNick Lewycky2009-02-21
| | | | | | | load(bitcast(char[4] to i32*)) evaluation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65246 91177308-0d34-0410-b5e6-96231b3b80d8
* bug 3610: Floating point vaarg not softened.Richard Pennington2009-02-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65239 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop bunch of half-working stuff in the ext_weak linkage support.Anton Korobeynikov2009-02-21
| | | | | | | | | | | Now we're using one gross, but quite robust hack :) (previous ones did not work, for example, when ext_weak symbol was used deep inside constant expression in the initializer). The proper fix of this problem will require some quite huge asmprinter changes and that's why was postponed. This fixes PR3629 by the way :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65230 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AddrModeMatcher.cppEvan Cheng2009-02-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65228 91177308-0d34-0410-b5e6-96231b3b80d8
* If two-address def is dead and the instruction does not define other ↵Evan Cheng2009-02-21
| | | | | | registers, and it doesn't produce side effects, just delete the instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65218 91177308-0d34-0410-b5e6-96231b3b80d8