tahonermann added a comment.

> Is there a need for this functionality?

Not a strong need, but I found it helpful in two scenarios:

1. A forward declaration of a multiversion function is not required to include 
a multiversion function attribute; later declarations might trigger 
multiversioning.
2. The `target` attribute does not necessarily declare a multiversion function.

Some examples:

  void f();
  __attribute__((target("default"))) void f(); // Causes multiversioning for 
the prior declaration.
  
  __attribute__((target("mmx"))) void g(); // Not a multiversion function 
declaration.
  
  __attribute__((target("mmx"))) void h();
  __attribute__((target("sse"))) void h(); // Causes multiversioning for the 
prior declaration.

I'll add a test; thank you for the hint for where to add it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121961/new/

https://reviews.llvm.org/D121961

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to