summaryrefslogtreecommitdiff
path: root/gcc/ira.h
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-28 01:53:24 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-28 01:53:24 +0000
commita5af08d26ce1678e462f91bb3fb9336e30d02ca8 (patch)
tree761665b37aeeeb5eb4e3f9b4770772ea49679cc0 /gcc/ira.h
parent24b0a129a158dc3987a676c625817b9b21e9d4e9 (diff)
downloadgcc-a5af08d26ce1678e462f91bb3fb9336e30d02ca8.tar.gz
2011-03-27 Vladimir Makarov <vmakarov@redhat.com>
PR bootstrap/48307 Revert the previous patch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171589 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.h')
-rw-r--r--gcc/ira.h94
1 files changed, 33 insertions, 61 deletions
diff --git a/gcc/ira.h b/gcc/ira.h
index a31a03ca21b..f6cac367180 100644
--- a/gcc/ira.h
+++ b/gcc/ira.h
@@ -20,6 +20,10 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+/* Function specific hard registers can not be used for the register
+ allocation. */
+extern HARD_REG_SET ira_no_alloc_regs;
+
/* True if we have allocno conflicts. It is false for non-optimized
mode or when the conflict table is too big. */
extern bool ira_conflicts_p;
@@ -29,47 +33,31 @@ struct target_ira {
allocation for given classes. */
int x_ira_available_class_regs[N_REG_CLASSES];
- /* Map: hard register number -> allocno class it belongs to. If the
+ /* Map: hard register number -> cover class it belongs to. If the
corresponding class is NO_REGS, the hard register is not available
for allocation. */
- enum reg_class x_ira_hard_regno_allocno_class[FIRST_PSEUDO_REGISTER];
-
- /* Number of allocno classes. Allocno classes are register classes
- which can be used for allocations of allocnos. */
- int x_ira_allocno_classes_num;
-
- /* The array containing allocno classes. Only first
- IRA_ALLOCNO_CLASSES_NUM elements are used for this. */
- enum reg_class x_ira_allocno_classes[N_REG_CLASSES];
-
- /* Map of all register classes to corresponding allocno classes
- containing the given class. If given class is not a subset of an
- allocno class, we translate it into the cheapest allocno class. */
- enum reg_class x_ira_allocno_class_translate[N_REG_CLASSES];
-
- /* Number of pressure classes. Pressure classes are register
- classes for which we calculate register pressure. */
- int x_ira_pressure_classes_num;
+ enum reg_class x_ira_hard_regno_cover_class[FIRST_PSEUDO_REGISTER];
- /* The array containing pressure classes. Only first
- IRA_PRESSURE_CLASSES_NUM elements are used for this. */
- enum reg_class x_ira_pressure_classes[N_REG_CLASSES];
+ /* Number of cover classes. Cover classes is non-intersected register
+ classes containing all hard-registers available for the
+ allocation. */
+ int x_ira_reg_class_cover_size;
- /* Map of all register classes to corresponding pressure classes
- containing the given class. If given class is not a subset of an
- pressure class, we translate it into the cheapest pressure
- class. */
- enum reg_class x_ira_pressure_class_translate[N_REG_CLASSES];
+ /* The array containing cover classes (see also comments for macro
+ IRA_COVER_CLASSES;. Only first IRA_REG_CLASS_COVER_SIZE elements are
+ used for this. */
+ enum reg_class x_ira_reg_class_cover[N_REG_CLASSES];
- /* Bigest pressure register class containing stack registers.
- NO_REGS if there are no stack registers. */
- enum reg_class x_ira_stack_reg_pressure_class;
+ /* Map of all register classes to corresponding cover class containing
+ the given class. If given class is not a subset of a cover class,
+ we translate it into the cheapest cover class. */
+ enum reg_class x_ira_class_translate[N_REG_CLASSES];
- /* Maps: register class x machine mode -> maximal/minimal number of
- hard registers of given class needed to store value of given
- mode. */
- int x_ira_reg_class_max_nregs[N_REG_CLASSES][MAX_MACHINE_MODE];
- int x_ira_reg_class_min_nregs[N_REG_CLASSES][MAX_MACHINE_MODE];
+ /* Map: register class x machine mode -> number of hard registers of
+ given class needed to store value of given mode. If the number for
+ some hard-registers of the register class is different, the size
+ will be negative. */
+ int x_ira_reg_class_nregs[N_REG_CLASSES][MAX_MACHINE_MODE];
/* Array analogous to target hook TARGET_MEMORY_MOVE_COST. */
short x_ira_memory_move_cost[MAX_MACHINE_MODE][N_REG_CLASSES][2];
@@ -82,10 +70,6 @@ struct target_ira {
/* The number of elements of the above array for given register
class. */
int x_ira_class_hard_regs_num[N_REG_CLASSES];
-
- /* Function specific hard registers can not be used for the register
- allocation. */
- HARD_REG_SET x_ira_no_alloc_regs;
};
extern struct target_ira default_target_ira;
@@ -97,34 +81,22 @@ extern struct target_ira *this_target_ira;
#define ira_available_class_regs \
(this_target_ira->x_ira_available_class_regs)
-#define ira_hard_regno_allocno_class \
- (this_target_ira->x_ira_hard_regno_allocno_class)
-#define ira_allocno_classes_num \
- (this_target_ira->x_ira_allocno_classes_num)
-#define ira_allocno_classes \
- (this_target_ira->x_ira_allocno_classes)
-#define ira_allocno_class_translate \
- (this_target_ira->x_ira_allocno_class_translate)
-#define ira_pressure_classes_num \
- (this_target_ira->x_ira_pressure_classes_num)
-#define ira_pressure_classes \
- (this_target_ira->x_ira_pressure_classes)
-#define ira_pressure_class_translate \
- (this_target_ira->x_ira_pressure_class_translate)
-#define ira_stack_reg_pressure_class \
- (this_target_ira->x_ira_stack_reg_pressure_class)
-#define ira_reg_class_max_nregs \
- (this_target_ira->x_ira_reg_class_max_nregs)
-#define ira_reg_class_min_nregs \
- (this_target_ira->x_ira_reg_class_min_nregs)
+#define ira_hard_regno_cover_class \
+ (this_target_ira->x_ira_hard_regno_cover_class)
+#define ira_reg_class_cover_size \
+ (this_target_ira->x_ira_reg_class_cover_size)
+#define ira_reg_class_cover \
+ (this_target_ira->x_ira_reg_class_cover)
+#define ira_class_translate \
+ (this_target_ira->x_ira_class_translate)
+#define ira_reg_class_nregs \
+ (this_target_ira->x_ira_reg_class_nregs)
#define ira_memory_move_cost \
(this_target_ira->x_ira_memory_move_cost)
#define ira_class_hard_regs \
(this_target_ira->x_ira_class_hard_regs)
#define ira_class_hard_regs_num \
(this_target_ira->x_ira_class_hard_regs_num)
-#define ira_no_alloc_regs \
- (this_target_ira->x_ira_no_alloc_regs)
extern void ira_init_once (void);
extern void ira_init (void);