[llvm-commits] [Patch] Exception Handling Documentation

Chris Lattner clattner at apple.com
Tue Aug 2 14:50:50 PDT 2011


On Aug 2, 2011, at 2:38 PM, Bill Wendling wrote:

> On Aug 2, 2011, at 2:29 PM, Bill Wendling wrote:
> 
>>> +  <li>A landing pad blcok must have a '<tt>landingpad</tt>' instruction as its
>>> +      first non-PHI instruction.</li>
>>> +  <li>The '<tt>landingpad</tt>' instruction must be the first non-PHI
>>> +      instruction in the landing pad block.</li>
>>> 
>>> typo "blcok".  It's not clear to me what the difference between these two points is.
>>> 
>> The second is restricting the placement of the landingpad instruction. The first is restricting how the landing pad block is set up. It would prevent this, admittedly broken, landing pad block:
>> 
>> lpad:
>> %exn = landingpad ...
>> %exn1 = landingpad ...
>> 
>> Though this may be overkill?  
>> 
> How about these for the restrictions?
> 
> 	• A landing pad block is a basic block which is the unwind destination of an 'invoke' instruction.
> 	• A landing pad block must have a 'landingpad' instruction as its first non-PHI instruction.
> 	• There can be only one 'landingpad' instruction within the landing pad block.
> 	• A basic block that is not a landing pad block may not include a 'landingpad' instruction.
> 	• All 'landingpad' instructions in a function must have the same personality function.

Sounds fine to me, please land the landingpad in langref!  I'll take a look at the 'landingpad instruction' patch once you update it for the grammar change.

-Chris



More information about the llvm-commits mailing list