Skip to content

Commit ff77966

Browse files
committed
[GSB] Use a larger set for checking for visited requirements in 'isRecursive'.
This claws back some of the regression of 2feb830 on certain generics heavy code. rdar://problem/40005262 (no-opt) goes from 7.83 -> 5.75 and rdar://problem/40010847 (opt) goes from 90.7 -> 66.6 (both -27%).
1 parent bcb98fa commit ff77966

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ FloatingRequirementSource FloatingRequirementSource::asInferred(
17751775
bool FloatingRequirementSource::isRecursive(
17761776
Type rootType,
17771777
GenericSignatureBuilder &builder) const {
1778-
llvm::SmallSet<std::pair<CanType, ProtocolDecl *>, 4> visitedAssocReqs;
1778+
llvm::SmallSet<std::pair<CanType, ProtocolDecl *>, 32> visitedAssocReqs;
17791779
for (auto storedSource = storage.dyn_cast<const RequirementSource *>();
17801780
storedSource; storedSource = storedSource->parent) {
17811781
// FIXME: isRecursive() is completely misnamed

0 commit comments

Comments
 (0)