summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* 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
* add ability for clients of SSAUpdater to find out about theChris Lattner2009-10-101-1/+9
| | | | | | PHI nodes inserted. llvm-svn: 83744
* add the ability to get a rewritten value from the middle of a block,Chris Lattner2009-10-101-3/+92
| | | | | | | not just at the end. Add a big comment explaining when this could be useful (which never happens for jump threading). llvm-svn: 83741
* rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect Chris Lattner2009-10-101-11/+11
| | | | | | what it does. llvm-svn: 83740
* use a typedef instead of spelling out an insane type. Yay for auto someday.Chris Lattner2009-10-101-3/+3
| | | | llvm-svn: 83707
* Implement an efficient and fully general SSA update mechanism that Chris Lattner2009-10-102-0/+233
| | | | | | works on unstructured CFGs. This implements PR217, our oldest open PR. llvm-svn: 83705
* random tidyingChris Lattner2009-10-101-7/+5
| | | | llvm-svn: 83701
* Use names instead of numbers for some of the magicDale Johannesen2009-10-091-6/+6
| | | | | | | constants used in inlining heuristics (especially those used in more than one file). No functional change. llvm-svn: 83675
* Add FreeInst to the "is a call" check for Insts that are calls, butEric Christopher2009-10-071-2/+2
| | | | | | not intrinsics. llvm-svn: 83441
* While we still have a MallocInst treat it as a call like any otherEric Christopher2009-10-071-0/+4
| | | | | | | | | for inlining. When MallocInst goes away this code will be subsumed as part of calls and work just fine... llvm-svn: 83434
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-063-6/+6
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Remove an unnnecessary LLVMContext argument inDan Gohman2009-10-051-1/+1
| | | | | | ConstantFoldLoadThroughGEPConstantExpr. llvm-svn: 83311
* Do away with the strange use of BitVectors in SSI, and just use normal sets. ↵Owen Anderson2009-10-041-116/+90
| | | | | | This makes the code much more C++/LLVM-ish. llvm-svn: 83286
* Fix a typo in the comment.Owen Anderson2009-10-041-1/+1
| | | | llvm-svn: 83283
* SSI needs to require DT and DF transitively, since it uses them outside of ↵Owen Anderson2009-10-041-3/+3
| | | | | | | | its runOnFunction. Similarly, it can be marked setPreservesAll, since it does no work in its runOnFunction. llvm-svn: 83282
* Fix this code so that it doesn't try to iterate through a std::vectorDan Gohman2009-09-301-3/+4
| | | | | | | while calling changeImmediateDominator, which removes elements from the vector. This fixes PR5097. llvm-svn: 83166
OpenPOWER on IntegriCloud