aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorRamkumar Ramachandra <Ramkumar.Ramachandra@imgtec.com>2023-12-01 11:29:19 +0000
committerGitHub <noreply@github.com>2023-12-01 11:29:19 +0000
commit9468de48fcd413aa0895a78bd6f1aeb161b39294 (patch)
tree31115c253f8161592ffee937a3e7a7a8eec0324b /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent460faa0c87f0a9496cdaf6c856aff1886e29afe3 (diff)
downloadllvm-9468de48fcd413aa0895a78bd6f1aeb161b39294.zip
llvm-9468de48fcd413aa0895a78bd6f1aeb161b39294.tar.gz
llvm-9468de48fcd413aa0895a78bd6f1aeb161b39294.tar.bz2
TargetInstrInfo: make getOperandLatency return optional (NFC) (#73769)
getOperandLatency has the following behavior: it returns -1 as a special value, negative numbers other than -1 on some target-specific overrides, or a valid non-negative latency. This behavior can be surprising, as some callers do arithmetic on these negative values. Change the interface of getOperandLatency to return a std::optional<unsigned> to prevent surprises in callers. While at it, change the interface of getInstrLatency to return unsigned instead of int. This change was inspired by a refactoring in TargetSchedModel::computeOperandLatency.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions