[LLVMdev] branch to a native instruction address from LLVM IR.

Eli Friedman eli.friedman at gmail.com
Mon Jun 25 09:17:05 PDT 2012


On Sun, Jun 24, 2012 at 3:04 AM, Xin Tong <xerox.time.tech at gmail.com> wrote:
> I would like to generate a branch/jump to a native instruction address
> (set up in the JIT runtime) in LLVM IR. It seems all the branch
> instructions (except indirect branch) takes a LLVM BasicBlock. What
> would be the best way to achieve this ?

You probably want the "call" instruction; if you set it up as a tail
call, the compiler will generate a "jmp" instruction.

-Eli



More information about the llvm-dev mailing list