Skip to content

Commit c4541c5

Browse files
authored
Merge pull request #33401 from hborla/join-perf-regression
[ConstraintSystem] Don't update the work list when merging type variables in addJoinConstraint
2 parents 91076bb + 89c499e commit c4541c5

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4529,7 +4529,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
45294529
return formUnsolvedResult();
45304530

45314531
// Merge the equivalence classes corresponding to these two variables.
4532-
mergeEquivalenceClasses(rep1, rep2);
4532+
mergeEquivalenceClasses(rep1, rep2, /*updateWorkList=*/true);
45334533
return getTypeMatchSuccess();
45344534
}
45354535

@@ -4581,7 +4581,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
45814581
if (!rep1->getImpl().canBindToInOut() ||
45824582
!rep2->getImpl().canBindToLValue()) {
45834583
// Merge the equivalence classes corresponding to these two variables.
4584-
mergeEquivalenceClasses(rep1, rep2);
4584+
mergeEquivalenceClasses(rep1, rep2, /*updateWorkList=*/true);
45854585
return getTypeMatchSuccess();
45864586
}
45874587
}

lib/Sema/ConstraintSystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3147,7 +3147,7 @@ class ConstraintSystem {
31473147

31483148
if (originalRep) {
31493149
if (originalRep != currentRep)
3150-
mergeEquivalenceClasses(currentRep, originalRep);
3150+
mergeEquivalenceClasses(currentRep, originalRep, /*updateWorkList=*/false);
31513151
continue;
31523152
}
31533153

@@ -3443,7 +3443,7 @@ class ConstraintSystem {
34433443
/// distinct.
34443444
void mergeEquivalenceClasses(TypeVariableType *typeVar1,
34453445
TypeVariableType *typeVar2,
3446-
bool updateWorkList = true);
3446+
bool updateWorkList);
34473447

34483448
/// Flags that direct type matching.
34493449
enum TypeMatchFlags {

validation-test/SILOptimizer/large_string_array.swift.gyb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// REQUIRES: long_test
1313
// REQUIRES: CPU=arm64 || CPU=x86_64
1414

15-
// REQUIRES: rdar66807959
16-
1715
// Check if the optimizer can optimize the whole array into a statically
1816
// initialized global
1917

0 commit comments

Comments
 (0)