[llvm-commits] [llvm] r117709 - /llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp

Owen Anderson resistor at mac.com
Fri Oct 29 15:24:26 PDT 2010


On Oct 29, 2010, at 3:08 PM, Eli Friedman wrote:

> On Fri, Oct 29, 2010 at 2:05 PM, Owen Anderson <resistor at mac.com> wrote:
>> Author: resistor
>> Date: Fri Oct 29 16:05:17 2010
>> New Revision: 117709
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=117709&view=rev
>> Log:
>> Give up on doing in-line instruction simplification during correlated value propagation.  Instruction simplification
>> needs to be guaranteed never to be run on an unreachable block.  However, earlier block simplifications may have
>> changed the CFG to make block that were reachable when we began our iteration unreachable by the time we try to
>> simplify them. (Note that this also means that our depth-first iterators were potentially being invalidated).
> 
> It isn't obvious to me how value propagation actually modifies the CFG…

It doesn't.  It could, however, determine that a comparison can be constant folded to true (or false).  The Simplify routines could use that replacement to turn a conditional branch into a direct branch, removing an edge from the CFG in the process.

--Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101029/d74a80e8/attachment.html>


More information about the llvm-commits mailing list