Pass rtx and index to read-md.c iterator routines
authorRichard Sandiford <richard.sandiford@linaro.org>
Mon, 21 Aug 2017 09:51:14 +0000 (09:51 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 21 Aug 2017 09:51:14 +0000 (09:51 +0000)
commit9f33a5d9acbed950bf446849e9d6968cf22cb9a2
treea9ed53967318f72eaa0abd88f2b9a81fcd2a139e
parent38fbc003332134ef0a04d319fb71b297f67c6988
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.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251219
gcc/ChangeLog
gcc/read-md.h
gcc/read-rtl.c