[LLVMdev] Updating value from PHI

Ryan Taylor ryta1203 at gmail.com
Fri Mar 9 11:18:21 PST 2012


I think the SSAupdater might do the trick. The issue with replaceUses is
that it would work great for the current block but what about the PHIs in
continuing blocks, think that would be a problem. Thanks.

On Thu, Mar 8, 2012 at 1:28 PM, Marc de Kruijf <dekruijf at cs.wisc.edu> wrote:

> It sounds like Transforms/Utils/SSAUpdater may be what you are looking
> for.
> A good example of how to use it -- one that sounds very similar to what
> you're doing -- can be found in Transforms/Scalar/LoopRotation.cpp
>
> On Wed, Mar 7, 2012 at 2:03 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
>> I am splitting a one BB loop into two BB.
>>
>> Basically, the one loop BB has 3 incoming values, one form back edge two
>> from other edges. I want to extract the PHIs from the other two edges out
>> into it's own BB and delete that from the loop, then redirect the backedge
>> to the loopbody (non extracted portion) and create a new PHI coming from
>> the extracted BB and the backedge.
>>
>> I can do this; however, the PHIs following in all the other BBs are not
>> getting updated, neither are the statements in the loopbody.
>>
>> What is the easieset way to propagate these changes downward?
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120309/019a3109/attachment.html>


More information about the llvm-dev mailing list