[PATCH] D66459: Make ShrinkWrap more consistent.

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 10 02:46:55 PST 2019


chill added a comment.

> 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?

> 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?


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