]> granicus.if.org Git - llvm/commit
Disable loop peeling during full unrolling pass.
authorTeresa Johnson <tejohnson@google.com>
Thu, 3 Aug 2017 17:52:38 +0000 (17:52 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 3 Aug 2017 17:52:38 +0000 (17:52 +0000)
commitaebcb9ce1d00dbc1686cec915bb4b44ba902e28d
tree1958db956ab07cbca9af6ffebfa7eb34cf325c9c
parentb65c3a989fda1977369d5e617cac5cb3c2ac65a1
Disable loop peeling during full unrolling pass.

Summary:
Peeling should not occur during the full unrolling invocation early
in the pipeline, but rather later with partial and runtime loop
unrolling. The later loop unrolling invocation will also eventually
utilize profile summary and branch frequency information, which
we would like to use to control peeling. And for ThinLTO we want
to delay peeling until the backend (post thin link) phase, just as
we do for most types of unrolling.

Ensure peeling doesn't occur during the full unrolling invocation
by adding a parameter to the shared implementation function, similar
to the way partial and runtime loop unrolling are disabled.

Performance results for ThinLTO suggest this has a neutral to positive
effect on some internal benchmarks.

Reviewers: chandlerc, davidxl

Subscribers: mzolotukhin, llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D36258

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309966 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Scalar.h
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/peel-loop-pgo.ll