[PATCH] New Loop Distribution pass

Adam Nemet anemet at apple.com
Thu Apr 16 14:40:34 PDT 2015


ping

> On Apr 4, 2015, at 1:36 AM, Adam Nemet <anemet at apple.com> wrote:
> 
> Hi hfinkel, aschwaighofer, nadav,
> 
> This implements the initial version as was proposed earlier this year
> (http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/080462.html).
> Since then the Loop Access Analysis was split out from the Loop
> Vectorizer and was made into a separate analysis pass.  Loop
> Distribution becomes the second user of this analysis.
> 
> The pass is off by default and can be enabled
> with -enable-loop-distribution.  There is currently no notion of
> profitability; if there is a loop with dependence cycles, the pass will
> try to split them off from other memory operations into a separate loop.
> 
> I decided to remove the control-dependence calculation from this first
> version.  This and the issues with the PDT are actively discussed so it
> probably makes sense to treat it separately.  Right now I just mark all
> terminator instruction required which keeps identical CFGs for each
> distributed loop.  This seems to be working pretty well for 456.hmmer
> where even though there is an empty if-then block in the distributed
> loop initially, it gets completely removed.
> 
> The pass keeps DominatorTree and LoopInfo updated.  I've tested this
> with -loop-distribute-verify with the testsuite where we distribute ~90
> loops.  SimplifyLoop is violated in some cases and I have a FIXME
> covering this.
> 
> http://reviews.llvm.org/D8831
> 
> Files:
>  include/llvm/InitializePasses.h
>  include/llvm/Transforms/Scalar.h
>  lib/Transforms/IPO/PassManagerBuilder.cpp
>  lib/Transforms/Scalar/CMakeLists.txt
>  lib/Transforms/Scalar/LoopDistribute.cpp
>  lib/Transforms/Scalar/Scalar.cpp
>  test/Transforms/LoopDistribute/basic-with-memchecks.ll
>  test/Transforms/LoopDistribute/basic.ll
>  test/Transforms/LoopDistribute/crash-in-memcheck-generation.ll
>  test/Transforms/LoopDistribute/no-if-convert.ll
>  test/Transforms/LoopDistribute/outside-use.ll
>  test/Transforms/LoopDistribute/program-order.ll
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> <D8831.23249.patch>




More information about the llvm-commits mailing list