[LLVMdev] question about the LLVM JIT

Chris Lattner sabre at nondot.org
Wed Nov 29 17:40:06 PST 2006


On Thu, 30 Nov 2006, Eric van Riet Paap wrote:
>> This is somewhat tricky.  To replace a function in-place like this,
>> you should actually modify the function in the original module,
>> then call EE->recompileAndRelinkFunction(fn).  This will require
>> some C++ code to delete the original function body, then splice the
>> body of the new function into the old function.
>
> For my purpose it would be ideal if I could give ParseAssemblyString
> an additional option (or maybe set a global flag somehow) to indicate
> what should happen when an already defined function is parsed. Would
> something like this be possible and fit into llvm's design?

Sure, it would be possible to add something like this.  I'd prefer a new 
function, not a bool to ParseAssemblyString though.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list