[llvm] r282740 - [LV] Convert processLoop to new streaming API for opt remarks

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 10:55:13 PDT 2016


Author: anemet
Date: Thu Sep 29 12:55:13 2016
New Revision: 282740

URL: http://llvm.org/viewvc/llvm-project?rev=282740&view=rev
Log:
[LV] Convert processLoop to new streaming API for opt remarks

Modified:
    llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp

Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=282740&r1=282739&r2=282740&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Thu Sep 29 12:55:13 2016
@@ -6993,9 +6993,10 @@ bool LoopVectorizePass::processLoop(Loop
       DEBUG(dbgs() << " But vectorizing was explicitly forced.\n");
     else {
       DEBUG(dbgs() << "\n");
-      emitAnalysisDiag(L, Hints, *ORE, VectorizationReport()
-                                           << "vectorization is not beneficial "
-                                              "and is not explicitly forced");
+      ORE->emit(createMissedAnalysis(Hints.vectorizeAnalysisPassName(),
+                                     "NotBeneficial", L)
+                << "vectorization is not beneficial "
+                   "and is not explicitly forced");
       return false;
     }
   }
@@ -7041,10 +7042,9 @@ bool LoopVectorizePass::processLoop(Loop
   if (F->hasFnAttribute(Attribute::NoImplicitFloat)) {
     DEBUG(dbgs() << "LV: Can't vectorize when the NoImplicitFloat"
                     "attribute is used.\n");
-    emitAnalysisDiag(
-        L, Hints, *ORE,
-        VectorizationReport()
-            << "loop not vectorized due to NoImplicitFloat attribute");
+    ORE->emit(createMissedAnalysis(Hints.vectorizeAnalysisPassName(),
+                                   "NoImplicitFloat", L)
+              << "loop not vectorized due to NoImplicitFloat attribute");
     emitMissedWarning(F, L, Hints, ORE);
     return false;
   }
@@ -7056,9 +7056,9 @@ bool LoopVectorizePass::processLoop(Loop
   if (Hints.isPotentiallyUnsafe() &&
       TTI->isFPVectorizationPotentiallyUnsafe()) {
     DEBUG(dbgs() << "LV: Potentially unsafe FP op prevents vectorization.\n");
-    emitAnalysisDiag(L, Hints, *ORE,
-                     VectorizationReport()
-                         << "loop not vectorized due to unsafe FP support.");
+    ORE->emit(
+        createMissedAnalysis(Hints.vectorizeAnalysisPassName(), "UnsafeFP", L)
+        << "loop not vectorized due to unsafe FP support.");
     emitMissedWarning(F, L, Hints, ORE);
     return false;
   }




More information about the llvm-commits mailing list