<div dir="ltr"><div>I see. I can think of a couple of ways to handle this, but they fall into the hacky category. It may just be that we need to bite the bullet and update all of the places in the MachinePasses. :-( Could you point to the comments made by you and Chandler? I'd like to familiarize myself with them.</div><div><br></div><div>-bw</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 1:34 PM Craig Topper <<a href="mailto:craig.topper@gmail.com">craig.topper@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This was Chandler's proposal after observing the number of places I had to update in MachinePasses to understand the control flow change happening in the middle of the basic block. He thought just making it a terminator would make it simpler.</div><div><br></div><div>There is some special casing of exception handling in MachineIR passes to make the control flow for invoke work. Look for isEHPad() or hasEHPadSuccessor()</div><br clear="all"><div><div dir="ltr" class="gmail-m_-7134053726050333873gmail_signature">~Craig</div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 1:23 PM Bill Wendling <<a href="mailto:isanbard@gmail.com" target="_blank">isanbard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Thu, Jun 27, 2019 at 12:32 PM Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>What about SelectionDAG representation? Currently we expand callbr to INLINEASM_BR and BR. Both of which are terminators. But in order to support outputs we would need to put CopyFromReg nodes between them.</div></div></blockquote><div><br></div><div>Is there a reason why callbr needs to be lowered to INLINEASM_BR and not a normal INLINEASM?</div><div><br></div><div>-bw</div></div></div>
</blockquote></div>
</blockquote></div></div>