[LLVMdev] Emit a jump instruction to a place inside basicblock
morisset at google.com
Thu Oct 30 11:33:16 PDT 2014
>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.
On Wed Oct 29 2014 at 2:28:09 PM Xiaoguang Wang <xgwang09 at gmail.com> wrote:
> Hi all,
> 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.
> 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.
> While my question is, is there a way to insert jump to place inside a
> basic block?
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev