mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Remove -sil-link-all frontend flag
It was only used in a few tests. Those tests now use -emit-sil instead of -emit-silgen, with some functions marked @_transparent and a few CHECK: lines changed now that the mandatory optimizations get to run.
This commit is contained in:
@@ -980,13 +980,6 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
return false;
|
||||
}
|
||||
|
||||
/// If we are asked to link all, link all.
|
||||
static void linkAllIfNeeded(const CompilerInvocation &Invocation,
|
||||
SILModule *SM) {
|
||||
if (Invocation.getSILOptions().LinkMode == SILOptions::LinkAll)
|
||||
performSILLinking(SM);
|
||||
}
|
||||
|
||||
/// Perform "stable" optimizations that are invariant across compiler versions.
|
||||
static bool performMandatorySILPasses(CompilerInvocation &Invocation,
|
||||
SILModule *SM,
|
||||
@@ -1008,8 +1001,6 @@ static bool performMandatorySILPasses(CompilerInvocation &Invocation,
|
||||
return true;
|
||||
}
|
||||
|
||||
linkAllIfNeeded(Invocation, SM);
|
||||
|
||||
if (Invocation.getSILOptions().MergePartialModules)
|
||||
SM->linkAllFromCurrentModule();
|
||||
return false;
|
||||
@@ -1211,12 +1202,10 @@ static bool performCompileStepsPostSILGen(
|
||||
|
||||
// We've been told to emit SIL after SILGen, so write it now.
|
||||
if (Action == FrontendOptions::ActionType::EmitSILGen) {
|
||||
linkAllIfNeeded(Invocation, SM.get());
|
||||
return writeSIL(*SM, PSPs, Instance, Invocation);
|
||||
}
|
||||
|
||||
if (Action == FrontendOptions::ActionType::EmitSIBGen) {
|
||||
linkAllIfNeeded(Invocation, SM.get());
|
||||
serializeSIB(SM.get(), PSPs, Instance.getASTContext(), MSF);
|
||||
return Context.hadError();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user