diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-12 16:03:01 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-12 16:03:01 +0000 |
commit | 743b56f226d67fc9ec841477c54c4f41864e7e9b (patch) | |
tree | ec5a079bb5b1c897a6de18159bcbfb9865f55713 /gcc/ira-costs.c | |
parent | 82a24a21ae7d542cda1b1dedb64966f251b0945b (diff) | |
download | gcc-743b56f226d67fc9ec841477c54c4f41864e7e9b.tar.gz |
2008-11-12 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r141785
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@141786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-costs.c')
-rw-r--r-- | gcc/ira-costs.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index eade4da4d1c..14d473ed285 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -989,11 +989,14 @@ scan_one_insn (rtx insn) && (note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != NULL_RTX && MEM_P (XEXP (note, 0))) { - COSTS_OF_ALLOCNO (allocno_costs, - ALLOCNO_NUM (ira_curr_regno_allocno_map - [REGNO (SET_DEST (set))]))->mem_cost - -= (ira_memory_move_cost[GET_MODE (SET_DEST (set))][GENERAL_REGS][1] - * frequency); + enum reg_class cl = GENERAL_REGS; + rtx reg = SET_DEST (set); + int num = ALLOCNO_NUM (ira_curr_regno_allocno_map[REGNO (reg)]); + + if (allocno_pref) + cl = allocno_pref[num]; + COSTS_OF_ALLOCNO (allocno_costs, num)->mem_cost + -= ira_memory_move_cost[GET_MODE (reg)][cl][1] * frequency; record_address_regs (GET_MODE (SET_SRC (set)), XEXP (SET_SRC (set), 0), 0, MEM, SCRATCH, frequency * 2); } |