[PATCH] D19821: [EarlyCSE] Optionally use MemorySSA. NFC.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 10:11:11 PDT 2016


On Thu, Aug 25, 2016 at 8:36 AM, Geoff Berry <gberry at codeaurora.org> wrote:

> Sounds good.  I'll go ahead and check in what I have now (since it is NFC)
> and we can proceed from there.
>
> I'm currently trying out an approach where upon removing a store I eagerly
> re-optimize phis, but just mark uses as dirty, then only re-compute the
> clobber for dirty uses if they come up in a isSameMemGeneration query or at
> the end of the pass, which is sort of a hybrid of the two approaches you
> described.
>
Okay.
Internally, I'm going to add an optimized bit that gets reset, and make the
default walker only rewalk uses that are not optimized (and optimize them).

That way if you just call getClobberingMemoryAccess, you'd get the right
answer all the time and it would only be expensive when it needs to
actually be recomputed.

Note that this will be imperfect.
It relies on not having indirect uses (which use optimization initially
guarantees).

That is, it relies on a given store having all of the loads that use it,
have it as the clobbering definition.

Otherwise, when you remove/RAUW the store, you will not invalidate the full
set of uses.


I will also make a batch updater that can do phi insertion and redo use
optimization for pieces of memoryssa.

--Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160825/c6351255/attachment.html>


More information about the llvm-commits mailing list