Skip to content

Commit 61f2e7b

Browse files
committed
SILVerifier: remove the unused -verify-skip-unreachable-must-be-last option
It had no effect, because such SIL is never generated anyway.
1 parent 09b26e8 commit 61f2e7b

File tree

6 files changed

+6
-17
lines changed

6 files changed

+6
-17
lines changed

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ using namespace swift::silverifier;
5252

5353
using Lowering::AbstractionPattern;
5454

55-
// This flag is used only to check that sil-combine can properly
56-
// remove any code after unreachable, thus bringing SIL into
57-
// its canonical form which may get temporarily broken during
58-
// intermediate transformations.
59-
static llvm::cl::opt<bool> SkipUnreachableMustBeLastErrors(
60-
"verify-skip-unreachable-must-be-last",
61-
llvm::cl::init(false));
62-
6355
// This flag controls the default behaviour when hitting a verification
6456
// failure (abort/exit).
6557
static llvm::cl::opt<bool> AbortOnFailure(
@@ -1026,10 +1018,8 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
10261018
"Non-terminators cannot be the last in a block");
10271019
}
10281020
} else {
1029-
// Skip the check for UnreachableInst, if explicitly asked to do so.
1030-
if (!isa<UnreachableInst>(I) || !SkipUnreachableMustBeLastErrors)
1031-
require(&*BB->rbegin() == I,
1032-
"Terminator must be the last in block");
1021+
require(&*BB->rbegin() == I,
1022+
"Terminator must be the last in block");
10331023
}
10341024

10351025
// Verify that all of our uses are in this function.

test/SILOptimizer/sil_combine.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-objc-interop -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last | %FileCheck %s
1+
// RUN: %target-sil-opt -enable-objc-interop -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine | %FileCheck %s
22

33
// Declare this SIL to be canonical because some tests break raw SIL
44
// conventions. e.g. address-type block args. -enforce-exclusivity=none is also

test/SILOptimizer/sil_combine_apply.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-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last -sil-combine-disable-alloc-stack-opts | %FileCheck %s
1+
// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -sil-combine-disable-alloc-stack-opts | %FileCheck %s
22

33
import Swift
44
import Builtin

test/SILOptimizer/sil_combine_global_addr.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last -devirtualizer | %FileCheck %s
1+
// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -devirtualizer | %FileCheck %s
22

33
// Test to see if concrete type can be propagated from
44
// global_addr in sil_combiner.

test/SILOptimizer/sil_combine_objc.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-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last | %FileCheck %s
1+
// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
22
// REQUIRES: objc_interop
33

44
// See https://bugs.swift.org/browse/SR-5065, rdar://32511494

utils/swift-autocomplete.bash

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ _swift_complete()
2727
-view-cfg-remove-use-list-comments \
2828
-view-cfg-only-for-function \
2929
-sil-print-no-color \
30-
-verify-skip-unreachable-must-be-last \
3130
-aa \
3231
-cache-aa-results \
3332
-sil-dump-call-graph \

0 commit comments

Comments
 (0)