[PATCH] D76124: [TTI] Remove getOperationCost
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 09:45:32 PDT 2020
spatel added a comment.
Is this NFC now? I added some sanity tests for x86 here:
rGa2bb19c <https://reviews.llvm.org/rGa2bb19ca420d0801f5b9a5363dec1d7bcb829030>
...but this patch doesn't apply to master cleanly, so I could not verify if that wiggles or not.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:890-892
+ if (getCastInstrCost(Opcode, Ty, OpTy, dyn_cast<Instruction>(U)) ==
+ TargetTransformInfo::TCC_Free)
+ return 0;
----------------
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;
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76124/new/
https://reviews.llvm.org/D76124
More information about the llvm-commits
mailing list