llvm-project/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir
Amara Emerson 946b1246d6 [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only.
Other opcodes shouldn't be CSE'd until we can be sure debug info quality won't
be degraded.

This change also improves the IRTranslator so that in most places, but not all,
it creates constants using the MIRBuilder directly instead of first creating a
new destination vreg and then creating a constant. By doing this, the
buildConstant() method can just return the vreg of an existing G_CONSTANT
instead of having to create a COPY from it.

I measured a 0.2% improvement in compile time and a 0.9% improvement in code
size at -O0 ARM64.

Compile time:
Program                                        base   cse    diff
test-suite...ark/tramp3d-v4/tramp3d-v4.test     9.04   9.12  0.8%
test-suite...Mark/mafft/pairlocalalign.test     2.68   2.66 -0.7%
test-suite...-typeset/consumer-typeset.test     5.53   5.51 -0.4%
test-suite :: CTMark/lencod/lencod.test         5.30   5.28 -0.3%
test-suite :: CTMark/Bullet/bullet.test        25.82  25.76 -0.2%
test-suite...:: CTMark/ClamAV/clamscan.test     6.92   6.90 -0.2%
test-suite...TMark/7zip/7zip-benchmark.test    34.24  34.17 -0.2%
test-suite :: CTMark/SPASS/SPASS.test           6.25   6.24 -0.1%
test-suite...:: CTMark/sqlite3/sqlite3.test     1.66   1.66 -0.1%
test-suite :: CTMark/kimwitu++/kc.test         13.61  13.60 -0.0%
Geomean difference                                          -0.2%

Code size:
Program                                        base     cse      diff
test-suite...-typeset/consumer-typeset.test    1315632  1266480 -3.7%
test-suite...:: CTMark/ClamAV/clamscan.test    1313892  1297508 -1.2%
test-suite :: CTMark/lencod/lencod.test        1439504  1423112 -1.1%
test-suite...TMark/7zip/7zip-benchmark.test    2936980  2904172 -1.1%
test-suite :: CTMark/Bullet/bullet.test        3478276  3445460 -0.9%
test-suite...ark/tramp3d-v4/tramp3d-v4.test    8082868  8033492 -0.6%
test-suite :: CTMark/kimwitu++/kc.test         3870380  3853972 -0.4%
test-suite :: CTMark/SPASS/SPASS.test          1434904  1434896 -0.0%
test-suite...Mark/mafft/pairlocalalign.test    764528   764528   0.0%
test-suite...:: CTMark/sqlite3/sqlite3.test    782092   782092   0.0%
Geomean difference                                              -0.9%

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

llvm-svn: 358369
2019-04-15 05:04:20 +00:00
..
add.ll [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only. 2019-04-15 05:04:20 +00:00
bitwise.ll [MIPS GlobalISel] ClampScalar G_AND G_OR and G_XOR 2018-12-18 11:36:14 +00:00
branch.ll [MIPS GlobalISel] Improve selection of constants 2019-03-15 07:07:50 +00:00
call.ll [MIPS GlobalISel] Add lowerCall 2018-06-06 07:24:52 +00:00
constants.ll [MIPS GlobalISel] Improve selection of constants 2019-03-15 07:07:50 +00:00
float_args.ll [MIPS GlobalISel] Select copy for arguments from FPRBRegBank 2019-03-25 11:38:06 +00:00
float_arithmetic_operations.ll [MIPS GlobalISel] Select floating point arithmetic operations 2019-04-03 14:12:59 +00:00
float_constants.ll [MIPS GlobalISel] Select float constants 2019-03-28 16:58:12 +00:00
global_address.ll [MIPS GlobalISel] Improve selection of constants 2019-03-15 07:07:50 +00:00
icmp.ll RegAllocFast: Remove early selection loop, the spill calculation will report cost 0 anyway for free regs 2019-03-19 19:01:34 +00:00
mul.ll [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only. 2019-04-15 05:04:20 +00:00
phi.ll [MIPS GlobalISel] Improve selection of constants 2019-03-15 07:07:50 +00:00
pointers.ll [MIPS GlobalISel] Lower pointer arguments 2018-07-25 12:35:01 +00:00
rem_and_div.ll [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only. 2019-04-15 05:04:20 +00:00
ret.ll
select.ll RegAllocFast: Remove early selection loop, the spill calculation will report cost 0 anyway for free regs 2019-03-19 19:01:34 +00:00
stack_args.ll RegAllocFast: Remove early selection loop, the spill calculation will report cost 0 anyway for free regs 2019-03-19 19:01:34 +00:00
sub.ll [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only. 2019-04-15 05:04:20 +00:00
truncStore_and_aExtLoad.ll RegAllocFast: Remove early selection loop, the spill calculation will report cost 0 anyway for free regs 2019-03-19 19:01:34 +00:00
zextLoad_and_sextLoad.ll [MIPS GlobalISel] Select zero extending and sign extending load 2019-01-24 10:27:21 +00:00