Skip to content

Commit 6e2c222

Browse files
authored
Merge pull request #65079 from meg-gupta/disableinputverify
Add a new flag to disable verification on input SIL
2 parents 96a183f + 95ede85 commit 6e2c222

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/SIL/Parser/ParseSIL.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ static llvm::cl::opt<bool>
4848
ParseSerializedSIL("parse-serialized-sil",
4949
llvm::cl::desc("Parse the output of a serialized module"));
5050

51+
static llvm::cl::opt<bool>
52+
DisableInputVerify("sil-disable-input-verify",
53+
llvm::cl::desc("Disable verification of input SIL"),
54+
llvm::cl::init(false));
55+
5156
//===----------------------------------------------------------------------===//
5257
// SILParserState implementation
5358
//===----------------------------------------------------------------------===//
@@ -7037,7 +7042,7 @@ bool SILParserState::parseDeclSIL(Parser &P) {
70377042
return true;
70387043

70397044
// If SIL parsing succeeded, verify the generated SIL.
7040-
if (!P.Diags.hadAnyError())
7045+
if (!P.Diags.hadAnyError() && !DisableInputVerify)
70417046
FunctionState.F->verify();
70427047

70437048
return false;

test/SILOptimizer/ossa_lifetime_completion.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -enable-ossa-complete-lifetimes -unit-test-runner -sil-verify-none %s -o /dev/null 2>&1 | %FileCheck %s
1+
// RUN: %target-sil-opt -enable-ossa-complete-lifetimes -unit-test-runner -sil-disable-input-verify %s -o /dev/null 2>&1 | %FileCheck %s
22

33
sil_stage raw
44

0 commit comments

Comments
 (0)