[PATCH] D67995: [MemorySSA] Avoid adding Phis in the presence of unreachable blocks.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 16:22:21 PDT 2019
asbirlea marked 2 inline comments as done.
asbirlea added inline comments.
================
Comment at: lib/Analysis/MemorySSAUpdater.cpp:82
+ else if (IncomingAccess != SingleAccess)
+ UniqueIncomingAccess = false;
+ PhiOps.push_back(IncomingAccess);
----------------
george.burgess.iv wrote:
> nit: would it be simpler to keep a count of the unreachable blocks we saw (not adding anything to PhiOps), then if PhiOps.size() > 1, just adding `NumUnreachablePreds` LiveOnEntryDefs?
I think having the `SingleAccess` is important to not end up adding Phis when multiple reachable blocks provide the same incoming access. Given this, we can't really model everything with a single counter. Yes, we can use a counter and add the LiveOnEntryDefs after the loop, but it's roughly the same amount of code/same complexity.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67995/new/
https://reviews.llvm.org/D67995
More information about the llvm-commits
mailing list