diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-25 14:41:35 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-25 14:41:35 +0000 |
commit | 162d880536958f718925814b009c10cbc147e644 (patch) | |
tree | a8ecb42eaa1d2f0ee7770c5362b559a82f891d42 /gcc/ssa.c | |
parent | 83ec925c6f71fab9848dbf0529a5e3c8b06e5377 (diff) | |
download | gcc-162d880536958f718925814b009c10cbc147e644.tar.gz |
* ssa.c (rename_insn_1): Do not wrap an assignment to a
paradoxical SUBREG inside a SEQUENCE. Fix minor formatting
glitch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44357 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ssa.c')
-rw-r--r-- | gcc/ssa.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ssa.c b/gcc/ssa.c index 0aeb92091f9..770ea46902c 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 |