summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Teach memdep about TBAA tags.Dan Gohman2010-09-221-71/+95
| | | | llvm-svn: 114588
* cleanup some of the lifetime/invariant marker stuff, add a big fixme.Chris Lattner2010-09-061-6/+11
| | | | llvm-svn: 113144
* speed up -gvn 3.4% on the testcase in PR7023Chris Lattner2010-09-061-1/+1
| | | | llvm-svn: 113135
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix memdep's code for reasoning about dependences between two calls. A RefDan Gohman2010-08-051-19/+8
| | | | | | | | | | response from getModRefInfo is not useful here. Instead, check for identical calls only in the NoModRef case. Reapply r110270, and strengthen it to compensate for the memdep changes. When both calls are readonly, there is no dependence between them. llvm-svn: 110382
* Add a convenient form of AliasAnalysis::alias for the case where the sizesDan Gohman2010-08-031-4/+2
| | | | | | are unknown. llvm-svn: 110090
* reintroduce original (asserting) semantics of CallSite(Instruction *II)Gabor Greif2010-07-271-1/+1
| | | | | | | add instead a CallSite(Value* V) constructor that is consistent with ImmutableCallSize and use that one in client code llvm-svn: 109553
* recommit simplification (originally r109504, backed out in r109508) now that ↵Gabor Greif2010-07-271-3/+2
| | | | | | problem in CallSiteBase is fixed llvm-svn: 109547
* back out r109504, breaks the botsGabor Greif2010-07-271-2/+3
| | | | llvm-svn: 109508
* simplifyGabor Greif2010-07-271-3/+2
| | | | llvm-svn: 109504
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* use the new isFreeCall API and ArgOperand accessorsGabor Greif2010-06-231-12/+13
| | | | llvm-svn: 106692
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-221-2/+2
| | | | llvm-svn: 106542
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-9/+9
| | | | | | | 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-9/+9
| | | | | | | | | | | | | 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-9/+9
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-9/+9
| | | | | | | | | | | | | 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
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-9/+9
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-9/+9
| | | | | | | | | | 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
* Reapply r97010, the speculative revert failed.Daniel Dunbar2010-02-241-1/+1
| | | | llvm-svn: 97036
* Speculatively revert r97010, "Add an argument to PHITranslateValue to specifyDaniel Dunbar2010-02-241-1/+1
| | | | | | 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-1/+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
* Split critical edges as needed for load PRE.Bob Wilson2010-02-161-0/+7
| | | | llvm-svn: 96378
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-3/+3
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* The phi translated pointer can be computed when returning a partially cached ↵Chris Lattner2009-12-221-19/+21
| | | | | | | | | | 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
* avoid calling extractMallocCall when it's obvious we don't haveChris Lattner2009-12-221-1/+2
| | | | | | a call. This speeds up memdep ~1.5% llvm-svn: 91869
* fix an overly conservative caching issue that caused memdep toChris Lattner2009-12-191-32/+8
| | | | | | | | cache a pointer as being unavailable due to phi trans in the wrong place. This would cause later queries to fail even when they didn't involve phi trans. llvm-svn: 91787
* enhance NonLocalDepEntry to keep the per-block phi translated addressChris Lattner2009-12-091-15/+17
| | | | | | of the query. llvm-svn: 90958
* change NonLocalDepEntry from being a typedef for an std::pair to be itsChris Lattner2009-12-091-53/+53
| | | | | | own small class. No functionality change. llvm-svn: 90956
* Switch GVN and memdep to use PHITransAddr, which correctly handlesChris Lattner2009-12-091-303/+34
| | | | | | | | | | | | | | | | | | | | | | | phi translation of complex expressions like &A[i+1]. This has the following benefits: 1. The phi translation logic is all contained in its own class with a strong interface and verification that it is self consistent. 2. The logic is more correct than before. Previously, if intermediate expressions got PHI translated, we'd miss the update and scan for the wrong pointers in predecessor blocks. @phi_trans2 is a testcase for this. 3. We have a lot less code in memdep. We can handle phi translation across blocks of things like @phi_trans3, which is pretty insane :). This patch should fix the miscompiles of 255.vortex, and I tested it with a bootstrap of llvm-gcc, llvm-test and dejagnu of course. llvm-svn: 90926
* Fix indentation in switch statement.Nick Lewycky2009-12-051-15/+16
| | | | llvm-svn: 90650
* Silence compiler warnings.Benjamin Kramer2009-12-021-2/+2
| | | | llvm-svn: 90319
* Cleanup/remove some parts of the lifetime region handling code in memdep and ↵Owen Anderson2009-12-021-16/+13
| | | | | | | | GVN, per Chris' comments. Adjust testcases to match. llvm-svn: 90304
* rename some variables.Chris Lattner2009-12-011-13/+13
| | | | llvm-svn: 90258
* tidyChris Lattner2009-12-011-1/+3
| | | | llvm-svn: 90257
* fix 255.vortex again, third time's the charm.Chris Lattner2009-12-011-2/+35
| | | | llvm-svn: 90217
* Revert r90107, fixing test/Transforms/GVN/2009-11-29-ReverseMap.ll and theNick Lewycky2009-11-301-15/+2
| | | | | | llvm-gcc build. llvm-svn: 90113
* reapply r90093 with an addition of keeping the forwardChris Lattner2009-11-301-2/+15
| | | | | | | and reverse nonlocal memdep maps in synch, this should fix 255.vortex. llvm-svn: 90107
* revert this patch for now, it causes failures of:Chris Lattner2009-11-291-12/+2
| | | | | | | LLVM::Transforms/GVN/2009-02-17-LoadPRECrash.ll LLVM::Transforms/GVN/2009-06-17-InvalidPRE.ll llvm-svn: 90096
* Fix a really nasty caching bug I introduced in memdep. An entryChris Lattner2009-11-291-2/+12
| | | | | | | | | | | | was being added to the Result vector, but not being put in the cache. This means that if the cache was reused wholesale for a later query that it would be missing this entry and we'd do an incorrect load elimination. Unfortunately, it's not really possible to write a useful testcase for this, but this unbreaks 255.vortex. llvm-svn: 90093
* Detabify.Nick Lewycky2009-11-291-1/+1
| | | | llvm-svn: 90085
* Teach memdep to look for memory use intrinsics during dependency queries. FixesNick Lewycky2009-11-281-9/+30
| | | | | | PR5574. llvm-svn: 90045
* Enhance InsertPHITranslatedPointer to be able to return a list of newlyChris Lattner2009-11-281-10/+13
| | | | | | inserted instructions. No functionality change until someone starts using it. llvm-svn: 90039
* enable code to handle un-phi-translatable cases more aggressively:Chris Lattner2009-11-281-3/+0
| | | | | | | | | | | | | | | | | if we don't have an address expression available in a predecessor, then model this as the value being clobbered at the end of the pred block instead of being modeled as a complete phi translation failure. This is important for PRE of loads because we want to see that the load is available in all but this predecessor, and complete phi translation failure results in not getting any information about predecessors. This doesn't do anything until I renable code insertion since PRE now sees that it is available in all but one predecessors, but can't insert the addressing in the predecessor that is missing it to eliminate the redundancy. llvm-svn: 90037
* Rework InsertPHITranslatedPointer to handle the recursive case, this Chris Lattner2009-11-271-29/+84
| | | | | | | fixes PR5630 and sets the stage for the next phase of goodness (testcase pending). llvm-svn: 90019
* recursively phi translate bitcast operands too, for consistency.Chris Lattner2009-11-271-21/+18
| | | | llvm-svn: 90016
* add support for recursive phi translation and phi Chris Lattner2009-11-271-10/+67
| | | | | | | | | | | | | | | | translation of add with immediate. This allows us to optimize this function: void test(int N, double* G) { long j; G[1] = 1; for (j = 1; j < N - 1; j++) G[j+1] = G[j] + G[j+1]; } to only do one load every iteration of the loop. llvm-svn: 90013
* add comment.Chris Lattner2009-11-271-1/+5
| | | | llvm-svn: 90002
OpenPOWER on IntegriCloud