[llvm] r276340 - [OptDiag, LDist] Convert remaining opt remarks to use the new API
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 14:21:34 PDT 2016
Author: anemet
Date: Thu Jul 21 16:21:34 2016
New Revision: 276340
URL: http://llvm.org/viewvc/llvm-project?rev=276340&view=rev
Log:
[OptDiag,LDist] Convert remaining opt remarks to use the new API
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopDistribute.cpp
llvm/trunk/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll
Modified: llvm/trunk/lib/Transforms/Scalar/LoopDistribute.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopDistribute.cpp?rev=276340&r1=276339&r2=276340&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopDistribute.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopDistribute.cpp Thu Jul 21 16:21:34 2016
@@ -748,8 +748,7 @@ public:
++NumLoopsDistributed;
// Report the success.
- emitOptimizationRemark(F->getContext(), LDIST_NAME, *F, L->getStartLoc(),
- "distributed loop");
+ ORE->emitOptimizationRemark(LDIST_NAME, L, "distributed loop");
return true;
}
@@ -768,10 +767,10 @@ public:
// With Rpass-analysis report why. This is on by default if distribution
// was requested explicitly.
- emitOptimizationRemarkAnalysis(
- Ctx, Forced ? DiagnosticInfoOptimizationRemarkAnalysis::AlwaysPrint
- : LDIST_NAME,
- *F, L->getStartLoc(), Twine("loop not distributed: ") + Message);
+ ORE->emitOptimizationRemarkAnalysis(
+ Forced ? DiagnosticInfoOptimizationRemarkAnalysis::AlwaysPrint
+ : LDIST_NAME,
+ L, Twine("loop not distributed: ") + Message);
// Also issue a warning if distribution was requested explicitly but it
// failed.
Modified: llvm/trunk/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll?rev=276340&r1=276339&r2=276340&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll (original)
+++ llvm/trunk/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll Thu Jul 21 16:21:34 2016
@@ -1,11 +1,15 @@
; RUN: opt -loop-distribute -S -pass-remarks-missed=loop-distribute \
+; RUN: -pass-remarks-analysis=loop-distribute \
; RUN: -pass-remarks-with-hotness < %s 2>&1 | FileCheck %s --check-prefix=HOTNESS
; RUN: opt -loop-distribute -S -pass-remarks-missed=loop-distribute \
+; RUN: -pass-remarks-analysis=loop-distribute \
; RUN: < %s 2>&1 | FileCheck %s --check-prefix=NO_HOTNESS
; RUN: opt -passes='require<aa>,loop-distribute' -S -pass-remarks-missed=loop-distribute \
+; RUN: -pass-remarks-analysis=loop-distribute \
; RUN: -pass-remarks-with-hotness < %s 2>&1 | FileCheck %s --check-prefix=HOTNESS
; RUN: opt -passes='require<aa>,loop-distribute' -S -pass-remarks-missed=loop-distribute \
+; RUN: -pass-remarks-analysis=loop-distribute \
; RUN: < %s 2>&1 | FileCheck %s --check-prefix=NO_HOTNESS
; This is the input program:
@@ -21,7 +25,9 @@ target datalayout = "e-m:o-i64:64-f80:12
target triple = "x86_64-apple-macosx10.11.0"
; HOTNESS: remark: /tmp/t.c:3:3: loop not distributed: use -Rpass-analysis=loop-distribute for more info (hotness: 300)
+; HOTNESS: remark: /tmp/t.c:3:3: loop not distributed: memory operations are safe for vectorization (hotness: 300)
; NO_HOTNESS: remark: /tmp/t.c:3:3: loop not distributed: use -Rpass-analysis=loop-distribute for more info{{$}}
+; NO_HOTNESS: remark: /tmp/t.c:3:3: loop not distributed: memory operations are safe for vectorization{{$}}
define void @forced(i8* %A, i8* %B, i8* %C, i32 %N) !dbg !7 !prof !22 {
entry:
More information about the llvm-commits
mailing list