[PATCH] D63396: [WinEH] Allocate space in funclets stack to save XMM CSRs
Pengfei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 08:18:08 PDT 2019
pengfei added a comment.
In D63396#1640095 <https://reviews.llvm.org/D63396#1640095>, @rnk wrote:
> My suggestion for drastically simplifying this is to modify `X86RegisterInfo::eliminateFrameIndex` to check if it's lowering an XMM CSR slot. In that case, it would call a new method, `X86FrameLowering::getSaveXMMFrameIndexRef`, which would contain the logic to check if the current block is a funclet prologue or epilogue. If the parent BB of the current instruction is in a funclet, then XMM slots would be resolved relative to RSP using the funclet frame size. If not, it would delegate to the standard `getFrameIndexReference` logic, yielding the correct register and offset for XMM slots in non-funclet prologues and epilogues. The prologue code that currently inserts savexmm markers would need to call this new helper as well instead of the standard `getFrameIndexReference` method. Does that plan seem reasonable?
It's a great idea that simplifies the implementation. I commit a new patch on D66596 <https://reviews.llvm.org/D66596> that follows your suggestions. Thanks a lot for the review and suggestions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63396/new/
https://reviews.llvm.org/D63396
More information about the llvm-commits
mailing list