llvm::remarks::parseHotnessThresholdOption

Parse a remarks hotness threshold option value.

Synopsis

Declared in <llvm/Remarks/HotnessThresholdParser.h>

Expected<std::optional<uint64_t>>
parseHotnessThresholdOption(StringRef Arg);

Description

Valid option values are: 1. integer: manually specified threshold; or 2. string 'auto': automatically get threshold from profile summary.

Returns std::nullopt if 'auto' is specified, indicating the value will be filled later during PSI. Negative integers are treated as no threshold (zero).

Return Value

The threshold, std::nullopt for 'auto', or an error if Arg is not a valid integer or 'auto'.

Parameters

NameDescription
ArgOption value string to parse.