[PATCH] D121744: [SCCP] Update ValueLatticeElement blockaddresses when removing unreachable BasicBlocks

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 11:37:40 PDT 2022


efriedma added a reviewer: fhahn.
efriedma added a comment.

I think my preferred solution here would be to delay deleting dead blocks further, until the lattice stops mattering.

Any solution that involves trying to explicitly fix up the lattice, like the current patch, is going to cause problems for correctness and perf, I think.

For your other proposed solution, I don't think you can tell whether a block is reachable at the point where the blockaddress shows up in the lattice.  You could blacklist all blockaddresses from the lattice, I guess, for a minor loss of optimization power.

You could also possibly use a TrackingVH in ValueLatticeElement; not sure what consequences that would have.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121744/new/

https://reviews.llvm.org/D121744



More information about the llvm-commits mailing list