[PATCH] D35741: Add MemorySSA alternative to AliasSetTracker in LICM.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 17:15:23 PDT 2017


dberlin added a comment.

In https://reviews.llvm.org/D35741#817737, @davide wrote:

> Thanks, I'll review this soon.
>  A quick question. a concern people have about MemorySSA is that you pay upfront for O(1) queries, which may have some impact on compile time.


FWIW: This is and always has been false accounting in most passes as you know.  
Most passes that could use MemorySSA already ask about every load and store in the function.  
The only reason people think it's faster to not use MemorySSA, or to avoid the upfront cost,  is because our time-passes doesn't account function time to lazy utilities/analysis properly.
If it did, AA/etc time would look *much* larger than it does now, because in reality, it *is* much larger than it seems.

IE if you avoid optimize uses, and call getClobberingAccess on every load/store, "MemorySSA" time goes down, overall time goes up.

> (e.g. in EarlyCSE). AST is already O(N^2), and in some cases badly so, but I wonder if you have compile time measurements of the impact of your change?

MemorySSA as alias sets (IE as done promotion) in this manner is not going to be faster in a lot of cases.

But you are going to have to rewrite how promotion in LICM functions (IE not use alias sets) to get the advantages of really using MemorySSA.
RIght now it's kinda wonky


https://reviews.llvm.org/D35741





More information about the llvm-commits mailing list