llvm-project/llvm/test/Transforms/CorrelatedValuePropagation
Philip Reames 814fb60130 [CVP] Fold return values if possible
In my previous change to CVP (251606), I made CVP much more aggressive about trying to constant fold comparisons. This patch is a reversal in direction. Rather than being agressive about every compare, we restore the non-block local restriction for most, and then try hard for compares feeding returns.

The motivation for this is two fold:
 * The more I thought about it, the less comfortable I got with the possible compile time impact of the other approach. There have been no reported issues, but after talking to a couple of folks, I've come to the conclusion the time probably isn't justified.
 * It turns out we need to know the context to leverage the full power of LVI. In particular, asking about something at the end of it's block (the use of a compare in a return) will frequently get more precise results than something in the middle of a block. This is an implementation detail, but it's also hard to get around since mid-block queries have to reason about possible throwing instructions and don't get to use most of LVI's block focused infrastructure. This will become particular important when combined with http://reviews.llvm.org/D14263.

Differential Revision: http://reviews.llvm.org/D14271

llvm-svn: 252032
2015-11-04 01:43:54 +00:00
..
2010-09-02-Trunc.ll
2010-09-26-MergeConstantRange.ll
basic.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
crash.ll
icmp.ll
non-null.ll [LazyValueInfo] Report nonnull range for nonnull pointers 2015-09-18 13:01:48 +00:00
range.ll [LVI/CVP] Teach LVI about range metadata 2015-10-29 03:57:17 +00:00
select.ll [CVP] Fold return values if possible 2015-11-04 01:43:54 +00:00