summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Reapply r112091 and r111922, support for metadata linking, with aDan Gohman2010-08-266-53/+88
| | | | | | | | | | | | | | fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g). This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class. llvm-svn: 112190
* Revert r111922, "MapValue support for MDNodes. This is similar to r109117,Daniel Dunbar2010-08-261-27/+8
| | | | | | | except ...", it is causing *massive* performance regressions when building Clang with itself (-O3 -g). llvm-svn: 112158
* Revert r112091, "Remap metadata attached to instructions when remappingDaniel Dunbar2010-08-262-12/+16
| | | | | | individual ...", which depends on r111922, which I am reverting. llvm-svn: 112157
* zap dead code.Chris Lattner2010-08-261-13/+1
| | | | llvm-svn: 112130
* Rewrite ExtractGV, removing a bunch of stuff that didn't fully work,Dan Gohman2010-08-261-125/+32
| | | | | | and was over-complicated, and replacing it with a simple implementation. llvm-svn: 112120
* remove some llvmcontext arguments that are now dead post-refactoring.Chris Lattner2010-08-251-2/+2
| | | | llvm-svn: 112104
* Remap metadata attached to instructions when remapping individualDan Gohman2010-08-252-16/+12
| | | | | | instructions, not when remapping modules. llvm-svn: 112091
* DIGlobalVariable can be used to encode debug info for globals that are ↵Devang Patel2010-08-251-2/+2
| | | | | | directly folded into a constant by FE. llvm-svn: 112072
* Use MapValue in the Linker instead of having a private functionDan Gohman2010-08-244-32/+3
| | | | | | | | which does the same thing. This eliminates redundant code and handles MDNodes better. MDNode linking still doesn't fully work yet though. llvm-svn: 111941
* Turn LVI on, previously detected failures should be fixed now.Owen Anderson2010-08-241-1/+1
| | | | llvm-svn: 111923
* MapValue support for MDNodes. This is similar to r109117, exceptDan Gohman2010-08-241-8/+27
| | | | | | | | that it avoids a lot of unnecessary cloning by avoiding remapping MDNode cycles when none of the nodes in the cycle actually need to be remapped. Also it uses the new temporary MDNode mechanism. llvm-svn: 111922
* Turn LVI back off, I have a testcase now.Owen Anderson2010-08-231-1/+1
| | | | llvm-svn: 111834
* Re-enable LazyValueInfo. Monitoring for failures.Owen Anderson2010-08-231-1/+1
| | | | llvm-svn: 111816
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-239-16/+19
| | | | | | passes over to the new registration API. llvm-svn: 111815
* 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
OpenPOWER on IntegriCloud