[PATCH] D115199: [WIP][X86][AMX] Support amxpreserve attribute in clang.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 7 09:17:41 PST 2021


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:2895
 
+def AMXPreserve : InheritableAttr, TargetSpecificAttr<TargetAnyX86> {
+  let Spellings = [GCC<"amxpreserve">, Declspec<"amxpreserve">];
----------------
Inherited on what? This attribute needs a `Subjects` list, I suspect, or it needs to not be using a `SimpleHandler`.


================
Comment at: clang/include/clang/Basic/Attr.td:2896
+def AMXPreserve : InheritableAttr, TargetSpecificAttr<TargetAnyX86> {
+  let Spellings = [GCC<"amxpreserve">, Declspec<"amxpreserve">];
+  let Documentation = [Undocumented];
----------------
Does GCC support this attribute? Or MSVC? I don't see any evidence that either compiler supports this, so I think this should be one spelling: `Clang`.


================
Comment at: clang/include/clang/Basic/Attr.td:2897
+  let Spellings = [GCC<"amxpreserve">, Declspec<"amxpreserve">];
+  let Documentation = [Undocumented];
+  let SimpleHandler = 1;
----------------
No new, undocumented attributes please.


================
Comment at: clang/lib/Sema/SemaType.cpp:7517
 
+  if (attr.getKind() == ParsedAttr::AT_AMXPreserve) {
+    if (S.CheckAttrTarget(attr))
----------------
Why are there type system changes for a declaration attribute?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115199



More information about the cfe-commits mailing list