Skip to content

Commit 8cc013e

Browse files
committed
Fix LICM debug output typo.
1 parent 6971335 commit 8cc013e

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

lib/SILOptimizer/LoopTransforms/LICM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ hoistSpecialInstruction(std::unique_ptr<LoopNestSummary> &LoopSummary,
347347
llvm_unreachable("LICM: Could not perform must-sink instruction");
348348
}
349349
}
350-
LLVM_DEBUG(llvm::errs() << " Successfully hosited and sank pair\n");
350+
LLVM_DEBUG(llvm::errs() << " Successfully hoisted and sank pair\n");
351351
} else {
352352
LLVM_DEBUG(llvm::dbgs() << "Hoisted RefElementAddr "
353353
<< *static_cast<RefElementAddrInst *>(Inst));
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -Xllvm -debug-only=sil-licm -primary-file %s 2>&1 | %FileCheck %s --check-prefix=TEST1
2-
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -Xllvm -debug-only=sil-licm -primary-file %s 2>&1 | %FileCheck %s --check-prefix=TEST2
1+
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -Xllvm -debug-only=sil-licm -primary-file %s 2>&1 | %FileCheck %s --check-prefix=TESTLICM
2+
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -Xllvm -debug-only=sil-licm -primary-file %s 2>&1 | %FileCheck %s --check-prefix=TESTLICM2
33
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -primary-file %s | %FileCheck %s --check-prefix=TESTSIL
4-
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -Xllvm -debug-only=sil-licm -whole-module-optimization %s 2>&1 | %FileCheck %s --check-prefix=TEST3
5-
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -whole-module-optimization %s | %FileCheck %s --check-prefix=TESTSIL2
4+
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -Xllvm -debug-only=sil-licm -whole-module-optimization %s 2>&1 | %FileCheck %s --check-prefix=TESTLICMWMO
5+
// RUN: %target-swift-frontend -O -enforce-exclusivity=checked -emit-sil -whole-module-optimization %s | %FileCheck %s --check-prefix=TESTSILWMO
66

77
// REQUIRES: optimized_stdlib,asserts
88
// REQUIRES: PTRSIZE=64
99

10-
// TEST1-LABEL: Processing loops in {{.*}}run_ReversedArray{{.*}}
11-
// TEST1: Hoist and Sink pairs attempt
12-
// TEST1: Hoisted
13-
// TEST1: Successfully hosited and sank pair
10+
// TESTLICM-LABEL: Processing loops in {{.*}}run_ReversedArray{{.*}}
11+
// TESTLICM: Hoist and Sink pairs attempt
12+
// TESTLICM: Hoisted
13+
// TESTLICM: Successfully hoisted and sank pair
1414

1515
// TESTSIL-LABEL: sil hidden @$s16licm_exclusivity17run_ReversedArrayyySiF : $@convention(thin) (Int) -> () {
1616
// TESTSIL: bb
@@ -32,9 +32,9 @@ func run_ReversedArray(_ N: Int) {
3232
}
3333
}
3434

35-
// TEST2-LABEL: Processing loops in {{.*}}count_unicodeScalars{{.*}}
36-
// TEST2: Hoist and Sink pairs attempt
37-
// TEST2: Hoisted
35+
// TESTLICM2-LABEL: Processing loops in {{.*}}count_unicodeScalars{{.*}}
36+
// TESTLICM2: Hoist and Sink pairs attempt
37+
// TESTLICM2: Hoisted
3838

3939
// TESTSIL-LABEL: sil @$s16licm_exclusivity20count_unicodeScalarsyySS17UnicodeScalarViewVF : $@convention(thin) (@guaranteed String.UnicodeScalarView) -> () {
4040
// TESTSIL: bb0(%0 : $String.UnicodeScalarView)
@@ -52,34 +52,34 @@ public func count_unicodeScalars(_ s: String.UnicodeScalarView) {
5252

5353

5454
public class ClassWithArrs {
55-
var N: Int = 0
56-
var A: [Int]
57-
var B: [Int]
55+
var N: Int = 0
56+
var A: [Int]
57+
var B: [Int]
5858

59-
init(N: Int) {
60-
self.N = N
59+
init(N: Int) {
60+
self.N = N
6161

62-
A = [Int](repeating: 0, count: N)
63-
B = [Int](repeating: 0, count: N)
64-
}
62+
A = [Int](repeating: 0, count: N)
63+
B = [Int](repeating: 0, count: N)
64+
}
6565

66-
// TEST3-LABEL: Processing loops in {{.*}}ClassWithArrsC7readArr{{.*}}
67-
// TEST3: Hoist and Sink pairs attempt
68-
// TEST3: Hoisted
69-
// TEST3: Successfully hosited and sank pair
70-
// TEST3: Hoisted
71-
// TEST3: Successfully hosited and sank pair
72-
// TESTSIL2-LABEL: sil @$s16licm_exclusivity13ClassWithArrsC7readArryyF : $@convention(method) (@guaranteed ClassWithArrs) -> () {
73-
// TESTSIL2: [[R1:%.*]] = ref_element_addr %0 : $ClassWithArrs, #ClassWithArrs.A
74-
// TESTSIL2: [[R2:%.*]] = ref_element_addr %0 : $ClassWithArrs, #ClassWithArrs.B
75-
// TESTSIL2: begin_access [read] [static] [no_nested_conflict] [[R1]]
76-
// TESTSIL2: begin_access [read] [static] [no_nested_conflict] [[R2]]
77-
public func readArr() {
78-
for i in 0..<self.N {
79-
for j in 0..<i {
80-
let _ = A[j]
81-
let _ = B[j]
82-
}
83-
}
66+
// TESTLICMWMO-LABEL: Processing loops in {{.*}}ClassWithArrsC7readArr{{.*}}
67+
// TESTLICMWMO: Hoist and Sink pairs attempt
68+
// TESTLICMWMO: Hoisted
69+
// TESTLICMWMO: Successfully hoisted and sank pair
70+
// TESTLICMWMO: Hoisted
71+
// TESTLICMWMO: Successfully hoisted and sank pair
72+
// TESTSILWMO-LABEL: sil @$s16licm_exclusivity13ClassWithArrsC7readArryyF : $@convention(method) (@guaranteed ClassWithArrs) -> () {
73+
// TESTSILWMO: [[R1:%.*]] = ref_element_addr %0 : $ClassWithArrs, #ClassWithArrs.A
74+
// TESTSILWMO: [[R2:%.*]] = ref_element_addr %0 : $ClassWithArrs, #ClassWithArrs.B
75+
// TESTSILWMO: begin_access [read] [static] [no_nested_conflict] [[R1]]
76+
// TESTSILWMO: begin_access [read] [static] [no_nested_conflict] [[R2]]
77+
public func readArr() {
78+
for i in 0..<self.N {
79+
for j in 0..<i {
80+
let _ = A[j]
81+
let _ = B[j]
82+
}
8483
}
84+
}
8585
}

0 commit comments

Comments
 (0)