[llvm] [TableGen][SubtargetEmitter] Refactor hasReadOfWrite to CodeGenProcModel (PR #92032)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 06:28:39 PDT 2024
================
@@ -746,18 +746,24 @@ unsigned CodeGenSchedModels::getSchedRWIdx(const Record *Def,
return I == RWVec.end() ? 0 : std::distance(RWVec.begin(), I);
}
-bool CodeGenSchedModels::hasReadOfWrite(Record *WriteDef) const {
- for (auto &ProcModel : ProcModels) {
- const RecVec &RADefs = ProcModel.ReadAdvanceDefs;
- for (auto &RADef : RADefs) {
- RecVec ValidWrites = RADef->getValueAsListOfDefs("ValidWrites");
- if (is_contained(ValidWrites, WriteDef))
- return true;
- }
+bool CodeGenSchedModels::hasReadOfWrite(
+ Record *WriteDef, const CodeGenProcModel &ProcModel) const {
+ const RecVec &RADefs = ProcModel.ReadAdvanceDefs;
+ for (auto &RADef : RADefs) {
+ RecVec ValidWrites = RADef->getValueAsListOfDefs("ValidWrites");
+ if (is_contained(ValidWrites, WriteDef))
+ return true;
}
return false;
}
+bool CodeGenSchedModels::hasReadOfWrite(Record *WriteDef) const {
----------------
michaelmaitland wrote:
Updated
https://github.com/llvm/llvm-project/pull/92032
More information about the llvm-commits
mailing list