[llvm-commits] [ARM] Scheduler FixedFrame object vs byval formal parameters
Andrew Trick
atrick at apple.com
Thu Oct 4 16:14:04 PDT 2012
On Oct 4, 2012, at 11:30 AM, Stepan Dyatkovskiy <STPWORLD at narod.ru> wrote:
> Hi all!
>
> Small but very important issue is, that SchedulerDAGInstrs::buildSchedGraph ignores dependencies between FixedStack objects and byval parameters. So loading byval parameters from stack may be inserted *before* it will stored, since these operations are treated as independent.
>
> Frankly right now, I couldn't found better solution than make byval arguments dependent from all fixed-frame objects. Perhaps guys, you have any ideas?
>
> Please find patch in attachment.
Hi Stepan,
Bill and Segei are right. You can look at the revisions they pointed to and make an equivalent fix on ARM.
I think it's better to fix this problem at Machine IR level rather then introduce special logic in the DAG builder. Although I admit there may be more to this problem, as Akira pointed out with a tail call example.
I think the rule should be that any time you're lowering call arguments that may alias a byval arg, either on the caller or callee side, you must either determine the byval argument and offset, or set your MachinePointerInfo to "unknown" rather than a fixed stack offset.
I would also be fine with a solution that tags all loads/stores to byval args as FixedStack access, but I'm not sure there's an easy way to do that.
-Andy
More information about the llvm-commits
mailing list