[LLVMdev] RFC: Native Windows C++ exception handling

Chandler Carruth chandlerc at google.com
Fri Feb 13 12:00:19 PST 2015


On Fri, Feb 13, 2015 at 11:29 AM, Reid Kleckner <rnk at google.com> wrote:

> On Fri, Feb 13, 2015 at 7:11 AM, Joseph Tremoulet <jotrem at microsoft.com>
> wrote:
>
>>  Yes, it seems like WinEHPrepare should always be able to move landing
>> pad code to somewhere appropriate.  Even if there's some involved code to
>> handle the cases that force #1, it's great that the complexity is contained
>> in WinEHPrepare.
>>
>>
>>
>> I'm still confused about the apparent lack of constraints after
>> WinEHPrepare.  *Can we simply require/assume that WinEHPrepare be run
>> after any passes that may move/insert code into landing pads?  Is that
>> documented somewhere?*
>>
>
> Yeah, this is kind of fuzzy. EH preparation just happens very late, after
> all the interesting passes (sroa, inlining, etc) have run. There are some
> passes that run afterwards, but they are typically lowering passes, and
> won't do this kind of hoisting.
>

I don't even think its very fuzzy. =] EH preparation is run during code
generation and with complete control over subsequent passes. It should be
very natural to impose strict requirements on subsequent passes within
reason (IE, you can't make SSA stop being valid, but you can do a whole lot
of other things).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150213/da13e156/attachment.html>


More information about the llvm-dev mailing list