[PATCH] D100565: [TTI] NFC: Change getIntImmCost[Inst|Intrin] to return InstructionCost

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 08:21:08 PDT 2021


c-rhodes added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/ConstantHoisting.cpp:390
     }
-    ConstIntCandVec[Itr->second].addUser(Inst, Idx, Cost);
+    ConstIntCandVec[Itr->second].addUser(Inst, Idx, *Cost.getValue());
     LLVM_DEBUG(if (isa<ConstantInt>(Inst->getOperand(Idx))) dbgs()
----------------
Does there need to be a check the cost is valid before calling `getValue`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100565/new/

https://reviews.llvm.org/D100565



More information about the llvm-commits mailing list