class DiagnosticInfoIROptimization

Declaration

class DiagnosticInfoIROptimization
    : public DiagnosticInfoOptimizationBase { /* full declaration omitted */ };

Description

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

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:605

Inherits from: DiagnosticInfoOptimizationBase

Member Variables

Inherited from DiagnosticInfoOptimizationBase:

protected PassName
protected RemarkName
protected Hotness
protected Args
protected IsVerbose = false
protected FirstExtraArgIndex = -1

Method Overview

  • public DiagnosticInfoIROptimization(enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const char * PassName, llvm::StringRef RemarkName, const llvm::Function & Fn, const llvm::DiagnosticLocation & Loc, const llvm::Value * CodeRegion = nullptr)
  • public DiagnosticInfoIROptimization(const char * PassName, llvm::StringRef Prepend, const llvm::DiagnosticInfoIROptimization & Orig)
  • public DiagnosticInfoIROptimization(enum DiagnosticKind Kind, enum DiagnosticSeverity Severity, const char * PassName, const llvm::Function & Fn, const llvm::DiagnosticLocation & Loc, const llvm::Twine & Msg)
  • public static bool classof(const llvm::DiagnosticInfo * DI)
  • public const llvm::Value * getCodeRegion() const

Inherited from DiagnosticInfoOptimizationBase:

Inherited from DiagnosticInfoWithLocationBase:

Inherited from DiagnosticInfo:

Methods

DiagnosticInfoIROptimization(
    enum DiagnosticKind Kind,
    enum DiagnosticSeverity Severity,
    const char* PassName,
    llvm::StringRef RemarkName,
    const llvm::Function& Fn,
    const llvm::DiagnosticLocation& Loc,
    const llvm::Value* CodeRegion = nullptr)

Description

\p PassName is the name of the pass emitting this diagnostic. \p RemarkName is a textual identifier for the remark (single-word, camel-case). \p Fn is the function where the diagnostic is being emitted.\p Loc is the location information to use in the diagnostic. If line table information is available, the diagnostic will include the source code location. \p CodeRegion is IR value (currently basic block) that the optimization operates on. This is currently used to provide run-time hotness information with PGO.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:616

Parameters

enum DiagnosticKind Kind
enum DiagnosticSeverity Severity
const char* PassName
llvm::StringRef RemarkName
const llvm::Function& Fn
const llvm::DiagnosticLocation& Loc
const llvm::Value* CodeRegion = nullptr

DiagnosticInfoIROptimization(
    const char* PassName,
    llvm::StringRef Prepend,
    const llvm::DiagnosticInfoIROptimization&
        Orig)

Description

This is ctor variant allows a pass to build an optimization remark from an existing remark. This is useful when a transformation pass (e.g LV) wants to emit a remark (\p Orig) generated by one of its analyses (e.g. LAA) as its own analysis remark. The string \p Prepend will be emitted before the original message.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:633

Parameters

const char* PassName
llvm::StringRef Prepend
const llvm::DiagnosticInfoIROptimization& Orig

DiagnosticInfoIROptimization(
    enum DiagnosticKind Kind,
    enum DiagnosticSeverity Severity,
    const char* PassName,
    const llvm::Function& Fn,
    const llvm::DiagnosticLocation& Loc,
    const llvm::Twine& Msg)

Description

Legacy interface.\p PassName is the name of the pass emitting this diagnostic.\p Fn is the function where the diagnostic is being emitted. \p Loc is the location information to use in the diagnostic. If line table information is available, the diagnostic will include the source code location. \p Msg is the message to show. Note that this class does not copy this message, so this reference must be valid for the whole life time of the diagnostic.

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:651

Parameters

enum DiagnosticKind Kind
enum DiagnosticSeverity Severity
const char* PassName
const llvm::Function& Fn
const llvm::DiagnosticLocation& Loc
const llvm::Twine& Msg

static bool classof(
    const llvm::DiagnosticInfo* DI)

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:661

Parameters

const llvm::DiagnosticInfo* DI

const llvm::Value* getCodeRegion() const

Declared at: llvm/include/llvm/IR/DiagnosticInfo.h:659