[llvm] r296019 - [ORE] Remove ORE.emit{{.+}} functions
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 13:32:53 PST 2017
Author: anemet
Date: Thu Feb 23 15:32:53 2017
New Revision: 296019
URL: http://llvm.org/viewvc/llvm-project?rev=296019&view=rev
Log:
[ORE] Remove ORE.emit{{.+}} functions
Last use was killed in my previous patch. The preferred way is now to
construct the remark, pipe things to it and pass it to ORE.emit.
Modified:
llvm/trunk/include/llvm/Analysis/OptimizationDiagnosticInfo.h
llvm/trunk/lib/Analysis/OptimizationDiagnosticInfo.cpp
Modified: llvm/trunk/include/llvm/Analysis/OptimizationDiagnosticInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/OptimizationDiagnosticInfo.h?rev=296019&r1=296018&r2=296019&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/OptimizationDiagnosticInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/OptimizationDiagnosticInfo.h Thu Feb 23 15:32:53 2017
@@ -74,134 +74,6 @@ public:
/// emit* APIs.
void emit(DiagnosticInfoOptimizationBase &OptDiag);
- /// Emit an optimization-applied message.
- ///
- /// \p PassName is the name of the pass emitting the message. If -Rpass= is
- /// given and \p PassName matches the regular expression in -Rpass, then the
- /// remark will be emitted. \p Fn is the function triggering the remark, \p
- /// DLoc is the debug location 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 emitOptimizationRemark(const char *PassName, const DebugLoc &DLoc,
- 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.
- 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
- /// -Rpass-missed= is given and the name matches the regular expression in
- /// -Rpass, then the remark will be emitted. \p DLoc is the debug location
- /// where the diagnostic is generated. \p V is the IR Value that identifies
- /// the code region. \p Msg is the message string to use. If \p IsVerbose is
- /// true, the message is considered verbose and will only be emitted when
- /// verbose output is turned on.
- void emitOptimizationRemarkMissed(const char *PassName, const DebugLoc &DLoc,
- const Value *V, const Twine &Msg,
- bool IsVerbose = false);
-
- /// \brief Same as above but derives the IR Value for the code region and the
- /// debug location from the Loop parameter \p L.
- void emitOptimizationRemarkMissed(const char *PassName, Loop *L,
- const Twine &Msg, bool IsVerbose = false);
-
- /// \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, bool IsVerbose = false) {
- emitOptimizationRemarkMissed(PassName, Inst->getDebugLoc(),
- Inst->getParent(), Msg, IsVerbose);
- }
-
- /// Emit an optimization analysis remark message.
- ///
- /// \p PassName is the name of the pass emitting the message. If
- /// -Rpass-analysis= is given and \p PassName matches the regular expression
- /// in -Rpass, then the remark will be emitted. \p DLoc is the debug location
- /// where the diagnostic is generated. \p V is the IR Value that identifies
- /// the code region. \p Msg is the message string to use. If \p IsVerbose is
- /// true, the message is considered verbose and will only be emitted when
- /// verbose output is turned on.
- void emitOptimizationRemarkAnalysis(const char *PassName,
- const DebugLoc &DLoc, const Value *V,
- const Twine &Msg, bool IsVerbose = false);
-
- /// \brief Same as above but derives the IR Value for the code region and the
- /// debug location from the Loop parameter \p L.
- void emitOptimizationRemarkAnalysis(const char *PassName, Loop *L,
- const Twine &Msg, bool IsVerbose = false);
-
- /// \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,
- bool IsVerbose = false) {
- emitOptimizationRemarkAnalysis(PassName, Inst->getDebugLoc(),
- Inst->getParent(), Msg, IsVerbose);
- }
-
- /// \brief This variant allows specifying what should be emitted for missed
- /// and analysis remarks in one call.
- ///
- /// \p PassName is the name of the pass emitting the message. If
- /// -Rpass-missed= is given and \p PassName matches the regular expression, \p
- /// MsgForMissedRemark is emitted.
- ///
- /// If -Rpass-analysis= is given and \p PassName matches the regular
- /// expression, \p MsgForAnalysisRemark is emitted.
- ///
- /// The debug location and the code region is derived from \p Inst. If \p
- /// IsVerbose is true, the message is considered verbose and will only be
- /// emitted when verbose output is turned on.
- void emitOptimizationRemarkMissedAndAnalysis(
- const char *PassName, Instruction *Inst, const Twine &MsgForMissedRemark,
- const Twine &MsgForAnalysisRemark, bool IsVerbose = false) {
- emitOptimizationRemarkAnalysis(PassName, Inst, MsgForAnalysisRemark,
- IsVerbose);
- emitOptimizationRemarkMissed(PassName, Inst, MsgForMissedRemark, IsVerbose);
- }
-
- /// \brief Emit an optimization analysis remark related to floating-point
- /// non-commutativity.
- ///
- /// \p PassName is the name of the pass emitting the message. If
- /// -Rpass-analysis= is given and \p PassName matches the regular expression
- /// in -Rpass, then the remark will be emitted. \p Fn is the function
- /// triggering the remark, \p DLoc is the debug location 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 emitOptimizationRemarkAnalysisFPCommute(const char *PassName,
- const DebugLoc &DLoc,
- const Value *V,
- const Twine &Msg);
-
- /// \brief Emit an optimization analysis remark related to pointer aliasing.
- ///
- /// \p PassName is the name of the pass emitting the message. If
- /// -Rpass-analysis= is given and \p PassName matches the regular expression
- /// in -Rpass, then the remark will be emitted. \p Fn is the function
- /// triggering the remark, \p DLoc is the debug location 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 emitOptimizationRemarkAnalysisAliasing(const char *PassName,
- const DebugLoc &DLoc,
- 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.
- void emitOptimizationRemarkAnalysisAliasing(const char *PassName, Loop *L,
- const Twine &Msg);
-
/// \brief Whether we allow for extra compile-time budget to perform more
/// analysis to produce fewer false positives.
///
Modified: llvm/trunk/lib/Analysis/OptimizationDiagnosticInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/OptimizationDiagnosticInfo.cpp?rev=296019&r1=296018&r2=296019&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/OptimizationDiagnosticInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/OptimizationDiagnosticInfo.cpp Thu Feb 23 15:32:53 2017
@@ -167,72 +167,6 @@ void OptimizationRemarkEmitter::emit(
F->getContext().diagnose(OptDiag);
}
-void OptimizationRemarkEmitter::emitOptimizationRemark(const char *PassName,
- const DebugLoc &DLoc,
- const Value *V,
- const Twine &Msg) {
- LLVMContext &Ctx = F->getContext();
- Ctx.diagnose(OptimizationRemark(PassName, *F, DLoc, Msg, computeHotness(V)));
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemark(const char *PassName,
- Loop *L,
- const Twine &Msg) {
- emitOptimizationRemark(PassName, L->getStartLoc(), L->getHeader(), Msg);
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemarkMissed(
- const char *PassName, const DebugLoc &DLoc, const Value *V,
- const Twine &Msg, bool IsVerbose) {
- LLVMContext &Ctx = F->getContext();
- if (!IsVerbose || shouldEmitVerbose())
- Ctx.diagnose(
- OptimizationRemarkMissed(PassName, *F, DLoc, Msg, computeHotness(V)));
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemarkMissed(
- const char *PassName, Loop *L, const Twine &Msg, bool IsVerbose) {
- emitOptimizationRemarkMissed(PassName, L->getStartLoc(), L->getHeader(), Msg,
- IsVerbose);
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemarkAnalysis(
- const char *PassName, const DebugLoc &DLoc, const Value *V,
- const Twine &Msg, bool IsVerbose) {
- LLVMContext &Ctx = F->getContext();
- if (!IsVerbose || shouldEmitVerbose())
- Ctx.diagnose(
- OptimizationRemarkAnalysis(PassName, *F, DLoc, Msg, computeHotness(V)));
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemarkAnalysis(
- const char *PassName, Loop *L, const Twine &Msg, bool IsVerbose) {
- emitOptimizationRemarkAnalysis(PassName, L->getStartLoc(), L->getHeader(),
- Msg, IsVerbose);
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemarkAnalysisFPCommute(
- const char *PassName, const DebugLoc &DLoc, const Value *V,
- const Twine &Msg) {
- LLVMContext &Ctx = F->getContext();
- Ctx.diagnose(OptimizationRemarkAnalysisFPCommute(PassName, *F, DLoc, Msg,
- computeHotness(V)));
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemarkAnalysisAliasing(
- const char *PassName, const DebugLoc &DLoc, const Value *V,
- const Twine &Msg) {
- LLVMContext &Ctx = F->getContext();
- Ctx.diagnose(OptimizationRemarkAnalysisAliasing(PassName, *F, DLoc, Msg,
- computeHotness(V)));
-}
-
-void OptimizationRemarkEmitter::emitOptimizationRemarkAnalysisAliasing(
- const char *PassName, Loop *L, const Twine &Msg) {
- emitOptimizationRemarkAnalysisAliasing(PassName, L->getStartLoc(),
- L->getHeader(), Msg);
-}
-
OptimizationRemarkEmitterWrapperPass::OptimizationRemarkEmitterWrapperPass()
: FunctionPass(ID) {
initializeOptimizationRemarkEmitterWrapperPassPass(
More information about the llvm-commits
mailing list