[LLVMdev] RFC: Exception Handling Rewrite

John McCall rjmccall at apple.com
Mon Jul 25 11:25:32 PDT 2011


On Jul 23, 2011, at 5:00 PM, Jakob Stoklund Olesen wrote:

> 
> On Jul 23, 2011, at 4:15 PM, Bill Wendling wrote:
> 
>> On Jul 23, 2011, at 2:00 AM, Jakob Stoklund Olesen wrote:
> 
>>> Yes. You scared me with 'requires considerable care'. Does that mean anything other than 'you have to duplicate the landing pad instead of splitting the unwind edge'. Is special magic required to duplicate a landingpad instruction?
>>> 
>> There shouldn't be any special magic involved. As you pointed out, we'd have to duplicate the landingpad instruction into each of the critical edge blocks.
> 
> That sounds good to me. It's not necessary that SplitCriticalEdge can do it, I just want to be able to duplicate a landing pad without knowing the details of any particular personality function.

You can definitely do that.  As you surmised, the only problem is the constraint that a landing pad not be the target of a non-unwind edge, which, in the general case, requires the rest of the edges to change, which is likely to be surprising to generic clients of SplitCriticalEdge.  I'd be in favor of letting callers of SplitCriticalEdge just specifically opt in to splitting unwind edges, or maybe providing a different entrypoint for it.

John.



More information about the llvm-dev mailing list