<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 13, 2015 at 4:09 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No, you probably haven't. I was seeing it as clang doing to lto link of the module together and then codegen based on that (which means it would have the options), but...<br>
<br>
That said, I think the general problem is more specific. I.e. how do you specify -msse3 as part of the default code generation flags when you do lto?<br>
<br></blockquote><div><br></div><div>In LTOCodeGenerator.cpp, SubtargetFeatures::getDefaultSubtargetFeatures is called to get the default subtarget features and the string is passed to TargetCreateTargetMachine.</div><div><br></div><div>Is that what you are asking about?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The C++ interface has addAttr (which is painful in that it requires, as you say, every linker to understand llvm's command line interface), but this is also pretty painful:<br>
<br>
  const void *compile(size_t *length,<br>
                      bool disableOpt,<br>
                      bool disableInline,<br>
                      bool disableGVNLoadPRE,<br>
                      bool disableVectorization,<br>
                      std::string &errMsg);<br>
<br>
because, you know, all optimizations, inlining, gvnloadpre, and vectorization are all anyone care about :)<br>
<br>
Realize this has dovetailed into "let's solve the general problem" but I am curious. The gold plugin's methods aren't much better.<br>
<br>
Or am I missing something?<br>
<div class="HOEnZb"><div class="h5"><br>
-eric<br>
<br>
<br>
<a href="http://reviews.llvm.org/D7968" target="_blank">http://reviews.llvm.org/D7968</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>