summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Eliminate cases where we could << by 64, which is undefined in C.Chris Lattner2005-04-241-9/+5
| | | | llvm-svn: 21500
* Implement xor.ll:test21: select (not C), A, B -> select C, B, AChris Lattner2005-04-241-2/+10
| | | | llvm-svn: 21495
* Use getPrimitiveSizeInBits() instead of getPrimitiveSize()*8Chris Lattner2005-04-241-170/+160
| | | | | | | | | | | Completely rework the 'setcc (cast x to larger), y' code. This code has the advantage of implementing setcc.ll:test19 (being more general than the previous code) and being correct in all cases. This allows us to unxfail 2004-11-27-SetCCForCastLargerAndConstant.ll, and close PR454. llvm-svn: 21491
* Eliminate tabs and trailing spacesJeff Cohen2005-04-2315-237/+237
| | | | llvm-svn: 21480
* Generalize the setcc -> PHI and Select folding optimizations to work withChris Lattner2005-04-231-30/+37
| | | | | | | any constant RHS, not just a constant integer RHS. This implements select.ll:test17 llvm-svn: 21470
* Remove trailing whitespaceMisha Brukman2005-04-2182-1225/+1225
| | | | llvm-svn: 21427
* Fix a bug where we would not promote calls to invokes if they occured inChris Lattner2005-04-211-3/+5
| | | | | | the same block as the setjmp. Thanks to Greg Pettyjohn for noticing this! llvm-svn: 21403
* Improve doxygen documentation, patch contributed by Evan Jones!Chris Lattner2005-04-211-17/+17
| | | | llvm-svn: 21393
* Instcombine this:Chris Lattner2005-04-211-0/+3
| | | | | | | | | | | | | | | | | %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] into this: %shortcirc_val = or bool %tmp.1, %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] not this: %tmp.4.cast = cast bool %tmp.4 to int ; <int> [#uses=1] %tmp.6 = select bool %tmp.1, int 1, int %tmp.4.cast ; <int> [#uses=1] llvm-svn: 21389
* Teach simplifycfg that setcc is cheap and non-trapping, so that it canChris Lattner2005-04-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | convert this: %tmp.1 = seteq int %i, 0 ; <bool> [#uses=1] br bool %tmp.1, label %shortcirc_done, label %shortcirc_next shortcirc_next: ; preds = %entry %tmp.4 = seteq int %j, 0 ; <bool> [#uses=1] br label %shortcirc_done shortcirc_done: ; preds = %shortcirc_next, %entry %shortcirc_val = phi bool [ %tmp.4, %shortcirc_next ], [ true, %entry ] ; <bool> [#uses=1] to this: %tmp.1 = seteq int %i, 0 ; <bool> [#uses=1] %tmp.4 = seteq int %j, 0 ; <bool> [#uses=1] %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1] ... which is later simplified by instcombine into an or. llvm-svn: 21388
* Wrap some long lines.Chris Lattner2005-04-191-3/+9
| | | | | | | | Make IPSCCP strip off dead constant exprs that are using functions, making them appear as though their address is taken. This allows us to propagate some more pool descriptors, lowering the overhead of pool alloc. llvm-svn: 21363
* Eliminate a broken transformation, fixing PR548Chris Lattner2005-04-191-4/+2
| | | | llvm-svn: 21354
* silence a bogus warningChris Lattner2005-04-181-1/+1
| | | | llvm-svn: 21320
* a new simple pass, which will be extended to be more useful in the future.Chris Lattner2005-04-151-0/+213
| | | | | | | | | This pass forward branches through conditions when it can show that the conditions is either always true or false for a predecessor. This currently only handles the most simple cases of this, but is successful at threading across 2489 branches and 65 switch instructions in 176.gcc, which isn't bad. llvm-svn: 21306
* Get rid of this for_each loopChris Lattner2005-04-121-2/+2
| | | | llvm-svn: 21253
* Fix bug: InstCombine/2005-05-07-UDivSelectCrash.llChris Lattner2005-04-081-14/+16
| | | | llvm-svn: 21152
* Implement the following xforms:Chris Lattner2005-04-071-3/+18
| | | | | | | | (X-Y)-X --> -Y A + (B - A) --> B (B - A) + A --> B llvm-svn: 21138
* Implement InstCombine/add.ll:test28, transforming C1-(X+C2) --> (C1-C2)-X.Chris Lattner2005-04-071-2/+8
| | | | | | | This occurs several dozen times in specint2k, particularly in crafty and gcc apparently. llvm-svn: 21136
* Transform X-(X+Y) == -Y and X-(Y+X) == -YChris Lattner2005-04-071-2/+11
| | | | llvm-svn: 21134
* disable this transformation in the one obscure case that really pessimizesChris Lattner2005-03-291-0/+3
| | | | | | pointer analysis. llvm-svn: 20916
* Rename createPromoteMemoryToRegister() toAlkis Evlogimenos2005-03-281-2/+1
| | | | | | | createPromoteMemoryToRegisterPass() to be consistent with other pass creation functions. llvm-svn: 20885
* Enhance loopsimplify to preserve alias analysis instead of clobbering it.Chris Lattner2005-03-251-2/+15
| | | | | | This prevents crashes on some programs when using -ds-aa -licm. llvm-svn: 20831
* Fix a bug where LICM was not updating AA information properly when sinkingChris Lattner2005-03-251-1/+2
| | | | | | a pointer value out of a loop causing it to be duplicated. llvm-svn: 20828
* enable -debug-only=licmChris Lattner2005-03-231-0/+1
| | | | llvm-svn: 20788
* Fix the missing symbols problem Bill was hitting. Patch contributed byChris Lattner2005-03-172-0/+2
| | | | | | Bill Wendling!! llvm-svn: 20649
* stop using method.Chris Lattner2005-03-151-1/+1
| | | | llvm-svn: 20603
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-1522-62/+62
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* fix a bug where we thought arguments were constants :(Chris Lattner2005-03-061-3/+7
| | | | llvm-svn: 20506
* Fix Regression/Transforms/LoopStrengthReduce/dont_insert_redundant_ops.ll,Chris Lattner2005-03-061-1/+1
| | | | | | hopefully not breaking too many other things. llvm-svn: 20505
* implement Transforms/LoopStrengthReduce/invariant_value_first_arg.llChris Lattner2005-03-061-1/+1
| | | | llvm-svn: 20501
* minor simplifications of the code.Chris Lattner2005-03-061-9/+8
| | | | llvm-svn: 20497
* trivial simplificationChris Lattner2005-03-061-1/+1
| | | | llvm-svn: 20494
* Fix a bug where we could corrupt a parent loop's header info if we unrolledChris Lattner2005-03-061-6/+17
| | | | | | | a nested loop. This fixes Transforms/LoopUnroll/2005-03-06-BadLoopInfoUpdate.ll and PR532 llvm-svn: 20493
* Make this MUCH faster by avoiding a linear search in the symbol table code.Chris Lattner2005-03-061-2/+1
| | | | llvm-svn: 20479
* Reformat comments to fix 80 columns.Jeff Cohen2005-03-051-7/+8
| | | | llvm-svn: 20467
* Reuse induction variables created for strength-reduced GEPs by other similar ↵Jeff Cohen2005-03-051-32/+61
| | | | | | GEPs. llvm-svn: 20466
* second argument to Value::setName is now gone.Chris Lattner2005-03-052-4/+4
| | | | llvm-svn: 20463
* Do not compute 1ULL << 64, which is undefined. This fixes Ptrdist/ks on theChris Lattner2005-03-041-1/+2
| | | | | | sparc, and testcase Regression/Transforms/InstCombine/2005-03-04-ShiftOverflow.ll llvm-svn: 20445
* Add support for not strength reducing GEPs where the element size is a smallJeff Cohen2005-03-041-2/+25
| | | | | | power of two. This emphatically includes the zeroeth power of two. llvm-svn: 20429
* Add an optional argument to lower to a specific constant value instead ofChris Lattner2005-03-031-6/+14
| | | | | | to a "sizeof" expression. llvm-svn: 20414
* Fixed the following LSR bugs:Jeff Cohen2005-03-011-23/+19
| | | | | | | | | | | | | | | * Loop invariant code does not dominate the loop header, but rather the end of the loop preheader. * The base for a reduced GEP isn't a constant unless all of its operands (preceding the induction variable) are constant. * Allow induction variable elimination for the simple case after all. Also made changes recommended by Chris for properly deleting instructions. llvm-svn: 20383
* Fix crash in LSR due to attempt to remove original induction variable. However,Jeff Cohen2005-02-281-3/+14
| | | | | | | for reasons explained in the comments, I also deactivated this code as it needs more thought. llvm-svn: 20367
* PHI nodes were incorrectly placed when more than one GEP is reduced in a loop.Jeff Cohen2005-02-271-7/+6
| | | | llvm-svn: 20360
* First pass at improved Loop Strength Reduction. Still not yet ready for ↵Jeff Cohen2005-02-271-35/+39
| | | | | | prime time. llvm-svn: 20358
* Teach globalopt how memset/cpy/move affect memory, to allow better optimization.Chris Lattner2005-02-271-25/+40
| | | | llvm-svn: 20352
* Fix spelling, patch contributed by Gabor Greif!Chris Lattner2005-02-272-2/+2
| | | | llvm-svn: 20343
* remove extraneous castChris Lattner2005-02-261-2/+1
| | | | llvm-svn: 20334
* Implement Transforms/SimplifyCFG/switch_thread.llChris Lattner2005-02-241-4/+190
| | | | | | | | This does a simple form of "jump threading", which eliminates CFG edges that are provably dead. This triggers 90 times in the external tests, and eliminating CFG edges is always always a good thing! :) llvm-svn: 20300
* make this more efficient. Scan up to 16 nodes, not the whole list.Chris Lattner2005-02-231-1/+1
| | | | llvm-svn: 20289
* Remove use of bind_objChris Lattner2005-02-221-2/+3
| | | | llvm-svn: 20276
OpenPOWER on IntegriCloud