HomePhabricator

[ARM] Rearrange SizeReduction when using -Oz

Authored by NickGuy on Jun 18 2020, 2:25 AM.

Description

[ARM] Rearrange SizeReduction when using -Oz

Move the Thumb2SizeReduce pass to before IfConversion when optimising
for minimal code size.

Running the Thumb2SizeReduction pass before IfConversionallows T1
instructions to propagate to the final output, rather than the
ifConverter modifying T2 instructions and preventing them from being
reduced later.

This change does introduce a regression regarding execution time, so
it's only applied when optimising for size.

Running the LLVM Test Suite with this change produces a geomean
difference of -0.1% for the size..text metric.

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

Details

Committed
NickGuyJul 2 2020, 1:19 AM
Differential Revision
D82439: [ARM] Rearrange SizeReduction when using -Oz
Parents
rG9e6f19fd8390: Fix missing build dependency on omp_gen.
Branches
Unknown
Tags
Unknown