branch to a native instruction address from LLVM IR.

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 ?

Thanks

Xin

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 ?

I don't think there's a way to do this in pure LLVM IR. However, I think you could insert an inline assembly code call instruction to do the jump.

-- John T.

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

-Eli