[llvm] [TableGen][SubtargetEmitter] Refactor hasReadOfWrite to take ProcModel argument (PR #92032)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 15:46:06 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 {
----------------
topperc wrote:
Does this have any callers now?
https://github.com/llvm/llvm-project/pull/92032
More information about the llvm-commits
mailing list