[llvm-commits] [llvm] r118702 - in /llvm/trunk/lib/CodeGen: SplitKit.cpp SplitKit.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Nov 11 11:21:16 PST 2010


On Nov 11, 2010, at 11:05 AM, Dan Gohman wrote:

>> Maybe a conservative approach could look at basic blocks. I want to ask: Can I move a load from block A to block B, where A dominates B. AA could conservatively assume that I want to move the load from the top of A to the bottom of B.
> 
> You also need to consider any other blocks that might be in a loop with B.

Yes, any possible path from A to B.

>> If all my MachineBasicBlocks are properly mapped to BasicBlocks, AA::canBasicBlockModify() is all I need, I think.
> 
> This sounds risky; there is MachineInstr-level code motion, possibly incuding remat itself ;). IIRC, the only use of MachineBasicBlock's BB member right now is verbose output.

We never remat stores, but you are right, other machine-level passes could possibly do that.

> A canMachineBasicBlockModify with a MachineInstr version of getModRefInfo might be worth considering.

Yes, that would actually be possible to do, using mayStore() and the memoperands.

/jakob





More information about the llvm-commits mailing list