Krzysztof Parzyszek via llvm-dev
2019-Sep-27 15:07 UTC
[llvm-dev] Question on target-features
Ugh, that would be a “yes” then…
--
Krzysztof Parzyszek kparzysz at quicinc.com<mailto:kparzysz at
quicinc.com> AI tools development
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Krzysztof
Parzyszek via llvm-dev
Sent: Friday, September 27, 2019 10:05 AM
To: Dangeti Tharun kumar <cs15mtech11002 at iith.ac.in>; llvm-dev at
lists.llvm.org
Subject: [EXT] Re: [llvm-dev] Question on target-features
No. The way +feature works is that it causes the assignment Attribute=Value to
happen, where Attribute and Value are strings defined in a td file. With
-feature, this assignment does not happen, so whatever the default value is of
Attribute, it will remain unchanged.
--
Krzysztof Parzyszek kparzysz at quicinc.com<mailto:kparzysz at
quicinc.com> AI tools development
From: llvm-dev <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces
at lists.llvm.org>> On Behalf Of Dangeti Tharun kumar via llvm-dev
Sent: Friday, September 27, 2019 9:23 AM
To: llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at
lists.llvm.org>>
Subject: [EXT] [llvm-dev] Question on target-features
Hi,
In "target-features" list in LLVM-IR, there are "+feature",
"-feature". My question is, does "-feature" is equivalent to
not specifying a feature at all?
For example:
attributes #0 = { "target-cpu"="znver2"
"target-features"="+avx -avx2" }
Wheather it is equalent to omitting the avx2 from list?
attributes #0 = { "target-cpu"="znver2"
"target-features"="+avx" }
--
Regards,
DTharun
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20190927/c4fed4af/attachment.html>
Since the target cpu is znver2, which has avx2, target-features of “+avx -avx2”
is not equivalent to “+avx”. So the two attributes in the original question are
not equivalent.
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Krzysztof
Parzyszek via llvm-dev
Sent: Friday, September 27, 2019 11:07
To: Dangeti Tharun kumar <cs15mtech11002 at iith.ac.in>; llvm-dev at
lists.llvm.org
Subject: Re: [llvm-dev] Question on target-features
Ugh, that would be a “yes” then…
--
Krzysztof Parzyszek kparzysz at quicinc.com<mailto:kparzysz at
quicinc.com> AI tools development
From: llvm-dev <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces
at lists.llvm.org>> On Behalf Of Krzysztof Parzyszek via llvm-dev
Sent: Friday, September 27, 2019 10:05 AM
To: Dangeti Tharun kumar <cs15mtech11002 at
iith.ac.in<mailto:cs15mtech11002 at iith.ac.in>>; llvm-dev at
lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
Subject: [EXT] Re: [llvm-dev] Question on target-features
No. The way +feature works is that it causes the assignment Attribute=Value to
happen, where Attribute and Value are strings defined in a td file. With
-feature, this assignment does not happen, so whatever the default value is of
Attribute, it will remain unchanged.
--
Krzysztof Parzyszek kparzysz at quicinc.com<mailto:kparzysz at
quicinc.com> AI tools development
From: llvm-dev <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces
at lists.llvm.org>> On Behalf Of Dangeti Tharun kumar via llvm-dev
Sent: Friday, September 27, 2019 9:23 AM
To: llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at
lists.llvm.org>>
Subject: [EXT] [llvm-dev] Question on target-features
Hi,
In "target-features" list in LLVM-IR, there are "+feature",
"-feature". My question is, does "-feature" is equivalent to
not specifying a feature at all?
For example:
attributes #0 = { "target-cpu"="znver2"
"target-features"="+avx -avx2" }
Wheather it is equalent to omitting the avx2 from list?
attributes #0 = { "target-cpu"="znver2"
"target-features"="+avx" }
--
Regards,
DTharun
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20190927/3ca27129/attachment.html>
Krzysztof Parzyszek via llvm-dev
2019-Sep-27 15:13 UTC
[llvm-dev] Question on target-features
This thread is getting from bad to worse… Certain features are assumed as
default for a given processor, so -feature will actually have an effect of
removing it from the feature string that is parsed in the subtarget. Back to
“no”…
--
Krzysztof Parzyszek kparzysz at quicinc.com<mailto:kparzysz at
quicinc.com> AI tools development
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Krzysztof
Parzyszek via llvm-dev
Sent: Friday, September 27, 2019 10:07 AM
To: Dangeti Tharun kumar <cs15mtech11002 at iith.ac.in>; llvm-dev at
lists.llvm.org
Subject: [EXT] Re: [llvm-dev] Question on target-features
Ugh, that would be a “yes” then…
--
Krzysztof Parzyszek kparzysz at quicinc.com<mailto:kparzysz at
quicinc.com> AI tools development
From: llvm-dev <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces
at lists.llvm.org>> On Behalf Of Krzysztof Parzyszek via llvm-dev
Sent: Friday, September 27, 2019 10:05 AM
To: Dangeti Tharun kumar <cs15mtech11002 at
iith.ac.in<mailto:cs15mtech11002 at iith.ac.in>>; llvm-dev at
lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
Subject: [EXT] Re: [llvm-dev] Question on target-features
No. The way +feature works is that it causes the assignment Attribute=Value to
happen, where Attribute and Value are strings defined in a td file. With
-feature, this assignment does not happen, so whatever the default value is of
Attribute, it will remain unchanged.
--
Krzysztof Parzyszek kparzysz at quicinc.com<mailto:kparzysz at
quicinc.com> AI tools development
From: llvm-dev <llvm-dev-bounces at lists.llvm.org<mailto:llvm-dev-bounces
at lists.llvm.org>> On Behalf Of Dangeti Tharun kumar via llvm-dev
Sent: Friday, September 27, 2019 9:23 AM
To: llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at
lists.llvm.org>>
Subject: [EXT] [llvm-dev] Question on target-features
Hi,
In "target-features" list in LLVM-IR, there are "+feature",
"-feature". My question is, does "-feature" is equivalent to
not specifying a feature at all?
For example:
attributes #0 = { "target-cpu"="znver2"
"target-features"="+avx -avx2" }
Wheather it is equalent to omitting the avx2 from list?
attributes #0 = { "target-cpu"="znver2"
"target-features"="+avx" }
--
Regards,
DTharun
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20190927/396eba12/attachment.html>
And -feature will remove all other features that depend on the feature. So for x86, -sse2 will disable sse2, sse3, sse4.1, sse4.2, avx, avx2, etc. On Fri, Sep 27, 2019 at 8:13 AM Krzysztof Parzyszek via llvm-dev < llvm-dev at lists.llvm.org> wrote:> This thread is getting from bad to worse… Certain features are assumed as > default for a given processor, so -feature will actually have an effect of > removing it from the feature string that is parsed in the subtarget. Back > to “no”… > > > > -- > > Krzysztof Parzyszek kparzysz at quicinc.com AI tools development > > > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Krzysztof > Parzyszek via llvm-dev > *Sent:* Friday, September 27, 2019 10:07 AM > *To:* Dangeti Tharun kumar <cs15mtech11002 at iith.ac.in>; > llvm-dev at lists.llvm.org > *Subject:* [EXT] Re: [llvm-dev] Question on target-features > > > > Ugh, that would be a “yes” then… > > > > -- > > Krzysztof Parzyszek kparzysz at quicinc.com AI tools development > > > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Krzysztof > Parzyszek via llvm-dev > *Sent:* Friday, September 27, 2019 10:05 AM > *To:* Dangeti Tharun kumar <cs15mtech11002 at iith.ac.in>; > llvm-dev at lists.llvm.org > *Subject:* [EXT] Re: [llvm-dev] Question on target-features > > > > No. The way +feature works is that it causes the assignment > Attribute=Value to happen, where Attribute and Value are strings defined in > a td file. With -feature, this assignment does not happen, so whatever the > default value is of Attribute, it will remain unchanged. > > > > -- > > Krzysztof Parzyszek kparzysz at quicinc.com AI tools development > > > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Dangeti > Tharun kumar via llvm-dev > *Sent:* Friday, September 27, 2019 9:23 AM > *To:* llvm-dev <llvm-dev at lists.llvm.org> > *Subject:* [EXT] [llvm-dev] Question on target-features > > > > Hi, > > > > In "target-features" list in LLVM-IR, there are "+feature", "-feature". My > question is, does "-feature" is equivalent to not specifying a feature at > all? > > For example: > > *attributes #0 = { "target-cpu"="znver2" "target-features"="+avx > -avx2" }* > > Wheather it is equalent to omitting the avx2 from list? > > *attributes #0 = { "target-cpu"="znver2" "target-features"="+avx" }* > > -- > > Regards, > > DTharun > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- ~Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190927/15f9c176/attachment.html>