Teach SerializedSILLoader how to load all SILFunctions. Also add SerializedSILLoader::getAll().

getAll deserializes all SIL (except for globals). This enables us to iterate
over the SILModules once instead of once for first SILFunctions, then VTables,
then WitnessTables which is just inefficient.

Swift SVN r14176
This commit is contained in:
Michael Gottesman
2014-02-20 22:22:20 +00:00
parent 8024563678
commit ec52d16f57
4 changed files with 47 additions and 0 deletions

View File

@@ -54,6 +54,16 @@ SILVTable *SerializedSILLoader::lookupVTable(Identifier Name) {
return nullptr;
}
void SerializedSILLoader::getAll() {
for (auto &Des : LoadedSILSections)
Des->getAll();
}
void SerializedSILLoader::getAllSILFunctions() {
for (auto &Des : LoadedSILSections)
Des->getAllSILFunctions();
}
/// Deserialize all VTables in all SILModules.
void SerializedSILLoader::getAllVTables() {
for (auto &Des : LoadedSILSections)