<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 2, 2015 at 7:05 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> On Feb 2, 2015, at 6:04 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
> I actually like the unified intrinsic approach here. The backend already has to know things about the personality function. Until recently we would assume that the personality function wants an Itanium LSDA, for example, and dump that out into a target-specific section. Now on Windows we look at the personality function and try to figure out what kind of preparation and tables it wants.<br>
><br>
> It seems reasonable then that we could continue along the lines of classifying some personalities as "Itanium" personalities and lowering these new intrinsics out to __cxa_begin_catch / end_catch.<br>
<br>
</span>You are over-estimating how similar the code-generation patterns are going to be here.  The information flow from the unwind mechanism to the catch clause can differ quite wildly.<br>
<br>
Go look at what happens in the different ABIs when an exception with a non-trivial copy constructor is caught.  There’s an entire copy-construction that’s explicit in Itanium but which I believe is done implicitly by the personality equivalent in MSVC (necessarily, if you understand the purpose of __cxa_begin_catch/__cxa_end_catch).<br></blockquote><div><br></div><div>Makes sense. LLVM shouldn't be too heroic about papering over the differences.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I agree that we should be more explicit about modeling the differences in personality-mandated code generation.  Perhaps if we did this, people would stop talking about the “Itanium LSDA” when they mean the gcc/g++ LSDA.  I just think there is zero benefit in pretending that we can actually model every useful difference between personalities with the name of the personality function.</blockquote><div><br></div><div>I guess that was my misunderstanding and I'm guilty of promoting that terminology. :) The document leads one to believe that the tables are covered later, but now that I look again, I see there is very little information.</div></div></div></div>