summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h')
-rw-r--r--llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h b/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
index cee8bfb990a..41e80bf7c8c 100644
--- a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
+++ b/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h
@@ -58,6 +58,14 @@ public:
/// debug location from the Loop parameter \p L.
void emitOptimizationRemark(const char *PassName, Loop *L, const Twine &Msg);
+ /// \brief Same as above but derives the debug location and the code region
+ /// from the debug location and the basic block of \p Inst, respectively.
+ void emitOptimizationRemark(const char *PassName, Instruction *Inst,
+ const Twine &Msg) {
+ emitOptimizationRemark(PassName, Inst->getDebugLoc(), Inst->getParent(),
+ Msg);
+ }
+
/// Emit an optimization-missed message.
///
/// \p PassName is the name of the pass emitting the message. If
@@ -73,6 +81,14 @@ public:
void emitOptimizationRemarkMissed(const char *PassName, Loop *L,
const Twine &Msg);
+ /// \brief Same as above but derives the debug location and the code region
+ /// from the debug location and the basic block of \p Inst, respectively.
+ void emitOptimizationRemarkMissed(const char *PassName, Instruction *Inst,
+ const Twine &Msg) {
+ emitOptimizationRemarkMissed(PassName, Inst->getDebugLoc(),
+ Inst->getParent(), Msg);
+ }
+
/// Emit an optimization analysis remark message.
///
/// \p PassName is the name of the pass emitting the message. If
@@ -89,6 +105,14 @@ public:
void emitOptimizationRemarkAnalysis(const char *PassName, Loop *L,
const Twine &Msg);
+ /// \brief Same as above but derives the debug location and the code region
+ /// from the debug location and the basic block of \p Inst, respectively.
+ void emitOptimizationRemarkAnalysis(const char *PassName, Instruction *Inst,
+ const Twine &Msg) {
+ emitOptimizationRemarkAnalysis(PassName, Inst->getDebugLoc(),
+ Inst->getParent(), Msg);
+ }
+
/// \brief Emit an optimization analysis remark related to floating-point
/// non-commutativity.
///
OpenPOWER on IntegriCloud