[llvm] r251113 - [CodeGen] Mark setjmp/catchret MBBs address-taken

Andy Ayers via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 12:48:36 PST 2015


Someday I’d like to understand this “epilog constraint” better, since our own compilers happily shrink wrap on x64 (via chained unwind).

However, this day may be a ways off....

First LLILC has to get to the point where we want to shrink wrap, and then we have to see if CoreCLR can handle it.

I see a fair number of cases coming from C# code where it looks like shrink wrapping should be a win.

From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf Of Reid Kleckner via llvm-commits
Sent: Thursday, November 12, 2015 10:44 AM
To: Quentin Colombet <qcolombet at apple.com>
Cc: llvm-commits <llvm-commits at lists.llvm.org>
Subject: Re: [llvm] r251113 - [CodeGen] Mark setjmp/catchret MBBs address-taken

On Thu, Nov 12, 2015 at 9:37 AM, Quentin Colombet <qcolombet at apple.com<mailto:qcolombet at apple.com>> wrote:
Hi Joseph,

Thanks for the detail explanation.

Based on the description, it seems to me the MachineFunction representation is, at least partly, not properly modeling the constraints of the EH code.
Indeed, in the funclets, there is nothing that uses of modify CSRs registers, so it looks like we do not need any prologue and epilogue in that case. I thought that what we were missing is something that expand CATCHRET into "lea BLOCKADER, rax”, i.e., just a pseudo expansion, but not a full prologue and epilogue.

But anyway, let me ask a couple more questions:
- When you said the funclet needs their own prologue and epilogue my impression is that right now this prologue and epilogue are needlessly identical to the function prologue and epilogue. Is this true or they actually different and this is just an artefact or the test case?

Ideally, funclets would have their own CSR sets. That was difficult to implement in the current framework, so I made them all use the same CSR sets.

- Is it worth adding the support for funclet in shrink-wrapping? My impression was that the constraints on EH prologue and epilogue are too tight to have it kicking in.

I think it's definitely not worth trying to shrink-wrap funclets. It might be worth shrink-wrapping the parent function that happens to use funclets. However, we would have to overcome the Win64 epilogue constraints, and we've decided not to do that now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151112/84a8d065/attachment.html>


More information about the llvm-commits mailing list