[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-dev
Subject:    Re: [llvm-dev] Loop Vectorize: Testing cost model driven transformations
From:       Michael Kuperstein via llvm-dev <llvm-dev () lists ! llvm ! org>
Date:       2016-11-30 19:53:24
Message-ID: CAL_y90k1Cb1k_PcBRm5X0vtyJFfB_-vrxYBAzobmofKjOWkrOQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Yeah, this makes a lot of sense, -mcpu=generic (as opposed to -mcpu=native)
is the sane default.
I guess I was just expecting an x86 host to get a "generic x86 TTI"
(whatever that means), not a "generic TTI".

On Wed, Nov 30, 2016 at 11:49 AM, Matthew Simpson <mssimpso@codeaurora.org>
wrote:

> 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-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).
>
> -- Matt
>
> On Wed, Nov 30, 2016 at 2:07 PM, Michael Kuperstein via llvm-dev <
> llvm-dev@lists.llvm.org> wrote:
>
>> Right, let's say what we get from llc --version is:
>>
>>   Default target: x86_64-unknown-linux-gnu
>>   Host CPU: haswell
>>
>> So, what we currently do is use the default target (which is normally the
>> host target), but ignore the host cpu?
>>
>> Michael
>>
>> On Wed, Nov 30, 2016 at 10:58 AM, Matthew Simpson <
>> mssimpso@codeaurora.org> wrote:
>>
>>>
>>> On Wed, Nov 30, 2016 at 1:04 PM, Michael Kuperstein via llvm-dev <
>>> llvm-dev@lists.llvm.org> wrote:
>>>
>>>> So, just to make sure I understand, what is getting a specific TTI in
>>>> llc triggered off? -mcpu?
>>>
>>>
>>> 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".
>>>
>>> -- Matt
>>>
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
>

[Attachment #5 (text/html)]

<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 &quot;generic x86 TTI&quot; (whatever that means), not a &quot;generic \
TTI&quot;.</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">&lt;<a \
href="mailto:mssimpso@codeaurora.org" \
target="_blank">mssimpso@codeaurora.org</a>&gt;</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&#39;s right. In your example, if the \
target isn&#39;t specified anywhere, an llc invocation would be equivalent to \
&quot;llc -mtriple=x86_64-unknown-linux-<wbr>gnu -mcpu=generic&quot;. TTI queries (in \
e.g., CodeGenPrepare) would be based on this. From opt, if the target triple is left \
unspecified, we will use the &quot;base&quot; 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">&lt;<a \
href="mailto:llvm-dev@lists.llvm.org" \
target="_blank">llvm-dev@lists.llvm.org</a>&gt;</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&#39;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">&lt;<a href="mailto:mssimpso@codeaurora.org" \
target="_blank">mssimpso@codeaurora.org</a>&gt;</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">&lt;<a href="mailto:llvm-dev@lists.llvm.org" \
target="_blank">llvm-dev@lists.llvm.org</a>&gt;</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 &quot;llc --version&quot;.</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>


[Attachment #6 (text/plain)]

_______________________________________________
LLVM Developers mailing list
llvm-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic