This is an archive of the discontinued LLVM Phabricator instance.

[MemorySSA] Const correctness. NFC.
ClosedPublic

Authored by bryant on Oct 28 2016, 10:20 AM.

Details

Summary

From what I understand so far, getClobberingMemoryAccess isn't supposed to modify its MemoryLocation argument. Making this argument const permits callers to pass xvalues, such as:

MemoryAccess *Start;
MemCpyInst *M;
...
MSSA->getWalker()->getClobberingMemoryAccess(Start, MemoryLocation::getForSource(M));

Diff Detail

Repository
rL LLVM

Event Timeline

bryant updated this revision to Diff 76214.Oct 28 2016, 10:20 AM
bryant retitled this revision from to [MemorySSA] Const correctness. NFC..
bryant updated this object.
bryant set the repository for this revision to rL LLVM.
bryant added a subscriber: llvm-commits.
george.burgess.iv edited edge metadata.

LGTM too (assuming the patch is reversed).

This revision is now accepted and ready to land.Oct 28 2016, 10:43 AM
bryant updated this revision to Diff 76220.Oct 28 2016, 11:14 AM
bryant edited edge metadata.

Regenerated with the right order to git diff. Please land this as I don't have commit access.

This revision was automatically updated to reflect the committed changes.

Thanks for the patch! :)