HomePhabricator

Loop Unroll: add options and tweak to make Partial unrolling more useful

Authored by escha on Apr 6 2016, 9:57 AM.

Description

Loop Unroll: add options and tweak to make Partial unrolling more useful

  1. Add FullUnrollMaxCount option that works like MaxCount, but also limits the unroll count for fully unrolled loops. So if a loop has an iteration count over this, it won't fully unroll.
  2. Add CLI options for MaxCount and the new option, so they can be tested (plus a test).
  3. Make partial unrolling obey MaxCount.

An example use-case (the out of tree one this is originally designed for) is
a target’s TTI can analyze a loop and decide on a max unroll count separate
from the size threshold, e.g. based on register pressure, then constrain
LoopUnroll to not exceed that, regardless of the size of the unrolled loop.

llvm-svn: 265562

Details

Committed
eschaApr 6 2016, 9:57 AM
Parents
rGa1ca39d3107f: [MachineRegisterInfo] Document what is the expected metric for the size of…
Branches
Unknown
Tags
Unknown