llvm::DiagnosticInfoMIROptimization

Common features for diagnostics dealing with optimization remarks that are used by machine passes.

Synopsis

Declared in <llvm/CodeGen/MachineOptimizationRemarkEmitter.h>

class DiagnosticInfoMIROptimization
    : public DiagnosticInfoOptimizationBase

Base Classes

NameDescription
DiagnosticInfoOptimizationBaseCommon features for diagnostics dealing with optimization remarks that are used by both IR and MIR passes.

Types

NameDescription
Argument Key-value argument used by the optimization remark stream interface.
MachineArgument MI-specific kinds of diagnostic Arguments.
setExtraArgs Marker that marks following stream arguments as record-only.
setIsVerbose Marker used to set IsVerbose via the stream interface.

Member Functions

NameDescription
DiagnosticInfoMIROptimization [constructor]Construct a MIR optimization remark of kind Kind.
getAbsolutePath Return the absolute path to the file.
getArgs Return the collected remark arguments.
getBlock Return the machine basic block this remark refers to.
getFunction Return the function where this diagnostic is triggered.
getHotness Return the profile hotness, if available.
getKind Return the kind of this diagnostic.
getLocation getLocation overloads
getLocationStr Return the location as a "file:line:col" string.
getMsg Return the formatted remark message.
getPassName Return the name of the pass emitting this remark.
getRemarkName Return the textual remark identifier.
getSeverity Return the severity of this diagnostic.
insert insert overloads
isAnalysis Return true if this is an optimization analysis remark.
isEnabled [virtual]Return true if this optimization remark is enabled.
isLocationAvailable Return true if location information is available for this diagnostic.
isMissed Return true if this is a missed-optimization remark.
isPassed Return true if this is a passed-optimization remark.
isVerbose Return true if this remark is expected to be noisy.
print [virtual]Print this diagnostic using DP.
setHotness Set the profile hotness to H.

Static Member Functions

NameDescription
classof Return true if DI is a MIR optimization remark.

Protected Data Members

NameDescription
Args Arguments collected via the streaming interface.
FirstExtraArgIndex If positive, the index of the first argument that only appear in the optimization records and not in the remark printed in the compiler output.
Hotness If profile information is available, this is the number of times the corresponding code was executed in a profile instrumentation run.
IsVerbose The remark is expected to be noisy.
PassName Name of the pass that triggers this report. If this matches the regular expression given in -Rpass=regexp, then the remark will be emitted.
RemarkName Textual identifier for the remark (single-word, CamelCase).

Non-Member Functions

NameDescription
wrapConvert a DiagnosticInfo pointer to an opaque LLVMDiagnosticInfoRef.

Derived Classes

NameDescription
MachineOptimizationRemark Diagnostic information for applied optimization remarks.
MachineOptimizationRemarkAnalysis Diagnostic information for optimization analysis remarks.
MachineOptimizationRemarkMissed Diagnostic information for missed-optimization remarks.