Function inlining and JIT

My JIT compiler builds the optimization passes with code directly
copypasted from `opt'. Indeed, the code is optimized as required, except
from function inlining. If the LLVM assembler code emitted by my JIT
compiler is passed through `opt' with -O2 or higher, small functions are
inlined as expected.

Is there anything special about function inlining in the JIT?

Nothing comes to mind. You just run normal module passes on the module
before passing it off to the JIT?

-eric

Eric Christopher <echristo@apple.com> writes:

Nothing comes to mind. You just run normal module passes on the module
before passing it off to the JIT?

Inspired by that question, finally found the problem. The LLVM assembler
code was being written to disk before running the PassManager :-/

Thanks Eric, and sorry for the noise.