[PATCH] D26527: Use profile info to adjust loop unroll threshold.

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 17:58:42 PST 2016


mzolotukhin added a comment.

Hi,

Thanks for working on this! Please find some comments inline.

Michael



================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:765
+                BFI->getBlockFreq(L->getLoopPreheader()).getFrequency()) {
+      UP.PartialThreshold /= 4;
+    } else if (PSI->isHotBB(L->getHeader(), BFI)) {
----------------
This looks like a magic number to me. Can we use some parameter for it (or maybe separate thresholds for 'hot' and 'cold' loops)?


================
Comment at: test/Other/pass-pipelines.ll:49-50
 ; CHECK-O2-NOT: Manager
+; CHECK-O2: Loop Pass Manager
+; CHECK-O2-NEXT: Unroll loops
 ; FIXME: It isn't clear that we need yet another loop pass pipeline
----------------
Hmm, is loop-unroll in a separate instance of loop pass manager now?


https://reviews.llvm.org/D26527





More information about the llvm-commits mailing list