This is an archive of the discontinued LLVM Phabricator instance.

[MemorySSA] Add API to reset optimized for uses of a replaced instruction.
AbandonedPublic

Authored by asbirlea on Sep 5 2018, 11:00 PM.

Details

Summary

If an instruction is optimized and replaced with another value, all the uses (instructions) of the replaced instruction, now point to said value.
This means that if these uses (instructions) have MemoryAccesses attached, they need to be un-optimized, as they may not longer have teh same clobbering access.
The use case that triggered this is in EarlyCSE w/ MemorySSA, where the replacement value is "undef".

Diff Detail

Event Timeline

asbirlea created this revision.Sep 5 2018, 11:00 PM
asbirlea updated this revision to Diff 164299.Sep 6 2018, 3:43 PM

Need to bypass geps when traversing users, use worklist.
Adding test in dependent patch.

asbirlea updated this revision to Diff 164314.Sep 6 2018, 4:13 PM

Avoid duplicates (use set).

asbirlea abandoned this revision.Sep 11 2018, 4:48 PM