[llvm] TargetInstrInfo: make getOperandLatency return optional (NFC) (PR #73769)

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 00:31:25 PST 2023


================
@@ -467,7 +467,7 @@ void HexagonSubtarget::adjustSchedDependency(SUnit *Src, int SrcOpIdx,
   // default.
   if ((DstInst->isRegSequence() || DstInst->isCopy())) {
     Register DReg = DstInst->getOperand(0).getReg();
-    int DLatency = -1;
+    std::optional<unsigned> DLatency = std::nullopt;
----------------
fpetrogalli wrote:

Same here?
```suggestion
    std::optional<unsigned> DLatency;
```

https://github.com/llvm/llvm-project/pull/73769


More information about the llvm-commits mailing list