[llvm] 4d525f2 - [VPlan] Remove unneeded InsertPointGuard (NFCI).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 29 04:37:33 PST 2024
Author: Florian Hahn
Date: 2024-02-29T12:37:13Z
New Revision: 4d525f2b9a42fee4bd3a3c45873fc38b35dd8004
URL: https://github.com/llvm/llvm-project/commit/4d525f2b9a42fee4bd3a3c45873fc38b35dd8004
DIFF: https://github.com/llvm/llvm-project/commit/4d525f2b9a42fee4bd3a3c45873fc38b35dd8004.diff
LOG: [VPlan] Remove unneeded InsertPointGuard (NFCI).
getBlockInMask now simply returns an already computed mask, hence
there's no need to adjust the builder insert point.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index b81cd508663c32..50a073e890626e 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -9003,11 +9003,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
BasicBlock *BB = CurrentLinkI->getParent();
VPValue *CondOp = nullptr;
- if (CM.blockNeedsPredicationForAnyReason(BB)) {
- VPBuilder::InsertPointGuard Guard(Builder);
- Builder.setInsertPoint(CurrentLink);
+ if (CM.blockNeedsPredicationForAnyReason(BB))
CondOp = RecipeBuilder.getBlockInMask(BB);
- }
VPReductionRecipe *RedRecipe = new VPReductionRecipe(
RdxDesc, CurrentLinkI, PreviousLink, VecOp, CondOp);
More information about the llvm-commits
mailing list