0

I'm trying to JIT the llvm trampoline intrinsics, but I can't find the functionality for that in the llvm::IRBuilder class. Does anyone know if it's possible to do with the current JIT engine?

I'm not looking for the semantics of the trampoline intrinsic, but how to generate the llvm ir for it. I assumed I would find it in the llvm::IRBuilder class because it can generate some other intrinsics, but, alas, it isn't there.

maxywb
  • 2,275
  • 1
  • 19
  • 25
  • 1
    You need to find the intrinsic ID name from llvm/IR/Intrinsics.gen then pass that to `Intrinsic::getDeclaration` which will give you a function object that you can pass to `IRBuilder::CreateCall` – user1937198 Jan 23 '15 at 00:12
  • 1
    Here is how you get the `Function*` for an intrinsic. Everything else is done by the `CallInst` or the `IRBuilder`. http://stackoverflow.com/questions/27569967/adding-intrinsics-using-an-llvm-pass – Michael Haidl Jan 23 '15 at 06:00

0 Answers0