Revert "Verify SIL modules at the beginning and at the end of the SIL optimization pipelines, if -sil-verify-all is provided"

This reverts commit r31863, which was committed by mistake.

Swift SVN r31864
This commit is contained in:
Roman Levenstein
2015-09-10 22:32:36 +00:00
parent 141b8f814d
commit 4cef619c19
13 changed files with 33 additions and 46 deletions

View File

@@ -150,6 +150,9 @@ static llvm::cl::opt<unsigned>
ASTVerifierProcessId("ast-verifier-process-id", llvm::cl::Hidden,
llvm::cl::init(1));
static llvm::cl::opt<bool>
PerformWMO("wmo", llvm::cl::desc("Enable whole-module optimizations"));
static void runCommandLineSelectedPasses(SILModule *Module) {
SILPassManager PM(Module);
@@ -253,8 +256,20 @@ int main(int argc, char **argv) {
PrintingDiagnosticConsumer PrintDiags;
CI.addDiagnosticConsumer(&PrintDiags);
if (!PerformWMO) {
auto &FrontendOpts = Invocation.getFrontendOptions();
if (!InputFilename.empty() && InputFilename != "-") {
FrontendOpts.PrimaryInput = SelectedInput(
FrontendOpts.InputFilenames.size());
} else {
FrontendOpts.PrimaryInput = SelectedInput(
FrontendOpts.InputBuffers.size(), SelectedInput::InputKind::Buffer);
}
}
if (CI.setup(Invocation))
return 1;
CI.performSema();
// If parsing produced an error, don't run any passes.