Page MenuHomePhabricator

[MSSA] Initial version of avoiding unnecessary use walks when calling getClobberingMemoryAccess
ClosedPublic

Authored by dberlin on Oct 2 2016, 7:38 PM.

Details

Summary

This allows us to mark when uses have been optimized.
This lets us avoid rewalking (IE when people call getClobberingAccess on everything), and also
enables us to later relax the requirement of use optimization during updates with less cost.

Event Timeline

dberlin updated this revision to Diff 73232.Oct 2 2016, 7:38 PM
dberlin retitled this revision from to [MSSA] Initial version of avoiding unnecessary use walks when calling getClobberingMemoryAccess.
dberlin updated this object.
dberlin added a reviewer: george.burgess.iv.
dberlin added a subscriber: llvm-commits.

(Unittest that resets the defining access, and calls getClobberingAccess, coming)

lib/Transforms/Utils/MemorySSA.cpp
2185

RE: Note: ...: can you bring me through why having this on a Def is would be useful? Is the cache just invalidated too aggressively?

  • Move optimized flag to uses
  • Update to work in all update cases
george.burgess.iv edited edge metadata.

LGTM, thanks!

This revision is now accepted and ready to land.Oct 19 2016, 3:52 PM
dberlin edited edge metadata.

I know you LGTM'd this, but i updated it t#o show the final state. The
only case we don't handle automatically right now is if removing
memory accesses causes single valued phis.

This revision was automatically updated to reflect the committed changes.