[LLVMdev] Question about post RA scheduler

Andrew Trick atrick at apple.com
Thu Mar 15 10:37:53 PDT 2012


On Mar 15, 2012, at 10:22 AM, Akira Hatanaka <ahatanak at gmail.com> wrote:

> Thank you for your suggestions.
> 
> I implemented the first approach (provided the byval argument and
> offset to MachinePointerInfo) and it seems to have fixed the
> instruction ordering problem. It was a lot simpler than initially
> expected.
> 
> In this particular case, is the user responsible for providing alias
> information to MachinePointerInfo to guarantee instructions are
> emitted in the correct order? It seems to me that getStore should not
> try to infer pointer information unless the user explicitly asks for
> it. The scheduler will then conservatively treat it as a load or store
> that aliases anything.

I think the pointer type inference is correct in the absence of any stronger information provided when the target lowers the store. In this case, the store is special because it initializes an object that already has a name in the IR. So it's the job of whoever creates that store to produce correct MachinePointerInfo. Unfortunately, that requirement is not obvious. If you can think of a way to clarify the lowering code through better comments, stricter API, or verification code, a patch would be most welcome.

Thanks,
-Andy



More information about the llvm-dev mailing list