[llvm] TargetInstrInfo: make getOperandLatency return optional (NFC) (PR #73769)
Francesco Petrogalli via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 02:14:36 PST 2023
================
@@ -162,18 +163,19 @@ class InstrItineraryData {
return Latency;
}
- /// Return the cycle for the given class and operand. Return -1 if no
- /// cycle is specified for the operand.
- int getOperandCycle(unsigned ItinClassIndx, unsigned OperandIdx) const {
+ /// Return the cycle for the given class and operand. Return std::nullopt if
+ /// no cycle is specified for the operand.
----------------
fpetrogalli wrote:
How about
```suggestion
/// the information is not specified for the operand.
```
https://github.com/llvm/llvm-project/pull/73769
More information about the llvm-commits
mailing list