[PATCH] D76124: [TTI] Remove getOperationCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 23:25:39 PDT 2020


samparker marked an inline comment as done.
samparker added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:890-892
+      if (getCastInstrCost(Opcode, Ty, OpTy, dyn_cast<Instruction>(U)) ==
+          TargetTransformInfo::TCC_Free)
+        return 0;
----------------
spatel wrote:
> I know we're in some intermediate phase of rewriting this, but this seems backwards.
> getCastInstrCost() returns a raw unsigned value, so do we want to check for that and convert to an enum cost here (and below for the extend opcodes)?
>       if (getCastInstrCost(Opcode, Ty, OpTy, dyn_cast<Instruction>(U)) == 0)
>           return TargetTransformInfo::TCC_Free;
Ok, I'll rebase this and take a look.


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

https://reviews.llvm.org/D76124





More information about the llvm-commits mailing list