Specifying Additional Compilation Passes to lli

Evan,
My overall goal is to support dynamic optimization in LLVM. In order to do so, I must gather profiling information at runtime, then recompile the profiled functions. Currently, I'm just adding and removing calls into my profiler in a custom pass. What is the advantage of giving the JIT a second profile manager over my current implementation? Thanks.
Tom

Evan,
My overall goal is to support dynamic optimization in LLVM. In order to do so, I must gather profiling information at runtime, then recompile the profiled functions. Currently, I'm just adding and removing calls into my profiler in a custom pass. What is the advantage of giving the JIT a second profile manager over my current implementation? Thanks.
Tom

It's just a cleaner design. There are well defined pass manager, executionengine, and JIT api's. We don't want to unnecessarily extend them. JITState PM controls the codegen passes. If you want to add LLVM level optimization passes, you can simple use a separate PM to run them.

Evan