[PATCH] D79849: [NFCI][CostModel] Unify getCFInstrCost
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 04:48:18 PDT 2020
samparker created this revision.
samparker added reviewers: RKSimon, craig.topper, spatel, hfinkel.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
samparker added a parent revision: D79164: [CostModel] getCFInstrCost.
Have TTI::getInstructionThroughput call getUserCost for Br, Ret and PHI.
https://reviews.llvm.org/D79849
Files:
llvm/lib/Analysis/TargetTransformInfo.cpp
Index: llvm/lib/Analysis/TargetTransformInfo.cpp
===================================================================
--- llvm/lib/Analysis/TargetTransformInfo.cpp
+++ llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -1176,13 +1176,10 @@
switch (I->getOpcode()) {
case Instruction::GetElementPtr:
- return getUserCost(I, CostKind);
-
case Instruction::Ret:
case Instruction::PHI:
- case Instruction::Br: {
- return getCFInstrCost(I->getOpcode(), CostKind);
- }
+ case Instruction::Br:
+ return getUserCost(I, CostKind);
case Instruction::Add:
case Instruction::FAdd:
case Instruction::Sub:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79849.263666.patch
Type: text/x-patch
Size: 620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/e57bc552/attachment.bin>
More information about the llvm-commits
mailing list