llvm::setupLLVMOptimizationRemarks

setupLLVMOptimizationRemarks overloads

Synopses

Declared in <llvm/IR/LLVMRemarkStreamer.h>

Set up optimization remarks that output to a file.

Expected<LLVMRemarkFileHandle>
setupLLVMOptimizationRemarks(
    LLVMContext& Context,
    StringRef RemarksFilename,
    StringRef RemarksPasses,
    StringRef RemarksFormat,
    bool RemarksWithHotness,
    std::optional<uint64_t> RemarksHotnessThreshold = 0);
» more...

Set up optimization remarks that output directly to a raw_ostream.

Error
setupLLVMOptimizationRemarks(
    LLVMContext& Context,
    raw_ostream& OS,
    StringRef RemarksPasses,
    StringRef RemarksFormat,
    bool RemarksWithHotness,
    std::optional<uint64_t> RemarksHotnessThreshold = 0);
» more...

Return Value

  • Handle owning the remarks output file, or an error on failure.
  • Success, or an error if remark setup fails.

Parameters

NameDescription
ContextLLVM context that receives the remark streamer.
RemarksFilenameOutput path for optimization remarks.
RemarksPassesRegex of pass names whose remarks should be emitted.
RemarksFormatSerialization format for remarks.
RemarksWithHotnessWhether to include profile hotness information.
RemarksHotnessThresholdMinimum hotness required to emit a remark.
OSStream that receives serialized remarks.