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

Cameron Zwarich zwarich at apple.com
Sun Dec 5 11:08:27 PST 2010


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.

Cameron



More information about the llvm-commits mailing list