[llvm] c3aa86c - [TableGen] const-correct a couple CodeGenSchedule methods. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 22:55:57 PST 2025


Author: Craig Topper
Date: 2025-01-17T22:55:20-08:00
New Revision: c3aa86c9de5dfcc40abad01eabb7f9a301b90a2e

URL: https://github.com/llvm/llvm-project/commit/c3aa86c9de5dfcc40abad01eabb7f9a301b90a2e
DIFF: https://github.com/llvm/llvm-project/commit/c3aa86c9de5dfcc40abad01eabb7f9a301b90a2e.diff

LOG: [TableGen] const-correct a couple CodeGenSchedule methods. NFC

Added: 
    

Modified: 
    llvm/utils/TableGen/Common/CodeGenSchedule.cpp
    llvm/utils/TableGen/Common/CodeGenSchedule.h

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/Common/CodeGenSchedule.cpp b/llvm/utils/TableGen/Common/CodeGenSchedule.cpp
index 06ef259c65ccfb..ce03bfc73e7705 100644
--- a/llvm/utils/TableGen/Common/CodeGenSchedule.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenSchedule.cpp
@@ -1740,8 +1740,8 @@ void CodeGenSchedModels::inferFromRW(ArrayRef<unsigned> OperWrites,
 
 // Check if any processor resource group contains all resource records in
 // SubUnits.
-bool CodeGenSchedModels::hasSuperGroup(ConstRecVec &SubUnits,
-                                       CodeGenProcModel &PM) {
+bool CodeGenSchedModels::hasSuperGroup(const ConstRecVec &SubUnits,
+                                       const CodeGenProcModel &PM) {
   for (const Record *ProcResourceDef : PM.ProcResourceDefs) {
     if (!ProcResourceDef->isSubClassOf("ProcResGroup"))
       continue;
@@ -1759,7 +1759,7 @@ bool CodeGenSchedModels::hasSuperGroup(ConstRecVec &SubUnits,
 }
 
 // Verify that overlapping groups have a common supergroup.
-void CodeGenSchedModels::verifyProcResourceGroups(CodeGenProcModel &PM) {
+void CodeGenSchedModels::verifyProcResourceGroups(const CodeGenProcModel &PM) {
   for (unsigned i = 0, e = PM.ProcResourceDefs.size(); i < e; ++i) {
     if (!PM.ProcResourceDefs[i]->isSubClassOf("ProcResGroup"))
       continue;

diff  --git a/llvm/utils/TableGen/Common/CodeGenSchedule.h b/llvm/utils/TableGen/Common/CodeGenSchedule.h
index d47c03514b155f..01f267ae55fad0 100644
--- a/llvm/utils/TableGen/Common/CodeGenSchedule.h
+++ b/llvm/utils/TableGen/Common/CodeGenSchedule.h
@@ -630,8 +630,8 @@ class CodeGenSchedModels {
   void inferFromItinClass(const Record *ItinClassDef, unsigned FromClassIdx);
   void inferFromInstRWs(unsigned SCIdx);
 
-  bool hasSuperGroup(ConstRecVec &SubUnits, CodeGenProcModel &PM);
-  void verifyProcResourceGroups(CodeGenProcModel &PM);
+  bool hasSuperGroup(const ConstRecVec &SubUnits, const CodeGenProcModel &PM);
+  void verifyProcResourceGroups(const CodeGenProcModel &PM);
 
   void collectProcResources();
 


        


More information about the llvm-commits mailing list