summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Rearrange code a bitChris Lattner2004-02-241-30/+27
| | | | llvm-svn: 11793
* Implement: test/Regression/Transforms/SimplifyCFG/switch_create.llChris Lattner2004-02-241-7/+140
| | | | | | | | | | This turns code like this: if (X == 4 | X == 7) and if (X != 4 & X != 7) into switch instructions. llvm-svn: 11792
* Generate much more efficient code in programs like pifftChris Lattner2004-02-231-0/+8
| | | | llvm-svn: 11775
* Fix a small typeo in my checkin last night that broke vortex and other ↵Chris Lattner2004-02-231-1/+1
| | | | | | programs :( llvm-svn: 11774
* Fix InstCombine/2004-02-23-ShiftShiftOverflow.llChris Lattner2004-02-231-3/+10
| | | | | | Also, turn 'shr int %X, 1234' into 'shr int %X, 31' llvm-svn: 11768
* Implement cast.ll::test14/15Chris Lattner2004-02-231-0/+37
| | | | llvm-svn: 11742
* Refactor some code. In the mul - setcc folding case, we really care aboutChris Lattner2004-02-231-32/+63
| | | | | | whether this is the sign bit or not, so check unsigned comparisons as well. llvm-svn: 11740
* Implement mul.ll:test11Chris Lattner2004-02-231-6/+7
| | | | llvm-svn: 11737
* Implement "strength reduction" of X <= C and X >= CChris Lattner2004-02-231-0/+9
| | | | llvm-svn: 11735
* Implement InstCombine/mul.ll:test10, which is a case that occurs when dealingChris Lattner2004-02-231-0/+40
| | | | | | with "predication" llvm-svn: 11734
* Implement Transforms/InstCombine/cast.ll:test13, a case which occurs in aChris Lattner2004-02-222-4/+35
| | | | | | hot 164.gzip loop. llvm-svn: 11702
* Fix PR245: Linking weak and strong global variables is dependent on link orderChris Lattner2004-02-171-1/+3
| | | | llvm-svn: 11565
* Implement test/Regression/Transforms/SimplifyCFG/UncondBranchToReturn.ll,Chris Lattner2004-02-161-0/+48
| | | | | | see the testcase for the reasoning. llvm-svn: 11496
* Fold PHI nodes of constants which are only used by a single cast. This ↵Chris Lattner2004-02-161-0/+29
| | | | | | | | implements phi.ll:test4 llvm-svn: 11494
* Teach LLVM to unravel the "swap idiom". This implements:Chris Lattner2004-02-161-2/+13
| | | | | | Regression/Transforms/InstCombine/xor.ll:test20 llvm-svn: 11492
* Implement Transforms/InstCombine/xor.ll:test19Chris Lattner2004-02-161-2/+13
| | | | llvm-svn: 11490
* Instead of producing calls to setjmp/longjmp, produce uses of theChris Lattner2004-02-151-2/+2
| | | | | | llvm.setjmp/llvm.longjmp intrinsics. llvm-svn: 11482
* Adjustments to support the new ConstantAggregateZero classChris Lattner2004-02-154-13/+30
| | | | llvm-svn: 11474
* Remove dependence on return type of ConstantStruct::getChris Lattner2004-02-151-1/+1
| | | | llvm-svn: 11466
* Remove dependence on the return type of ConstantArray::getChris Lattner2004-02-151-1/+1
| | | | llvm-svn: 11463
* Fix compilation of 126.gcc: intrinsic functions cannot throw, so they are notChris Lattner2004-02-131-28/+33
| | | | | | | allowed in invoke instructions. Thus, if we are inlining a call to an intrinsic function into an invoke site, we don't need to turn the call into an invoke! llvm-svn: 11384
* Intrinsic functions cannot throwChris Lattner2004-02-131-1/+1
| | | | llvm-svn: 11383
* Expose a pass ID that can be 'required'Chris Lattner2004-02-131-0/+2
| | | | llvm-svn: 11376
* Remove obsolete comment. Unreachable blocks will automatically be left at theChris Lattner2004-02-111-2/+0
| | | | | | end of the function. llvm-svn: 11313
* Add an _embarassingly simple_ implementation of basic block layout. This isChris Lattner2004-02-111-0/+141
| | | | | | | | more of a testcase for profiling information than anything that should reasonably be used, but it's a starting point. When I have more time I will whip this into better shape. llvm-svn: 11311
* Implement SimplifyCFG/PhiEliminate.llChris Lattner2004-02-111-5/+234
| | | | | | | Having a proper 'select' instruction would allow the elimination of a lot of the special case cruft in this patch, but we don't have one yet. llvm-svn: 11307
* The hasConstantReferences predicate always returns false.Chris Lattner2004-02-111-52/+49
| | | | llvm-svn: 11301
* initialization calls now return argc. If the program uses the argc valueChris Lattner2004-02-101-17/+24
| | | | | | | passed into main, make sure they use the return value of the init call instead of the one passed in. llvm-svn: 11262
* Only add the global variable with the abort message if an unwind actuallyChris Lattner2004-02-091-14/+26
| | | | | | occurs in the program. llvm-svn: 11249
* Don't depend on auto data conversionChris Lattner2004-02-091-1/+1
| | | | llvm-svn: 11229
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-094-11/+9
| | | | | | getElementTypes() is gone. llvm-svn: 11228
* Start using the new and improve interface to FunctionType argumentsChris Lattner2004-02-093-21/+18
| | | | llvm-svn: 11224
* The ConstantExpr::getCast call can cause a CPR to be generated. If so,Chris Lattner2004-02-091-0/+4
| | | | | | strip it off. llvm-svn: 11213
* Fix grammar-o.Misha Brukman2004-02-081-1/+1
| | | | llvm-svn: 11210
* Improve compatibility with programs that already have a prototype for 'write',Chris Lattner2004-02-081-12/+43
| | | | | | even if it is wierd in some way. llvm-svn: 11207
* rename the "exceptional" destination of an invoke instruction to the ↵Chris Lattner2004-02-087-10/+10
| | | | | | 'unwind' dest llvm-svn: 11202
* Fix PR225: [pruneeh] -pruneeh pass removes invoke instructions it shouldn'tChris Lattner2004-02-081-10/+32
| | | | llvm-svn: 11200
* splitBasicBlock "does the right thing" now, no reason to reposition it.Chris Lattner2004-02-081-3/+0
| | | | llvm-svn: 11199
* Implement proper invoke/unwind lowering.Chris Lattner2004-02-081-21/+262
| | | | | | This fixed PR16 "[lowerinvoke] The -lowerinvoke pass does not insert calls to setjmp/longjmp" llvm-svn: 11195
* Add a call to 'write' right before the call to abort() in the unwind path.Chris Lattner2004-02-081-3/+27
| | | | | | | This causes the JIT, or LLC'd program to print out a nice message, explaining WHY the program aborted. llvm-svn: 11184
* Fix another dominator update bug. These bugs keep getting exposed because GCSEChris Lattner2004-02-051-1/+1
| | | | | | keeps finding more code motion opportunities now that the dominators are correct! llvm-svn: 11142
* Fix bug updating dominatorsChris Lattner2004-02-051-2/+2
| | | | llvm-svn: 11140
* Add debug outputChris Lattner2004-02-051-0/+4
| | | | llvm-svn: 11139
* Fix PR223: Loopsimplify incorrectly updates dominator informationChris Lattner2004-02-051-33/+105
| | | | | | | | The problem is that the dominator update code didn't "realize" that it's possible for the newly inserted basic block to dominate anything. Because it IS possible, stuff was getting updated wrong. llvm-svn: 11137
* Minor speedup, don't query ValueMap each time through the loopChris Lattner2004-02-041-6/+3
| | | | llvm-svn: 11123
* Two changes:Chris Lattner2004-02-041-5/+12
| | | | | | | | | | | | | 1. Don't scan to the end of alloca instructions in the caller function to insert inlined allocas, just insert at the top. This saves a lot of time inlining into functions with a lot of allocas. 2. Use splice to move the alloca instructions over, instead of remove/insert. This allows us to transfer a block at a time, and eliminates a bunch of silly symbol table manipulations. This speeds up the inliner on the testcase in PR209 from 1.73s -> 1.04s (67%) llvm-svn: 11118
* Optimize the case where we are inlining a function that contains only one ↵Chris Lattner2004-02-041-37/+67
| | | | | | | | | | | basic block, and that basic block ends with a return instruction. In this case, we can just splice the cloned "body" of the function directly into the source basic block, avoiding a lot of rearrangement and splitBasicBlock's linear scan over the split block. This speeds up the inliner on the testcase in PR209 from 2.3s to 1.7s, a 35% reduction. llvm-svn: 11116
* Adjust to the new BasicBlock ctor, which requires a function parameterChris Lattner2004-02-042-2/+2
| | | | llvm-svn: 11114
* Remove unneeded code now that splitBasicBlock does the "right thing"Chris Lattner2004-02-041-5/+0
| | | | llvm-svn: 11111
* More refactoring. Move alloca instructions and handle invoke instructionsChris Lattner2004-02-041-129/+132
| | | | | | | before we delete the original call site, allowing slight simplifications of code, but nothing exciting. llvm-svn: 11109
OpenPOWER on IntegriCloud