summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 1) add '-debug' outputChris Lattner2008-05-011-11/+19
| | | | | | | 2) Return NULL instead of false in several places for tidiness. 3) fix a bug optimizing sprintf(p, "%c", x) llvm-svn: 50521
* Delete the IPO simplify-libcalls and completely reimplement it asChris Lattner2008-05-012-2214/+1437
| | | | | | | | a FunctionPass. This makes it simpler, fixes dozens of bugs, adds a couple of minor features, and shrinks is considerably: from 2214 to 1437 lines. llvm-svn: 50520
* fix a bug in my previous patch, a classic =/== bug.Chris Lattner2008-04-301-1/+1
| | | | llvm-svn: 50483
* Tail call optimization improvements:Arnold Schwaighofer2008-04-3012-294/+919
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move platform independent code (lowering of possibly overwritten arguments, check for tail call optimization eligibility) from target X86ISelectionLowering.cpp to TargetLowering.h and SelectionDAGISel.cpp. Initial PowerPC tail call implementation: Support ppc32 implemented and tested (passes my tests and test-suite llvm-test). Support ppc64 implemented and half tested (passes my tests). On ppc tail call optimization is performed if caller and callee are fastcc call is a tail call (in tail call position, call followed by ret) no variable argument lists or byval arguments option -tailcallopt is enabled Supported: * non pic tail calls on linux/darwin * module-local tail calls on linux(PIC/GOT)/darwin(PIC) * inter-module tail calls on darwin(PIC) If constraints are not met a normal call will be emitted. A test checking the argument lowering behaviour on x86-64 was added. llvm-svn: 50477
* fcntl.h is pretty standard on unix (without the sys/)Gabor Greif2008-04-301-2/+1
| | | | llvm-svn: 50475
* This condition got inverted accidentally.Owen Anderson2008-04-301-1/+1
| | | | llvm-svn: 50473
* move lowering of llvm.memset -> store from simplify libcalls Chris Lattner2008-04-301-7/+49
| | | | | | to instcombine. llvm-svn: 50472
* add a method for comparing to see if a value has a specified name.Chris Lattner2008-04-301-0/+7
| | | | llvm-svn: 50465
* use string length computation to generalize several xforms.Chris Lattner2008-04-301-36/+39
| | | | llvm-svn: 50464
* Add comments for previous patch as requested.Dale Johannesen2008-04-301-0/+6
| | | | llvm-svn: 50463
* Bug fixes and updates for CellSPU, syncing up with trunk. Most notableScott Michel2008-04-307-53/+133
| | | | | | | | fixes are target-specific lowering of frame indices, fix constants generated for the FSMBI instruction, and fixing SPUTargetLowering::computeMaskedBitsFor- TargetNode(). llvm-svn: 50462
* Fix custom target lowering for zero/any/sign_extend: make sure thatScott Michel2008-04-301-5/+3
| | | | | | | DAG.UpdateNodeOperands() is called before (not after) the call to TLI.LowerOperation(). llvm-svn: 50461
* Make eh_frame objects by 8-byte aligned on 64-bitDale Johannesen2008-04-291-2/+4
| | | | | | targets. llvm-svn: 50451
* Revert r50441. The original code was correct. Add some more comments so ↵Owen Anderson2008-04-291-3/+9
| | | | | | that I don't make the same mistake in the future. llvm-svn: 50446
* Fix a bug in memcpyopt where the memcpy-memcpy transform was never being ↵Owen Anderson2008-04-291-4/+6
| | | | | | | | | applied because we were checking for it in the wrong order. This caused a miscompilation because the return slot optimization assumes that the call it is dealing with is NOT a memcpy. llvm-svn: 50444
* We should be returning true here since we've changed the function.Owen Anderson2008-04-291-1/+1
| | | | llvm-svn: 50442
* 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. llvm-svn: 50441
* Rename DeadLoopElimination to LoopDeletion, part 2.Owen Anderson2008-04-291-14/+12
| | | | llvm-svn: 50437
* Rename DeadLoopElimination to LoopDeletion, part one.Owen Anderson2008-04-291-0/+0
| | | | llvm-svn: 50436
* Don't do stupid things: doInitialization(Module&) is not applicable to ↵Anton Korobeynikov2008-04-291-17/+2
| | | | | | ModulePass :) llvm-svn: 50433
* 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 llvm-svn: 50430
* fix a subtle volatile handling bug.Chris Lattner2008-04-291-7/+12
| | | | llvm-svn: 50428
* 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. llvm-svn: 50412
* 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. llvm-svn: 50408
* Clarify what we mean by a dead loop.Owen Anderson2008-04-291-0/+4
| | | | llvm-svn: 50406
* don't delete the last store to an alloca if the store is volatile.Chris Lattner2008-04-291-1/+1
| | | | llvm-svn: 50390
* 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. llvm-svn: 50389
* 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. llvm-svn: 50386
* 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. llvm-svn: 50385
* Add some more comments.Owen Anderson2008-04-291-0/+21
| | | | llvm-svn: 50384
* Remove debugging code.Owen Anderson2008-04-291-4/+0
| | | | llvm-svn: 50383
* Add dead loop elimination, which removes dead loops for which we can computeOwen Anderson2008-04-291-0/+239
| | | | | | the trip count. llvm-svn: 50382
* 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. llvm-svn: 50376
* 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. llvm-svn: 50372
* Fix DSE to not eliminate volatile loads with no uses.Dan Gohman2008-04-281-3/+3
| | | | llvm-svn: 50370
* Evan pointed out that folding sext to zext may not be correctDan Gohman2008-04-281-1/+2
| | | | | | if the zext is not legal. llvm-svn: 50368
* Delete an unused constructor.Dan Gohman2008-04-281-3/+0
| | | | llvm-svn: 50367
* Add a comment to CreateRegForValue that clarifies the handling ofDan Gohman2008-04-281-0/+4
| | | | | | aggregate types. llvm-svn: 50366
* Rewrite the comments for RegsForValue and its members, andDan Gohman2008-04-281-20/+30
| | | | | | reorder some of the members for clarity. llvm-svn: 50365
* 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. llvm-svn: 50362
* Don't call size() on each iteration of the loop.Dan Gohman2008-04-281-2/+2
| | | | llvm-svn: 50361
* Expose parameter attributes via C bindings.Gordon Henriksen2008-04-282-0/+47
| | | | | | Patch by Anders Johnsen! llvm-svn: 50360
* 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. llvm-svn: 50359
* 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. llvm-svn: 50358
* 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. llvm-svn: 50357
* Add support for response files to the CommandLine library.Mikhail Glushenkov2008-04-281-23/+79
| | | | llvm-svn: 50355
* Fix FP return for Win64 ABIAnton Korobeynikov2008-04-281-0/+4
| | | | llvm-svn: 50342
* Another collection of random cleanups. No functionality change.Chris Lattner2008-04-281-64/+61
| | | | llvm-svn: 50341
* 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. llvm-svn: 50340
* switch RegsForValue::Regs to be a SmallVector to avoidChris Lattner2008-04-281-4/+4
| | | | | | heap thrash on tiny (usually single-element) vectors. llvm-svn: 50335
OpenPOWER on IntegriCloud