diff options
author | Adam Nemet <anemet@apple.com> | 2016-07-20 21:44:22 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-07-20 21:44:22 +0000 |
commit | 6100d16e7d63b377038a1da54bc25c66779bdafc (patch) | |
tree | 146631d6238fc4a8fcf4cc50886c614b2a88f376 /llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp | |
parent | 78d1091c918ae8493d70e955d444a5c52c6963b5 (diff) | |
download | llvm-6100d16e7d63b377038a1da54bc25c66779bdafc.zip llvm-6100d16e7d63b377038a1da54bc25c66779bdafc.tar.gz llvm-6100d16e7d63b377038a1da54bc25c66779bdafc.tar.bz2 |
[OptDiag] Take the IR Value as a const pointer
This helps because LoopAccessReport is passed around as a const
reference and we derive the basic block passed as the Value parameter
from the instruction in LoopAccessReport.
llvm-svn: 276191
Diffstat (limited to 'llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp b/llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp index b844db2..910d194 100644 --- a/llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp +++ b/llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp @@ -20,7 +20,7 @@ using namespace llvm; -Optional<uint64_t> OptimizationRemarkEmitter::computeHotness(Value *V) { +Optional<uint64_t> OptimizationRemarkEmitter::computeHotness(const Value *V) { if (!BFI) return None; @@ -28,7 +28,8 @@ Optional<uint64_t> OptimizationRemarkEmitter::computeHotness(Value *V) { } void OptimizationRemarkEmitter::emitOptimizationRemarkMissed( - const char *PassName, const DebugLoc &DLoc, Value *V, const Twine &Msg) { + const char *PassName, const DebugLoc &DLoc, const Value *V, + const Twine &Msg) { LLVMContext &Ctx = F->getContext(); Ctx.diagnose(DiagnosticInfoOptimizationRemarkMissed(PassName, *F, DLoc, Msg, computeHotness(V))); |