From c9d74da68c27d7af5c5c2edef7f723190ab461d2 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 2 Oct 2012 19:34:38 +0000 Subject: ira.h (target_ira): Add x_ira_class_singleton. gcc/ * ira.h (target_ira): Add x_ira_class_singleton. (ira_class_singleton): New macro. * ira.c (setup_prohibited_class_mode_regs): Set up ira_class_singleton. * ira-build.c (update_conflict_hard_reg_costs): Use ira_class_singleton to check for classes with a single allocatable register. * ira-lives.c (ira_implicitly_set_insn_hard_regs): Likewise. (single_reg_class): Likewise. When more than one class is specified, check whether they have the same singleton register. (process_single_reg_class_operands): Require single_reg_class to return NO_REGS or a class with a single allocatable register. Obtain that register from ira_class_singleton. From-SVN: r191995 --- gcc/ira.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/ira.h') diff --git a/gcc/ira.h b/gcc/ira.h index d53db4e..6870c4b 100644 --- a/gcc/ira.h +++ b/gcc/ira.h @@ -79,6 +79,10 @@ struct target_ira { class. */ int x_ira_class_hard_regs_num[N_REG_CLASSES]; + /* If class CL has a single allocatable register of mode M, + index [CL][M] gives the number of that register, otherwise it is -1. */ + short x_ira_class_singleton[N_REG_CLASSES][MAX_MACHINE_MODE]; + /* Function specific hard registers can not be used for the register allocation. */ HARD_REG_SET x_ira_no_alloc_regs; @@ -117,6 +121,8 @@ extern struct target_ira *this_target_ira; (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_class_singleton \ + (this_target_ira->x_ira_class_singleton) #define ira_no_alloc_regs \ (this_target_ira->x_ira_no_alloc_regs) -- cgit v1.1