[PATCH] D76124: [TTI] Remove getOperationCost
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 18 08:08:58 PDT 2020
lebedev.ri added a comment.
Sanity check: i believe, as per `llvm::TargetTransformInfo::getInstructionCost()`,
there are three cost-models:
- throughput model (`getInstructionThroughput()`)
- latency model (`getInstructionLatency()`)
- size model (`getUserCost()`)
I'm not sure what `getOperationCost()` is supposed to represent,
so i'm not sure how it's code should be redistributed should it be deleted.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:281
/// This can estimate the cost of either a ConstantExpr or Instruction when
- /// lowered. It has two primary advantages over the \c getOperationCost and
- /// \c getGEPCost above, and one significant disadvantage: it can only be
- /// used when the IR construct has already been formed.
+ /// lowered. It has two primary advantages over the \c getGEPCost above,
+ /// and one significant disadvantage: it can only be used when the IR
----------------
\c get*Cost
this isn't specific to getGEPCost at all
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:869-872
+ case Instruction::Freeze:
+ // Freeze operation is free because it should be lowered into a register
+ // use without any register copy in assembly code.
+ return TTI::TCC_Free;
----------------
This is unreachable
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76124/new/
https://reviews.llvm.org/D76124
More information about the llvm-commits
mailing list