I am trying out ORC v2 and facing some problems.
I am using LLVM 8.0.1.
I updated my ORC v1 implementation from 6.0 to 8.0 based on
Kaleidoscope example (i.e. using Legacy classes) and that works fine.
Now I am trying out ORC v2 apis, based on
llvm/KaleidoscopeJIT.h at master · llvm-mirror/llvm · GitHub.
I have got it to compile and build.
But looks like my compiled code is not being optimized at all.
For optimization I am using the PassManagerBuilder class to setup the
passes. I use OptLevel = 2. This works perfectly with ORC v1 apis, but
with ORC v2 I am not sure what is happening. I can see that the
optimizeModule() is being called.
Second issue is - I need to use an instance method as optimizeModule()
but based on the example this is now a static method. Is this a
restriction in the new api? I need to pass some parameters from the
JIT context such as what optimization level to use.
Thanks and Regards