[LLVMdev] Emit a jump instruction to a place inside basicblock
serge.guelton at enst-bretagne.fr
Thu Oct 30 00:46:58 PDT 2014
On Wed, Oct 29, 2014 at 05:24:37PM -0400, Xiaoguang Wang 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
ISTM you can split a basic bloc in two using ``llvm::SplitBlock'' then
jump to the begining of the second part?
More information about the llvm-dev