<div dir="ltr">Yeah, this makes a lot of sense, -mcpu=generic (as opposed to -mcpu=native) is the sane default.<div>I guess I was just expecting an x86 host to get a "generic x86 TTI" (whatever that means), not a "generic TTI".</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 30, 2016 at 11:49 AM, Matthew Simpson <span dir="ltr"><<a href="mailto:mssimpso@codeaurora.org" target="_blank">mssimpso@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>That's right. In your example, if the target isn't specified anywhere, an llc invocation would be equivalent to "llc -mtriple=x86_64-unknown-linux-<wbr>gnu -mcpu=generic". TTI queries (in e.g., CodeGenPrepare) would be based on this. From opt, if the target triple is left unspecified, we will use the "base" TTI implementation (not x86).</div><div><br></div><div><div>-- Matt</div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Nov 30, 2016 at 2:07 PM, Michael Kuperstein via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Right, let's say what we get from llc --version is:<div><br></div><div><div>  Default target: x86_64-unknown-linux-gnu</div><div>  Host CPU: haswell</div></div><div><br></div><div>So, what we currently do is use the default target (which is normally the host target), but ignore the host cpu?</div><div><br></div><div>Michael</div></div><div class="m_4436523534404455307HOEnZb"><div class="m_4436523534404455307h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 30, 2016 at 10:58 AM, Matthew Simpson <span dir="ltr"><<a href="mailto:mssimpso@codeaurora.org" target="_blank">mssimpso@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span><br><div class="gmail_quote">On Wed, Nov 30, 2016 at 1:04 PM, Michael Kuperstein via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So, just to make sure I understand, what is getting a specific TTI in llc triggered off? -mcpu?</blockquote></div><br></span>Right, TTI would be determined by the target specified in the IR or set explicitly with the -m flags. My understanding is that if the target is left unspecified in the IR and not set with the -m flags, llc will generate code for the default target listed in the output of "llc --version".</div><div class="gmail_extra"><br></div><div class="gmail_extra">-- Matt</div></div>
</blockquote></div><br></div>
</div></div><br></div></div><span class="">______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>