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:
Slava Pestov
2018-04-06 17:53:25 -07:00
parent cc586594d1
commit 81cf1d951d
20 changed files with 197 additions and 286 deletions

View File

@@ -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();
}