[llvm-dev] Enabling Loop Distribution Pass as default in the pipeline of new pass manager

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 21 11:03:38 PDT 2021

Am Mo., 21. Juni 2021 um 08:36 Uhr schrieb Sjoerd Meijer
<Sjoerd.Meijer at arm.com>:
> I think we need to look at compile-times too before we can draw that conclusion, i.e. we need to justify it's worth spending extra compile-time for optimising a few cases. Hopefully loop distribution is a cheap pass to run (also when it is running but not triggering), but that's something that needs to be checked I think.

LoopDistribute currently already iterates over all loops to find the
llvm.loop.distribute.enable metadata. Additional compile-time overhead
would be the LoopAccessAnalysis which could be done for cheap if
LoopAccessAnalysis is used for LoopVectorize anyways.

> ________________________________
> From: Jingu Kang <Jingu.Kang at arm.com>
> Sent: 21 June 2021 14:27
> To: Michael Kruse <llvmdev at meinersbur.de>; Kyrylo Tkachov <Kyrylo.Tkachov at arm.com>; Sjoerd Meijer <Sjoerd.Meijer at arm.com>
> Cc: llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org>
> Subject: RE: [llvm-dev] Enabling Loop Distribution Pass as default in the pipeline of new pass manager

For some reason I cannot find this email in my inbox, although it was
definitely sent to the mailing-list:
So I am replying within Sjoerd's email.

> For considering the LoopDistribute pass as a canonicalization with the profitability heuristic of LoopFuse pass, it looks the LoopFuse pass does not also have proper profitability function.

Within the loop optimization working group we were considering adding
a heuristic to LoopFuse. but is also not restricted to innermost
loops. However, the advantage is that it could run after LoopVectorize
and re-fuse loops that turned out to be non-vectorizable, or to loops
that have been vectorized independently. Unfortunately I think the
legality/profitability is comparatively expensive since it does not
unse LoopAccessAnalsysis,


More information about the llvm-dev mailing list