Skip to content

Commit 9bfbf8b

Browse files
committedNov 11, 2016
[LV] Stop saying "use -Rpass-analysis=loop-vectorize"
This is PR28376. Unfortunately given the current structure of optimization diagnostics we lack the capability to tell whether the user has passed -Rpass-analysis=loop-vectorize since this is local to the front-end (BackendConsumer::OptimizationRemarkHandler). So rather than printing this even if the user has already passed -Rpass-analysis, this patch just punts and stops recommending this option. I don't think that getting this right is worth the complexity. Differential Revision: https://reviews.llvm.org/D26563 llvm-svn: 286662
1 parent 720a20a commit 9bfbf8b

File tree

7 files changed

+12
-13
lines changed

7 files changed

+12
-13
lines changed
 

‎llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1319,8 +1319,7 @@ class LoopVectorizeHints {
13191319
else {
13201320
OptimizationRemarkMissed R(LV_NAME, "MissedDetails",
13211321
TheLoop->getStartLoc(), TheLoop->getHeader());
1322-
R << "loop not vectorized: use -Rpass-analysis=loop-vectorize for more "
1323-
"info";
1322+
R << "loop not vectorized";
13241323
if (Force.Value == LoopVectorizeHints::FK_Enabled) {
13251324
R << " (Force=" << NV("Force", true);
13261325
if (Width.Value != 0)

‎llvm/test/Transforms/LoopVectorize/X86/no_fpmath.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; RUN: opt < %s -loop-vectorize -mtriple=x86_64-unknown-linux -S -pass-remarks='loop-vectorize' -pass-remarks-missed='loop-vectorize' -pass-remarks-analysis='loop-vectorize' 2>&1 | FileCheck %s
22

33
; CHECK: remark: no_fpmath.c:6:11: loop not vectorized: cannot prove it is safe to reorder floating-point operations
4-
; CHECK: remark: no_fpmath.c:6:14: loop not vectorized:
4+
; CHECK: remark: no_fpmath.c:6:14: loop not vectorized
55
; CHECK: remark: no_fpmath.c:17:14: vectorized loop (vectorization width: 2, interleaved count: 2)
66

77
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"

‎llvm/test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; RUN: opt < %s -passes=loop-vectorize -mtriple=x86_64-unknown-linux -S -pass-remarks=loop-vectorize -pass-remarks-missed=loop-vectorize -pass-remarks-analysis=loop-vectorize -pass-remarks-with-hotness 2>&1 | FileCheck %s
33

44
; CHECK: remark: no_fpmath.c:6:11: loop not vectorized: cannot prove it is safe to reorder floating-point operations (hotness: 300)
5-
; CHECK: remark: no_fpmath.c:6:14: loop not vectorized:
5+
; CHECK: remark: no_fpmath.c:6:14: loop not vectorized
66
; CHECK: remark: no_fpmath.c:17:14: vectorized loop (vectorization width: 2, interleaved count: 2) (hotness: 300)
77

88
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"

‎llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424

2525
; File, line, and column should match those specified in the metadata
2626
; CHECK: remark: source.cpp:4:5: loop not vectorized: could not determine number of loop iterations
27-
; CHECK: remark: source.cpp:4:5: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info
27+
; CHECK: remark: source.cpp:4:5: loop not vectorized
2828
; CHECK: remark: source.cpp:13:5: loop not vectorized: vectorization and interleaving are explicitly disabled, or vectorize width and interleave count are both set to 1
2929
; CHECK: remark: source.cpp:19:5: loop not vectorized: cannot identify array bounds
30-
; CHECK: remark: source.cpp:19:5: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info
30+
; CHECK: remark: source.cpp:19:5: loop not vectorized
3131
; CHECK: warning: source.cpp:19:5: loop not vectorized: failed explicitly specified loop vectorization
3232

3333
; CHECK: _Z4testPii

‎llvm/test/Transforms/LoopVectorize/control-flow.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
; }
1212

1313
; CHECK: remark: source.cpp:5:9: loop not vectorized: loop control flow is not understood by vectorizer
14-
; CHECK: remark: source.cpp:5:9: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info
14+
; CHECK: remark: source.cpp:5:9: loop not vectorized
1515

1616
; CHECK: _Z4testPii
1717
; CHECK-NOT: x i32>

‎llvm/test/Transforms/LoopVectorize/diag-with-hotness-info.ll

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
; 19 }
3636
; 20 }
3737

38-
; HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info (hotness: 300)
39-
; NO_HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info{{$}}
40-
; HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info (hotness: 5000)
41-
; NO_HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info{{$}}
42-
; BOTH: remark: /tmp/s.c:16:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info{{$}}
38+
; HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized (hotness: 300)
39+
; NO_HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized{{$}}
40+
; HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized (hotness: 5000)
41+
; NO_HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized{{$}}
42+
; BOTH: remark: /tmp/s.c:16:3: loop not vectorized{{$}}
4343

4444
; ModuleID = '/tmp/s.c'
4545
source_filename = "/tmp/s.c"

‎llvm/test/Transforms/LoopVectorize/no_switch.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
; NOANALYSIS: warning: source.cpp:4:5: loop not interleaved: failed explicitly specified loop interleaving
1010

1111
; MOREINFO: remark: source.cpp:4:5: loop not vectorized: loop contains a switch statement
12-
; MOREINFO: remark: source.cpp:4:5: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info (Force=true, Vector Width=4)
12+
; MOREINFO: remark: source.cpp:4:5: loop not vectorized (Force=true, Vector Width=4)
1313
; MOREINFO: warning: source.cpp:4:5: loop not vectorized: failed explicitly specified loop vectorization
1414

1515
; CHECK: _Z11test_switchPii

0 commit comments

Comments
 (0)
Please sign in to comment.