[PATCH] D99249: [PassManager] Run additional LICM before LoopRotate

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 11:24:48 PDT 2021


lebedev.ri added a comment.

In D99249#2648214 <https://reviews.llvm.org/D99249#2648214>, @nikic wrote:

>> I.e. we end up with less instructions, more LICM activity (+30% more sunks out of loops!),
>
> This sounds too good to be true ... and it is. The statistic was closer to counting sinking candidates than actually sunk instructions. I've fixed it in 8a168d2d70678164004fca8de78e98bfb6e1272d <https://reviews.llvm.org/rG8a168d2d70678164004fca8de78e98bfb6e1272d> and would expect this patch to have a much more limited impact on it now.

Down to 7%.
Also, note that stats suggest that early LICM is worse than two LICM's:

In D99249#2647162 <https://reviews.llvm.org/D99249#2647162>, @lebedev.ri wrote:

> <> ... but that actually regresses LICM (-12% licm.NumMovedLoads),
> loop-simplifycfg (NumLoopExitsDeleted, NumTerminatorsFolded),
> simple-loop-unswitch (NumTrivial).
>
>> ! In D99249#2647162 <https://reviews.llvm.org/D99249#2647162>, @lebedev.ri wrote:
>
> also note how none of those 4 regressions are here.

So i still believe this is what we need.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99249/new/

https://reviews.llvm.org/D99249



More information about the llvm-commits mailing list