[llvm-commits] [Review request] Have Correlated Value Propagation handle instruction operands.

Owen Anderson resistor at mac.com
Mon Feb 7 21:33:50 PST 2011


Frits,

Do you done any measurements of the compile-time impact of this?

--Owen

On Feb 7, 2011, at 12:12 PM, Frits van Bommel wrote:

> This patch teaches -correlated-propagation to check whether LVI knows
> instruction operands to be constant, and if so to replace them. It
> also adds a call to SimplifyInstruction afterwards so that the special
> handling of some instructions (select, load, store) is no longer
> needed.
> 
> This fixes the -correlated-propagation problem mentioned in comment 1
> of PR 9004[1] and is an alternative implementation of "A small pass to
> constant fold branch conditions in destination blocks"[2] which
> integrates with the existing pass as Duncan suggested.
> Since it leverages LVI, this also handles the 'if (x == 0) use(x)'
> case mentioned in that post as well as the 'x > 10' followed by 'x >
> 5' case I mentioned in a follow-up (and doesn't need a domtree).
> 
> It passes 'make check-all'.
> 
> 
> [1]: http://llvm.org/bugs/show_bug.cgi?id=9004
> [2]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-February/037884.html
> <correlated-value-prop-operands.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list