Skip to content

Conversation

@sunshaoce
Copy link
Contributor

Including the name helps quickly locate the corresponding Instruction that caused the issue.

Including the name helps quickly locate the corresponding Instruction that caused the issue.
@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2025

@llvm/pr-subscribers-tablegen

Author: Shaoce SUN (sunshaoce)

Changes

Including the name helps quickly locate the corresponding Instruction that caused the issue.


Full diff: https://github.com/llvm/llvm-project/pull/149531.diff

1 Files Affected:

  • (modified) llvm/utils/TableGen/Common/CodeGenSchedule.cpp (+4-2)
diff --git a/llvm/utils/TableGen/Common/CodeGenSchedule.cpp b/llvm/utils/TableGen/Common/CodeGenSchedule.cpp
index 50346c29e8862..b07ea9e9d5caf 100644
--- a/llvm/utils/TableGen/Common/CodeGenSchedule.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenSchedule.cpp
@@ -2114,7 +2114,8 @@ void CodeGenSchedModels::addWriteRes(const Record *ProcWriteResDef,
     const Record *WRDef = ProcWriteResDef->getValueAsDef("WriteType");
     if (!WRMap.try_emplace(WRDef, ProcWriteResDef).second)
       PrintFatalError(ProcWriteResDef->getLoc(),
-                      "WriteType already used in another WriteRes");
+                      "WriteType of " + WRDef->getName() +
+                          " already used in another WriteRes");
   }
 
   // Visit ProcResourceKinds referenced by the newly discovered WriteRes.
@@ -2148,7 +2149,8 @@ void CodeGenSchedModels::addReadAdvance(const Record *ProcReadAdvanceDef,
     const Record *RADef = ProcReadAdvanceDef->getValueAsDef("ReadType");
     if (!RAMap.try_emplace(RADef, ProcReadAdvanceDef).second)
       PrintFatalError(ProcReadAdvanceDef->getLoc(),
-                      "ReadType already used in another ReadAdvance");
+                      "ReadType of " + RADef->getName() +
+                          " already used in another ReadAdvance");
   }
 }
 

@sunshaoce sunshaoce merged commit 0c75e09 into llvm:main Jul 18, 2025
11 checks passed
@sunshaoce sunshaoce deleted the RADef branch July 18, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants