diff options
author | Trevor Saunders <tbsaunde+gcc@tbsaunde.org> | 2015-07-15 14:38:13 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2015-07-15 14:38:13 +0000 |
commit | 6b8068d653b2fc19de7839d64fc6e19dc420dc30 (patch) | |
tree | 17d6c9dac4cfb44b97a64bf9d87934b9eb70eb03 /gcc/gensupport.c | |
parent | 0467e3ebef7688c50fb0141b10c8b5e7e4dbbcdf (diff) | |
download | gcc-6b8068d653b2fc19de7839d64fc6e19dc420dc30.zip gcc-6b8068d653b2fc19de7839d64fc6e19dc420dc30.tar.gz gcc-6b8068d653b2fc19de7839d64fc6e19dc420dc30.tar.bz2 |
remove some usage of expr_list from read_rtx
gcc/ChangeLog:
2015-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* gensupport.c (rtx_handle_directive): Adjust.
* read-rtl.c (apply_iterators): Take vector to add rtxs to
instead of expr list rtx.
(add_define_attr_for_define_subst): Likewise.
(add_define_subst_attr): Likewise.
(read_subst_mapping): Likewise.
(read_rtx): Likewise.
* rtl.h (read_rtx): Adjust.
From-SVN: r225833
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r-- | gcc/gensupport.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 729366c..67ff5ce 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -26,6 +26,7 @@ #include "errors.h" #include "read-md.h" #include "gensupport.h" +#include "vec.h" #define MAX_OPERANDS 40 @@ -2248,11 +2249,14 @@ process_define_subst (void) static void rtx_handle_directive (int lineno, const char *rtx_name) { - rtx queue, x; + auto_vec<rtx, 32> subrtxs; + if (!read_rtx (rtx_name, &subrtxs)) + return; - if (read_rtx (rtx_name, &queue)) - for (x = queue; x; x = XEXP (x, 1)) - process_rtx (XEXP (x, 0), lineno); + rtx x; + unsigned int i; + FOR_EACH_VEC_ELT (subrtxs, i, x) + process_rtx (x, lineno); } /* Comparison function for the mnemonic hash table. */ |