Skip to content

Commit

Permalink
Remove unused HyperToken attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
VoxSciurorum committed Sep 18, 2024
1 parent 1d36a6a commit a9cef26
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 21 deletions.
6 changes: 0 additions & 6 deletions clang/include/clang/Basic/Attr.td
Original file line number Diff line number Diff line change
Expand Up @@ -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]>;
Expand Down
3 changes: 0 additions & 3 deletions clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9868,9 +9868,6 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL,
case ParsedAttr::AT_HyperView:
handleSimpleAttribute<HyperViewAttr>(S, D, AL);
break;
case ParsedAttr::AT_HyperToken:
handleSimpleAttribute<HyperTokenAttr>(S, D, AL);
break;
case ParsedAttr::AT_ReducerUnregister:
handleSimpleAttribute<ReducerUnregisterAttr>(S, D, AL);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions llvm/utils/TableGen/CodeGenIntrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R,
isInjective = false;
isStrandPure = false;
isHyperView = false;
isHyperToken = false;
isReducerRegister = false;
isReducerUnregister = false;

Expand Down Expand Up @@ -222,8 +221,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")) {
Expand Down
1 change: 0 additions & 1 deletion llvm/utils/TableGen/CodeGenIntrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ struct CodeGenIntrinsic {
// Tapir reducer-related attributes
bool isStrandPure;
bool isHyperView;
bool isHyperToken;
bool isReducerRegister;
bool isReducerUnregister;

Expand Down
8 changes: 1 addition & 7 deletions llvm/utils/TableGen/IntrinsicEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,6 @@ std::optional<bool> 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();
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit a9cef26

Please sign in to comment.