[PATCH] D60266: [LoopUnroll] Rotate loop, when optimizing for size and can fully unroll a loop.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 08:37:27 PDT 2019


fhahn added a comment.

In D60266#1455299 <https://reviews.llvm.org/D60266#1455299>, @efriedma wrote:

> On a related note, independent of what we do in unrolling, it would probably be worthwhile to teach loop rotation to rotate loops where the cloned header would fold to zero instructions.


I started looking into this and put up D61683 <https://reviews.llvm.org/D61683>, which uses UnrolledInstAnalyzer to simulate the simplification of the hoisted header, including a patch to move some functionality in UnrolledInstAnalyzer. It is still rough (the interface & naming needs improving) and it lead to some size improvements and regressions. I need to take a closer look at the regressions, I suspect they highlight some problems in other passes, that previously did not have to deal with a lot of loops with -Oz.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60266





More information about the llvm-commits mailing list