[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
    
    
  
================
@@ -201,25 +203,27 @@ class InstrItineraryData {
 
   /// Compute and return the use operand latency of a given itinerary
   /// class and operand index if the value is produced by an instruction of the
-  /// specified itinerary class and def operand index.
-  int getOperandLatency(unsigned DefClass, unsigned DefIdx,
-                        unsigned UseClass, unsigned UseIdx) const {
+  /// specified itinerary class and def operand index. Return std::nullopt if
+  /// no cycle is specified for the operand.
----------------
fpetrogalli wrote:
```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