Page MenuHomePhabricator

[MemCpyOpt] Update pass to also optimize the atomic memory intrinsics (WIP - NOT FOR REVIEW)

Authored by dneilson on Jun 1 2018, 7:03 AM.



This change updates parts of the memcpyopt pass to also perform optimizations on the atomic
memcpy & memset intrinsics.

Specifically, we update:
processMemMove - This will change memmoves into memcpys if aliasing allows.
processMemCpy - Basically exposes opportunities for DSE by changing the source of a memcpy

if the source was just memcpy/memset into.

Parts of the pass that still need to be updated:
processMemSet - Merging consecutive memsets/stores into a single memset
processStore - Merging consecutive load/store pairs into memcpys.

Some care will have to be taken with processMemSet and processStore to ensure
that we don't break the expectations of unordered atomic operations (ex: no merging
an unordered store into a regular memset, etc).

Diff Detail

Event Timeline

dneilson created this revision.Jun 1 2018, 7:03 AM
dneilson abandoned this revision.Jun 1 2018, 7:04 AM