Delay import of prespecialize decls until generic specialization

This commit is contained in:
Arnold Schwaighofer
2021-10-08 07:23:15 -07:00
parent c2fd49cebb
commit 81dd5d9cb6
9 changed files with 110 additions and 64 deletions

View File

@@ -109,6 +109,7 @@ class SILUndef;
class SourceFile;
class SerializedSILLoader;
class SILFunctionBuilder;
class SILOptFunctionBuilder;
class SILRemarkStreamer;
namespace Lowering {
@@ -353,6 +354,8 @@ private:
/// This gets set in OwnershipModelEliminator pass.
bool regDeserializationNotificationHandlerForAllFuncOME;
bool prespecializedFunctionDeclsImported;
/// Action to be executed for serializing the SILModule.
ActionCallback SerializeSILAction;
@@ -894,6 +897,10 @@ public:
/// declaration context ought to be serialized as part of this module.
bool
shouldSerializeEntitiesAssociatedWithDeclContext(const DeclContext *DC) const;
/// Gather prespecialized from extensions.
void performOnceForPrespecializedImportedExtensions(
llvm::function_ref<void(AbstractFunctionDecl *)> action);
};
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SILModule &M){