diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-24 19:47:05 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-24 19:47:05 +0000 |
commit | 3dc77328bc12b3fda1709cb5a6da381b6144fc2c (patch) | |
tree | 8f489fcd2a7911641c9c974bdfda7d1ab77702cc /gcc/flow.c | |
parent | ab5a7d5536558eec88d4f6c8096381c8cb1efbbc (diff) | |
download | gcc-3dc77328bc12b3fda1709cb5a6da381b6144fc2c.tar.gz |
PR rtl-opt/17503
* regclass.c (subregs_of_mode): Turn into an htab. Make static.
(som_hash, som_eq): New.
(init_subregs_of_mode, record_subregs_of_mode): New.
(cannot_change_mode_set_regs): Rewrite for htab implementation.
(invalid_mode_change_p): Likewise.
* combine.c (gen_lowpart_for_combine): Use record_subregs_of_mode.
* flow.c (mark_used_regs): Likewise.
(life_analysis): Use init_subregs_of_mode.
* regs.h (subregs_of_mode): Remove.
* rtl.h (init_subregs_of_mode, record_subregs_of_mode): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gcc/flow.c b/gcc/flow.c index d1e7e2d61c4..02f7ff21505 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -377,7 +377,7 @@ life_analysis (FILE *file, int flags) #ifdef CANNOT_CHANGE_MODE_CLASS if (flags & PROP_REG_INFO) - bitmap_initialize (&subregs_of_mode, 1); + init_subregs_of_mode (); #endif if (! optimize) @@ -3773,12 +3773,8 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) case SUBREG: #ifdef CANNOT_CHANGE_MODE_CLASS - if ((flags & PROP_REG_INFO) - && REG_P (SUBREG_REG (x)) - && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER) - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x)) - * MAX_MACHINE_MODE - + GET_MODE (x)); + if (flags & PROP_REG_INFO) + record_subregs_of_mode (x); #endif /* While we're here, optimize this case. */ @@ -3823,13 +3819,8 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn) || GET_CODE (testreg) == SUBREG) { #ifdef CANNOT_CHANGE_MODE_CLASS - if ((flags & PROP_REG_INFO) - && GET_CODE (testreg) == SUBREG - && REG_P (SUBREG_REG (testreg)) - && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER) - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg)) - * MAX_MACHINE_MODE - + GET_MODE (testreg)); + if ((flags & PROP_REG_INFO) && GET_CODE (testreg) == SUBREG) + record_subregs_of_mode (testreg); #endif /* Modifying a single register in an alternate mode |