class OptimizationRemarkAnalysis

Declaration

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

Description

Diagnostic information for optimization analysis remarks.

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

Inherits from: DiagnosticInfoIROptimization

Member Variables

public static const char* AlwaysPrint

Inherited from DiagnosticInfoOptimizationBase:

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

Method Overview

  • public OptimizationRemarkAnalysis(const char * PassName, llvm::StringRef RemarkName, const llvm::DiagnosticLocation & Loc, const llvm::Value * CodeRegion)
  • public OptimizationRemarkAnalysis(const char * PassName, llvm::StringRef Prepend, const llvm::OptimizationRemarkAnalysis & Orig)
  • public OptimizationRemarkAnalysis(const char * PassName, llvm::StringRef RemarkName, const llvm::Instruction * Inst)
  • public OptimizationRemarkAnalysis(const char * PassName, llvm::StringRef RemarkName, const llvm::Function * F)
  • protected OptimizationRemarkAnalysis(enum DiagnosticKind Kind, const char * PassName, const llvm::Function & Fn, const llvm::DiagnosticLocation & Loc, const llvm::Twine & Msg)
  • protected OptimizationRemarkAnalysis(enum DiagnosticKind Kind, const char * PassName, llvm::StringRef RemarkName, const llvm::DiagnosticLocation & Loc, const llvm::Value * CodeRegion)
  • private OptimizationRemarkAnalysis(const char * PassName, const llvm::Function & Fn, const llvm::DiagnosticLocation & Loc, const llvm::Twine & Msg)
  • public static bool classof(const llvm::DiagnosticInfo * DI)
  • public bool isEnabled() const
  • public bool shouldAlwaysPrint() const

Inherited from DiagnosticInfoIROptimization:

Inherited from DiagnosticInfoOptimizationBase:

Inherited from DiagnosticInfoWithLocationBase:

Inherited from DiagnosticInfo:

Methods

OptimizationRemarkAnalysis(
    const char* PassName,
    llvm::StringRef RemarkName,
    const llvm::DiagnosticLocation& Loc,
    const llvm::Value* CodeRegion)

Description

\p PassName is the name of the pass emitting this diagnostic. If this name matches the regular expression given in -Rpass-analysis=, then the diagnostic will be emitted. \p RemarkName is a textual identifier for the remark (single-word, camel-case). \p Loc is the debug location and \p CodeRegion is the region that the optimization operates on (currently only block is supported).

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

Parameters

const char* PassName
llvm::StringRef RemarkName
const llvm::DiagnosticLocation& Loc
const llvm::Value* CodeRegion

OptimizationRemarkAnalysis(
    const char* PassName,
    llvm::StringRef Prepend,
    const llvm::OptimizationRemarkAnalysis& 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:800

Parameters

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

OptimizationRemarkAnalysis(
    const char* PassName,
    llvm::StringRef RemarkName,
    const llvm::Instruction* Inst)

Description

Same as above but \p Inst is used to derive code region and debug location.

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

Parameters

const char* PassName
llvm::StringRef RemarkName
const llvm::Instruction* Inst

OptimizationRemarkAnalysis(
    const char* PassName,
    llvm::StringRef RemarkName,
    const llvm::Function* F)

Description

Same as above but \p F is used to derive code region and debug location.

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

Parameters

const char* PassName
llvm::StringRef RemarkName
const llvm::Function* F

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

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

Parameters

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

OptimizationRemarkAnalysis(
    enum DiagnosticKind Kind,
    const char* PassName,
    llvm::StringRef RemarkName,
    const llvm::DiagnosticLocation& Loc,
    const llvm::Value* CodeRegion)

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

Parameters

enum DiagnosticKind Kind
const char* PassName
llvm::StringRef RemarkName
const llvm::DiagnosticLocation& Loc
const llvm::Value* CodeRegion

OptimizationRemarkAnalysis(
    const char* PassName,
    const llvm::Function& Fn,
    const llvm::DiagnosticLocation& Loc,
    const llvm::Twine& Msg)

Description

This is deprecated now and only used by the function API below.\p PassName is the name of the pass emitting this diagnostic. If this name matches the regular expression given in -Rpass-analysis=, then the diagnostic will be emitted. \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:846

Parameters

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:814

Parameters

const llvm::DiagnosticInfo* DI

bool isEnabled() const

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

bool shouldAlwaysPrint() const

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