aboutsummaryrefslogtreecommitdiff
path: root/gcc/ssa.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2001-07-25 14:41:35 +0000
committerJeff Law <law@gcc.gnu.org>2001-07-25 08:41:35 -0600
commitea0eceb16511d7e3e6ab0fb78e6641b8aed4e829 (patch)
treea8ecb42eaa1d2f0ee7770c5362b559a82f891d42 /gcc/ssa.c
parent3237ac18759be515c2836996e6b376d5c457761b (diff)
downloadgcc-ea0eceb16511d7e3e6ab0fb78e6641b8aed4e829.zip
gcc-ea0eceb16511d7e3e6ab0fb78e6641b8aed4e829.tar.gz
gcc-ea0eceb16511d7e3e6ab0fb78e6641b8aed4e829.tar.bz2
ssa.c (rename_insn_1): Do not wrap an assignment to a paradoxical SUBREG inside a SEQUENCE.
* ssa.c (rename_insn_1): Do not wrap an assignment to a paradoxical SUBREG inside a SEQUENCE. Fix minor formatting glitch. From-SVN: r44357
Diffstat (limited to 'gcc/ssa.c')
-rw-r--r--gcc/ssa.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ssa.c b/gcc/ssa.c
index 0aeb920..770ea46 100644
--- a/gcc/ssa.c
+++ b/gcc/ssa.c
@@ -833,6 +833,21 @@ rename_insn_1 (ptr, data)
rtx *destp = &SET_DEST (x);
rtx dest = SET_DEST (x);
+ /* An assignment to a paradoxical SUBREG does not read from
+ the destination operand, and thus does not need to be
+ wrapped into a SEQUENCE when translating into SSA form.
+ We merely strip off the SUBREG and proceed normally for
+ this case. */
+ if (GET_CODE (dest) == SUBREG
+ && (GET_MODE_SIZE (GET_MODE (dest))
+ > GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))))
+ && GET_CODE (SUBREG_REG (dest)) == REG
+ && CONVERT_REGISTER_TO_SSA_P (REGNO (SUBREG_REG (dest))))
+ {
+ destp = &XEXP (dest, 0);
+ dest = XEXP (dest, 0);
+ }
+
/* Some SETs also use the REG specified in their LHS.
These can be detected by the presence of
STRICT_LOW_PART, SUBREG, SIGN_EXTRACT, and ZERO_EXTRACT
@@ -842,11 +857,12 @@ rename_insn_1 (ptr, data)
(sequence [(set (reg foo_1) (reg foo))
(set (subreg (reg foo_1)) ...)])
- FIXME: Much of the time this is too much. For many libcalls,
- paradoxical SUBREGs, etc., the input register is dead. We should
- recognise this in rename_block or here and not make a false
+ FIXME: Much of the time this is too much. For some constructs
+ we know that the output register is strictly an output
+ (paradoxical SUBREGs and some libcalls for example).
+
+ For those cases we are better off not making the false
dependency. */
-
if (GET_CODE (dest) == STRICT_LOW_PART
|| GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == SIGN_EXTRACT
@@ -877,8 +893,8 @@ rename_insn_1 (ptr, data)
context->new_renames = saved_new_renames;
}
}
- else if (GET_CODE (dest) == REG &&
- CONVERT_REGISTER_TO_SSA_P (REGNO (dest)))
+ else if (GET_CODE (dest) == REG
+ && CONVERT_REGISTER_TO_SSA_P (REGNO (dest)))
{
/* We found a genuine set of an interesting register. Tag
it so that we can create a new name for it after we finish