[llvm] cf0773f - [TableGen][NFC] Remove EponymousProcResourceKind (#80812)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 18:52:29 PST 2024
Author: Wang Pengcheng
Date: 2024-02-07T10:52:25+08:00
New Revision: cf0773fb14e18e97de3f66b4f21f286ca4f97eae
URL: https://github.com/llvm/llvm-project/commit/cf0773fb14e18e97de3f66b4f21f286ca4f97eae
DIFF: https://github.com/llvm/llvm-project/commit/cf0773fb14e18e97de3f66b4f21f286ca4f97eae.diff
LOG: [TableGen][NFC] Remove EponymousProcResourceKind (#80812)
We can use `!cast` to cast `NAME` to `ProcResourceKind`.
Added:
Modified:
llvm/include/llvm/Target/TargetSchedule.td
Removed:
################################################################################
diff --git a/llvm/include/llvm/Target/TargetSchedule.td b/llvm/include/llvm/Target/TargetSchedule.td
index 032de72851782..e2781a5d1ea54 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;
More information about the llvm-commits
mailing list