mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-05 18:49:06 +00:00
[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
This commit is contained in:
parent
45603dc4d7
commit
c8216345a3
@ -51,7 +51,7 @@ public:
|
||||
/// where the diagnostic is generated. \p V is the IR Value that identifies
|
||||
/// the code region. \p Msg is the message string to use.
|
||||
void emitOptimizationRemarkMissed(const char *PassName, const DebugLoc &DLoc,
|
||||
Value *V, const Twine &Msg);
|
||||
const Value *V, const Twine &Msg);
|
||||
|
||||
/// \brief Same as above but derives the IR Value for the code region and the
|
||||
/// debug location from the Loop parameter \p L.
|
||||
@ -63,7 +63,7 @@ private:
|
||||
|
||||
BlockFrequencyInfo *BFI;
|
||||
|
||||
Optional<uint64_t> computeHotness(Value *V);
|
||||
Optional<uint64_t> computeHotness(const Value *V);
|
||||
|
||||
OptimizationRemarkEmitter(const OptimizationRemarkEmitter &) = delete;
|
||||
void operator=(const OptimizationRemarkEmitter &) = delete;
|
||||
|
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user