[LLVMdev] API on JIT, code snippets
Reid Spencer
reid at x10sys.com
Tue Aug 10 11:56:14 PDT 2004
vak wrote:
> Well. Compiled. Tested. Infinite loop in:
>
> GenericValue gv = EE->runFunction(FooF, noargs);
>
> you were really, really close, Reid, just a one mistake:
>
> < CallInst * Add1CallRes = new CallInst(FooF, Params, "foo", BB);
>
> > CallInst * Add1CallRes = new CallInst(Add1F, Params, "add1", BB);
Duh. Oops!
>
> I got advice from Chris, thx.
>
> AND NOW IT WORKSSSSSS!!!
>
> HowToUseJIT.cpp is attached as finall version.
>
> ...well could anyone tell me whether JIT was really invoked in this code?
> What kind of optimization were applied by default (if any)?
JIT should have been invoked (its a subclass of ExecutionEngine). I doubt any
optimizations were applied. I'll leave that as an exercise for you to play
with. Have a look at the PassManager.
>
> thanks.
>
> oh, and great thanks to Reid of course!
Glad to help.
Reid.
More information about the llvm-dev
mailing list