[llvm-commits] [Review request] Moving code from PHIElimination to MachineBasicBlock

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Dec 5 11:16:31 PST 2010


On Dec 5, 2010, at 11:08 AM, Cameron Zwarich wrote:

> On Dec 5, 2010, at 10:38 AM, Chris Lattner wrote:
> 
>> On Dec 4, 2010, at 4:16 PM, Cameron Zwarich wrote:
>> 
>>> MachineBasicBlock should be responsible for the placement of phis in predecessor blocks, sparing PHIElimination the need to know the details. This will also let StrongPHIElimination share the code.
>> 
>> I don't have a strong opinion on this, but this function does seem pretty phi-elimination specific, and it seems strange for MBB.cpp to have to pull in MachineRegisterInfo.h.  If your goal is to share this between phi elimination implementation, it would probably be better in a PHIEliminationUtils.cpp file or something?
> 
> Okay, I'll do that. It's a bit strange to have a new file just for that one function, but I think more code could be moved there over time.

Right.

I was looking at using that function for live range splitting, but the method it uses for edges to landing pads is a bit weird, and it only really makes sense before coalescing. (It can insert a copy at the beginning of the basic block, doubling register pressure through the block).

So banishing it to a PHI-elimination specific file is fine.

/jakob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101205/628f30ce/attachment.bin>


More information about the llvm-commits mailing list