diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-05-19 07:11:37 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-05-19 07:11:37 +0000 |
commit | 07a737f333f0d4352984664c1ab6d344f6e2c88c (patch) | |
tree | eb76c88033453d389b51706d4861488d574dcaf2 /gcc/cfgcleanup.c | |
parent | 72d19505eef64d2d9c37d8aabf1fffb3267d5d0e (diff) | |
download | gcc-07a737f333f0d4352984664c1ab6d344f6e2c88c.zip gcc-07a737f333f0d4352984664c1ab6d344f6e2c88c.tar.gz gcc-07a737f333f0d4352984664c1ab6d344f6e2c88c.tar.bz2 |
bitmap.c (bitmap_set_range): Handle count==1 specially.
gcc/
* bitmap.c (bitmap_set_range): Handle count==1 specially.
(bitmap_clear_range): Likewise.
* cfgcleanup.c (mark_effect): Use bitmap_clear_range and
bitmap_set_range unconditionally.
* df-problems.c (df_simulate_one_insn_forwards): Likewise.
* df-scan.c (df_mark_reg): Likewise.
* haifa-sched.c (setup_ref_regs): Likewise.
* sched-rgn.c (update_live_1): Likewise.
From-SVN: r223344
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 0a6766b..cd12b50 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -222,22 +222,15 @@ try_simplify_condjump (basic_block cbranch_block) static bool mark_effect (rtx exp, regset nonequal) { - int regno; rtx dest; switch (GET_CODE (exp)) { /* In case we do clobber the register, mark it as equal, as we know the value is dead so it don't have to match. */ case CLOBBER: - if (REG_P (XEXP (exp, 0))) - { - dest = XEXP (exp, 0); - regno = REGNO (dest); - if (HARD_REGISTER_NUM_P (regno)) - bitmap_clear_range (nonequal, regno, REG_NREGS (dest)); - else - bitmap_clear_bit (nonequal, regno); - } + dest = XEXP (exp, 0); + if (REG_P (dest)) + bitmap_clear_range (nonequal, REGNO (dest), REG_NREGS (dest)); return false; case SET: @@ -248,11 +241,7 @@ mark_effect (rtx exp, regset nonequal) return false; if (!REG_P (dest)) return true; - regno = REGNO (dest); - if (HARD_REGISTER_NUM_P (regno)) - bitmap_set_range (nonequal, regno, REG_NREGS (dest)); - else - bitmap_set_bit (nonequal, regno); + bitmap_set_range (nonequal, REGNO (dest), REG_NREGS (dest)); return false; default: |