diff options
author | Adam Nemet <anemet@apple.com> | 2016-09-29 18:04:47 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-09-29 18:04:47 +0000 |
commit | 3628282a77d27f27e0f3dcb5b800b5b065d36a20 (patch) | |
tree | 05a88adc483905f1d3cace154a1cd907cc5d283d /llvm/lib/Transforms | |
parent | c94946a83855d679a22ae0edf54e3fe4f4ff21dd (diff) | |
download | bcm5719-llvm-3628282a77d27f27e0f3dcb5b800b5b065d36a20.tar.gz bcm5719-llvm-3628282a77d27f27e0f3dcb5b800b5b065d36a20.zip |
[LV] Port OptimizationRemarkAnalysisFPCommute and
OptimizationRemarkAnalysisAliasing to new streaming API for opt remarks
llvm-svn: 282742
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 44af9bbaade..bc92441250f 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -1978,14 +1978,15 @@ public: void addRuntimePointerChecks(unsigned Num) { NumRuntimePointerChecks = Num; } bool doesNotMeet(Function *F, Loop *L, const LoopVectorizeHints &Hints) { - const char *Name = Hints.vectorizeAnalysisPassName(); + const char *PassName = Hints.vectorizeAnalysisPassName(); bool Failed = false; if (UnsafeAlgebraInst && !Hints.allowReordering()) { - ORE.emitOptimizationRemarkAnalysisFPCommute( - Name, UnsafeAlgebraInst->getDebugLoc(), - UnsafeAlgebraInst->getParent(), - VectorizationReport() << "cannot prove it is safe to reorder " - "floating-point operations"); + ORE.emit( + OptimizationRemarkAnalysisFPCommute(PassName, "CantReorderFPOps", + UnsafeAlgebraInst->getDebugLoc(), + UnsafeAlgebraInst->getParent()) + << "loop not vectorized: cannot prove it is safe to reorder " + "floating-point operations"); Failed = true; } @@ -1996,10 +1997,11 @@ public: NumRuntimePointerChecks > VectorizerParams::RuntimeMemoryCheckThreshold; if ((ThresholdReached && !Hints.allowReordering()) || PragmaThresholdReached) { - ORE.emitOptimizationRemarkAnalysisAliasing( - Name, L, - VectorizationReport() - << "cannot prove it is safe to reorder memory operations"); + ORE.emit(OptimizationRemarkAnalysisAliasing(PassName, "CantReorderMemOps", + L->getStartLoc(), + L->getHeader()) + << "loop not vectorized: cannot prove it is safe to reorder " + "memory operations"); DEBUG(dbgs() << "LV: Too many memory checks needed.\n"); Failed = true; } |