[PATCH] D121961: [clang] Produce a "multiversion" annotation in textual AST output.
Tom Honermann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 13:30:17 PDT 2022
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
More information about the cfe-commits
mailing list