This is an archive of the discontinued LLVM Phabricator instance.

[GVN] MemorySSA for GVN: add a switch to enable MemorySSA for GVN
Needs ReviewPublic

Authored by chill on Jan 26 2022, 8:09 AM.

Diff Detail

Event Timeline

chill created this revision.Jan 26 2022, 8:09 AM
chill requested review of this revision.Jan 26 2022, 8:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2022, 8:09 AM
ormris removed a subscriber: ormris.Jan 26 2022, 1:53 PM

Just a couple of quick comments:

  • Why take out the option to DisableGVNLoadPRE?
  • Can the MemDep and MSSA be mutually exclusive options? (i.e. enabling one disables the other)
chill updated this revision to Diff 407204.Feb 9 2022, 10:33 AM
chill added a comment.Feb 9 2022, 11:17 AM

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.
mkazantsev resigned from this revision.Mar 4 2022, 12:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 12:13 AM
chill updated this revision to Diff 417610.Mar 23 2022, 7:44 AM
chill updated this revision to Diff 428110.May 9 2022, 9:41 AM
chill updated this revision to Diff 440215.Jun 27 2022, 7:23 AM