aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* We should be returning true here since we've changed the function.Owen Anderson2008-04-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50442 91177308-0d34-0410-b5e6-96231b3b80d8
* A lot of cleanups and documentation improvements, as well as a few corner ↵Owen Anderson2008-04-291-59/+76
| | | | | | | | | case fixes. Most of this was suggested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50441 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename DeadLoopElimination to LoopDeletion, part 2.Owen Anderson2008-04-291-14/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50437 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename DeadLoopElimination to LoopDeletion, part one.Owen Anderson2008-04-291-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50436 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't do stupid things: doInitialization(Module&) is not applicable to ↵Anton Korobeynikov2008-04-291-17/+2
| | | | | | ModulePass :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50433 91177308-0d34-0410-b5e6-96231b3b80d8
* don't eliminate load from volatile value on paths where the load is dead.Chris Lattner2008-04-291-0/+9
| | | | | | | This fixes the second half of PR2262 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50430 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a subtle volatile handling bug.Chris Lattner2008-04-291-7/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50428 91177308-0d34-0410-b5e6-96231b3b80d8
* Use std::set instead of std::priority_queue for the RegReductionPriorityQueue. Roman Levenstein2008-04-291-44/+29
| | | | | | | | | | | | | | | | This removes the existing bottleneck related to the removal of elements from the middle of the queue. Also fixes a subtle bug in ScheduleDAGRRList::CapturePred: It was updating the state of the SUnit before removing it. As a result, the comparison operators were working incorrectly and this SUnit could not be removed from the queue properly. Reviewed by Evan and Dan. Approved by Dan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50412 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement more aggressive support for analyzing string length. ThisChris Lattner2008-04-291-10/+136
| | | | | | | | | | | | generalizes the previous code to handle the case when the string is not an immediate to the strlen call (for example, crazy stuff like strlen(c ? "foo" : "bart"+1) -> 3). This implements gcc.c-torture/execute/builtins/strlen-2.c. I will generalize other cases in simplifylibcalls to use the same routine later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50408 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify what we mean by a dead loop.Owen Anderson2008-04-291-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50406 91177308-0d34-0410-b5e6-96231b3b80d8
* don't delete the last store to an alloca if the store is volatile.Chris Lattner2008-04-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50390 91177308-0d34-0410-b5e6-96231b3b80d8
* make the vector conversion magic handle multiple results.Chris Lattner2008-04-291-7/+16
| | | | | | | | | | | | | | | | | | | | | | We now compile test2/test3 to: _test2: ## InlineAsm Start set %xmm0, %xmm1 ## InlineAsm End addps %xmm1, %xmm0 ret _test3: ## InlineAsm Start set %xmm0, %xmm1 ## InlineAsm End paddd %xmm1, %xmm0 ret as expected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50389 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for multiple return values in inline asm. This is a step Chris Lattner2008-04-291-12/+19
| | | | | | | | | | | | | | | | | | | towards PR2094. It now compiles the attached .ll file to: _sad16_sse2: movslq %ecx, %rax ## InlineAsm Start %ecx %rdx %rax %rax %r8d %rdx %rsi ## InlineAsm End ## InlineAsm Start set %eax ## InlineAsm End ret which is pretty decent for a 3 output, 4 input asm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50386 91177308-0d34-0410-b5e6-96231b3b80d8
* Another extract_subreg coalescing bug.Evan Cheng2008-04-291-1/+3
| | | | | | | | | e.g. vr1024<2> extract_subreg vr1025, 2 If vr1024 do not have the same register class as vr1025, it's not safe to coalesce this away. For example, vr1024 might be a GPR32 while vr1025 might be a GPR64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50385 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more comments.Owen Anderson2008-04-291-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50384 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove debugging code.Owen Anderson2008-04-291-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50383 91177308-0d34-0410-b5e6-96231b3b80d8
* Add dead loop elimination, which removes dead loops for which we can computeOwen Anderson2008-04-291-0/+239
| | | | | | | the trip count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50382 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in RegsForValue::getCopyToRegs() that causes cyclical scheduling ↵Evan Cheng2008-04-281-2/+12
| | | | | | | | | | | | | | | units. If it's creating multiple CopyToReg nodes that are "flagged" together, it should not create a TokenFactor for it's chain outputs: c1, f1 = CopyToReg c2, f2 = CopyToReg c3 = TokenFactor c1, c2 ... = user c3, ..., f2 Now that the two CopyToReg's and the user are "flagged" together. They effectively forms a single scheduling unit. The TokenFactor is now both an operand and a successor of the Flagged nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50376 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a pointer-arithmetic bug that caused 64-bit host pointer values toDan Gohman2008-04-281-1/+1
| | | | | | | | be truncated to 32 bits. This fixes the recent Benchmarks/McCat/09-vor regression on x86-64, among other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50372 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix DSE to not eliminate volatile loads with no uses.Dan Gohman2008-04-281-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50370 91177308-0d34-0410-b5e6-96231b3b80d8
* Evan pointed out that folding sext to zext may not be correctDan Gohman2008-04-281-1/+2
| | | | | | | if the zext is not legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50368 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete an unused constructor.Dan Gohman2008-04-281-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50367 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment to CreateRegForValue that clarifies the handling ofDan Gohman2008-04-281-0/+4
| | | | | | | aggregate types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50366 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the comments for RegsForValue and its members, andDan Gohman2008-04-281-20/+30
| | | | | | | reorder some of the members for clarity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50365 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fix in BumpPtrAllocator: don't assume that all objects have the same ↵Ted Kremenek2008-04-281-6/+9
| | | | | | alignment. "Bump" of the pointer for the next allocated object to be of the specified alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50362 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't call size() on each iteration of the loop.Dan Gohman2008-04-281-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50361 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose parameter attributes via C bindings.Gordon Henriksen2008-04-282-0/+47
| | | | | | Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50360 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the SVOffset values for loads and stores produced byDan Gohman2008-04-285-34/+38
| | | | | | | | memcpy/memset expansion. It was a bug for the SVOffset value to be used in the actual address calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50359 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach InstCombine's ComputeMaskedBits what SelectionDAG'sDan Gohman2008-04-282-78/+224
| | | | | | | | | | | | ComputeMaskedBits knows about cttz, ctlz, and ctpop. Teach SelectionDAG's ComputeMaskedBits what InstCombine's knows about SRem. And teach them both some things about high bits in Mul, UDiv, URem, and Sub. This allows instcombine and dagcombine to eliminate sign-extension operations in several new cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50358 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DAGCombine to convert (sext x) to (zext x) when theDan Gohman2008-04-281-0/+4
| | | | | | | sign-bit of x is known to be zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50357 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for response files to the CommandLine library.Mikhail Glushenkov2008-04-281-23/+79
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50355 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix FP return for Win64 ABIAnton Korobeynikov2008-04-281-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50342 91177308-0d34-0410-b5e6-96231b3b80d8
* Another collection of random cleanups. No functionality change.Chris Lattner2008-04-281-64/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50341 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the SmallVector ctor that converts from a SmallVectorImpl. ThisChris Lattner2008-04-281-48/+53
| | | | | | | | | | | conversion open the door for many nasty implicit conversion issues, and can be easily solved by initializing with (V.begin(), V.end()) when needed. This patch includes many small cleanups for sdisel also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50340 91177308-0d34-0410-b5e6-96231b3b80d8
* switch RegsForValue::Regs to be a SmallVector to avoidChris Lattner2008-04-281-4/+4
| | | | | | | heap thrash on tiny (usually single-element) vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50335 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR2256, yet another miscompilation in simplifycfg of iChris Lattner2008-04-281-3/+4
| | | | | | | | | multiple return values. Bill, please pull this into Tak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50332 91177308-0d34-0410-b5e6-96231b3b80d8
* move static function out of anon namespace, no functionality change.Chris Lattner2008-04-271-25/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50330 91177308-0d34-0410-b5e6-96231b3b80d8
* Another step to getting multiple result inline asm to work.Chris Lattner2008-04-271-6/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50329 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow asms to return multiple results by value.Chris Lattner2008-04-271-4/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50328 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly lower vararg's FORMAL_ARGUMENTS node on win64Anton Korobeynikov2008-04-271-14/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50325 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle fp80 for win64Anton Korobeynikov2008-04-271-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50324 91177308-0d34-0410-b5e6-96231b3b80d8
* typoChris Lattner2008-04-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50316 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a signficant optimization for inline asm:Chris Lattner2008-04-273-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When choosing between constraints with multiple options, like "ir", test to see if we can use the 'i' constraint and go with that if possible. This produces more optimal ASM in all cases (sparing a register and an instruction to load it), and fixes inline asm like this: void test () { asm volatile (" %c0 %1 " : : "imr" (42), "imr"(14)); } Previously we would dump "42" into a memory location (which is ok for the 'm' constraint) which would cause a problem because the 'c' modifier is not valid on memory operands. Isn't it great how inline asm turns 'missed optimization' into 'compile failed'?? Incidentally, this was the todo in PowerPC/2007-04-24-InlineAsm-I-Modifier.ll Please do NOT pull this into Tak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50315 91177308-0d34-0410-b5e6-96231b3b80d8
* isa+cast -> dyn_castChris Lattner2008-04-271-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50314 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a bunch of inline asm code out of line.Chris Lattner2008-04-273-2/+99
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50313 91177308-0d34-0410-b5e6-96231b3b80d8
* A few inline asm cleanups:Chris Lattner2008-04-265-23/+21
| | | | | | | | | | - Make targetlowering.h fit in 80 cols. - Make LowerAsmOperandForConstraint const. - Make lowerXConstraint -> LowerXConstraint - Make LowerXConstraint return a const char* instead of taking a string byref. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50312 91177308-0d34-0410-b5e6-96231b3b80d8
* no need to implement this method and just have it callChris Lattner2008-04-262-14/+0
| | | | | | | the default impl. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50311 91177308-0d34-0410-b5e6-96231b3b80d8
* When SRoA'ing a global variable, make sure the new globals get the Chris Lattner2008-04-261-5/+32
| | | | | | | | | | appropriate alignment. This fixes a miscompilation of 252.eon on x86-64 (rdar://5891920). Bill, please pull this into Tak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50308 91177308-0d34-0410-b5e6-96231b3b80d8
* change comments per reviewDale Johannesen2008-04-251-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50300 91177308-0d34-0410-b5e6-96231b3b80d8
* Extract the lower 64-bit if a MMX value is passed in a XMM register.Evan Cheng2008-04-251-3/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50292 91177308-0d34-0410-b5e6-96231b3b80d8