[llvm] r286662 - [LV] Stop saying "use -Rpass-analysis=loop-vectorize"

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 14:51:47 PST 2016


Author: anemet
Date: Fri Nov 11 16:51:46 2016
New Revision: 286662

URL: http://llvm.org/viewvc/llvm-project?rev=286662&view=rev
Log:
[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

Modified:
    llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
    llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath.ll
    llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll
    llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
    llvm/trunk/test/Transforms/LoopVectorize/control-flow.ll
    llvm/trunk/test/Transforms/LoopVectorize/diag-with-hotness-info.ll
    llvm/trunk/test/Transforms/LoopVectorize/no_switch.ll

Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=286662&r1=286661&r2=286662&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Fri Nov 11 16:51:46 2016
@@ -1319,8 +1319,7 @@ public:
     else {
       OptimizationRemarkMissed R(LV_NAME, "MissedDetails",
                                  TheLoop->getStartLoc(), TheLoop->getHeader());
-      R << "loop not vectorized: use -Rpass-analysis=loop-vectorize for more "
-           "info";
+      R << "loop not vectorized";
       if (Force.Value == LoopVectorizeHints::FK_Enabled) {
         R << " (Force=" << NV("Force", true);
         if (Width.Value != 0)

Modified: llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath.ll?rev=286662&r1=286661&r2=286662&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath.ll (original)
+++ llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath.ll Fri Nov 11 16:51:46 2016
@@ -1,7 +1,7 @@
 ; 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
 
 ; CHECK: remark: no_fpmath.c:6:11: loop not vectorized: cannot prove it is safe to reorder floating-point operations
-; CHECK: remark: no_fpmath.c:6:14: loop not vectorized:
+; CHECK: remark: no_fpmath.c:6:14: loop not vectorized
 ; CHECK: remark: no_fpmath.c:17:14: vectorized loop (vectorization width: 2, interleaved count: 2)
 
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"

Modified: llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll?rev=286662&r1=286661&r2=286662&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll (original)
+++ llvm/trunk/test/Transforms/LoopVectorize/X86/no_fpmath_with_hotness.ll Fri Nov 11 16:51:46 2016
@@ -2,7 +2,7 @@
 ; 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
 
 ; CHECK: remark: no_fpmath.c:6:11: loop not vectorized: cannot prove it is safe to reorder floating-point operations (hotness: 300)
-; CHECK: remark: no_fpmath.c:6:14: loop not vectorized:
+; CHECK: remark: no_fpmath.c:6:14: loop not vectorized
 ; CHECK: remark: no_fpmath.c:17:14: vectorized loop (vectorization width: 2, interleaved count: 2) (hotness: 300)
 
 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"

Modified: llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll?rev=286662&r1=286661&r2=286662&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll (original)
+++ llvm/trunk/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll Fri Nov 11 16:51:46 2016
@@ -24,10 +24,10 @@
 
 ; File, line, and column should match those specified in the metadata
 ; CHECK: remark: source.cpp:4:5: loop not vectorized: could not determine number of loop iterations
-; CHECK: remark: source.cpp:4:5: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info
+; CHECK: remark: source.cpp:4:5: loop not vectorized
 ; 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
 ; CHECK: remark: source.cpp:19:5: loop not vectorized: cannot identify array bounds
-; CHECK: remark: source.cpp:19:5: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info
+; CHECK: remark: source.cpp:19:5: loop not vectorized
 ; CHECK: warning: source.cpp:19:5: loop not vectorized: failed explicitly specified loop vectorization
 
 ; CHECK: _Z4testPii

Modified: llvm/trunk/test/Transforms/LoopVectorize/control-flow.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/control-flow.ll?rev=286662&r1=286661&r2=286662&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/control-flow.ll (original)
+++ llvm/trunk/test/Transforms/LoopVectorize/control-flow.ll Fri Nov 11 16:51:46 2016
@@ -11,7 +11,7 @@
 ; }
 
 ; CHECK: remark: source.cpp:5:9: loop not vectorized: loop control flow is not understood by vectorizer
-; CHECK: remark: source.cpp:5:9: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info
+; CHECK: remark: source.cpp:5:9: loop not vectorized
 
 ; CHECK: _Z4testPii
 ; CHECK-NOT: x i32>

Modified: llvm/trunk/test/Transforms/LoopVectorize/diag-with-hotness-info.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/diag-with-hotness-info.ll?rev=286662&r1=286661&r2=286662&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/diag-with-hotness-info.ll (original)
+++ llvm/trunk/test/Transforms/LoopVectorize/diag-with-hotness-info.ll Fri Nov 11 16:51:46 2016
@@ -35,11 +35,11 @@
 ;  19	  }
 ;  20	}
 
-; HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info (hotness: 300)
-; NO_HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info{{$}}
-; HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info (hotness: 5000)
-; NO_HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info{{$}}
-; BOTH: remark: /tmp/s.c:16:3: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info{{$}}
+; HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized (hotness: 300)
+; NO_HOTNESS: remark: /tmp/s.c:2:3: loop not vectorized{{$}}
+; HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized (hotness: 5000)
+; NO_HOTNESS: remark: /tmp/s.c:9:3: loop not vectorized{{$}}
+; BOTH: remark: /tmp/s.c:16:3: loop not vectorized{{$}}
 
 ; ModuleID = '/tmp/s.c'
 source_filename = "/tmp/s.c"

Modified: llvm/trunk/test/Transforms/LoopVectorize/no_switch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/no_switch.ll?rev=286662&r1=286661&r2=286662&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/no_switch.ll (original)
+++ llvm/trunk/test/Transforms/LoopVectorize/no_switch.ll Fri Nov 11 16:51:46 2016
@@ -9,7 +9,7 @@
 ; NOANALYSIS: warning: source.cpp:4:5: loop not interleaved: failed explicitly specified loop interleaving
 
 ; MOREINFO: remark: source.cpp:4:5: loop not vectorized: loop contains a switch statement
-; MOREINFO: remark: source.cpp:4:5: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info (Force=true, Vector Width=4)
+; MOREINFO: remark: source.cpp:4:5: loop not vectorized (Force=true, Vector Width=4)
 ; MOREINFO: warning: source.cpp:4:5: loop not vectorized: failed explicitly specified loop vectorization
 
 ; CHECK: _Z11test_switchPii




More information about the llvm-commits mailing list