Specifying Additional Compilation Passes to lli

Evan,
So, if I understand you correctly, the design you have in mind is to: create a PassManager, pass it to the JIT on construction, and modify runJITOnFunction to run the second PassManager on the Function being jit'd before running the codegen PassManager. Thanks.
Tom

Evan,
So, if I understand you correctly, the design you have in mind is to: create a PassManager, pass it to the JIT on construction, and modify runJITOnFunction to run the second PassManager on the Function being jit'd before running the codegen PassManager. Thanks.

Optimiztions should be done before JIT, right? Why not run the optimizations (using the second PM) on the function that's scheduled for JIT before? Perhaps I am not understanding what you are trying to do.

Evan