[llvm-dev] RFC: Replace usage of Alias Set Tracker with MemorySSA in LICM

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Tue May 30 12:44:03 PDT 2017


On 5/30/2017 10:07 AM, Alina Sbirlea via llvm-dev wrote:
> Hi,
>
> I wanted to give a heads-up that I've been looking into replacing the 
> AliasSetTracker(AST) with MemorySSA in the Loop Invariant Code Motion 
> (LICM) pass.
> I would love to get feedback on the best way to incrementally push in 
> this change.
>
> Motivation:
> There has been an outstanding issue with using the Alias Set Tracker 
> due to its expensive construction time (quadratic).
> We've had test cases take forever to compile, where the largest time 
> was spent constructing the AST in LICM.
> We've also had to degrade the AST results as a temporary fix to 
> resolve this (D23432).
> The hope is that by using MemorySSA instead, which has linear 
> construction time, we can avoid this issues and decrease compile times.
>
> Some initial discussion points:
> 1. As a first step, I'm looking at having MemorySSA as a dependency 
> only for LICM, in the old pass manager.
> 2. In the future, MemorySSA may become one of the loop passes that's 
> readily available for all loops in the new pass manager. This will be 
> a more extensive change and it may require analyzing the overhead of 
> preserving MemorySSA by all loop passes.

This works essentially the same way in the legacy pass manager and the 
new pass manager; it's just not as obvious in the legacy pass manager.  
See getLoopAnalysisUsage(), which is basically the set of passes which a 
LoopPass is allowed to use/must preserve to allow loop pass interleaving.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-dev mailing list