diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2012-10-02 19:34:38 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2012-10-02 19:34:38 +0000 |
commit | c9d74da68c27d7af5c5c2edef7f723190ab461d2 (patch) | |
tree | db8ded671097465c0fd2ce2c9d3774344bcda7fc /gcc/ira.h | |
parent | 59a2dfe8d754913ff356c83e1c9a7106a69aad11 (diff) | |
download | gcc-c9d74da68c27d7af5c5c2edef7f723190ab461d2.zip gcc-c9d74da68c27d7af5c5c2edef7f723190ab461d2.tar.gz gcc-c9d74da68c27d7af5c5c2edef7f723190ab461d2.tar.bz2 |
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
Diffstat (limited to 'gcc/ira.h')
-rw-r--r-- | gcc/ira.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |