llvm::tryLess

Prefer TryCand when TryVal is less than CandVal.

Synopsis

Declared in <llvm/CodeGen/MachineScheduler.h>

bool
tryLess(
    int TryVal,
    int CandVal,
    GenericSchedulerBase::SchedCandidate& TryCand,
    GenericSchedulerBase::SchedCandidate& Cand,
    GenericSchedulerBase::CandReason Reason);

Return Value

True if TryCand replaced Cand because TryVal was less.

Parameters

NameDescription
TryValMetric for the tentative candidate.
CandValMetric for the current best candidate.
TryCandTentative candidate being compared.
CandCurrent best candidate, updated on success.
ReasonHeuristic reason recorded when TryCand wins.