<br><br><div class="gmail_quote">On Tue, May 17, 2011 at 11:54 PM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Kostya,<br>
<div class="im"><br>
> My transformation phase inserts an if-the-else construct into a BB.<br>
> If that BB contains llvm.eh.exception, I get an Assertion at some later point:<br>
><br>
> lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:212:<br>
> void llvm::FunctionLoweringInfo::clear(): Assertion `CatchInfoFound.size() ==<br>
> CatchInfoLost.size() && "Not all catch info was assigned to a  landing pad!"'<br>
> failed.<br>
><br>
> Is there some rule that forbids splitting BBs with EH?<br>
> Or maybe something special needs to be done when splitting such BB?<br>
<br>
</div>sadly the code generators can only handle the case in which the eh.selector call<br>
is in the landing pad (or in the basic block following it).  I suggest you put<br>
your branch after the calls to eh.exception and eh.selector.<br></blockquote><div>Thanks! </div><div>--kcc  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Ciao, Duncan.<br>
<div class="im"><br>
><br>
> The code is here:<br>
> <a href="http://code.google.com/p/address-sanitizer/source/browse/trunk/llvm/AddressSanitizer.cpp" target="_blank">http://code.google.com/p/address-sanitizer/source/browse/trunk/llvm/AddressSanitizer.cpp</a> ,<br>
> see splitBlockAndInsertIfThen<br>
><br>
> Thanks,<br>
><br>
> --kcc<br>
><br>
><br>
><br>
</div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br>