summaryrefslogtreecommitdiffstats
path: root/llvm
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-014-2219/+1443
| | | | | | | | 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 typoChris Lattner2008-05-011-1/+1
| | | | llvm-svn: 50519
* instcombine does memset optzns.Chris Lattner2008-05-011-18/+0
| | | | llvm-svn: 50518
* simplifylibcalls doesn't optimize llvm.memmove, instcombine does.Chris Lattner2008-05-011-22/+0
| | | | llvm-svn: 50517
* move some tests from libcall optimizer suite.Chris Lattner2008-05-011-0/+17
| | | | llvm-svn: 50516
* Add CreateCall3/CreateCall4 at Eric's request.Chris Lattner2008-05-011-0/+10
| | | | llvm-svn: 50515
* Add a spiffy little "CreateCall2" method, which can be used to makeChris Lattner2008-05-011-3/+8
| | | | | | a function call that takes two Value*'s as arguments. llvm-svn: 50514
* fix a bug in my previous patch, a classic =/== bug.Chris Lattner2008-04-301-1/+1
| | | | llvm-svn: 50483
* Really commit the test checking the argument lowering behaviour on x86-64 :).Arnold Schwaighofer2008-04-301-0/+21
| | | | llvm-svn: 50478
* Tail call optimization improvements:Arnold Schwaighofer2008-04-3016-294/+985
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move this test to LoopDeletion, where it now passes.Owen Anderson2008-04-302-2/+4
| | | | llvm-svn: 50474
* 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-302-7/+64
| | | | | | to instcombine. llvm-svn: 50472
* no reason for simplifylibcalls to simplify intrinsics, instcombine doesChris Lattner2008-04-301-3/+1
| | | | | | a fine job. llvm-svn: 50470
* remove redundant check.Chris Lattner2008-04-301-3/+1
| | | | llvm-svn: 50469
* add missing #includeChris Lattner2008-04-301-0/+2
| | | | llvm-svn: 50468
* add a method for comparing to see if a value has a specified name.Chris Lattner2008-04-302-0/+11
| | | | 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
* Minor spelling and typo fixes.John Criswell2008-04-291-4/+4
| | | | llvm-svn: 50448
* 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-292-4/+23
| | | | | | | | | 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-293-17/+15
| | | | 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-292-0/+34
| | | | | | This fixes the second half of PR2262 llvm-svn: 50430
* make this test reduced and *valid*Chris Lattner2008-04-291-15/+6
| | | | llvm-svn: 50429
* fix a subtle volatile handling bug.Chris Lattner2008-04-292-7/+42
| | | | llvm-svn: 50428
* Use std::set instead of std::priority_queue for the RegReductionPriorityQueue. Roman Levenstein2008-04-292-45/+31
| | | | | | | | | | | | | | 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
* new testcase for PR2094. The inline asms should not pin allocas to theChris Lattner2008-04-291-0/+12
| | | | | | stack anymore. llvm-svn: 50397
* don't delete the last store to an alloca if the store is volatile.Chris Lattner2008-04-292-1/+9
| | | | llvm-svn: 50390
* make the vector conversion magic handle multiple results.Chris Lattner2008-04-292-9/+36
| | | | | | | | | | | | | | | | | | | | | 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-292-12/+36
| | | | | | | | | | | | | | | | | | 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-292-1/+169
| | | | | | | | 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-293-0/+247
| | | | | | the trip count. llvm-svn: 50382
* Add -march=x86.Evan Cheng2008-04-281-1/+1
| | | | llvm-svn: 50380
* Update and_ops.ll according to the recent dagcombiner changes.Dan Gohman2008-04-282-2/+28
| | | | | | | | Add a new test, and_ops_more.ll, which is XFAIL'd, to record the parts of and_ops.ll that were affected by this change. llvm-svn: 50379
* Test case.Evan Cheng2008-04-281-0/+6
| | | | llvm-svn: 50377
* 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
OpenPOWER on IntegriCloud