[llvm] c37a8ac - [CostModel] remove hack for intrinsic cost based on cost type
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 13:03:36 PDT 2020
Author: Sanjay Patel
Date: 2020-09-28T15:58:42-04:00
New Revision: c37a8acef64213c2d9cf6fc76f958eb6bd252b4f
URL: https://github.com/llvm/llvm-project/commit/c37a8acef64213c2d9cf6fc76f958eb6bd252b4f
DIFF: https://github.com/llvm/llvm-project/commit/c37a8acef64213c2d9cf6fc76f958eb6bd252b4f.diff
LOG: [CostModel] remove hack for intrinsic cost based on cost type
This hack seems to only have been necessary because of the
constructor bug noted in 33125cffd.
Once again, it's hard to prove NFC, but that's the hope...
Added:
Modified:
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
index b31dd9a2cfed..5707242b1303 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -859,11 +859,6 @@ class TargetTransformInfoImplCRTPBase : public TargetTransformInfoImplBase {
case Instruction::Call: {
assert(isa<IntrinsicInst>(U) && "Unexpected non-intrinsic call");
auto *Intrinsic = cast<IntrinsicInst>(U);
- // FIXME: We shouldn't have this exception for RecipThroughput.
- if (CostKind == TTI::TCK_RecipThroughput) {
- IntrinsicCostAttributes CostAttrs(*Intrinsic);
- return TargetTTI->getIntrinsicInstrCost(CostAttrs, CostKind);
- }
IntrinsicCostAttributes CostAttrs(Intrinsic->getIntrinsicID(), *CB);
return TargetTTI->getIntrinsicInstrCost(CostAttrs, CostKind);
}
More information about the llvm-commits
mailing list