diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 19:34:38 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 19:34:38 +0000 |
commit | c259678fdd8088668cb71fe2d6c00920ea24f815 (patch) | |
tree | db8ded671097465c0fd2ce2c9d3774344bcda7fc /gcc/ira-build.c | |
parent | 61e26f31fae6b504f618bed1f6eb41018572ecc3 (diff) | |
download | gcc-c259678fdd8088668cb71fe2d6c00920ea24f815.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191995 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-build.c')
-rw-r--r-- | gcc/ira-build.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ira-build.c b/gcc/ira-build.c index dba1d467ad7..1181813d92b 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -3047,11 +3047,10 @@ update_conflict_hard_reg_costs (void) { reg_class_t aclass = ALLOCNO_CLASS (a); reg_class_t pref = reg_preferred_class (ALLOCNO_REGNO (a)); - - if (reg_class_size[(int) pref] != 1) + int singleton = ira_class_singleton[pref][ALLOCNO_MODE (a)]; + if (singleton < 0) continue; - index = ira_class_hard_reg_index[(int) aclass] - [ira_class_hard_regs[(int) pref][0]]; + index = ira_class_hard_reg_index[(int) aclass][singleton]; if (index < 0) continue; if (ALLOCNO_CONFLICT_HARD_REG_COSTS (a) == NULL |