summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LazyValueInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* llvm.memcpy.* has two distinct associated address spaces; the source address ↵Eli Friedman2011-05-311-4/+6
| | | | | | space, and the destination address space. Fix up the interface on MemIntrinsic and MemTransferInst to make this clear, and fix InstructionDereferencesPointer in LazyValueInfo.cpp to use the interface properly. llvm-svn: 132356
* Remove unused STL header includes.Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130068
* Mark some functions as used which are used within debug-only code. ThisChandler Carruth2011-04-181-0/+2
| | | | | | silences Clang's -Wunused-function when building in release mode. llvm-svn: 129709
* Teach LazyValueInfo that allocas aren't NULL. Over all of llvm-test, this savesNick Lewycky2011-01-151-5/+27
| | | | | | | | | | | half a million non-local queries, each of which would otherwise have triggered a linear scan over a basic block. Also fix a fixme for memory intrinsics which dereference pointers. With this, we prove that a pointer is non-null because it was dereferenced by an intrinsic 112 times in llvm-test. llvm-svn: 123533
* Reorder, rename, and document some members to make this easier to follow.Owen Anderson2011-01-051-20/+23
| | | | llvm-svn: 122929
* When computing the value on an edge, in certain cases LVI would fail to ↵Owen Anderson2011-01-051-0/+5
| | | | | | | | compute the value range in the predecessor block, leading to an incorrect conclusion for the edge value. Found by inspection. llvm-svn: 122908
* Re-convert several of LazyValueInfo's internal maps to Dense{Map|Set}, and ↵Owen Anderson2011-01-051-33/+93
| | | | | | | | | fix the issue in hasBlockValue() that was causing iterator invalidations. Many thanks to Dimitry Andric for tracking down those invalidations! llvm-svn: 122906
* Speculatively revert the use of DenseMap in LazyValueInfo, which may be ↵Owen Anderson2010-12-201-42/+16
| | | | | | causing Linux self-host failures. llvm-svn: 122291
* Attempt to appease the DragonEgg buildbots.Owen Anderson2010-12-201-22/+24
| | | | llvm-svn: 122288
* Convert one of LVI's primary maps to a DenseMap, now that we know are more ↵Owen Anderson2010-12-201-16/+40
| | | | | | assured of iterator stability. llvm-svn: 122273
* More LVI cleanups, including trying to simplify the process of maintaining ↵Owen Anderson2010-12-201-25/+41
| | | | | | the OverDefinedCache. llvm-svn: 122256
* Reuse the reference into the LVI cache throughout the solver subsystem. ↵Owen Anderson2010-12-201-24/+28
| | | | | | | | This is much easier to verify as being safe thanks its recent de-recursivization. llvm-svn: 122254
* Make LazyValueInfo non-recursive.Nick Lewycky2010-12-181-132/+249
| | | | llvm-svn: 122120
* Move Value::getUnderlyingObject to be a standaloneDan Gohman2010-12-151-2/+3
| | | | | | | function so that it can live in Analysis instead of VMCore. llvm-svn: 121885
* Clean up some of LVI:Nick Lewycky2010-12-151-91/+101
| | | | | | | | * mergeIn now uses constant folding for constants that are provably not-equal. * sink some sanity checks from the get*() methods into the mark*() methods, to ensure that we never have a constant/notconstant ConstantInt * some textual cleanups, whitespace changes, removing "else" after return, that sort of thing. llvm-svn: 121877
* Take the first step towards making LVI non-recursive: get rid of the ↵Owen Anderson2010-12-091-101/+39
| | | | | | LVIQuery abstraction. llvm-svn: 121357
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* It is possible, under specific circumstances involving ptrtoint ↵Owen Anderson2010-09-161-3/+7
| | | | | | | | | | | | ConstantExpr's, for LVI to end up trying to merge a Constant into a ConstantRange. Handle this conservatively for now, rather than asserting. The testcase is more complex that I would like, but the manifestation of the problem is sensitive to iteration orders and the state of the LVI cache, and I have not been able to reproduce it with manually constructed or simplified cases. Fixes PR8162. llvm-svn: 114103
* Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce ↵Owen Anderson2010-09-071-0/+2
| | | | | | | | #include clutter and exposing internal details. llvm-svn: 113252
* Add completely hokey binary-and and binary-or operations to ConstantRange andNick Lewycky2010-09-071-0/+6
| | | | | | teach LazyValueInfo to use them. llvm-svn: 113196
* zap dead code.Chris Lattner2010-09-041-4/+0
| | | | llvm-svn: 113073
* Add support for simplifying a load from a computed value to a load from a ↵Owen Anderson2010-09-031-2/+11
| | | | | | | | global when it is provable that they're equivalent. This fixes PR4855. llvm-svn: 112994
* Remove incorrect and poorly tested code for trying to reason about values on ↵Owen Anderson2010-09-021-16/+2
| | | | | | | | default edges of switches. Just return the conservatively correct answer. llvm-svn: 112876
* Fix a bug in LazyValueInfo that CorrelatedValuePropagation exposed: In the ↵Owen Anderson2010-09-021-4/+0
| | | | | | | | LVI lattice, undef and the full set ConstantRange should not be treated as equivalent. llvm-svn: 112843
* It is possible to try to merge a not-constant with a constantrage, when ↵Owen Anderson2010-08-301-2/+3
| | | | | | | | | dealing with ptrtoint ConstantExpr's. Unfortunately, the only testcase I have for this is huge and doesn't reduce well because the error is sensitive to iteration-order issues, since the problem only occurs when merging values in a particular order. llvm-svn: 112489
* Improve the precision of getConstant().Owen Anderson2010-08-271-0/+5
| | | | llvm-svn: 112323
* Use LVI to eliminate conditional branches where we've tested a related ↵Owen Anderson2010-08-271-1/+2
| | | | | | | | condition previously. Update tests for this change. This fixes PR5652. llvm-svn: 112270
* In the default address space, any GEP off of null results in a trap value if ↵Owen Anderson2010-08-251-4/+5
| | | | | | | | | you try to load it. Thus, any load in the default address space that completes implies that the base value that it GEP'd from was not null. llvm-svn: 112015
* NULL loads are only invalid in the default address space.Owen Anderson2010-08-241-1/+1
| | | | llvm-svn: 111972
* Add support for inferring values for the default cases of switches.Owen Anderson2010-08-241-3/+22
| | | | llvm-svn: 111971
* Add support for inferring that a load from a pointer implies that it is not ↵Owen Anderson2010-08-241-4/+17
| | | | | | null. llvm-svn: 111959
* Don't assume that all constants with integer types are ConstantInts.Owen Anderson2010-08-241-2/+11
| | | | llvm-svn: 111906
* Use ConstantRange to propagate information through value definitions.Owen Anderson2010-08-181-4/+83
| | | | llvm-svn: 111425
* Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer ↵Owen Anderson2010-08-181-21/+47
| | | | | | issues. llvm-svn: 111382
* Fix another iterator invalidation that caused a *really* nasty ↵Owen Anderson2010-08-161-6/+7
| | | | | | miscompilation in 403.gcc. llvm-svn: 111210
* Fix a subtle use-after-free issue.Owen Anderson2010-08-111-1/+4
| | | | llvm-svn: 110863
* Improve indentation.Owen Anderson2010-08-111-27/+28
| | | | llvm-svn: 110778
* Now that we're using ConstantRange to represent potential values, make use ↵Owen Anderson2010-08-101-8/+35
| | | | | | | | of that represenation to create constraints from comparisons other than eq/neq. llvm-svn: 110742
* Switch over to using ConstantRange to track integral values.Owen Anderson2010-08-101-7/+44
| | | | llvm-svn: 110714
* Add ConstantRange information to the debugging output.Owen Anderson2010-08-091-0/+3
| | | | llvm-svn: 110598
* Add the beginnings of infrastructure for range tracking.Owen Anderson2010-08-051-6/+60
| | | | llvm-svn: 110388
* Split the tag and value members of LVILatticeVal in preparation for ↵Owen Anderson2010-08-051-14/+14
| | | | | | expanding the lattice to something that won't fit in two bits. llvm-svn: 110383
* Add an initial implementation of PHI translation for LazyValueInfo. This ↵Owen Anderson2010-07-301-35/+72
| | | | | | | | involves rolling back some of my earlier data structure improvements until I can ensure that there are no iterator invalidation problems. llvm-svn: 109935
* Revert my last two patches to LVI, which recent changes have exposed a ↵Owen Anderson2010-07-301-56/+94
| | | | | | miscompilation in. llvm-svn: 109889
* Pass the queried value by argument rather than in a member, in preparation ↵Owen Anderson2010-07-281-36/+25
| | | | | | for supporting PHI translation. llvm-svn: 109701
* Get rid of LVIQuery as a distinct data structure, so that we don't have to ↵Owen Anderson2010-07-281-93/+66
| | | | | | initialize a new set of maps on every query. llvm-svn: 109679
* Rearrange several datastructures in LazyValueInfo to improve compile time.Owen Anderson2010-07-271-69/+35
| | | | | | This is still not perfect, but better than it was before. llvm-svn: 109563
* Add an initial implementation of LazyValueInfo updating for JumpThreading. ↵Owen Anderson2010-07-261-4/+89
| | | | | | Disabled for now. llvm-svn: 109424
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* Convert debug messages to use dbgs(). Generally this meansDavid Greene2009-12-231-7/+7
| | | | | | s/errs/dbgs/g except for certain special cases. llvm-svn: 92040
OpenPOWER on IntegriCloud