Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused HyperToken attribute #284

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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")) {
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
Loading