Patchwork [23/27] Add more ira stuff to target structures

login
register
mail settings
Submitter Richard Sandiford
Date July 7, 2010, 9:29 p.m.
Message ID <87bpajrnff.fsf@firetop.home>
Download mbox | patch
Permalink /patch/58190/
State New
Headers show

Comments

Richard Sandiford - July 7, 2010, 9:29 p.m.
Again, this patch adds variables to the target structures that
aren't covered by target_reinit but which are target-dependent.

Richard


gcc/
	* ira-int.h (target_ira_int): Add x_ira_prohibited_mode_move_regs
	and x_ira_prohibited_mode_move_regs_initialized_p.
	(ira_prohibited_mode_move_regs): Redefine as a macro.
	* ira.c (ira_prohibited_mode_move_regs): Delete.
	(ira_prohibited_mode_move_regs_initialized_p): Redefine as a macro.

Patch

Index: gcc/ira-int.h
===================================================================
--- gcc/ira-int.h	2010-07-07 22:17:38.000000000 +0100
+++ gcc/ira-int.h	2010-07-07 22:28:11.000000000 +0100
@@ -823,6 +823,14 @@  struct target_ira_int {
      (excluding the class itself.  Non-allocatable registers are
      excluded from the consideration;.  */
   enum reg_class x_alloc_reg_class_subclasses[N_REG_CLASSES][N_REG_CLASSES];
+
+  /* Array whose values are hard regset of hard registers for which
+     move of the hard register in given mode into itself is
+     prohibited.  */
+  HARD_REG_SET x_ira_prohibited_mode_move_regs[NUM_MACHINE_MODES];
+
+  /* Flag of that the above array has been initialized.  */
+  bool x_ira_prohibited_mode_move_regs_initialized_p;
 };
 
 extern struct target_ira_int default_target_ira_int;
@@ -860,14 +868,11 @@  #define ira_reg_class_super_classes \
   (this_target_ira_int->x_ira_reg_class_super_classes)
 #define ira_reg_class_union \
   (this_target_ira_int->x_ira_reg_class_union)
+#define ira_prohibited_mode_move_regs \
+  (this_target_ira_int->x_ira_prohibited_mode_move_regs)
 
 /* ira.c: */
 
-/* Array whose values are hard regset of hard registers for which
-   move of the hard register in given mode into itself is
-   prohibited.  */
-extern HARD_REG_SET ira_prohibited_mode_move_regs[NUM_MACHINE_MODES];
-
 extern void *ira_allocate (size_t);
 extern void *ira_reallocate (void *, size_t);
 extern void ira_free (void *addr);
Index: gcc/ira.c
===================================================================
--- gcc/ira.c	2010-07-07 22:17:34.000000000 +0100
+++ gcc/ira.c	2010-07-07 22:28:11.000000000 +0100
@@ -1195,14 +1195,8 @@  ira_finish_once (void)
 }
 
 
-
-/* Array whose values are hard regset of hard registers for which
-   move of the hard register in given mode into itself is
-   prohibited.  */
-HARD_REG_SET ira_prohibited_mode_move_regs[NUM_MACHINE_MODES];
-
-/* Flag of that the above array has been initialized.  */
-static bool ira_prohibited_mode_move_regs_initialized_p = false;
+#define ira_prohibited_mode_move_regs_initialized_p \
+  (this_target_ira_int->x_ira_prohibited_mode_move_regs_initialized_p)
 
 /* Set up IRA_PROHIBITED_MODE_MOVE_REGS.  */
 static void