Thanks for reply Chuck.<br>Please excuse me if I'm not supposed to reply to all.<br><br>Are you saying all PHI nodes are required to include all its predecessor blocks no matter they have input or not?<br>What about successor blocks? Are they optional if they don't provide inputs?<br>
<br>BTW, where should I look at to verify this, the mem2reg.cpp & PromoteMemToReg.cpp?<br>Thanks a lot.<br><br><div class="gmail_quote">On Sat, Mar 2, 2013 at 6:39 PM, Caldarale, Charles R <span dir="ltr"><<a href="mailto:Chuck.Caldarale@unisys.com" target="_blank">Chuck.Caldarale@unisys.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> From: <a href="mailto:llvmdev-bounces@cs.uiuc.edu">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu">llvmdev-bounces@cs.uiuc.edu</a>]<br>
> On Behalf Of Wei Dang<br>
> Subject: [LLVMdev] Question about method CodeExtractor::severSplitPHINodes<br>
<div class="im"><br>
> In the implementation of serverSplitPHINodes(), why it only checks the<br>
> first PHI node for possible multiple inputs from outside the region to<br>
> extract. There could be more than one PHI nodes in the header block,<br>
> and the code only checks the first one. I don't quite get it. What if<br>
> the first PHI node contains only incoming values from inside the region,<br>
> while subsequent PHI nodes have inputs from outside? Is that possible?<br>
<br>
</div>No, it's not possible. All PHI nodes must include inputs for _all_ predecessors of the block, so only one PHI node needs to checked for the origins.<br>
<br>
- Chuck<br>
<br>
<br>
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Wei Dang