Elide repeated RTL elements.
authorAndrew Stubbs <ams@codesourcery.com>
Thu, 11 Oct 2018 14:00:20 +0000 (14:00 +0000)
committerAndrew Stubbs <ams@gcc.gnu.org>
Thu, 11 Oct 2018 14:00:20 +0000 (14:00 +0000)
commit2045ae1d3f511717c2a1223148ce63f71800e1dd
treedc74c7785ea195aa9f6861e525f4709cbc23d73e
parentf9f3b77cf5290a8417cfc450b936039c78f6618b
Elide repeated RTL elements.

GCN's 64-lane vectors tend to make RTL dumps very long.  This patch makes them
far more bearable by eliding long sequences of the same element into "repeated"
messages.

This also takes care of reading repeated sequences in the RTL front-end.

There are self tests for both reading and writing.

2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
    Jan Hubicka  <jh@suse.cz>
    Martin Jambor  <mjambor@suse.cz>

gcc/
* print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
the same elements are repeated rather than printing all of them.
* read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
"repeated" elements.
* read-rtl-function.c (test_loading_repeat): New function.
(read_rtl_function_c_tests): Call test_loading_repeat.
* rtl-tests.c (test_dumping_repeat): New function.
(rtl_tests_c_tests): Call test_dumping_repeat.

gcc/testsuite/
* selftests/repeat.rtl: New file.

Co-Authored-By: Jan Hubicka <jh@suse.cz>
Co-Authored-By: Martin Jambor <mjambor@suse.cz>
From-SVN: r265042
gcc/ChangeLog
gcc/print-rtl.c
gcc/read-rtl-function.c
gcc/read-rtl.c
gcc/rtl-tests.c
gcc/testsuite/ChangeLog
gcc/testsuite/selftests/repeat.rtl [new file with mode: 0644]