[LLVMdev] One question on runJITOnFunction() in JIT.cpp in llvm-2.6

Heming Cui hc2428 at columbia.edu
Wed Mar 31 09:33:00 PDT 2010


Dear all,
    I have a question on the runJITOnFunction() function in JIT.cpp. The
second argument MCI must be used to create a MCIListener in the
runJITOnFunction() function. However, the JIT::recompileAndRelinkFunction()
just calls the runJITOnFunction() like this: " runJITOnFunction(F);",
leaving the second argument, the MCI, empty.

    As a result, if the call the recompileAndRelinkFunction() for a function
for the first time, everything is fine, if I re-JIT the same function again,
a segment fault occur, because the MCIListener class needs to use MCI like
this: "MCI->setAddress(Code);".
    How to make re-JIT work, please? For example, sometimes I need to JIT a
function for the first time, and modify its llvm code in the function body,
and re-JIT it again.

-- 
Regards,
Heming Cui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100331/c717ccf2/attachment.html>


More information about the llvm-dev mailing list