<div dir="rtl"><div dir="ltr">Hi,</div><div dir="ltr"><br></div><div dir="ltr">You need to call llvm::sys::getHostCPUName() and pass the result to createTargetMachine() passed to the JIT. This patch should be applied:</div><div dir="ltr"><br></div><div dir="ltr"> <a href="http://llvm.org/bugs/show_bug.cgi?id=17422">http://llvm.org/bugs/show_bug.cgi?id=17422</a><br></div><div dir="ltr"><br></div><div dir="ltr">Anyhow, the JIT was removed from current code and will not be in next LLVM release.</div><div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2014-09-17 22:27 GMT+03:00 Matt Godbolt <span dir="ltr"><<a href="mailto:matt@godbolt.org" target="_blank">matt@godbolt.org</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jim,<br>
<br>
Thanks for a very quick reply! That indeed does the trick!<br>
<br>
Presumably the default has changed in 3.5 to be a "generic" CPU<br>
instead of the native one? If that's the case I wonder why: especially<br>
when JITting it really only makes sense to target the actual CPU -<br>
unless I'm missing something? :)<br>
<br>
Thanks again,<br>
<br>
Matt<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Sep 17, 2014 at 2:16 PM, Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> wrote:<br>
> Hi Matt,<br>
><br>
> I suspect you need to specify the target CPU when you create the JIT. It’s just a method on the builder (e.g., builder.setMCPU(MCPU)). If you want auto-detection based on the host CPU, sys::getHostCPUName() returns a value suitable to be passed directly into the builder.<br>
><br>
> -Jim<br>
><br>
>> On Sep 17, 2014, at 11:44 AM, Matt Godbolt <<a href="mailto:matt@godbolt.org">matt@godbolt.org</a>> wrote:<br>
>><br>
>> Hi guys,<br>
>><br>
>> I just upgraded our JIT system to use llvm 3.5 and noticed one big<br>
>> change in our generated code: we don't see any non-destructive VEX<br>
>> prefix instructions being emitted any more (vmulsd xmm0, xmm1, blah)<br>
>> etc.<br>
>><br>
>> It's long been on my list of things to investigate anyway as I noticed<br>
>> llvm didn't emit VZEROUPPER calls either, so I supposed it might not<br>
>> be a bad thing to disable vex.<br>
>><br>
>> That being said, try as I might I can't force avx on<br>
>> (builder.setMCPU("core-avx-i") and/or<br>
>> builder.setMAttrs(vector<string>{"+avx"});). We're still using the old<br>
>> JIT but I just spiked out a move to MCJIT and I still don't see the<br>
>> VEX instructions.<br>
>><br>
>> Was there a deliberate change on the llvm-side to discourage VEX<br>
>> instructions unless they make a big enough difference (and/or is<br>
>> VZEROUPPER now emitted?).<br>
>><br>
>> If not, how might I go about digging further into this?<br>
>><br>
>> Many thanks in advance, Matt<br>
>><br>
>> --<br>
>> Matt<br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
<br>
<br>
<br>
--<br>
Matt<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div>