<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 22, 2011, at 10:29 PM, Bill Wendling wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Optima; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">// Restrictions:<br><br>There are several new invariants which will be enforced by the verifier:<br><br>1. A landing pad block is a basic block which is the unwind destination of an<br>  invoke instruction.<br>2. A landing pad block must have a landingpad instruction as its first non-PHI<br>  instruction.<br>3. The landingpad instruction must be the first non-PHI instruction in the<br>  landing pad block.<br>4. Like indirect branches, splitting the critical edge to a landing pad block<br>  requires considerable care, and SplitCriticalEdge will refuse to do it.<br>5. All landingpad instructions in a function must have the same personality<br>  function.<br></span></span></blockquote></div><br><div>Could we add:</div><div><br></div><div>- A landing pad block is not the destination of any other kind of terminator. Only unwind edges are allowed.</div><div><br></div><div>- The landingpad instruction must only appear at the top of a landing pad. It cannot appear in any other block, or following non-phi instructions.</div><div><br></div><div>Why won't SplitCriticalEdge work for landing pads? Does it require more than splitting the landing pad after the landingpad instruction, and duplicating the top half? Alternatively, could we get a SplitLandingPad function?</div><div><br></div><div>Will it be possible to split landing pads during codegen?</div><div><br></div><div>/jakob</div><div><br></div></body></html>