<div><font>Hi:</font></div><div><font>Unfortunately main is beyond our use-case. Is there any suggestion on how to work around this bug?</font></div><div><font>Also, found a new case where even non-dead basicblocks could reproduce the same issue, is there any suggestion on how can I debug this?</font></div><div><font><br></font></div><div><font>Zhang</font></div><div><includetail><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Arthur Eubanks"<aeubanks@google.com>;</div><div><b>Date: </b> Mon, Apr 12, 2021 11:57 AM</div><div><b>To: </b> "Zhang"<admin@mayuyu.io>; <wbr></div><div><b>Cc: </b> "llvm-dev"<llvm-dev@lists.llvm.org>; <wbr></div><div><b>Subject: </b> Re: [llvm-dev] Unreferenced BlockAddress broke IR compilation?</div></div><div> </div><div style="position:relative;"><div id="tmpcontent_res"></div><div dir="ltr">Does <a href="https://reviews.llvm.org/rG90af134473331095adcf2c7e4a511ac35d9f2f4a">https://reviews.llvm.org/rG90af134473331095adcf2c7e4a511ac35d9f2f4a</a> help?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 11, 2021 at 8:41 PM Zhang via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</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><font>Hi:</font></div><div>I'm currently using 176249bd @ release/11.x for a downstream project that contains two passes.</div><div>The first pass randomly introduces DeadBasicBlocks (BasicBlocks that are not branched to in any way).</div><div>The second pass creates BlockAddress of all BasicBlocks in a function, put them into a GlobalVariable and patch br instructions to GEP+Load+indibr instructions.</div><div><br></div><div>When the first pass didn't create deadBasicBlock, the transformed IR fully works as intended, however if deadbasicblock is introduced, all elements in the GV created in the second pass references to the same address in the compiled object file.</div><div><br></div><div>Not sure if this is a bug on LLVM side or not</div><div><br></div><div><br></div><div><u></u><u></u></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>

</div></div><!--<![endif]--></includetail></div>