[PATCH] D72700: [DSE] Add first version of MemorySSA-backed DSE (Bottom up walk).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 04:48:09 PST 2020


fhahn added a comment.

In D72700#1865066 <https://reviews.llvm.org/D72700#1865066>, @asbirlea wrote:

> I do think there are outstanding issues that need answers, but I believe the way to make progress is to have an initial good version and iterate on it.


Great, thanks for all the helpful comments!

> 1. The major issue is performance, and to start testing this out we need a working version in tree. There are many MemorySSA and AA calls in this variant, that we may be able to do better. For example: build a walker to do a single getClobbering with all the preconditions on what instructions are safe to skip, instead of doing this in a loop here.

Agreed! I think it makes sense to look into perf-tuning once we cover most cases legacy DSE handles. Otherwise perf comparisons might be a bit skewed.

> 2. Add all missing cases from add-on patches and get parity or better stores eliminated than current DSE. Merge tests when this happens to make this clear.

One missing piece that is not covered yet in the patch series is load->store forwarding. If anybody is interested in pushing this forward, that would be great! Otherwise I'll get to that in a bit.

> 3. The performance problem's scope goes beyond DSE. The current pass pipeline for both pass managers has a sequence of (gvn, memcpyopt, dse), where all of these use MemDepAnalysis.  Switching DSE to MemorySSA may initially get worse compile times, as we need to build both MemDepAnalysis and MemorySSA, but switching all three (use newgvn and port memcpyopt and dse), may be worthwhile. This is the long term goal I have in mind.

Yes, one follow-up to MSSA backed DSE is MSSA backed MemCopyOpt. My hope is that we can re-use/share some/most of the walking strategy & safety checks between DSE and MemCpyOpt.

> Thanks for all the work on this!




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72700





More information about the llvm-commits mailing list