llvm/test/Transforms/CorrelatedValuePropagation
Philip Reames 82d78c2f27 [LVI] Reduce compile time by lazily scanning blocks if needed
When encountering a non-local pointer, LVI would eagerly scan the block for dereferences of the given object to prove the pointer to be non null.  That's all well and good, but *then* we'd go recurse through our input blocks.  As a result, we could end up scanning each and every block we traverse, even if the final definition was obviously non null or we found a constant value somewhere up the chain.  The previous code papered over this by using the isKnownNonNull routine from value tracking.  This made the duplication less painful in the common case.

Instead, we know do the block scan only *after* we've gotten the recursive results back.  This lets us stop scanning individual blocks as soon as we've determined it to be non-null in any predecessor block and use our usual merge rules to propagate that information cheaply through successor blocks.  For a pointer which can be found non-null, this does strictly less work and sometimes substaintially so.

Note that the case where we *can't* prove something non-null is still the really expensive case.  We end up scanning each and every block looking for a dereference and never end up finding one.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267642 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-27 00:30:55 +00:00
..
2010-09-02-Trunc.ll
2010-09-26-MergeConstantRange.ll
basic.ll [LVI] Reduce compile time by lazily scanning blocks if needed 2016-04-27 00:30:55 +00:00
conflict.ll [LVI] Introduce an intersect operation on lattice values 2016-02-02 03:15:40 +00:00
crash.ll
icmp.ll
non-null.ll Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
range.ll [LVI] Fix a bug which prevented use of !range metadata within a query 2016-03-04 22:27:39 +00:00
sdiv.ll [CVP] Convert an SDiv to a UDiv if both operands are known to be nonnegative 2016-03-14 03:24:28 +00:00
select.ll [LVI] Improve select handling to use condition 2016-02-12 00:09:18 +00:00