[llvm] 822a818 - [SLP][NFC]Add comments for the code, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 10:06:49 PDT 2024
Author: Alexey Bataev
Date: 2024-07-09T10:06:34-07:00
New Revision: 822a818786ccd726e20e2b12cbcccbf9a8f23d4c
URL: https://github.com/llvm/llvm-project/commit/822a818786ccd726e20e2b12cbcccbf9a8f23d4c
DIFF: https://github.com/llvm/llvm-project/commit/822a818786ccd726e20e2b12cbcccbf9a8f23d4c.diff
LOG: [SLP][NFC]Add comments for the code, NFC.
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 9f3159244319c..4dc92419e1423 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -4099,7 +4099,10 @@ BoUpSLP::~BoUpSLP() {
SmallVector<WeakTrackingVH> DeadInsts;
for (auto *I : DeletedInstructions) {
if (!I->getParent()) {
+ // Temporarily insert instruction back to erase them from parent and
+ // memory later.
if (isa<PHINode>(I))
+ // Phi nodes must be the very first instructions in the block.
I->insertBefore(F->getEntryBlock(),
F->getEntryBlock().getFirstNonPHIIt());
else
More information about the llvm-commits
mailing list