[PATCH] D113939: [runtime-unroll] Remove restriction about unrolling multiple exit loops

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 12 08:24:13 PST 2022


reames abandoned this revision.
reames added a comment.

I'm going to abandon this patch.

Finally got another set of compile time and performance data following the small loops change above, and the results were not particularly compelling.  Performance didn't really move in any interesting way, and the compile time across the suite degraded by a couple of percent.  I suspect there are things we could do about compile time, but given the lack of compelling performance gains, I lack the motivation to push this.

For anyone interested in following up, here are some ideas on possible compile time wins:

- Prune loop exits during unrolling.  Check that D116496 <https://reviews.llvm.org/D116496>, and D114039 <https://reviews.llvm.org/D114039> have landed, then go looking for other examples.  In particular, the case where an exit becomes unreachable is slightly hard, but possibly worthwhile.
- Do incremental peephole during unrolling.  As a degenerate example, an increment unrolled one thousand times and used exactly once at the end of the chain currently results in one thousand scev constructions.  This is a quite noticeable waste.
- Beyond peephole, both CSE and DSE are possible to do incrementally during unrolling.  These will both cut down on memory traffic and IR size.
- Revise the cost model to account for *benefit* from unrolling, not just *cost*.  This is a much deeper change, but looks increasing necessary.


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

https://reviews.llvm.org/D113939



More information about the llvm-commits mailing list