1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[SchedModels] Return earlier removed checks

It is possible that some write resource is variant in model A
and sequence in model B. Such case will trigger assertion in
getAllPredicates function.
This commit is contained in:
Evgeny Leviant 2020-11-25 12:07:35 +03:00
parent 6470b438cd
commit ffd843aa95

View File

@ -1456,7 +1456,9 @@ static std::vector<Record *> getAllPredicates(ArrayRef<TransVariant> Variants,
ArrayRef<unsigned> ProcIndices) {
std::vector<Record *> Preds;
for (auto &Variant : Variants) {
assert(Variant.VarOrSeqDef->isSubClassOf("SchedVar"));
if (!Variant.VarOrSeqDef->isSubClassOf("SchedVar"))
continue;
if (ProcIndices[0] && Variant.ProcIdx)
if (!llvm::count(ProcIndices, Variant.ProcIdx))
continue;
@ -1532,9 +1534,11 @@ void PredTransitions::getIntersectingVariants(
" Ensure only one SchedAlias exists per RW.");
}
}
Record *PredDef = Variant.VarOrSeqDef->getValueAsDef("Predicate");
if (mutuallyExclusive(PredDef, AllPreds, TransVec[TransIdx].PredTerm))
continue;
if (Variant.VarOrSeqDef->isSubClassOf("SchedVar")) {
Record *PredDef = Variant.VarOrSeqDef->getValueAsDef("Predicate");
if (mutuallyExclusive(PredDef, AllPreds, TransVec[TransIdx].PredTerm))
continue;
}
if (IntersectingVariants.empty()) {
// The first variant builds on the existing transition.