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?
On Aug 28, 2012, at 4:28 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:> 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 at 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.
Apparently Analagous Threads
- [LLVMdev] Function inlining and JIT
- [LLVMdev] JIT: Inlining introduces intrinsics.
- [LLVMdev] JIT: Inlining introduces intrinsics.
- [LLVMdev] Fw: include/Config/config.h discrepancies between CMake and autofoo builds
- [LLVMdev] JIT: Inlining introduces intrinsics.