[PATCH] D118255: [GVN] MemorySSA for GVN: add a switch to enable MemorySSA for GVN

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 9 11:17:34 PST 2022


chill added a comment.

In D118255#3305450 <https://reviews.llvm.org/D118255#3305450>, @asbirlea wrote:

> Just a couple of quick comments:
>
> - Why take out the option to DisableGVNLoadPRE?

Just a cleanup. It's never set to anything but `false` and is used only with old pass manager. Its effect is to disable MemDep in GVN, which is redundant
with respect to the `--enable-gvn-memdep` , `gvn(no-memdep)`/`GVNOptions`.

I guess, if there is interest, there is an option to add it back with the semantics of disabling loads PRE, regardless of whether using MemDep or MemorySSA, and
also add corresponding pieces to `GVNOptions`/`parseGVNOptions`.

> - Can the MemDep and MSSA be mutually exclusive options? (i.e. enabling one disables the other)

Yeah, I guess so. Right now, enabling MemSSA makes GVN not use MemDep. I suppose I can squeeze a separate patch (second to last in the series), which

- flips MemDep default to disabled
- flips MemSSA default to enabled
- makes enabling MemDEP disable use of MemSSA.


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

https://reviews.llvm.org/D118255



More information about the llvm-commits mailing list