summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GVN.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR7052, patch by Jakub Staszak!Chris Lattner2010-05-081-3/+3
| | | | llvm-svn: 103347
* Use the right version of "append" to combine two SmallVectors.Bob Wilson2010-05-051-1/+1
| | | | | | This fixes the compile-time regressions seen in last night's tests. llvm-svn: 103118
* Defer adding critical edges to the "toSplit" list until after checking forBob Wilson2010-05-041-4/+5
| | | | | | | | indirect branches in all the predecessors. This avoids unnecessarily splitting edges in cases where load PRE is not possible anyway. Thanks to Jakub Staszak for pointing this out. llvm-svn: 103034
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-3/+3
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-3/+3
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-3/+3
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-3/+3
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* Fix a bunch of namespace polution.Dan Gohman2010-04-151-1/+3
| | | | llvm-svn: 101376
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-3/+3
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-3/+3
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* const-ize a predicateGabor Greif2010-04-091-2/+2
| | | | llvm-svn: 100856
* fix PR6642, GVN forwarding from memset to load of the base of the memset.Chris Lattner2010-03-251-7/+7
| | | | llvm-svn: 99488
* Don't attempt load PRE when there is no real redundancy (i.e., the load is inBob Wilson2010-03-021-4/+6
| | | | | | a loop and is itself the only dependency). llvm-svn: 97526
* When GVN needs to split critical edges for load PRE, check all of theBob Wilson2010-03-011-1/+4
| | | | | | | | predecessors before returning. Otherwise, if multiple predecessor edges need splitting, we only get one of them per iteration. This makes a small but measurable compile time improvement with -enable-full-load-pre. llvm-svn: 97521
* MemoryDepAnalysis is not used if redundant load processing is disabled.Evan Cheng2010-03-011-1/+1
| | | | llvm-svn: 97512
* Revert r97245 which seems to be causing performance problems.Bob Wilson2010-02-281-6/+5
| | | | llvm-svn: 97366
* Move the EnableFullLoadPRE flag from a separate command-line option to anBob Wilson2010-02-261-5/+6
| | | | | | argument of createGVNPass and set it automatically for -O3. llvm-svn: 97245
* Remove unused "NoPRE" parameter in GVN and createGVNPass().Bob Wilson2010-02-261-5/+4
| | | | llvm-svn: 97235
* Reapply r97010, the speculative revert failed.Daniel Dunbar2010-02-241-6/+1
| | | | llvm-svn: 97036
* Speculatively revert r97010, "Add an argument to PHITranslateValue to specifyDaniel Dunbar2010-02-241-1/+6
| | | | | | the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap. llvm-svn: 97027
* Add an argument to PHITranslateValue to specify the DominatorTree. If thisBob Wilson2010-02-241-6/+1
| | | | | | | | | | | | | | | | | | | | argument is non-null, pass it along to PHITranslateSubExpr so that it can prefer using existing values that dominate the PredBB, instead of just blindly picking the first equivalent value that it finds on a uselist. Also when the DominatorTree is specified, have PHITranslateValue filter out any result that does not dominate the PredBB. This is basically just refactoring the check that used to be in GetAvailablePHITranslatedSubExpr and also in GVN. Despite my initial expectations, this change does not affect the results of GVN for any testcases that I could find, but it should help compile time. Before this change, if PHITranslateSubExpr picked a value that does not dominate, PHITranslateWithInsertion would then insert a new value, which GVN would later determine to be redundant and would replace. By picking a good value to begin with, we save GVN the extra work of inserting and then replacing a new value. llvm-svn: 97010
* Update memdep when load PRE inserts a new load, and add some debug output.Bob Wilson2010-02-231-0/+2
| | | | | | I don't have a small testcase for this. llvm-svn: 96890
* Erase deleted instructions from GVN's ValueTable. This fixes assertionBob Wilson2010-02-221-0/+7
| | | | | | failures from ValueTable::verifyRemoved() when using -debug. llvm-svn: 96805
* Rename SuccessorNumber to GetSuccessorNumber.Bob Wilson2010-02-161-2/+2
| | | | llvm-svn: 96387
* Split critical edges as needed for load PRE.Bob Wilson2010-02-161-8/+30
| | | | llvm-svn: 96378
* Refactor to share code to find the position of a basic block successor in theBob Wilson2010-02-161-8/+1
| | | | | | terminator's list of successors. llvm-svn: 96377
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-24/+24
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Ignore dbg info intrinsics.Devang Patel2010-02-111-0/+4
| | | | llvm-svn: 95828
* Fix some comment typos.Bob Wilson2010-02-031-3/+3
| | | | llvm-svn: 95170
* Add an option to GVN to remove all partially redundant loads. This is currentlyBob Wilson2010-02-011-80/+107
| | | | | | | | | disabled by default. This divides the existing load PRE code into 2 phases: first it checks that it is safe to move the load to each of the predecessors where it is unavailable, and then if it is safe, the code is changed to move the load. Radar 7571861. llvm-svn: 95007
* Check alignment of loads when deciding whether it is safe to execute themBob Wilson2010-01-301-1/+2
| | | | | | | unconditionally. Besides checking the offset, also check that the underlying object is aligned as much as the load itself. llvm-svn: 94875
* Improve isSafeToLoadUnconditionally to recognize that GEPs with constantBob Wilson2010-01-291-1/+2
| | | | | | | indices are safe if the result is known to be within the bounds of the underlying object. llvm-svn: 94829
* Remove check for an impossible condition: the condition of the while loop hasBob Wilson2010-01-251-2/+0
| | | | | | already checked that TmpBB->getSinglePredecessor() is non-null. llvm-svn: 94451
* Convert some of the dynamic opcode lookups into static ones.Owen Anderson2010-01-171-59/+40
| | | | llvm-svn: 93693
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-051-2/+2
| | | | | | non-zero trip count. Use SmallVector's pop_back_val(). llvm-svn: 92734
* Change errs() to dbgs().David Greene2010-01-051-20/+20
| | | | llvm-svn: 92613
* split code that doesn't need to be templated out of IRBuilder into a newChris Lattner2009-12-281-0/+1
| | | | | | | non-templated IRBuilderBase class. Move that large CreateGlobalString out of line, eliminating the need to #include GlobalVariable.h in IRBuilder.h llvm-svn: 92227
* The phi translated pointer can be computed when returning a partially cached ↵Chris Lattner2009-12-221-1/+1
| | | | | | | | | | result instead of stored. This reduces memdep memory usage, and also eliminates a bunch of weakvh's. This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x) on a different machine than earlier. llvm-svn: 91885
* Add a fastpath to Load GVN to special case when we have exactly one dominatingChris Lattner2009-12-211-2/+10
| | | | | | | | | | | load to avoid even messing around with SSAUpdate at all. In this case (which is very common, we can just use the input value directly). This speeds up GVN time on gcc.c-torture/20001226-1.c from 36.4s to 16.3s, which still isn't great, but substantially better and this is a simple speedup that applies to lots of different cases. llvm-svn: 91851
* refactor some code out to a new helper method.Chris Lattner2009-12-211-22/+27
| | | | llvm-svn: 91849
* Eliminte unnecessary uses of <cstdio>.Dan Gohman2009-12-181-4/+3
| | | | llvm-svn: 91666
* Remove isPod() from DenseMapInfo, splitting it out to its ownChris Lattner2009-12-151-1/+4
| | | | | | | | isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91421
* Fix PR5744, a case where we were getting the pointer size instead of theChris Lattner2009-12-101-1/+1
| | | | | | | | value size. This only manifested when memdep inprecisely returns clobber, which is do to a caching issue in the PR5744 testcase. We can 'efficiently emulate' this by using '-no-aa' llvm-svn: 91004
* allow this to build when the #if 0's are enabled. No functionality change.Chris Lattner2009-12-101-6/+2
| | | | llvm-svn: 90999
* fix hte last remaining known (by me) phi translation bug. When we reanalyzeChris Lattner2009-12-091-6/+9
| | | | | | | clobbers to forward pieces of large stores to small loads, we need to consider the properly phi translated pointer in the store block. llvm-svn: 90978
* change GetStoreValueForLoad to use IRBuilder, which is cleaner andChris Lattner2009-12-091-7/+7
| | | | | | implicitly constant folds. llvm-svn: 90977
* change AnalyzeLoadFromClobberingMemInst/AnalyzeLoadFromClobberingStoreChris Lattner2009-12-091-13/+22
| | | | | | to require the load ty/ptr to be passed in, no functionality change. llvm-svn: 90960
* change AnalyzeLoadFromClobberingWrite and clients to pass in type Chris Lattner2009-12-091-10/+12
| | | | | | and pointer instead of the load. No functionality change. llvm-svn: 90959
* change NonLocalDepEntry from being a typedef for an std::pair to be itsChris Lattner2009-12-091-10/+10
| | | | | | own small class. No functionality change. llvm-svn: 90956
* add some aborts to #if 0's.Chris Lattner2009-12-091-0/+2
| | | | llvm-svn: 90929
OpenPOWER on IntegriCloud