This is an archive of the discontinued LLVM Phabricator instance.

[MemorySSA] Update comment in PassBuilder
ClosedPublic

Authored by ychen on Jun 25 2020, 6:39 PM.

Details

Summary

Is teaching the LoopFullUnrollPass to preserve MemorySSA very hard or
just impossible?

Diff Detail

Event Timeline

ychen created this revision.Jun 25 2020, 6:39 PM
asbirlea accepted this revision.Jun 25 2020, 11:54 PM

It's not impossible. It's hard and likely not worth it.
Preserving MemorySSA for this pass means creating MemoryAccesses for all blocks cloned when unrolling. Creating an access and then updating so many times is likely more expensive than recomputing MemorySSA from scratch.

I have a patch lined up where MemorySSA would be set to true when unroll added to LPM2, but preliminary testing didn't show this case to provide much value.

This revision is now accepted and ready to land.Jun 25 2020, 11:54 PM
ychen added a comment.Jun 26 2020, 2:41 PM

It's not impossible. It's hard and likely not worth it.
Preserving MemorySSA for this pass means creating MemoryAccesses for all blocks cloned when unrolling. Creating an access and then updating so many times is likely more expensive than recomputing MemorySSA from scratch.

I have a patch lined up where MemorySSA would be set to true when unroll added to LPM2, but preliminary testing didn't show this case to provide much value.

Thanks for the information @asbirlea . It is very helpful.

This revision was automatically updated to reflect the committed changes.