<div dir="ltr"><div>Hi Dibyendu,</div><div>Could you please send me your unoptimized and expected optimized code? The default implementation only contains some transformations. It would be helpful to know what you are actually trying. <br></div><div>Optimize Module is just a function object. <br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 10 Aug 2019 at 22:55, Dibyendu Majumdar via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am trying out ORC v2 and facing some problems.<br>
<br>
I am using LLVM 8.0.1.<br>
I updated my ORC v1 implementation from 6.0 to 8.0 based on<br>
Kaleidoscope example (i.e. using Legacy classes) and that works fine.<br>
<br>
Now  I am trying out ORC v2 apis, based on<br>
<a href="https://github.com/llvm-mirror/llvm/blob/master/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/llvm/blob/master/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h</a>.<br>
<br>
I have got it to compile and build.<br>
But looks like my compiled code is not being optimized at all.<br>
<br>
For optimization I am using the PassManagerBuilder class to setup the<br>
passes. I use OptLevel = 2. This works perfectly with ORC v1 apis, but<br>
with ORC v2 I am not sure what is happening. I can see that the<br>
optimizeModule() is being called.<br>
<br>
Second issue is - I need to use an instance method as optimizeModule()<br>
but based on the example this is now a static method. Is this a<br>
restriction in the new api? I need to pass some parameters from the<br>
JIT context such as what optimization level to use.<br>
<br>
Thanks and Regards<br>
Dibyendu<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>