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

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 16:55:02 PDT 2017


asbirlea added a comment.

As far as I have tested, the cost of building MemorySSA is low because it does not incur all the cost up front.
More precisely, "optimizeUses" is capped. Only when the clobbering info is requested (if this was not part of the initial optimize pass) there's a pass to obtain it.
For hoist/sink, LICM takes advantage of this.

For promotion, LICM does not use it in this patch, and as I mentioned in the description, there is no cap. So the test in PR28670/PR28832 will not be happy.
I have a version that adds a threshold, but it does more work creating the sets. With the current patch, a small extension to MemorySSA should be enough to get a similar threshold.
With sink/hoist/promotion capped like this, the test in the PRs I mentioned runs on par with the saturated AST.

I tried to add extensive comments in code to describe ways to minimize cost, please let me know if they're unclear.

I plan to get more results for compile times after I address all issues, and before landing. I'll appreciate others testing this once this is ready to land.


https://reviews.llvm.org/D35741





More information about the llvm-commits mailing list