diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-14 15:08:54 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-03-14 15:08:54 +0000 |
commit | e947f9c35eee2d8d464201a684f0144f33817a57 (patch) | |
tree | fa0721d7527c8d8af0cd822d4a28519e071f5320 /gcc/lra-lives.c | |
parent | 74201dc2e07c65ff621f8c319fa25f31b5770067 (diff) | |
download | gcc-e947f9c35eee2d8d464201a684f0144f33817a57.tar.gz |
LRA: identify biggest access mode for hard_regs and use it in split_reg
PR target/70083
* lra-lives.c (process_bb_lives): Also update biggest mode for hard
regs.
(lra_create_live_ranges_1): initialize hard register biggest_mode to
VOIDmode.
* lra-constraints.c (split_reg): For hard regs, try to find the
biggest single-register mode used in the function.
testsuite/
PR target/70083
* gcc.dg/torture/pr70083.c: New test.
* gcc.target/i386/pr70083.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-lives.c')
-rw-r--r-- | gcc/lra-lives.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index 67dda47df2a..8811198cfd3 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -700,12 +700,13 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p) /* Update max ref width and hard reg usage. */ for (reg = curr_id->regs; reg != NULL; reg = reg->next) - if (reg->regno >= FIRST_PSEUDO_REGISTER - && (GET_MODE_SIZE (reg->biggest_mode) - > GET_MODE_SIZE (lra_reg_info[reg->regno].biggest_mode))) - lra_reg_info[reg->regno].biggest_mode = reg->biggest_mode; - else if (reg->regno < FIRST_PSEUDO_REGISTER) - lra_hard_reg_usage[reg->regno] += freq; + { + if (GET_MODE_SIZE (reg->biggest_mode) + > GET_MODE_SIZE (lra_reg_info[reg->regno].biggest_mode)) + lra_reg_info[reg->regno].biggest_mode = reg->biggest_mode; + if (reg->regno < FIRST_PSEUDO_REGISTER) + lra_hard_reg_usage[reg->regno] += freq; + } call_p = CALL_P (curr_insn); src_regno = (set != NULL_RTX && REG_P (SET_SRC (set)) @@ -1208,7 +1209,7 @@ lra_create_live_ranges_1 (bool all_p, bool dead_insn_p) conservative because of recent transformation. Here in this file we recalculate it again as it costs practically nothing. */ - if (regno_reg_rtx[i] != NULL_RTX) + if (i >= FIRST_PSEUDO_REGISTER && regno_reg_rtx[i] != NULL_RTX) lra_reg_info[i].biggest_mode = GET_MODE (regno_reg_rtx[i]); else lra_reg_info[i].biggest_mode = VOIDmode; |