This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[FRV] RFA: Use new rtl iterators in frv_io_handle_use

This is part of a series to remove uses of for_each_rtx from the ports.
As with the first FR-V patch, we can find_all_hard_regs instead.

Tested by making sure there were no code changes for gcc.dg, gcc.c-torture
and g++.dg for frv-elf.  OK to install?


	* config/frv/frv.c (frv_io_handle_use_1): Delete.
	(frv_io_handle_use): Use find_all_hard_regs.

Index: gcc/config/frv/frv.c
--- gcc/config/frv/frv.c	2014-10-25 09:51:23.450865761 +0100
+++ gcc/config/frv/frv.c	2014-10-25 09:51:23.839869228 +0100
@@ -7793,29 +7793,13 @@ frv_io_handle_set (rtx x, const_rtx pat
       CLEAR_HARD_REG_BIT (*set, regno);
-/* A for_each_rtx callback for which DATA points to a HARD_REG_SET.
-   Add every register in *X to the set.  */
-static int
-frv_io_handle_use_1 (rtx *x, void *data)
-  HARD_REG_SET *set = (HARD_REG_SET *) data;
-  unsigned int regno;
-  if (REG_P (*x))
-    FOR_EACH_REGNO (regno, *x)
-      SET_HARD_REG_BIT (*set, regno);
-  return 0;
-/* A note_stores callback that applies frv_io_handle_use_1 to an
-   entire rhs value.  */
+/* A note_uses callback that adds all registers in *X to hard register
+   set *DATA.  */
 static void
 frv_io_handle_use (rtx *x, void *data)
-  for_each_rtx (x, frv_io_handle_use_1, data);
+  find_all_hard_regs (*x, (HARD_REG_SET *) data);
 /* Go through block BB looking for membars to remove.  There are two

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]