[PATCH] D91957: [Support] Migrate more high level cost functions to using InstructionCost
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 26 10:41:28 PST 2021
ctetreau added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:1017
else if (Shuffle->changesLength())
- return CostKind == TTI::TCK_RecipThroughput ? -1 : 1;
+ return CostKind == TTI::TCK_RecipThroughput
+ ? InstructionCost::getInvalid()
----------------
Where are all of these "return -1"'s handled?
================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp:533
+ InstructionCost InsnCost = TTI.getUserCost(&I, CostKind);
+ if (!InsnCost.isValid()) {
+ LLVM_DEBUG(dbgs() << " Encountered invalid baseline cost.\n");
----------------
I think this is a functional change. Before it returned a non-None garbage value, and now it returns None. Is there a test that can be written for this?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91957/new/
https://reviews.llvm.org/D91957
More information about the llvm-commits
mailing list