[PATCH] D34619: [ARM] Enable partial and runtime unrolling

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 12:29:07 PDT 2017


efriedma added inline comments.


================
Comment at: lib/Target/ARM/ARMTargetTransformInfo.cpp:599
+  // Enable runtime unrolling for non-nested loops.
+  if (L->getLoopDepth() == 1) {
+    UP.Runtime = true;
----------------
These heuristics seem really weird... why does the loop depth affect the performance of a loop?  Why does the trip count of the parent loop affect the performance of a loop?

I mean, I can imagine these heuristics are profitable for your particular benchmarks, but it seems like a performance trap: for example, someone turns on LTO, so a function gets inlined into a loop, so we decide it's no longer profitable to unroll the inner loop, and we lose a bunch of performance.


https://reviews.llvm.org/D34619





More information about the llvm-commits mailing list