public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/95777] New: Allow specifying more than one target options at the same time in target and target_clones attribute
@ 2020-06-20 5:02 yyc1992 at gmail dot com
2020-06-22 7:41 ` [Bug c/95777] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: yyc1992 at gmail dot com @ 2020-06-20 5:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95777
Bug ID: 95777
Summary: Allow specifying more than one target options at the
same time in target and target_clones attribute
Product: gcc
Version: 10.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: yyc1992 at gmail dot com
Target Milestone: ---
Currently it seems that (document and own tests) only a single option is
allowed for each version of the function using `target` and `target_clones`.
This can be a problem for options that are not strict subset of each other
(e.g. the AVX512 ones IIUC). Of course specifying `cpu=haswell` and
`cpu=skylake` for the same target doesn't make much sense so some checking
should be in place but I believe allowing multiple directly testable features
to be specified at the same time should be allowed.
A related issue is that while one can indeed do some of these by specifying a
`arch=<cpu>`. However, even if the runtime CPU supports all the features it'll
still not get selected if the name doesn't exactly match (tested with
`arch=haswell` on my kabelake laptop). If a fallback could be implemented to
make this work that will be also good enough for me at least...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/95777] Allow specifying more than one target options at the same time in target and target_clones attribute
2020-06-20 5:02 [Bug c/95777] New: Allow specifying more than one target options at the same time in target and target_clones attribute yyc1992 at gmail dot com
@ 2020-06-22 7:41 ` rguenth at gcc dot gnu.org
2020-06-22 13:33 ` yyc1992 at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-22 7:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95777
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Target| |x86_64-*-* i?86-*-*
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think multiple targets are allowed by means of providing multiple
declarations with different attribute parameters. Martin?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/95777] Allow specifying more than one target options at the same time in target and target_clones attribute
2020-06-20 5:02 [Bug c/95777] New: Allow specifying more than one target options at the same time in target and target_clones attribute yyc1992 at gmail dot com
2020-06-22 7:41 ` [Bug c/95777] " rguenth at gcc dot gnu.org
@ 2020-06-22 13:33 ` yyc1992 at gmail dot com
2020-06-22 14:19 ` yyc1992 at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: yyc1992 at gmail dot com @ 2020-06-22 13:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95777
--- Comment #2 from Yichao Yu <yyc1992 at gmail dot com> ---
I only tested this with `target_clones` and it seems that I misread the
document for `target`. So this is only an issue with `target_clones` attribute.
`target` support this just fine.
So to be more clear, using an example from the doc, it seems impossible to do
the equivalent of `target("sse4.1,arch=core2")` using `target_clones`. Doing
`target_clones("sse4.1,arch=core2")` will create two functions instead of one.
(of course in reality what I might actually want is to make `target_clones` do
`target("sse4.1,arch=core2")` and target("default")).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/95777] Allow specifying more than one target options at the same time in target and target_clones attribute
2020-06-20 5:02 [Bug c/95777] New: Allow specifying more than one target options at the same time in target and target_clones attribute yyc1992 at gmail dot com
2020-06-22 7:41 ` [Bug c/95777] " rguenth at gcc dot gnu.org
2020-06-22 13:33 ` yyc1992 at gmail dot com
@ 2020-06-22 14:19 ` yyc1992 at gmail dot com
2020-06-23 19:38 ` marxin at gcc dot gnu.org
2020-09-22 12:37 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: yyc1992 at gmail dot com @ 2020-06-22 14:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95777
--- Comment #3 from Yichao Yu <yyc1992 at gmail dot com> ---
And for backward compatibility maybe
`target_clones("(sse4.1,arch=core2),default")` would work?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/95777] Allow specifying more than one target options at the same time in target and target_clones attribute
2020-06-20 5:02 [Bug c/95777] New: Allow specifying more than one target options at the same time in target and target_clones attribute yyc1992 at gmail dot com
` (2 preceding siblings ...)
2020-06-22 14:19 ` yyc1992 at gmail dot com
@ 2020-06-23 19:38 ` marxin at gcc dot gnu.org
2020-09-22 12:37 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-23 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95777
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-06-23
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/95777] Allow specifying more than one target options at the same time in target and target_clones attribute
2020-06-20 5:02 [Bug c/95777] New: Allow specifying more than one target options at the same time in target and target_clones attribute yyc1992 at gmail dot com
` (3 preceding siblings ...)
2020-06-23 19:38 ` marxin at gcc dot gnu.org
@ 2020-09-22 12:37 ` marxin at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-09-22 12:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95777
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|marxin at gcc dot gnu.org |unassigned at gcc dot gnu.org
Status|ASSIGNED |NEW
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
I don't see it as a high priority, thus leaving for now.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-22 12:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 5:02 [Bug c/95777] New: Allow specifying more than one target options at the same time in target and target_clones attribute yyc1992 at gmail dot com
2020-06-22 7:41 ` [Bug c/95777] " rguenth at gcc dot gnu.org
2020-06-22 13:33 ` yyc1992 at gmail dot com
2020-06-22 14:19 ` yyc1992 at gmail dot com
2020-06-23 19:38 ` marxin at gcc dot gnu.org
2020-09-22 12:37 ` marxin at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).