[PATCH] D105545: [MergedLoadStoreMotion] Conditional store elimination

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 09:53:32 PDT 2021


chill added a comment.

In D105545#2879424 <https://reviews.llvm.org/D105545#2879424>, @jaykang10 wrote:

> It looks like the patch does Partial Redundancy Elimination for store with triangle CFG... As far as I know, LLVM has passes to support the PRE.
> If you have already checked the llvm passes, can you let me know why the passes do not handle the triangle CFG with store instruction please?

I'm not aware of a pass that does PRE on stores. GVN does a limited form of PRE
on diamonds, but it does not deal with `void` instructions (such is stores).
DSE only handles fully redundant stores, as far as I can tell.

Even if we have PRE on stores, we still need this pass (or a variant thereof) to
create the (partial) redundancy, to feed to or as a step of a (hypothetical?)
Partial-DSE pass, since we don't have actually a case for a PRE - no two stores,
one to be considered (partially) redundant.

In any case, I'm open to suggestions about better places for this
transformation.


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

https://reviews.llvm.org/D105545



More information about the llvm-commits mailing list