Skip to content

Commit 3d2559f

Browse files
committed
RequirementMachine: Don't skip subst-simplified rules when importing
Property map construction is still not incremental, and considers all rules. Skipping subst-simplified rules here violates invariants checked by the next commit.
1 parent 3777054 commit 3d2559f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/AST/RequirementMachine/RewriteSystem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,10 @@ void RewriteSystem::addRules(
332332
const auto &newRule = Rules[newRuleID];
333333
// Skip simplified rules. At the very least we need to skip RHS-simplified
334334
// rules since their left hand sides might duplicate existing rules; the
335-
// others are skipped purely as an optimization.
335+
// others are skipped purely as an optimization. We can't skip subst-
336+
// simplified rules, since property map construction considers them.
336337
if (newRule.isLHSSimplified() ||
337-
newRule.isRHSSimplified() ||
338-
newRule.isSubstitutionSimplified())
338+
newRule.isRHSSimplified())
339339
continue;
340340

341341
auto oldRuleID = Trie.insert(newRule.getLHS().begin(),

0 commit comments

Comments
 (0)