summaryrefslogtreecommitdiff
path: root/llvm
diff options
context:
space:
mode:
authorWang Pengcheng <wangpengcheng.pp@bytedance.com>2024-02-07 10:52:25 +0800
committerGitHub <noreply@github.com>2024-02-07 10:52:25 +0800
commitcf0773fb14e18e97de3f66b4f21f286ca4f97eae (patch)
treef01e71e40ab77a01ae6d09c24b55d45accd48f2e /llvm
parent69a661cbae10495e9556d195fa683c0100ae299c (diff)
[TableGen][NFC] Remove EponymousProcResourceKind (#80812)
We can use `!cast` to cast `NAME` to `ProcResourceKind`.
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Target/TargetSchedule.td7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/include/llvm/Target/TargetSchedule.td b/llvm/include/llvm/Target/TargetSchedule.td
index 032de7285178..e2781a5d1ea5 100644
--- a/llvm/include/llvm/Target/TargetSchedule.td
+++ b/llvm/include/llvm/Target/TargetSchedule.td
@@ -192,15 +192,10 @@ class ProcResourceUnits<ProcResourceKind kind, int num> {
SchedMachineModel SchedModel = ?;
}
-// EponymousProcResourceKind helps implement ProcResourceUnits by
-// allowing a ProcResourceUnits definition to reference itself. It
-// should not be referenced anywhere else.
-def EponymousProcResourceKind : ProcResourceKind;
-
// Subtargets typically define processor resource kind and number of
// units in one place.
class ProcResource<int num> : ProcResourceKind,
- ProcResourceUnits<EponymousProcResourceKind, num>;
+ ProcResourceUnits<!cast<ProcResourceKind>(NAME), num>;
class ProcResGroup<list<ProcResource> resources> : ProcResourceKind {
list<ProcResource> Resources = resources;