[SIL] NFC: Simplify SILVTable and save 8 bytes per SILVTable

We were not using the primary benefits of an intrusive list, namely the
ability to insert or remove from the middle of the list, so let's switch
to a plain vector. This also avoids linked-list pointer chasing.
This commit is contained in:
David Zarzycki
2020-06-08 10:42:04 -04:00
parent fe8893da96
commit 017ee7bf04
14 changed files with 53 additions and 58 deletions

View File

@@ -736,7 +736,7 @@ static void countStatsPostSILGen(UnifiedStatsReporter &Stats,
auto &C = Stats.getFrontendCounters();
// FIXME: calculate these in constant time, via the dense maps.
C.NumSILGenFunctions += Module.getFunctionList().size();
C.NumSILGenVtables += Module.getVTableList().size();
C.NumSILGenVtables += Module.getVTables().size();
C.NumSILGenWitnessTables += Module.getWitnessTableList().size();
C.NumSILGenDefaultWitnessTables += Module.getDefaultWitnessTableList().size();
C.NumSILGenGlobalVariables += Module.getSILGlobalList().size();