<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Jan 1, 2013, at 12:31 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_default" style="">On Mon, Dec 31, 2012 at 3:26 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank" class="cremed">nrotem@apple.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="im"><br><div><div>
On Dec 31, 2012, at 11:57 AM, Benjamin Kramer <<a href="mailto:benny.kra@gmail.com" target="_blank" class="cremed">benny.kra@gmail.com</a>> wrote:</div><br><blockquote type="cite"><span style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">I'm not entirely sure why this is the case, the target specific stuff for opt is still very new, but at the moment you have to explicitly set a triple for opt so it can access target-specific bits to estimate the cost of vectorization.</span></blockquote>
</div><br></div><div>I think that this is a good opportunity to discuss this topic. At the moment 'opt' does not use the triple that is found in the module in order to initialize the backend and the backend related analysis passes. It relies on the '-mtriple' command line flag. LLC on the other hand uses the host triple. I see the following options:</div>
<div><br></div><div>1. 'opt' does not initialize the backend passes unless '-mtriple' is used. (the current option)</div><div>2. 'opt' grabs the triple from the bit code file and uses it to initialize the backend passes.</div>
<div>3. 'opt' gets the default target triple (like llc).</div></div></blockquote><div><br></div><div style="">My only strong opinion is that I dislike #3.</div><div style=""><br></div><div style="">I have a mild preference for encoding more in bitcode and less in commandline switches, while still allowing commandline switches to override what is in the bitcode.</div></div></div></div></div></blockquote><div><br></div><div>+1 on both points. Both opt and llc should work this way. To get llc's current behavior, you should have to pass -mcpu=native or something, explicitly.</div><div><br></div><div>-Chris</div><div><br></div><br><blockquote type="cite"><div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>I think that Nick said that he prefers #2.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Nadav </div></font></span></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" class="cremed">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank" class="cremed">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank" class="cremed">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LLVM Developers mailing list</span><br><span><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a></span><br><span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></span><br></div></blockquote></body></html>