Skip to content

Commit 0ca5937

Browse files
authored
Merge pull request swiftlang#63100 from gottesmm/pr-dfde9bc04c8a111a1187d060690481f5f3f7f205
[move-only] Fix a small thinko.
2 parents 4cd9877 + ce39f36 commit 0ca5937

File tree

5 files changed

+6
-13
lines changed

5 files changed

+6
-13
lines changed

lib/SIL/Utils/FieldSensitivePrunedLiveness.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,13 @@ void FieldSensitiveMultiDefPrunedLiveRange::findBoundariesInBlock(
781781
LLVM_DEBUG(llvm::dbgs() << "Has multiple defs!\n");
782782

783783
// Handle a live-out or live-within block with potentially multiple defs
784+
#ifndef NDEBUG
785+
// We only use prevCount when checking a specific invariant when asserts are
786+
// enabled. boundary.getNumLastUsersAndDeadDefs actually asserts if you try to
787+
// call it in a non-asserts compiler since it is relatively inefficient and
788+
// not needed.
784789
unsigned prevCount = boundary.getNumLastUsersAndDeadDefs(bitNo);
790+
#endif
785791
bool isLive = isLiveOut;
786792
for (auto &inst : llvm::reverse(*block)) {
787793
LLVM_DEBUG(llvm::dbgs() << "Visiting: " << inst);

test/SILOptimizer/moveonly_addresschecker.sil

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// RUN: %target-sil-opt -sil-move-only-address-checker -enable-experimental-move-only -enable-sil-verify-all %s | %FileCheck %s
22

3-
// rdar://104107922
4-
// REQUIRES: rdar104107922
5-
6-
73
sil_stage raw
84

95
import Swift

test/SILOptimizer/moveonly_addresschecker_diagnostics.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %target-swift-emit-sil -verify -enable-experimental-move-only %s
22

3-
// rdar://104107922
4-
// REQUIRES: rdar104107922
5-
63
//////////////////
74
// Declarations //
85
//////////////////

test/SILOptimizer/moveonly_deinits.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %target-swift-frontend -enable-experimental-move-only -verify -emit-sil %s
22

3-
// rdar://104107922
4-
// REQUIRES: rdar104107922
5-
63
class Klass {}
74

85
var globalMoveOnlyStruct = MoveOnlyStruct()

test/SILOptimizer/moveonly_trivial_addresschecker_diagnostics.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %target-swift-emit-sil -verify -enable-experimental-move-only %s
22

3-
// rdar://104107922
4-
// REQUIRES: rdar104107922
5-
63
//////////////////
74
// Declarations //
85
//////////////////

0 commit comments

Comments
 (0)