[PATCH] D26527: Use profile info to adjust loop unroll threshold.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 14:02:38 PST 2016
danielcdh added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:765
+ BFI->getBlockFreq(L->getLoopPreheader()).getFrequency()) {
+ UP.PartialThreshold /= 4;
+ } else if (PSI->isHotBB(L->getHeader(), BFI)) {
----------------
mzolotukhin wrote:
> This looks like a magic number to me. Can we use some parameter for it (or maybe separate thresholds for 'hot' and 'cold' loops)?
Logic removed from the patch
================
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
----------------
mzolotukhin wrote:
> Hmm, is loop-unroll in a separate instance of loop pass manager now?
Removed dependency to BFI/PSI
https://reviews.llvm.org/D26527
More information about the llvm-commits
mailing list