[Bug c/78464] New: Feature request: automatic function multi versioning

2016-11-22 Thread bo.langgaard.lind at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78464

Bug ID: 78464
   Summary: Feature request: automatic function multi versioning
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bo.langgaard.lind at gmail dot com
  Target Milestone: ---

Function Multi Versioning currently requires an attribute manually added to
each function that one wants to be multi versioned. Something like:

__attribute__((target_clones("avx2","default")))

If not doing FMV, but just letting the compiler optimize with, say, AVX2, the
compiler automatically finds candidates for optimization and does so.

How about an option that lets the compiler automatically create target clones
of functions that would benefit from it? In plain English: "If the user has
specified "default" and "avx2" as function targets; if a function is found
which could benefit from AVX2 instructions, make two versions of this."

[Bug c/78464] Feature request: automatic function multi versioning

2016-11-22 Thread bo.langgaard.lind at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78464

--- Comment #1 from Bo Lind  ---
See this StackOverflow question for a different phrasing of this issue:
http://stackoverflow.com/questions/39979926/is-there-or-will-there-be-a-global-version-of-the-target-clones-attribute