[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
Wei Dang
jacdang at gmail.com
Sat Mar 2 18:35:46 PST 2013
Thanks for reply Chuck.
Please excuse me if I'm not supposed to reply to all.
Are you saying all PHI nodes are required to include all its predecessor
blocks no matter they have input or not?
What about successor blocks? Are they optional if they don't provide inputs?
BTW, where should I look at to verify this, the mem2reg.cpp &
PromoteMemToReg.cpp?
Thanks a lot.
On Sat, Mar 2, 2013 at 6:39 PM, Caldarale, Charles R <
Chuck.Caldarale at unisys.com> wrote:
> > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> > On Behalf Of Wei Dang
> > Subject: [LLVMdev] Question about method
> CodeExtractor::severSplitPHINodes
>
> > In the implementation of serverSplitPHINodes(), why it only checks the
> > first PHI node for possible multiple inputs from outside the region to
> > extract. There could be more than one PHI nodes in the header block,
> > and the code only checks the first one. I don't quite get it. What if
> > the first PHI node contains only incoming values from inside the region,
> > while subsequent PHI nodes have inputs from outside? Is that possible?
>
> 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.
>
> - Chuck
>
>
> 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.
>
>
--
Wei Dang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130302/78fcdf5f/attachment.html>
More information about the llvm-dev
mailing list