[PATCH] D14407: [WinEH] Mark funclet entries and exits as clobbering all registers

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 09:06:19 PST 2015


JosephTremoulet added a comment.

In http://reviews.llvm.org/D14407#283723, @rnk wrote:

> In http://reviews.llvm.org/D14407#283135, @JosephTremoulet wrote:
>
> > Should you also be removing the FIXME code in X86ISelLowering.cpp (~line 3445) that sets the noPreserved mask on invokes (with 32-bit funclet personalities)?  I don't see that here.
>
>
> I can't remove that yet because it also informs PEI that it needs to push all non-volatile registers in the prologue. We *don't* want that behavior for x64, because the runtime takes care of it for us, and redundantly saving all callee-saved XMM registers is expensive.
>
> I think the right way to handle that is to put a nothing-preserved mask on EH_RESTORE instructions, which corresponds to where control rejoins an outer scope after a CATCHRET. That way, 32-bit functions using only cleanups will not need to spill all CSRs.


Oops -- I didn't realize that the 32-bit runtime doesn't restore them for us on "catchret".  What you say makes sense, thanks for explaining.


http://reviews.llvm.org/D14407





More information about the llvm-commits mailing list