mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "Make sure we always de-serialize transparent functions."
This reverts commit 821b365054.
It caused a bunch of execution time regressions.
This commit is contained in:
@@ -179,10 +179,8 @@ SILModule::lookUpWitnessTable(const ProtocolConformance *C,
|
||||
// *NOTE* In practice, wtable will be deserializedTable, but I do not want to rely
|
||||
// on that behavior for now.
|
||||
if (deserializeLazily)
|
||||
if (auto deserialized = getSILLoader()->lookupWitnessTable(wtable)) {
|
||||
linkTransparentFunctions();
|
||||
if (auto deserialized = getSILLoader()->lookupWitnessTable(wtable))
|
||||
return deserialized;
|
||||
}
|
||||
|
||||
// If we fail, just return the declaration.
|
||||
return wtable;
|
||||
@@ -591,25 +589,8 @@ void SILModule::removeFromZombieList(StringRef Name) {
|
||||
}
|
||||
}
|
||||
|
||||
void SILModule::linkTransparentFunctions() {
|
||||
FunctionListType::iterator Iter = functions.begin();
|
||||
if (LastFunctionChecked) {
|
||||
Iter = LastFunctionChecked->getIterator();
|
||||
Iter++;
|
||||
}
|
||||
while (Iter != functions.end()) {
|
||||
SILFunction *F = &*Iter;
|
||||
Iter++;
|
||||
LastFunctionChecked = F;
|
||||
if (F->isTransparent() && F->isExternalDeclaration())
|
||||
linkFunction(F, LinkingMode::LinkNormal);
|
||||
}
|
||||
}
|
||||
|
||||
/// Erase a function from the module.
|
||||
void SILModule::eraseFunction(SILFunction *F) {
|
||||
if (F == LastFunctionChecked)
|
||||
LastFunctionChecked = nullptr;
|
||||
|
||||
assert(! F->isZombie() && "zombie function is in list of alive functions");
|
||||
if (F->isInlined() || F->isExternallyUsedSymbol()) {
|
||||
|
||||
Reference in New Issue
Block a user