[LLVMdev] Question about method CodeExtractor::severSplitPHINodes

Caldarale, Charles R Chuck.Caldarale at unisys.com
Sat Mar 2 17:39:49 PST 2013

> 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.

More information about the llvm-dev mailing list