[LLVMdev] User-specified JIT passes
Warren Armstrong
warren.armstrong at anu.edu.au
Sun Oct 28 22:38:28 PDT 2007
Greetings,
I have a plan to use LLVM to undertake runtime optimisation of
computational chemistry programs. As part of this, I'd like to be able
to invoke lli and pass it a list of passes to run, in the manner of
opt. For example:
> lli -load=llvm/mem_trace_pass/bin/lib/hello.so -hello ./my_bitcode.bc
The current implementation of lli (updated from SVN as of three nights
ago) doesn't seem to support this. Too see if it would work, I
transplanted the required functionality from the opt tool, so the above
invocation now works - the pass 'hello' is run by the JIT. This
has led to a couple of questions:
1. Did I miss something? As far as I can see, the current JIT
implementation has a hardcoded list of pre-defined passes, which deal with
bitcode to machine code transformations. The interpreter doesn't seem
to have anything to do with passes.
2. Is granting this ability to the JIT desirable? If so, I'm happy to
clean up my temporary hack job and submit a patch.
Cheers,
Warren Armstrong
More information about the llvm-dev
mailing list