summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* adjust a couple xforms to work with null bb's in BlockAddress.Chris Lattner2009-10-312-4/+8
| | | | llvm-svn: 85680
* add a comment.Chris Lattner2009-10-311-0/+4
| | | | llvm-svn: 85671
* Revert r85667. LoopUnroll currently can't call utility functions whichDan Gohman2009-10-312-24/+94
| | | | | | | auto-update the DominatorTree because it doesn't keep the DominatorTree current while it works. llvm-svn: 85670
* Remove redundant code.Dan Gohman2009-10-311-3/+0
| | | | llvm-svn: 85668
* Merge the enhancements from LoopUnroll's FoldBlockIntoPredecessor intoDan Gohman2009-10-312-94/+24
| | | | | | | MergeBlockIntoPredecessor. This makes SimplifyCFG slightly more aggressive, and makes it unnecessary for LoopUnroll to have its own copy of this code. llvm-svn: 85667
* Rename forgetLoopBackedgeTakenCount to forgetLoop, because itDan Gohman2009-10-313-3/+3
| | | | | | clears out more information than just the stored backedge taken count. llvm-svn: 85664
* Replace LoopUnrollPass.cpp's custom code-size estimation code usingDan Gohman2009-10-311-30/+5
| | | | | | the new common CodeMetrics code. llvm-svn: 85663
* Simplify this code.Dan Gohman2009-10-311-2/+2
| | | | llvm-svn: 85662
* Remove an unnecessary #include.Dan Gohman2009-10-311-1/+0
| | | | llvm-svn: 85661
* Update CMakeLists for recent renames.Dan Gohman2009-10-312-2/+2
| | | | llvm-svn: 85660
* Rename UnrollLoop.cpp to LoopUnroll.cpp, and LoopUnroll.cpp toDan Gohman2009-10-312-0/+0
| | | | | | | LoopUnrollPass.cpp, for consistency with other passes which are similarly split. llvm-svn: 85659
* Remove CodeGenLICM. It's largely obsoleted by MachineLICM's new abilityDan Gohman2009-10-312-113/+0
| | | | | | to unfold loop-invariant loads. llvm-svn: 85657
* Reapply r85634, with the bug fixed.Dan Gohman2009-10-311-15/+17
| | | | llvm-svn: 85655
* Revert 85634. It's breaking consumer-typeset (and others).Evan Cheng2009-10-311-17/+15
| | | | llvm-svn: 85641
* Add a comment about a missed opportunity.Dan Gohman2009-10-301-0/+5
| | | | llvm-svn: 85635
* Optimize around the fact that pred_iterator is slow: instead of sortingDan Gohman2009-10-301-15/+17
| | | | | | | PHI operands by the predecessor order, sort them by the order used by the first PHI in the block. This is still suffucient to expose duplicates. llvm-svn: 85634
* Teach SimplifyCFG how to eliminate duplicate PHI nodes within a block.Dan Gohman2009-10-301-0/+61
| | | | | | | This reduces codesize on a variety of codes by 1-2% on x86-64. It also helps clean up after SSAUpdater. llvm-svn: 85626
* Sort the incoming values in PHI nodes to match the predecessor order.Dan Gohman2009-10-301-0/+19
| | | | | | | This helps expose duplicate PHIs, which will make it easier for them to be eliminated. llvm-svn: 85623
* Add option to createGVNPass to disable PRE.Evan Cheng2009-10-301-2/+3
| | | | llvm-svn: 85609
* Apply some cleanups. No functionality changes.Nick Lewycky2009-10-291-27/+23
| | | | llvm-svn: 85498
* just for the hell of it, allow globalopt to statically evaluate Chris Lattner2009-10-291-0/+6
| | | | | | static constructors with indirect gotos :) llvm-svn: 85495
* teach various passes about blockaddress. We no longerChris Lattner2009-10-293-33/+57
| | | | | | crash on any clang tests. llvm-svn: 85465
* teach ValueMapper about BlockAddress', making bugpoint a lot more useful.Chris Lattner2009-10-291-7/+10
| | | | llvm-svn: 85458
* unindent massive blocks, no functionality change.Chris Lattner2009-10-291-69/+75
| | | | llvm-svn: 85457
* Extend getMallocArraySize() to determine the array size if the malloc ↵Victor Hernandez2009-10-281-11/+9
| | | | | | | | | | | | | | argument is: ArraySize * ElementSize ElementSize * ArraySize ArraySize << log2(ElementSize) ElementSize << log2(ArraySize) Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic. Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well. llvm-svn: 85421
* llvm.dbg.global_variables do not exist anymore.Devang Patel2009-10-281-9/+0
| | | | llvm-svn: 85402
* No newline at end of file.Edward O'Callaghan2009-10-281-1/+1
| | | | llvm-svn: 85390
* Update CMake file.Benjamin Kramer2009-10-281-0/+1
| | | | llvm-svn: 85389
* Treat lifetime begin/end markers as allocations/frees respectively for theOwen Anderson2009-10-282-0/+41
| | | | | | purposes for GVN/DSE. llvm-svn: 85383
* Add ABCD, a generalized implementation of the Elimination of Array BoundsNick Lewycky2009-10-281-0/+1108
| | | | | | | | Checks on Demand algorithm which looks at arbitrary branches instead of loop iterations. This is GSoC work by Andre Tavares with only editorial changes applied! llvm-svn: 85382
* Previously, all operands to Constant were themselves constant.Chris Lattner2009-10-281-5/+4
| | | | | | | | | In the new world order, BlockAddress can have a BasicBlock operand. This doesn't permute much, because if you have a ConstantExpr (or anything more specific than Constant) we still know the operand has to be a Constant. llvm-svn: 85375
* Factor out redundancy from clone() implementations.Devang Patel2009-10-272-2/+2
| | | | llvm-svn: 85327
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-277-7/+7
| | | | llvm-svn: 85286
* Fix a pretty serious misfeature of the inliner: if it inlines a functionChris Lattner2009-10-271-0/+9
| | | | | | | | | | with multiple return values it inserts a PHI to merge them all together. However, if the return values are all the same, it ends up with a pointless PHI and this pointless PHI happens to really block SRoA from happening in at least a silly C++ example written by Doug, but probably others. This fixes rdar://7339069. llvm-svn: 85206
* VS build fix, patch by Marius Wachtler.Mike Stump2009-10-271-0/+1
| | | | llvm-svn: 85197
* Add objectsize intrinsic and hook it up through codegen. Doesn'tEric Christopher2009-10-271-0/+25
| | | | | | do anything than return "I don't know" at the moment. llvm-svn: 85189
* Add braces to avoid ambiguous else.Dan Gohman2009-10-271-1/+2
| | | | llvm-svn: 85185
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-267-7/+7
| | | | | | to free() llvm-svn: 85181
* Add a straight-forward implementation of SCCVN for aggressively eliminating ↵Owen Anderson2009-10-261-0/+721
| | | | | | scalar redundancies. llvm-svn: 85179
* Remove FreeInst.Victor Hernandez2009-10-269-183/+7
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Simplify this code. LoopDeletion doesn't need to explicit check thatDan Gohman2009-10-261-24/+2
| | | | | | | the loop exiting block dominates the latch block; if ScalarEvolution can prove that the trip-count is finite, that's sufficient. llvm-svn: 85165
* Code that checks WillNotOverflowSignedAdd before creating an AddDan Gohman2009-10-261-8/+8
| | | | | | can safely use the NSW bit on the Add. llvm-svn: 85164
* Update CMake files.Ted Kremenek2009-10-261-0/+1
| | | | llvm-svn: 85161
* Check in the experimental GEP splitter pass. This pass splits complexDan Gohman2009-10-261-0/+81
| | | | | | | | | | GEPs (more than one non-zero index) into simple GEPs (at most one non-zero index). In some simple experiments using this it's not uncommon to see 3% overall code size wins, because it exposes redundancies that can be eliminated, however it's tricky to use because instcombine aggressively undoes the work that this pass does. llvm-svn: 85144
* Fix a typo in a comment.Dan Gohman2009-10-261-1/+1
| | | | llvm-svn: 85120
* reapply r85085 with a bugfix to avoid infinite looping.Chris Lattner2009-10-261-8/+47
| | | | | | | All of the 'demorgan' related xforms need to use dyn_castNotVal, not m_Not. llvm-svn: 85119
* Make LSR's OptimizeShadowIV ignore induction variables with negativeDan Gohman2009-10-261-0/+4
| | | | | | | | | | strides for now, because it doesn't handle them correctly. This fixes a miscompile of SingleSource/Benchmarks/Misc-C++/ray. This problem was usually hidden because indvars transforms such induction variables into negations of canonical induction variables. llvm-svn: 85118
* Revert 85085. It causes infinite looping during llvm-gcc build.Evan Cheng2009-10-261-45/+6
| | | | llvm-svn: 85090
* Implement PR3266 & PR5276, folding:Chris Lattner2009-10-261-6/+45
| | | | | | not (or (icmp, icmp)) -> and(icmp, icmp) llvm-svn: 85085
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-2533-33/+1
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
OpenPOWER on IntegriCloud