[PATCH] D82439: [ARM] Rearrange SizeReduction when using -Oz

Nicholas Guy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 01:02:15 PDT 2020


NickGuy created this revision.
NickGuy added reviewers: samparker, SjoerdMeijer, dmgreen, olista01.
NickGuy added a project: LLVM.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.

Move the Thumb2SizeReduce pass to before IfConversion when optimising
for minimal code size.
Running the LLVM Test Suite with this change produces a geomean
difference of -0.1% for the size..text metric.

LLVM Test suite results:

Tests: 310
Metric: size..text

Program                                        Initial Modified diff
 test-suite.../Applications/sgefa/sgefa.test    6152    6096    -0.9%
 test-suite...ks/Prolangs-C/agrep/agrep.test    24100   23884   -0.9%
 test-suite.../Benchmarks/Stanford/Perm.test    524     520     -0.8%
 test-suite...rks/FreeBench/mason/mason.test    1232    1224    -0.6%
 test-suite.../Trimaran/enc-rc4/enc-rc4.test    656     652     -0.6%
 test-suite...itBench/uudecode/uudecode.test    664     660     -0.6%
 test-suite...Benchmarks/Stanford/Oscar.test    1344    1336    -0.6%
 test-suite...ks/Shootout/Shootout-hash.test    1360    1352    -0.6%
 test-suite...nch/fourinarow/fourinarow.test    4336    4312    -0.6%
 test-suite...ch/g721/g721encode/encode.test    3816    3796    -0.5%
 test-suite...itBench/uuencode/uuencode.test    796     792     -0.5%
 test-suite.../Benchmarks/Dhrystone/dry.test    820     816     -0.5%
 test-suite...count/automotive-bitcount.test    1824    1816    -0.4%
 test-suite...marks/Olden/bisort/bisort.test    1832    1824    -0.4%
 test-suite...CI_Purple/SMG2000/smg2000.test    89904   89512   -0.4%
 Geomean difference                                             -0.1%

  Initial       Modified        diff

count  310.000000     310.000000     310.000000
mean   19649.870968   19629.354839  -0.000601
std    48795.053450   48742.740588   0.001539
min    292.000000     292.000000    -0.009103
25%    1090.000000    1090.000000   -0.000648
50%    2770.000000    2772.000000    0.000000
75%    10185.000000   10185.000000   0.000000
max    324040.000000  323540.000000  0.003704


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82439

Files:
  llvm/lib/Target/ARM/ARMTargetMachine.cpp
  llvm/test/CodeGen/ARM/t2-shrink-ldrpost.ll
  llvm/test/CodeGen/Thumb2/constant-hoisting.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82439.272726.patch
Type: text/x-patch
Size: 4185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200624/14ee00f9/attachment-0001.bin>


More information about the llvm-commits mailing list