Pass rtx and index to read-md.c iterator routines
commit0fdb6b5dc4ca1238ba719cbea52a92efb215cdb5
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Aug 2017 09:51:14 +0000 (21 09:51 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Aug 2017 09:51:14 +0000 (21 09:51 +0000)
treea9ed53967318f72eaa0abd88f2b9a81fcd2a139e
parent4397eb6811e531e0ba44598edba3fe5047b2b9e9
Pass rtx and index to read-md.c iterator routines

The read-md.c iterator callbacks previously used a void * to record the
position at which the iterator value should be installed.  This doesn't
scale easily to the SUBREG_BYTE representation used by a later patch,
so this patch replaces the void * with both an rtx and an operand
number.  The operand number is ignored for modes and codes.

2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* read-md.h (md_reader::record_potential_iterator_use): Replace
pointer argument with an rtx and an index.
* read-rtl.c (iterator_group::apply_iterator): Likewise.
(apply_mode_iterator): Likewise.
(apply_code_iterator): Likewise.
(apply_int_iterator): Likewise.
(apply_subst_iterator): Likewise.
(record_iterator_use): Likewise.
(record_attribute_use): Likewise.
(md_reader::record_potential_iterator_use): Likewise.  Update calls
to record_iterator_use and apply_iterator.
(iterator_use): Replace ptr with x and index.
(attribute_use): Likewise.
(apply_attribute_uses): Update calls to apply_iterator.
(apply_iterators): Likewise.  Update initialization of iterator_use.
(rtx_reader::read_rtx_code): Update calls to record_iterator_use
and record_potential_iterator_use.
(rtx_reader::read_rtx_operand): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251219 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/read-md.h
gcc/read-rtl.c