++NumLoopsDistributed;
// Report the success.
- emitOptimizationRemark(F->getContext(), LDIST_NAME, *F, L->getStartLoc(),
- "distributed loop");
+ ORE->emitOptimizationRemark(LDIST_NAME, L, "distributed loop");
return true;
}
// 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.
; 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:
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: