mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Remove unused deserialized SILFunctions.
The deserializer holds a reference to the deserialized SILFunction, which prevents Dead Function Elimination from erasing them. We have a tradeoff on how often we should clean up the unused deserialized SILFunctions. If we clean up at every optimization iteration, we may end up deserializing the same SILFunction multiple times. For now, we clean up only after we are done with the optimization iteration. rdar://17046033 Swift SVN r18697
This commit is contained in:
@@ -656,6 +656,10 @@ void SILModule::linkAllVTables() {
|
||||
getSILLoader()->getAllVTables();
|
||||
}
|
||||
|
||||
void SILModule::invalidateSILLoader() {
|
||||
getSILLoader()->invalidateEntry(nullptr);
|
||||
}
|
||||
|
||||
SILVTable *SILModule::lookUpVTable(const ClassDecl *C) {
|
||||
if (!C)
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user