mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
SchedMachineModel: compress the CPU's WriteLatencyTable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164199 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -270,6 +270,21 @@ unsigned CodeGenSchedModels::getSchedRWIdx(Record *Def, bool IsRead,
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CodeGenSchedModels::hasReadOfWrite(Record *WriteDef) const {
|
||||
for (unsigned i = 0, e = SchedReads.size(); i < e; ++i) {
|
||||
Record *ReadDef = SchedReads[i].TheDef;
|
||||
if (!ReadDef || !ReadDef->isSubClassOf("ProcReadAdvance"))
|
||||
continue;
|
||||
|
||||
RecVec ValidWrites = ReadDef->getValueAsListOfDefs("ValidWrites");
|
||||
if (std::find(ValidWrites.begin(), ValidWrites.end(), WriteDef)
|
||||
!= ValidWrites.end()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
void splitSchedReadWrites(const RecVec &RWDefs,
|
||||
RecVec &WriteDefs, RecVec &ReadDefs) {
|
||||
|
||||
Reference in New Issue
Block a user