[PATCH] D127812: [AArch64] Function multiversioning support added.

Pavel Iliin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 16:49:48 PDT 2022


ilinpv added inline comments.


================
Comment at: clang/include/clang/AST/ASTContext.h:3090
 
+  std::vector<std::string>
+  filterFunctionTargetVersionAttrs(const TargetVersionAttr *TV) const;
----------------
erichkeane wrote:
> It is concerning that this differs from the above.  
target_version supports features only, that is similar to ParsedTargetAttr { std::vector<std::string> Features; }.



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11483
+def warn_target_clone_no_impact_options
+    : Warning<"version list contains no code impact entries">,
+      InGroup<FunctionMultiVersioning>;
----------------
erichkeane wrote:
> I'm not clear as to what this means?
It gives a warning if target_clones attributes contains features which have no impact on code generation ( no supported yet ) and ignored. They has "<NS>" OPTION in llvm/include/llvm/Support/AArch64TargetParser.def 
See clang/test/Sema/attr-target-clones-aarch64.c tests
```
// expected-warning at +1 {{version list contains no code impact entries}}
void __attribute__((target_clones("sha1+pmull"))) warn2(void);

// expected-warning at +1 {{version list contains no code impact entries}}
int __attribute__((target_clones("rng", "fhm+dpb+sha1", "default"))) redecl4(void) { return 1; }
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127812



More information about the llvm-commits mailing list