<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Mar 11, 2015 at 1:08 PM Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> 4. Having `llc` mutate the IR itself -- the obvious solution, which<br>
>    Akira posted a patch for a few months ago -- does the job just as<br>
>    well as `llvm-attr-mutate` but with a much cleaner interface.  It<br>
>    fails to distinguish between target defaults and explicit<br>
>    attributes, but when combined with `llvm-extract`, it gives you full<br>
>    control over the codegen options for each function.<br>
><br>
> Remind me again why we don't just do #4?  It seems like the simplest way<br>
> to keep `llc` viable in the short term.<br>
><br>
><br>
><br>
> llc should be able to override the default values for options without<br>
> mutating anything that’s explicitly specified at a function (or module)<br>
> level.<br>
><br>
> For example, if I have a .ll file with specialized functions with different<br>
> CPUs specified, I want to be able to recompile that file with -mcpu= on the<br>
> llc command line in such a way that those functions don’t get changed, but<br>
> any functions that don’t have an explicit CPU on them do. Consider trying to<br>
> test something like function multi versioning.<br>
<br>
Sure, but that can be implemented with 4, no? Something like:<br>
<br>
* In llc, if given -mcpu:<br>
  * Iterate over all functions:<br>
     * If a function has a an explicit cpu, leave it alone.<br>
     * If a function has no explicit cpu, set it to the -mcpu command line value<br>
<br></blockquote><div><br></div><div>The problem with some of this is that we could see a lot of default cpus on functions. I.e. it may be set most of the time. That's still up in the air though.</div><div><br></div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
Rafael<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div></div>