mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Cache ConformanceAccessPaths in GSB::EquivalenceClass for big wins
This dramatically speeds up SubstitutionMap::lookupConformance, shaving off 1/3 of the time spent compiling the standard library.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "swift/AST/Decl.h"
|
||||
#include "swift/AST/DiagnosticEngine.h"
|
||||
#include "swift/AST/GenericSignature.h"
|
||||
#include "swift/AST/Identifier.h"
|
||||
#include "swift/AST/ProtocolConformanceRef.h"
|
||||
#include "swift/AST/Types.h"
|
||||
@@ -45,7 +46,6 @@ namespace swift {
|
||||
class DeclContext;
|
||||
class DependentMemberType;
|
||||
class GenericParamList;
|
||||
class GenericSignature;
|
||||
class GenericSignatureBuilder;
|
||||
class GenericTypeParamType;
|
||||
class LazyResolver;
|
||||
@@ -278,6 +278,10 @@ public:
|
||||
/// Cached nested-type information, which contains the best declaration
|
||||
/// for a given name.
|
||||
llvm::SmallDenseMap<Identifier, CachedNestedType> nestedTypeNameCache;
|
||||
|
||||
/// Cached access paths.
|
||||
llvm::SmallDenseMap<const ProtocolDecl *, ConformanceAccessPath, 8>
|
||||
conformanceAccessPathCache;
|
||||
};
|
||||
|
||||
friend class RequirementSource;
|
||||
|
||||
Reference in New Issue
Block a user