<font face="arial,helvetica,sans-serif">I have build LLVM in debug mode. Here are the informations of the segfault :</font><div><font face="arial,helvetica,sans-serif"><div><span class="Apple-tab-span" style="white-space:pre">  </span>memcpy() at 0x7ffff6f6581e<span class="Apple-tab-span" style="white-space:pre">  </span></div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>LoadIntFromMemory() at ExecutionEngine.cpp:887 0xb3c297<span class="Apple-tab-span" style="white-space:pre">     </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>llvm::ExecutionEngine::LoadValueFromMemory() at ExecutionEngine.cpp:915 0xb3c3f9<span class="Apple-tab-span" style="white-space:pre">    </span></div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>llvm::Interpreter::visitLoadInst() at Execution.cpp:812 0xa1f855<span class="Apple-tab-span" style="white-space:pre">    </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>llvm::InstVisitor<llvm::Interpreter, void>::visitLoad() at 0xa28357<span class="Apple-tab-span" style="white-space:pre">   </span></div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>llvm::InstVisitor<llvm::Interpreter, void>::visit() at 0xa26b4e<span class="Apple-tab-span" style="white-space:pre">       </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>llvm::Interpreter::run() at Execution.cpp:1,328 0xa235ff<span class="Apple-tab-span" style="white-space:pre">    </span></div>

<div><span class="Apple-tab-span" style="white-space:pre">      </span>llvm::Interpreter::runFunction() at Interpreter.cpp:95 0xa166fa<span class="Apple-tab-span" style="white-space:pre">     </span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-tab-span" style="white-space: pre; ">     </span>....</div>

<div>So the segfaults happens because of the memcpy call in the LoadIntFromMemory function in ExecutionEngine.cpp on line 887... Any clue ?</div><div><br></div><div><br></div><div>Adding .setOptLevel(llvm::CodeGenOpt::None) to the EngineBuilder creation reduces the time by 25% but that is still not enough :(</div>

<div><br></div></font><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><br>

<div class="gmail_quote">2010/11/3 Török Edwin <span dir="ltr"><<a href="mailto:edwintorok@gmail.com">edwintorok@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

On Wed, 3 Nov 2010 11:18:34 +0000<br>
<div class="im">Salomon Brys <<a href="mailto:salomon.brys@gmail.com">salomon.brys@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">> Jiting with no optimization does not reduce significantly the<br>
> compilation with very small code...<br>
<br>
</div>I mean the parameter to createJIT, OptLevel. Try setting it to None.<br>
Or if you use EngineBuilder, setOptLevel(CodeGenOpt::None).<br>
<div class="im"><br>
> What is the local register allocator ???<br>
<br>
</div>-regalloc=fast, or -regalloc=local parameter to llc, or lli.<br>
I think there was a programatic way to choose register allocator, but I<br>
forgot how.<br>
<br>
Best regards,<br>
<font color="#888888">--Edwin<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>###########################################<br># Salomon BRYS<br># +33 (0) 6 83 54 55 96<br>#------------------------------------------<br># > EPITECH "Koala" : C++ assistant : Sbire du C++<br>

# > Zend Certified Engineer for PHP5<br>#------------------------------------------<br># All data in this e-mail is confidential.<br># If you are not, or if you don't believe you are, the recipient of this e-mail, please delete it.<br>

#------------------------------------------<br># GPG : <a href="http://gpgkey-salomon.antesocial.fr/">http://gpgkey-salomon.antesocial.fr/</a><br>###########################################<br>
</div>