[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.

llvm-svn: 296019
This commit is contained in:
Adam Nemet 2017-02-23 21:32:53 +00:00
parent 9b607f87d4
commit 2de8602432
2 changed files with 0 additions and 194 deletions

View File

@ -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.
///

View File

@ -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(