[PATCH] D80958: SROA: Remove pointer from visited along with instruction
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 12:57:44 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1e9a0a4e04aa: SROA: Remove pointer from visited along with instruction (authored by rampitec).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80958/new/
https://reviews.llvm.org/D80958
Files:
llvm/lib/Transforms/Scalar/SROA.cpp
Index: llvm/lib/Transforms/Scalar/SROA.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/SROA.cpp
+++ llvm/lib/Transforms/Scalar/SROA.cpp
@@ -3381,6 +3381,7 @@
getAdjustedAlignment(&LI, 0), DL);
Value *V = UndefValue::get(LI.getType());
Splitter.emitSplitOps(LI.getType(), V, LI.getName() + ".fca");
+ Visited.erase(&LI);
LI.replaceAllUsesWith(V);
LI.eraseFromParent();
return true;
@@ -3427,6 +3428,7 @@
StoreOpSplitter Splitter(&SI, *U, V->getType(), AATags,
getAdjustedAlignment(&SI, 0), DL);
Splitter.emitSplitOps(V->getType(), V, V->getName() + ".fca");
+ Visited.erase(&SI);
SI.eraseFromParent();
return true;
}
@@ -3473,6 +3475,7 @@
Value *NSel = Builder.CreateSelect(Sel->getCondition(), NTrue, NFalse,
Sel->getName() + ".sroa.sel");
+ Visited.erase(&GEPI);
GEPI.replaceAllUsesWith(NSel);
GEPI.eraseFromParent();
Instruction *NSelI = cast<Instruction>(NSel);
@@ -3521,6 +3524,7 @@
NewPN->addIncoming(NewVal, PHI->getIncomingBlock(I));
}
+ Visited.erase(&GEPI);
GEPI.replaceAllUsesWith(NewPN);
GEPI.eraseFromParent();
Visited.insert(NewPN);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80958.268917.patch
Type: text/x-patch
Size: 1311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200605/be30555d/attachment-0001.bin>
More information about the llvm-commits
mailing list