Hi,<br><br>From my understanding of the LLVM IR, it is impossible to jump to the middle of a Basic Block, only to its beginning. But there is a splitBasicBlock function that seems like it might be useful to you, to make sure a basic block is starting at the exact place you want to jump.<div><br></div><div>Best regards,</div><div>Robin</div><br><div class="gmail_quote">On Wed Oct 29 2014 at 2:28:09 PM Xiaoguang Wang <<a href="mailto:xgwang09@gmail.com">xgwang09@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi all,<br><br></div>I'm a beginner in LLVM. Currently, I want to implement a pass that generates a jump table. The entry in that table is a jump to some place (may be an instruction) in a basic block.<br><br></div>I'm reading the JumpTable code in llvm 3.5, there is a table which contains jump entries to functions. In AsmPrinter::doFinalization function from file lib/CodeGen/AsmPrinter/AsmPrinter.cpp, it gets a MCSymbolRefExpr from the function symbol. <br><br>While my question is, is there a way to insert jump to place inside a basic block?<br><br></div>Thanks!<br><br></div>Xiaoguang<br></div>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div>