This is an archive of the discontinued LLVM Phabricator instance.

[MemorySSA] Define a restricted upward AccessList splice.
ClosedPublic

Authored by bryant on Nov 14 2016, 11:17 PM.

Details

Summary

This defines an API endpoint that allows clients to move upwards a MemoryUse/Def
*M to just before a MemoryDef *Dest, where Dest and M may reside in separate
BasicBlocks. The following conditions must hold:

  • Dest must dominate M,
  • All MemoryAccesses between the Dest and M, as well as Dest itself, must be no-alias with M,
  • Dest is MemoryDef (this restriction could probably be lifted).

These conditions allow the splice to be carried out with simple
replaceAllUsesWith and setDefiningAccess operations. In particular, the first
and second conditions are sufficient conditions for preservation of semantics.

Diff Detail

Repository
rL LLVM

Event Timeline

bryant updated this revision to Diff 77949.Nov 14 2016, 11:17 PM
bryant retitled this revision from to [MemorySSA] Define a restricted upward AccessList splice..
bryant updated this object.
bryant set the repository for this revision to rL LLVM.
bryant added a subscriber: llvm-commits.
bryant updated this revision to Diff 78882.Nov 22 2016, 8:42 AM
  • Mark affected basic blocks for re-numbering.
  • Add test.
dberlin accepted this revision.Dec 24 2016, 8:01 PM
dberlin edited edge metadata.
This revision is now accepted and ready to land.Dec 24 2016, 8:01 PM
This revision was automatically updated to reflect the committed changes.