[PATCH] D72148: [DSE] Support traversing MemoryPhis.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 21 09:19:24 PST 2020
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1642
if (isa<MemoryPhi>(UseAccess)) {
- LLVM_DEBUG(dbgs() << " ... hit MemoryPhi\n");
- return None;
+ if (KillingDef == UseAccess)
+ continue;
----------------
asbirlea wrote:
> Can you clarify this?
> KillingDef is a MemoryDef, UseAccess is a MemoryPhi inside this if. How can they be equal?
I think this was a left-over before switching to a SetVector worklist. With the SetVector, we will never visit the node twice. I've added an assertion to be sure to check for cycles.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72148/new/
https://reviews.llvm.org/D72148
More information about the llvm-commits
mailing list