Add indexTrieRoot to the SILModule to share across Analyses.

...and avoid reallocation.

This is immediately necessary for LICM, in addition to its current
uses. I suspect this could be used by many passes that work with
addresses. RLE/DSE should absolutely migrate to it.
This commit is contained in:
Andrew Trick
2020-04-05 18:53:24 -07:00
parent 38c8bbd9a7
commit 85ff15acd3
8 changed files with 21 additions and 22 deletions

View File

@@ -94,7 +94,8 @@ class SILModule::SerializationCallback final
SILModule::SILModule(llvm::PointerUnion<FileUnit *, ModuleDecl *> context,
Lowering::TypeConverter &TC, const SILOptions &Options)
: Stage(SILStage::Raw), Options(Options), serialized(false),
: Stage(SILStage::Raw), indexTrieRoot(new IndexTrieNode()),
Options(Options), serialized(false),
regDeserializationNotificationHandlerForNonTransparentFuncOME(false),
regDeserializationNotificationHandlerForAllFuncOME(false),
SerializeSILAction(), Types(TC) {