[LLVMdev] Loads/Stores and MachineMemOperand

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Dec 13 09:03:31 PST 2012


On Dec 13, 2012, at 4:43 AM, Justin Holewinski <justin.holewinski at gmail.com> wrote:

> Is there a reason MachineMemOperands are not guaranteed to be persisted in late optimization passes?  Is there a use-case where they should be stripped?

That's not really the issue, though. As an intermediate representation, MI should be reasonably self-contained. The MMOs are pointers into an old version of the program being compiled - The MI representation has undergone many transformations, including CFG changes and code motion. The links provided by the MMOs get more and more sketchy as the program is optimized.

Currently, we only use the MMOs for alias analysis during scheduling, but even that can cause problems as you've seen with the stack coloring pass.

If you are attaching specific semantics to address spaces, you should encode it in either opcodes or explicit operands.

/jakob




More information about the llvm-dev mailing list