mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
TableGen SubtargetEmitter fix to allow A9 and Swift to coexist.
Allow variants to be defined only for some processors on a target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df23a60fa6
commit
82e7c4f533
@ -1308,7 +1308,7 @@ void CodeGenSchedModels::inferFromRW(const IdxVec &OperWrites,
|
|||||||
const IdxVec &OperReads,
|
const IdxVec &OperReads,
|
||||||
unsigned FromClassIdx,
|
unsigned FromClassIdx,
|
||||||
const IdxVec &ProcIndices) {
|
const IdxVec &ProcIndices) {
|
||||||
DEBUG(dbgs() << "INFER RW: ");
|
DEBUG(dbgs() << "INFER RW proc("; dumpIdxVec(ProcIndices); dbgs() << ") ");
|
||||||
|
|
||||||
// Create a seed transition with an empty PredTerm and the expanded sequences
|
// Create a seed transition with an empty PredTerm and the expanded sequences
|
||||||
// of SchedWrites for the current SchedClass.
|
// of SchedWrites for the current SchedClass.
|
||||||
@ -1650,6 +1650,13 @@ void CodeGenSchedClass::dump(const CodeGenSchedModels* SchedModels) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dbgs() << "\n ProcIdx: "; dumpIdxVec(ProcIndices); dbgs() << '\n';
|
dbgs() << "\n ProcIdx: "; dumpIdxVec(ProcIndices); dbgs() << '\n';
|
||||||
|
if (!Transitions.empty()) {
|
||||||
|
dbgs() << "\n Transitions for Proc ";
|
||||||
|
for (std::vector<CodeGenSchedTransition>::const_iterator
|
||||||
|
TI = Transitions.begin(), TE = Transitions.end(); TI != TE; ++TI) {
|
||||||
|
dumpIdxVec(TI->ProcIndices);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PredTransitions::dump() const {
|
void PredTransitions::dump() const {
|
||||||
|
@ -850,7 +850,22 @@ void SubtargetEmitter::GenSchedClassTables(const CodeGenProcModel &ProcModel,
|
|||||||
SCDesc.ReadAdvanceIdx = 0;
|
SCDesc.ReadAdvanceIdx = 0;
|
||||||
|
|
||||||
// A Variant SchedClass has no resources of its own.
|
// A Variant SchedClass has no resources of its own.
|
||||||
if (!SCI->Transitions.empty()) {
|
bool HasVariants = false;
|
||||||
|
for (std::vector<CodeGenSchedTransition>::const_iterator
|
||||||
|
TI = SCI->Transitions.begin(), TE = SCI->Transitions.end();
|
||||||
|
TI != TE; ++TI) {
|
||||||
|
if (TI->ProcIndices[0] == 0) {
|
||||||
|
HasVariants = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
IdxIter PIPos = std::find(TI->ProcIndices.begin(),
|
||||||
|
TI->ProcIndices.end(), ProcModel.Index);
|
||||||
|
if (PIPos != TI->ProcIndices.end()) {
|
||||||
|
HasVariants = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (HasVariants) {
|
||||||
SCDesc.NumMicroOps = MCSchedClassDesc::VariantNumMicroOps;
|
SCDesc.NumMicroOps = MCSchedClassDesc::VariantNumMicroOps;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user