summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-063-8/+4
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Avoid calling getUniqueExitBlocks from within LoopSimplify, as it dependsDan Gohman2009-11-051-1/+8
| | | | | | | on loops having dedicated exits, which LoopSimplify can no longer always guarantee. llvm-svn: 86181
* The introduction of indirectbr meant the introduction ofDan Gohman2009-11-051-21/+82
| | | | | | | | | unsplittable critical edges, which means the introduction of loops which cannot be transformed to LoopSimplify form. Fix LoopSimplify to avoid transforming such loops into invalid code. llvm-svn: 86176
* Teach LoopUnroll how to bail if LoopSimplify can't give it what it needs.Dan Gohman2009-11-051-1/+12
| | | | llvm-svn: 86164
* Delete an unused member variable.Dan Gohman2009-11-051-2/+0
| | | | llvm-svn: 86160
* Add an assertion to catch indirectbr in SplitBlockPredecessors. ThisDan Gohman2009-11-051-2/+6
| | | | | | | | | | | | makes several optimization passes abort in cases where they're currently silently miscompiling code. Remove the indirectbr assertion from SplitEdge. Indirectbr is only a problem for critical edges, and SplitEdge defers to SplitCriticalEdge to handle those, and SplitCriticalEdge has its own assertion for indirectbr. llvm-svn: 86147
* remove a isFreeCall check: it is a callinst that can write to memory already.Chris Lattner2009-11-031-3/+2
| | | | llvm-svn: 85863
* Alphabetize.Ted Kremenek2009-11-031-1/+1
| | | | llvm-svn: 85859
* fix a bug exposed by moving SRoA earlier which caused a crash building kc++Chris Lattner2009-11-021-1/+6
| | | | llvm-svn: 85786
* improve comment.Chris Lattner2009-11-011-1/+1
| | | | llvm-svn: 85725
* change llvm::MergeBlockIntoPredecessor to not merge two blocks BB1->BB2 Chris Lattner2009-11-011-3/+7
| | | | | | | | | when BB2 has its address taken. Since it ends up doing BB2->rauw(BB1), this can cause the address of the entry block to be taken. Since it is generally undesirable to nuke blocks whose address is taken, even when we can, just unconditionally stop this xform. llvm-svn: 85708
* constant fold indirectbr(blockaddress(%bb)) -> br label %bb.Chris Lattner2009-11-011-9/+46
| | | | llvm-svn: 85704
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-011-7/+2
| | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699
* llvm::SplitEdge should refuse to split an edge from an indirectbr.Chris Lattner2009-10-311-0/+2
| | | | | | Fix CodeGenPrepare to not try to split edges from indirectbr. llvm-svn: 85690
* update the comment above llvm::SplitCriticalEdge, and makeChris Lattner2009-10-311-6/+21
| | | | | | it abort on IndirectBrInst as describe in the comment. llvm-svn: 85688
* adjust a couple xforms to work with null bb's in BlockAddress.Chris Lattner2009-10-311-2/+7
| | | | llvm-svn: 85680
* 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
* Simplify this code.Dan Gohman2009-10-311-2/+2
| | | | llvm-svn: 85662
* Update CMakeLists for recent renames.Dan Gohman2009-10-311-1/+1
| | | | llvm-svn: 85660
* Rename UnrollLoop.cpp to LoopUnroll.cpp, and LoopUnroll.cpp toDan Gohman2009-10-311-0/+0
| | | | | | | LoopUnrollPass.cpp, for consistency with other passes which are similarly split. llvm-svn: 85659
* Add a comment about a missed opportunity.Dan Gohman2009-10-301-0/+5
| | | | llvm-svn: 85635
* 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
* teach various passes about blockaddress. We no longerChris Lattner2009-10-291-2/+2
| | | | | | 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
* Factor out redundancy from clone() implementations.Devang Patel2009-10-271-1/+1
| | | | llvm-svn: 85327
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-271-1/+1
| | | | 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
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-261-1/+1
| | | | | | to free() llvm-svn: 85181
* Remove FreeInst.Victor Hernandez2009-10-266-123/+2
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-259-9/+1
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-2511-13/+13
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* MapValue doesn't needs its LLVMContext argument.Dan Gohman2009-10-243-18/+13
| | | | llvm-svn: 85020
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-242-6/+3
| | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. llvm-svn: 84987
* alternate fix for PR5258 which avoids worklist problems, with reduced testcase.Chris Lattner2009-10-201-11/+6
| | | | llvm-svn: 84667
* Fix PR5258, jump-threading creating invalid PHIs.Torok Edwin2009-10-201-2/+10
| | | | | | | When an incoming value for a PHI is updated, we must also updated all other incoming values for the same BB to match, otherwise we create invalid PHIs. llvm-svn: 84638
* Fix SplitBlockPredecessors' LoopInfo updating code to handle the caseDan Gohman2009-10-191-8/+20
| | | | | | | | where a loop's header is being split and it has predecessors which are not contained by the most-nested loop which contains the loop. This fixes PR5235. llvm-svn: 84505
* Change instnamer to name arguments "arg" instead of "tmp" for clarity, andDan Gohman2009-10-191-2/+2
| | | | | | to name basic blocks "bb" instead of "BB", for consistency. llvm-svn: 84502
* Simplify some code (first hunk) and fix PR5208 (second hunk) byChris Lattner2009-10-171-8/+6
| | | | | | updating the callgraph when introducing a call. llvm-svn: 84310
* Remove MallocInst from LLVM Instructions.Victor Hernandez2009-10-171-29/+10
| | | | llvm-svn: 84299
* Strip trailing white space.Duncan Sands2009-10-161-33/+31
| | | | llvm-svn: 84256
* Update CMake file.Ted Kremenek2009-10-131-1/+0
| | | | llvm-svn: 84001
* Commit the removal of this file, which is now moved to lib/Analysis.Dan Gohman2009-10-131-337/+0
| | | | llvm-svn: 83999
* Start refactoring the inline cost estimation code so that it can be usedDan Gohman2009-10-131-71/+71
| | | | | | for purposes other than inlining. llvm-svn: 83997
* change simplifycfg to not duplicate 'unwind' instructions. HopefullyChris Lattner2009-10-131-12/+5
| | | | | | | this will increase the likelihood of common code getting sunk towards the unwind. llvm-svn: 83996
* rewrite LCSSA to use SSAUpdate, to only return true if it modifiesChris Lattner2009-10-111-154/+130
| | | | | | the IR, and to implement the FIXME'd optimization. llvm-svn: 83748
* clean up and simplify some code. Don't use setvector when things will beChris Lattner2009-10-111-28/+23
| | | | | | | inserted only once, just use vector. Don't compute ExitBlocks unless we need it, change std::sort to array_pod_sort. llvm-svn: 83747
* add a simple helper method.Chris Lattner2009-10-101-0/+6
| | | | llvm-svn: 83745
OpenPOWER on IntegriCloud