summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Fix uninitialized variable warning.Nick Lewycky2010-08-061-2/+2
| | | | | | | | Also move 'default' case next to a real case to help compiler optimize in non-Debug builds. No functionality change. llvm-svn: 110435
* Work in progress, cleaning up MergeFuncs.Nick Lewycky2010-08-061-180/+40
| | | | | | | | Further clean up the comparison function by removing overly generalized "domains". Remove all understanding of ELF aliases and simplify folding code and comments. llvm-svn: 110434
* Revert r110396 to fix buildbots.Owen Anderson2010-08-0664-84/+84
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-0564-84/+84
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Give JumpThreading+LVI a long-form cl::opt so that it's easier to toggle the ↵Owen Anderson2010-08-051-1/+4
| | | | | | default. llvm-svn: 110384
* Experiments show that we can safely increase our unrolling threshold without ↵Owen Anderson2010-08-041-1/+1
| | | | | | | | unduly impacting code size, particularly since unrolling is not enabled at -Os. llvm-svn: 110233
* Fix whitespace.Dan Gohman2010-08-041-1/+1
| | | | llvm-svn: 110223
* Fix a comment.Dan Gohman2010-08-041-1/+1
| | | | llvm-svn: 110181
* Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman2010-08-031-1/+1
| | | | | | | | | | | | eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. llvm-svn: 110155
* Make instcombine set explicit alignments on load or storeDan Gohman2010-08-031-6/+14
| | | | | | | instructions with alignment 0, so that subsequent passes don't need to bother checking the TargetData ABI size manually. llvm-svn: 110128
* Add an atomic lowering passPeter Collingbourne2010-08-032-0/+161
| | | | llvm-svn: 110113
* Use unary + instead of a separate local variable for workingDan Gohman2010-08-031-2/+1
| | | | | | around std::min vs static const friction. llvm-svn: 110112
* Re-apply the infamous r108614, with a fix pointed out by Dirk Steinke.Owen Anderson2010-08-021-5/+38
| | | | llvm-svn: 110036
* Prefix `next' iterator operation with `llvm::'.Oscar Fuentes2010-08-022-4/+4
| | | | | | | | Fixes potential ambiguity problems on VS 2010. Patch by nobled! llvm-svn: 110029
* Fix a -Wreorder warning.Daniel Dunbar2010-08-021-1/+1
| | | | llvm-svn: 110022
* Work in progress.Nick Lewycky2010-08-021-129/+164
| | | | | | | | Start cleaning up MergeFunctions to look more like the rest of LLVM. The primary change here is to move the methods responsible for comparison into the new FunctionComparator object. Some comments added. There's more to do. llvm-svn: 110021
* Speculatively revert r108614, "Another attempt at getting the clang self-host toDaniel Dunbar2010-07-311-32/+0
| | | | | | | like my instcombine patch.", in an attempt to fix Clang i386 bootstrap. - Also PR7719. llvm-svn: 109953
* The BlockExtractorPass() constructor was not reading the BlockFile and that wasRafael Espindola2010-07-311-5/+3
| | | | | | | | | | | | | | exactly what bugpoint expected it to do. There was also only one user of BlockExtractorPass(const std::vector<BasicBlock*> &B), so just remove it and make BlockExtractorPass read BlockFile. This fixes bugpoint's block extraction. Nick, please review. llvm-svn: 109936
* Move MaximumAlignment to be a member of the Value class.Dan Gohman2010-07-301-1/+2
| | | | llvm-svn: 109891
* Add missing newline to debug statement.Nick Lewycky2010-07-301-1/+1
| | | | llvm-svn: 109886
* PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnullEli Friedman2010-07-291-1/+1
| | | | | | if CExpr is a ConstantInt. llvm-svn: 109773
* simplify by using CallSite constructors; virtually eliminates CallSite::get ↵Gabor Greif2010-07-288-24/+24
| | | | | | from the tree llvm-svn: 109687
* Define a maximum supported alignment value for load, store, andDan Gohman2010-07-281-1/+5
| | | | | | | | | alloca instructions (constrained by their internal encoding), and add error checking for it. Fix an instcombine bug which generated huge alignment values (null is infinitely aligned). This fixes undefined behavior noticed by John Regehr. llvm-svn: 109643
* When user code intentionally dereferences null, the alignment of theDan Gohman2010-07-281-2/+7
| | | | | | | dereference is theoretically infinite. Put a cap on the computed alignment to avoid overflow, noticed by John Regehr. llvm-svn: 109596
* simplifyGabor Greif2010-07-281-2/+2
| | | | llvm-svn: 109589
* use Value* constructor of CallSite to create potentially improper site, and ↵Gabor Greif2010-07-281-2/+1
| | | | | | test that llvm-svn: 109581
* recommit simplification (r109502, backed out r109509); seems to innocentGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109510
* back out this too to restore the botsGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109509
* simplify: CallSite::get --> CallSite constructorGabor Greif2010-07-271-4/+4
| | | | llvm-svn: 109506
* simplifyGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109502
* Add an initial implementation of LazyValueInfo updating for JumpThreading. ↵Owen Anderson2010-07-261-0/+3
| | | | | | Disabled for now. llvm-svn: 109424
* Remove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogusDan Gohman2010-07-264-19/+12
| | | | | | | | | | | | | | dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier pass in StandardPasses.h to ensure that it gets scheduled at the right time. Declare that loop unrolling preserves ScalarEvolution, and shuffle some getAnalysisUsages. This eliminates one LoopSimplify and one LCCSA run in the standard compile opts sequence. llvm-svn: 109413
* Preserve ScalarEvolution in the loop unroller.Dan Gohman2010-07-261-0/+6
| | | | llvm-svn: 109412
* Use DominatorTree::properlyDominates instead of dominates with anDan Gohman2010-07-261-1/+1
| | | | | | explicit inequality check. llvm-svn: 109401
* A block dominates itself, by definition.Dan Gohman2010-07-261-1/+1
| | | | llvm-svn: 109400
* Revert this because we can't clone cyclic MDNodes which are creating during aNick Lewycky2010-07-241-3/+4
| | | | | | build of llvm-gcc. llvm-svn: 109355
* Whether function-local or not, a MDNode may reference a Function in which caseNick Lewycky2010-07-241-4/+3
| | | | | | | it needs to be mapped to refer to the function in the new module, not the old one. Fixes PR7700. llvm-svn: 109353
* Speculatively revert 109117Devang Patel2010-07-221-27/+6
| | | | llvm-svn: 109132
* keep in 80 colsGabor Greif2010-07-221-3/+4
| | | | llvm-svn: 109122
* Map MDNode correctly. Devang Patel2010-07-221-6/+27
| | | | | | A non function local MDNode can have an operand which is cloned by MapValue(). llvm-svn: 109117
* mass elimination of reliance on automatic iterator dereferencingGabor Greif2010-07-228-10/+10
| | | | llvm-svn: 109103
* simplifyGabor Greif2010-07-221-3/+2
| | | | llvm-svn: 109101
* do not access arguments via low-level interface, do not multiply dereference ↵Gabor Greif2010-07-221-17/+19
| | | | | | use_iterators llvm-svn: 109100
* pass dereferenced iterator to dyn_castGabor Greif2010-07-221-1/+1
| | | | llvm-svn: 109099
* pass dereferenced iterator to dyn_castGabor Greif2010-07-221-1/+1
| | | | llvm-svn: 109098
* undo 80 column trespassing I causedGabor Greif2010-07-225-22/+30
| | | | llvm-svn: 109092
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-4/+2
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-2154-108/+119
| | | | llvm-svn: 109045
* Make this code a little more readable.Dan Gohman2010-07-201-2/+4
| | | | llvm-svn: 108968
* Use DebugLocs instead of MDNodes.Dan Gohman2010-07-201-32/+27
| | | | llvm-svn: 108967
OpenPOWER on IntegriCloud