[LLVMdev] [ LLI / MCJIT] re-initializing of lli ...

Chris Bieneman beanz at apple.com
Mon Jan 26 10:34:24 PST 2015


Hi Armin,

Today there is no way to reset command line options to their defaults. The implementation of options doesn’t really have a concept of defaults, the default value is just what the option is initialized to. Once you set an option the default is gone, so it can’t be restored.

I’m currently working on cleaning this all up, and the eventual goal is to completely replace the existing option parsing an handling code. The new design does allow for resetting options to their defaults.

-Chris


> On Jan 25, 2015, at 12:46 PM, Armin Steinhoff <armin at steinhoff.de> wrote:
> 
> 
> Hi Lang,
> 
> sorry for the late response, I tried without success to solve the trouble with the repeated processing of a command line.
> The implementation of the command line parser is a real hack ... IMHO.
> 
> I'm simply trying to build a server process for JIT compiling /execution of a bitcode module using individual command line options (in server loop).
> 
> Do you have an idea how to reset the comand liner parser ?
> 
> Regards
> 
> Armin
> 
> 
> Lang Hames schrieb:
>> Hi Armin,
>> 
>> Argument parsing isn't handled by the JIT. This sounds like you're making redundant calls to cl::ParseCommandLineOptions ?
>> 
>> Deleting the ExecutionEngine and any RTDyldMemoryManager instances that you've created should be enough to reset the JIT.
>> 
>> Cheers,
>> Lang.
>> 
>> On Tue, Jan 20, 2015 at 12:38 PM, Armin Steinhoff <armin at steinhoff.de <mailto:armin at steinhoff.de>> wrote:
>> 
>> Hi,
>> 
>> I'm using the code of the tool "lli" embedded in a process of a controll application.
>> 
>> After the second JIT compile action I see the following messages:
>> 
>> first JIT compile .. with a dump of the actual parameters:
>> 
>> xargv: -load
>> xargv: libqwt.so
>> xargv: -load
>> xargv: libosz.so
>> xargv: -entry-function=main
>> xargv: -use-mcjit
>> xargv: source.bc -> the jitted application code works !
>> 
>> second JIT compile:
>> 
>> xargv: -load
>> xargv: libqwt.so
>> xargv: -load
>> xargv: libosz.so
>> xargv: -entry-function=main
>> xargv: -use-mcjit
>> xargv: source.bc
>> dV: for the -entry-function option: may only occur zero or one times!
>> dV: for the -use-mcjit option: may only occur zero or one times!
>> <input bitcode> option: may only occur zero or one times!
>> 
>> The execution engine is deleted after the first JIT action ... but it seems not to be sufficient in order to run multiple JIT compiles.
>> 
>> What's to do additionally to reset (or re-initialize) lli ?
>> 
>> Regards
>> 
>> Armin
>> 
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>Â  Â  Â  Â  Â http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/>
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150126/81b60dc4/attachment.html>


More information about the llvm-dev mailing list