From 51fa56f55de499abad614080ce58eef11378d14a Mon Sep 17 00:00:00 2001 From: "John F. Carr" Date: Fri, 23 Aug 2024 16:51:29 -0400 Subject: [PATCH] Remove unused HyperToken attribute --- clang/include/clang/Basic/Attr.td | 6 ------ clang/lib/Sema/SemaDeclAttr.cpp | 3 --- .../Misc/pragma-attribute-supported-attributes-list.test | 1 - llvm/utils/TableGen/CodeGenIntrinsics.cpp | 3 --- llvm/utils/TableGen/CodeGenIntrinsics.h | 1 - llvm/utils/TableGen/IntrinsicEmitter.cpp | 8 +------- 6 files changed, 1 insertion(+), 21 deletions(-) diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index d850a725be19..7e03d670d5bb 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -4501,12 +4501,6 @@ def HyperView : InheritableAttr { let Documentation = [StrandMallocDocs]; } -def HyperToken : InheritableAttr { - let Spellings = [Clang<"hyper_token">]; - let Subjects = SubjectList<[FunctionLike]>; - let Documentation = [StrandMallocDocs]; -} - def ReducerRegister : InheritableAttr { let Spellings = [Clang<"reducer_register">]; let Subjects = SubjectList<[FunctionLike]>; diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 7edb7f0f9aec..85f057600945 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -9868,9 +9868,6 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, case ParsedAttr::AT_HyperView: handleSimpleAttribute(S, D, AL); break; - case ParsedAttr::AT_HyperToken: - handleSimpleAttribute(S, D, AL); - break; case ParsedAttr::AT_ReducerUnregister: handleSimpleAttribute(S, D, AL); break; diff --git a/clang/test/Misc/pragma-attribute-supported-attributes-list.test b/clang/test/Misc/pragma-attribute-supported-attributes-list.test index 6050dd8bfde2..a637c6f2598e 100644 --- a/clang/test/Misc/pragma-attribute-supported-attributes-list.test +++ b/clang/test/Misc/pragma-attribute-supported-attributes-list.test @@ -82,7 +82,6 @@ // CHECK-NEXT: GNUInline (SubjectMatchRule_function) // CHECK-NEXT: HIPManaged (SubjectMatchRule_variable) // CHECK-NEXT: Hot (SubjectMatchRule_function) -// CHECK-NEXT: HyperToken (SubjectMatchRule_hasType_functionType) // CHECK-NEXT: HyperView (SubjectMatchRule_hasType_functionType) // CHECK-NEXT: IBAction (SubjectMatchRule_objc_method_is_instance) // CHECK-NEXT: IFunc (SubjectMatchRule_function) diff --git a/llvm/utils/TableGen/CodeGenIntrinsics.cpp b/llvm/utils/TableGen/CodeGenIntrinsics.cpp index 05330068533c..9eef4604ff03 100644 --- a/llvm/utils/TableGen/CodeGenIntrinsics.cpp +++ b/llvm/utils/TableGen/CodeGenIntrinsics.cpp @@ -78,7 +78,6 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, isInjective = false; isStrandPure = false; isHyperView = false; - isHyperToken = false; isReducerRegister = false; isReducerUnregister = false; @@ -220,8 +219,6 @@ void CodeGenIntrinsic::setProperty(Record *R) { isReducerRegister = true; else if (R->getName() == "IntrHyperView") isHyperView = true; - else if (R->getName() == "IntrHyperToken") - isHyperToken = true; else if (R->getName() == "IntrReducerUnregister") isReducerUnregister = true; else if (R->isSubClassOf("NoCapture")) { diff --git a/llvm/utils/TableGen/CodeGenIntrinsics.h b/llvm/utils/TableGen/CodeGenIntrinsics.h index 91fb20a97505..6a5317009bca 100644 --- a/llvm/utils/TableGen/CodeGenIntrinsics.h +++ b/llvm/utils/TableGen/CodeGenIntrinsics.h @@ -112,7 +112,6 @@ struct CodeGenIntrinsic { // Tapir reducer-related attributes bool isStrandPure; bool isHyperView; - bool isHyperToken; bool isReducerRegister; bool isReducerUnregister; diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp index 25cf081e8b19..f70c5481a613 100644 --- a/llvm/utils/TableGen/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp @@ -405,9 +405,6 @@ std::optional compareFnAttributes(const CodeGenIntrinsic *L, if (L->isHyperView != R->isHyperView) return R->isHyperView; - if (L->isHyperToken != R->isHyperToken) - return R->isHyperToken; - // Try to order by readonly/readnone attribute. uint32_t LK = L->ME.toIntValue(); uint32_t RK = R->ME.toIntValue(); @@ -554,8 +551,6 @@ void IntrinsicEmitter::EmitAttributes(const CodeGenIntrinsicTable &Ints, OS << " Attribute::get(C, Attribute::ReducerUnregister),\n"; if (Intrinsic.isHyperView) OS << " Attribute::get(C, Attribute::HyperView),\n"; - if (Intrinsic.isHyperToken) - OS << " Attribute::get(C, Attribute::HyperToken),\n"; MemoryEffects ME = Intrinsic.ME; // TODO: IntrHasSideEffects should affect not only readnone intrinsics. @@ -631,8 +626,7 @@ void IntrinsicEmitter::EmitAttributes(const CodeGenIntrinsicTable &Ints, Intrinsic.isConvergent || Intrinsic.isSpeculatable || Intrinsic.isStrictFP || Intrinsic.isInjective || Intrinsic.isStrandPure || Intrinsic.isReducerRegister || - Intrinsic.isReducerUnregister || Intrinsic.isHyperView || - Intrinsic.isHyperToken) { + Intrinsic.isReducerUnregister || Intrinsic.isHyperView) { unsigned ID = UniqFnAttributes.find(&Intrinsic)->second; OS << " AS[" << numAttrs++ << "] = {AttributeList::FunctionIndex, " << "getIntrinsicFnAttributeSet(C, " << ID << ")};\n";