[PATCH] D66459: Make ShrinkWrap more consistent.

zuojian lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 20:35:09 PST 2019


linzj added a comment.

In D66459#1740000 <https://reviews.llvm.org/D66459#1740000>, @chill wrote:

> > V8 needs to save a specific set of registers at the entry of a function depending on the type of this function. For example, a JS function needs to save r0, r1,r7 along with fp, lr. And a wasm function needs to spill r3 at sp - 16.
>
> So, these registers essentially hold argument values?


Yes. They are argument values.

> 
> 
>> But they are CSRs in the ShrinkWrap context. For example, If a JS function use/def r1 in the a basic block but ShrinkWrap move the save block to one of its successor, that will be a trouble.
> 
> I think ShrinkWrap pass is the wrong place to solve this problem. Could you, please, look at the how the registers, which correspond to vararg arguments of a variadic function are saved to 
>  designated slots on the stack (check all mentions of `ArgRegsSaveSize` in `ARMFrameLowering.cpp`)? Perhaps you could do something similar?

I check that place, but my solution also works well in current situation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66459/new/

https://reviews.llvm.org/D66459





More information about the llvm-commits mailing list