cris: Add new pass eliminating compares after delay-slot-filling
authorHans-Peter Nilsson <hp@axis.com>
Sun, 12 Jul 2020 16:41:25 +0000 (18:41 +0200)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 13 Jul 2020 08:14:40 +0000 (10:14 +0200)
commit9a2ae08b02d185a11e3e525e100ba637ce81c7ff
tree7e98f9dd3d9cee797158c3957bdee30cdd163b31
parent881fb2091cf0609f7a6e3454a3b6f23062943b7e
cris: Add new pass eliminating compares after delay-slot-filling

Delayed-branch-slot-filling a.k.a. reorg or dbr, often causes
opportunities for more compare-elimination than were visible for
the cmpelim pass.  With cc0, these were caught by the
elimination pass run in "final", thus the missed opportunities
is a regression.  A simple reorg-aware pass run just after reorg
handles most of them, if not all.  I chose to keep the "mach2"
pass identifier string I copy-pasted from the SPARC port instead
of inventing one like "postdbr_cmpelim".  Note the gap in numbers
in the test-case file names.

gcc:
PR target/93372
* config/cris/cris-passes.def: New file.
* config/cris/t-cris (PASSES_EXTRA): Add cris-passes.def.
* config/cris/cris.c: Add infrastructure bits and pass execute
function cris_postdbr_cmpelim.
* config/cris/cris-protos.h (make_pass_cris_postdbr_cmpelim): Declare.

gcc/testsuite:
* gcc.target/cris/pr93372-44.c, gcc.target/cris/pr93372-46.c: New.
gcc/config/cris/cris-passes.def [new file with mode: 0644]
gcc/config/cris/cris-protos.h
gcc/config/cris/cris.c
gcc/config/cris/t-cris
gcc/testsuite/gcc.target/cris/pr93372-44.c [new file with mode: 0644]
gcc/testsuite/gcc.target/cris/pr93372-46.c [new file with mode: 0644]