<div dir="rtl"><div dir="ltr">That's odd. getHostCPUName uses cpuid to get the actual capabilities of the CPU before selecting the name. </div><div dir="ltr">Does cpuid reports incorrect information in these virtual machines?</div><div dir="ltr"><br></div><div dir="ltr">In any case you can further tune CPU capabilities with EngineBuilder::setMAttrs.<br></div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2015-05-11 11:59 GMT+03:00 Mueller-Roemer, Johannes Sebastian <span dir="ltr"><<a href="mailto:Johannes.Sebastian.Mueller-Roemer@igd.fraunhofer.de" target="_blank">Johannes.Sebastian.Mueller-Roemer@igd.fraunhofer.de</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">I am currently setting up my Module with<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">module->setTargetTriple(llvm::sys::getProcessTriple()<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">#ifdef _WIN32<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> + "-elf"<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">#endif<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">And my ExecutionEngine with<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">llvm::EngineBuilder(std::move(module))<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> .setErrorStr(&err)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> .setMCPU(llvm::sys::getHostCPUName())<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> .create()<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">This works fine on most machines, however on some virtualized machines this fails because the host CPU name implies AVX, however AVX is in fact disabled, leading to an illegal instruction when running JIT-compiled functions.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there a better way to set up the executionengine so that such failure do not occur (but all available features are used)?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span>--<u></u><u></u></span></p>
<p class="MsoNormal"><span>Johannes S. Mueller-Roemer, MSc<u></u><u></u></span></p>
<p class="MsoNormal"><span>Wiss. Mitarbeiter - Interactive Engineering Technologies (IET)<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Fraunhofer-Institut für Graphische Datenverarbeitung IGD<u></u><u></u></span></p>
<p class="MsoNormal"><span>Fraunhoferstr. 5 | 64283 Darmstadt | Germany<u></u><u></u></span></p>
<p class="MsoNormal"><span>Tel +49 6151 155-606 | Fax +49 6151 155-139<u></u><u></u></span></p>
<p class="MsoNormal"><span><a href="mailto:johannes.mueller-roemer@igd.fraunhofer.de" target="_blank">johannes.mueller-roemer@igd.fraunhofer.de</a> | <a href="http://www.igd.fraunhofer.de" target="_blank">www.igd.fraunhofer.de</a><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<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></blockquote></div><br></div>