[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 22 02:07:45 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff a56e6dfd2e6b141b5475c05ad62c378906f565ba c91f8baeaec8c574dec3db446bdc3ef94ee62e99 -- llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index ea2a791d66..cd75371562 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7458,7 +7458,7 @@ InstructionCost LoopVectorizationPlanner::computeCost(VPlan &Plan,
if (!CostCtx.SkipCostComputation.insert(I).second)
continue;
LLVM_DEBUG(dbgs() << "Cost of " << ReductionCost << " for VF " << VF
- << ":\n in-loop reduction " << *I << "\n");
+ << ":\n in-loop reduction " << *I << "\n");
Cost += *ReductionCost;
}
}
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 065419d4b1..60f6ef3376 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -782,8 +782,8 @@ InstructionCost VPRegionBlock::computeCost(ElementCount VF,
bool IsHeaderMaskOrUniformCond =
vputils::isUniformCompare(Cond) ||
match(Cond, m_ActiveLaneMask(m_VPValue(), m_VPValue())) ||
- (match(Cond, m_Binary<Instruction::ICmp>(m_VPValue(), m_VPValue(Op))) &&
- Op == getPlan()->getOrCreateBackedgeTakenCount()) ||
+ (match(Cond, m_Binary<Instruction::ICmp>(m_VPValue(), m_VPValue(Op))) &&
+ Op == getPlan()->getOrCreateBackedgeTakenCount()) ||
isa<VPActiveLaneMaskPHIRecipe>(Cond);
if (IsHeaderMaskOrUniformCond || VF.isScalable())
return Cost;
``````````
</details>
https://github.com/llvm/llvm-project/pull/92555
More information about the llvm-commits
mailing list