[LoopUnroll] Fix the partial unrolling threshold for small loop sizes

Description

[LoopUnroll] Fix the partial unrolling threshold for small loop sizes

When we compute the size of a loop, we include the branch on the backedge and
the comparison feeding the conditional branch. Under normal circumstances,
these don't get replicated with the rest of the loop body when we unroll. This
led to the somewhat surprising behavior that really small loops would not get
unrolled enough -- they could be unrolled more and the resulting loop would be
below the threshold, because we were assuming they'd take
(LoopSize * UnrollingFactor) instructions after unrolling, instead of
(((LoopSize-2) * UnrollingFactor)+2) instructions. This fixes that computation.

Details

Committed
hfinkelJan 9 2015, 4:30 PM
Parents
rL225564: [TestInferiorAssert] Differentiate DWARF and DSYM tests with suffixes.
Branches
Unknown
Tags
Unknown