summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Re-apply r111568 with a fix for the clang self-host.Owen Anderson2010-08-201-0/+47
| | | | llvm-svn: 111665
* Revert r111568 to unbreak clang self-host.Owen Anderson2010-08-191-45/+0
| | | | llvm-svn: 111571
* When a set of bitmask operations, typically from a bitfield initialization, ↵Owen Anderson2010-08-191-0/+45
| | | | | | | | only modifies the low bytes of a value, we can narrow the store to only over-write the affected bytes. llvm-svn: 111568
* Disable LVI while I evaluate a failure.Owen Anderson2010-08-191-1/+1
| | | | llvm-svn: 111551
* Tentatively enabled LVI by default. I'll be monitoring for any failures.Owen Anderson2010-08-191-1/+1
| | | | llvm-svn: 111543
* Process the step before the start, because it's usually the simplerDan Gohman2010-08-191-3/+3
| | | | | | of the two. llvm-svn: 111495
* Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer ↵Owen Anderson2010-08-181-0/+7
| | | | | | issues. llvm-svn: 111382
* Fix PR7755: knowing something about an inval for a predChris Lattner2010-08-181-8/+4
| | | | | | | | | from the LHS should disable reconsidering that pred on the RHS. However, knowing something about the pred on the RHS shouldn't disable subsequent additions on the RHS from happening. llvm-svn: 111349
* fit in 80 colsChris Lattner2010-08-181-2/+3
| | | | llvm-svn: 111348
* remove some dead code.Chris Lattner2010-08-183-15/+4
| | | | llvm-svn: 111344
* remove dead prototype.Chris Lattner2010-08-181-2/+1
| | | | llvm-svn: 111342
* Temporarily revert r110987 as it's causing some miscompares inEric Christopher2010-08-171-123/+64
| | | | | | vector heavy code. I'll re-enable when we've tracked down the problem. llvm-svn: 111318
* When rotating loops, put the original header at the bottom of theDan Gohman2010-08-171-0/+20
| | | | | | | loop, making the resulting loop significantly less ugly. Also, zap its trivial PHI nodes, since it's easy. llvm-svn: 111255
* Use the getUniquePredecessor() utility function, instead of doingDan Gohman2010-08-171-15/+5
| | | | | | what it does manually. llvm-svn: 111248
* Add an option to disable codegen prepare critical edge splitting. In theory, ↵Evan Cheng2010-08-171-6/+14
| | | | | | PHI elimination is already doing all (most?) of the splitting needed. But machine-licm and machine-sink seem to miss some important optimizations when splitting is disabled. llvm-svn: 111224
* Instead of having CollectSubexpr's categorize operands as interesting orDan Gohman2010-08-161-19/+14
| | | | | | | | uninteresting, just put all the operands on one list and make GenerateReassociations make the decision about what's interesting. This is simpler, and it avoids an extra ScalarEvolution::getAddExpr call. llvm-svn: 111133
* Put add operands in ScalarEvolution-canonical order, when convenient.Dan Gohman2010-08-161-2/+2
| | | | | | | This isn't necessary, because ScalarEvolution sorts them anyway, but it's tidier this way. llvm-svn: 111132
* Avoid #include <ScalarEvolution.h> in LoopSimplify.cpp, which doesn'tDan Gohman2010-08-161-2/+1
| | | | | | actually use ScalarEvolution. llvm-svn: 111124
* Instead, teach SimplifyCFG to trim non-address-taken blocks fromDan Gohman2010-08-161-2/+3
| | | | | | indirectbr destination lists. llvm-svn: 111122
* LoopSimplify shouldn't split loop backedges that use indirectbr. PR7867.Dan Gohman2010-08-141-0/+5
| | | | llvm-svn: 111061
* Teach SimplifyCFG how to simplify indirectbr instructions.Dan Gohman2010-08-143-16/+45
| | | | | | | | | | | - Eliminate redundant successors. - Convert an indirectbr with one successor into a direct branch. Also, generalize SimplifyCFG to be able to be run on a function entry block. It knows quite a few simplifications which are applicable to the entry block, and it only needs a few checks to avoid trouble with the entry block. llvm-svn: 111060
* Fix LSR's ExtractImmediate and ExtractSymbol to avoid callingDan Gohman2010-08-131-4/+8
| | | | | | | ScalarEvolution::getAddExpr, which can be pretty expensive, when nothing has changed, which is pretty common. llvm-svn: 111042
* Reapply this transformation now that it is passing the external test which ↵Nate Begeman2010-08-131-64/+123
| | | | | | it previously failed. llvm-svn: 110987
* fix PR7876: If ipsccp decides that a function's address is takenChris Lattner2010-08-121-4/+15
| | | | | | before it rewrites the code, we need to use that in the post-rewrite pass. llvm-svn: 110962
* Temporarily revert 110737 and 110734, they were causing failuresEric Christopher2010-08-121-141/+64
| | | | | | in an external testsuite. llvm-svn: 110905
* Add the minimal amount of smarts necessary to instcombine of shufflevectors ↵Nate Begeman2010-08-101-64/+141
| | | | | | | | | | | | | | to recognize patterns generated by clang for transpose of a matrix in generic vectors. This is made of two parts: 1) Propagating vector extracts of hi/lo half into their users 2) Recognizing an insertion of even elements followed by the odd elements as an unpack. Testcase to come, but this shrinks the # of shuffle instructions generated on x86 from ~40 to the minimal 8. llvm-svn: 110734
* Fix a use after free error caught by the valgrind builders.Nick Lewycky2010-08-091-2/+4
| | | | llvm-svn: 110601
* PR7853: fix a silly mistake introduced in r101899, and add a test to make sureEli Friedman2010-08-091-1/+1
| | | | | | it doesn't regress again. llvm-svn: 110597
* Do more to modernize MergeFunctions. Refactor in response to Chris' code review.Nick Lewycky2010-08-081-91/+81
| | | | llvm-svn: 110538
* Don't attempt the PRE inline asm calls, since we don't value number them ↵Owen Anderson2010-08-071-0/+5
| | | | | | yet. Fixes PR7835. llvm-svn: 110489
* Eliminate PromoteMemoryToRegisterID; just use addPreserved("mem2reg")Dan Gohman2010-08-064-5/+3
| | | | | | instead, as an example of what this looks like. llvm-svn: 110478
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-0664-84/+84
| | | | llvm-svn: 110460
* 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
OpenPOWER on IntegriCloud