diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-27 22:25:36 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-27 22:25:36 +0000 |
commit | 9680c84645b5b058a2d00533e064ff6d9666f5b1 (patch) | |
tree | d0ee34c1b25d930f18a8d86229603462b5336bcc /gcc/jump.c | |
parent | 0e4d11dfc8b6d80624a799ab2f2f6c5ada1f457e (diff) | |
download | gcc-9680c84645b5b058a2d00533e064ff6d9666f5b1.tar.gz |
2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
* jump.c (rtx_renumbered_equal_p): Use subreg_get_info.
(true_regnum): Likewise.
* rtlanal.c (subreg_info): Moved to ...
* rtl.h (subreg_info): Here. New.
(subreg_get_info): New.
* rtlanal.c (subreg_get_info): Make it extern.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145134 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/jump.c')
-rw-r--r-- | gcc/jump.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/gcc/jump.c b/gcc/jump.c index 2b9a9545223..1189f812fef 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1536,6 +1536,7 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y) { int reg_x = -1, reg_y = -1; int byte_x = 0, byte_y = 0; + struct subreg_info info; if (GET_MODE (x) != GET_MODE (y)) return 0; @@ -1552,15 +1553,12 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y) if (reg_renumber[reg_x] >= 0) { - if (!subreg_offset_representable_p (reg_renumber[reg_x], - GET_MODE (SUBREG_REG (x)), - byte_x, - GET_MODE (x))) + subreg_get_info (reg_renumber[reg_x], + GET_MODE (SUBREG_REG (x)), byte_x, + GET_MODE (x), &info); + if (!info.representable_p) return 0; - reg_x = subreg_regno_offset (reg_renumber[reg_x], - GET_MODE (SUBREG_REG (x)), - byte_x, - GET_MODE (x)); + reg_x = info.offset; byte_x = 0; } } @@ -1578,15 +1576,12 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y) if (reg_renumber[reg_y] >= 0) { - if (!subreg_offset_representable_p (reg_renumber[reg_y], - GET_MODE (SUBREG_REG (y)), - byte_y, - GET_MODE (y))) + subreg_get_info (reg_renumber[reg_y], + GET_MODE (SUBREG_REG (y)), byte_y, + GET_MODE (y), &info); + if (!info.representable_p) return 0; - reg_y = subreg_regno_offset (reg_renumber[reg_y], - GET_MODE (SUBREG_REG (y)), - byte_y, - GET_MODE (y)); + reg_y = info.offset; byte_y = 0; } } @@ -1728,13 +1723,17 @@ true_regnum (const_rtx x) { int base = true_regnum (SUBREG_REG (x)); if (base >= 0 - && base < FIRST_PSEUDO_REGISTER - && subreg_offset_representable_p (REGNO (SUBREG_REG (x)), - GET_MODE (SUBREG_REG (x)), - SUBREG_BYTE (x), GET_MODE (x))) - return base + subreg_regno_offset (REGNO (SUBREG_REG (x)), - GET_MODE (SUBREG_REG (x)), - SUBREG_BYTE (x), GET_MODE (x)); + && base < FIRST_PSEUDO_REGISTER) + { + struct subreg_info info; + + subreg_get_info (REGNO (SUBREG_REG (x)), + GET_MODE (SUBREG_REG (x)), + SUBREG_BYTE (x), GET_MODE (x), &info); + + if (info.representable_p) + return base + info.offset; + } } return -1; } |