diff options
author | Michael P. Hayes <michaelh@ongaonga.chch.cri.nz> | 1998-02-02 01:09:04 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-02-01 18:09:04 -0700 |
commit | 7457661d45df0e4a1380adf0d2eb12c31f87ca39 (patch) | |
tree | f6938970d33884a2ae9ce0f58e6156a31894770f | |
parent | 460f50dc1470348f6b74a4e73559d867aae534ee (diff) | |
download | gcc-7457661d45df0e4a1380adf0d2eb12c31f87ca39.zip gcc-7457661d45df0e4a1380adf0d2eb12c31f87ca39.tar.gz gcc-7457661d45df0e4a1380adf0d2eb12c31f87ca39.tar.bz2 |
jump.c (jump_optimize): Allow conditional loading of floating point constants and constants from memory.
* jump.c (jump_optimize): Allow conditional loading of floating point
constants and constants from memory. Reinstalled modified_in_p tests.
From-SVN: r17591
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/jump.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 890853e..4b0b7fe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 2 02:08:04 1998 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz> + + * jump.c (jump_optimize): Allow conditional loading of floating point + constants and constants from memory. Reinstalled modified_in_p tests. + Mon Feb 2 01:38:39 1998 J"orn Rennecke <amylaar@cygnus.co.uk> * loop.c (get_condition): Handle sign-extended constants. @@ -771,6 +771,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && rtx_equal_p (SET_DEST (temp4), temp1) && (GET_CODE (SET_SRC (temp4)) == REG || GET_CODE (SET_SRC (temp4)) == SUBREG + || (GET_CODE (SET_SRC (temp4)) == MEM + && RTX_UNCHANGING_P (SET_SRC (temp4))) || CONSTANT_P (SET_SRC (temp4))) && (REG_NOTES (temp2) == 0 || ((REG_NOTE_KIND (REG_NOTES (temp2)) == REG_EQUAL @@ -907,6 +909,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && rtx_equal_p (SET_DEST (temp4), temp1) && (GET_CODE (SET_SRC (temp4)) == REG || GET_CODE (SET_SRC (temp4)) == SUBREG + || (GET_CODE (SET_SRC (temp4)) == MEM + && RTX_UNCHANGING_P (SET_SRC (temp4))) || CONSTANT_P (SET_SRC (temp4))) && (REG_NOTES (temp3) == 0 || ((REG_NOTE_KIND (REG_NOTES (temp3)) == REG_EQUAL @@ -991,6 +995,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && GET_CODE (SET_SRC (temp1)) != REG && GET_CODE (SET_SRC (temp1)) != SUBREG && GET_CODE (SET_SRC (temp1)) != CONST_INT + && ! modified_in_p (insn, temp) && ! side_effects_p (SET_SRC (temp1)) && ! may_trap_p (SET_SRC (temp1)) && rtx_cost (SET_SRC (temp1), SET) < 10) @@ -1030,11 +1035,13 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && GET_MODE_CLASS (GET_MODE (temp2)) == MODE_INT && (! SMALL_REGISTER_CLASSES || REGNO (temp2) >= FIRST_PSEUDO_REGISTER) + && ! modified_in_p (insn, temp) && ! side_effects_p (SET_SRC (temp1)) && ! may_trap_p (SET_SRC (temp1)) && rtx_cost (SET_SRC (temp1), SET) < 10 && (temp4 = single_set (temp3)) != 0 && rtx_equal_p (SET_DEST (temp4), temp2) + && ! modified_in_p (insn, temp3) && ! side_effects_p (SET_SRC (temp4)) && ! may_trap_p (SET_SRC (temp4)) && rtx_cost (SET_SRC (temp4), SET) < 10) @@ -1087,6 +1094,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && REGNO (temp5) >= FIRST_PSEUDO_REGISTER && REGNO_FIRST_UID (REGNO (temp5)) == INSN_UID (temp) && REGNO_LAST_UID (REGNO (temp5)) == INSN_UID (temp3) + && ! modified_in_p (insn, temp) && ! side_effects_p (SET_SRC (temp1)) && ! may_trap_p (SET_SRC (temp1)) && rtx_cost (SET_SRC (temp1), SET) < 10 @@ -1096,6 +1104,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && (! SMALL_REGISTER_CLASSES || REGNO (temp2) >= FIRST_PSEUDO_REGISTER) && rtx_equal_p (SET_DEST (temp4), temp2) + && ! modified_in_p (insn, temp3) && ! side_effects_p (SET_SRC (temp4)) && ! may_trap_p (SET_SRC (temp4)) && rtx_cost (SET_SRC (temp4), SET) < 10) @@ -1153,9 +1162,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && (! SMALL_REGISTER_CLASSES || REGNO (temp1) >= FIRST_PSEUDO_REGISTER) && (GET_CODE (temp2 = SET_SRC (PATTERN (temp))) == REG + || (GET_CODE (temp2) == MEM && RTX_UNCHANGING_P (temp2)) || GET_CODE (temp2) == SUBREG /* ??? How about floating point constants? */ - || GET_CODE (temp2) == CONST_INT) + || CONSTANT_P (temp2)) /* Allow either form, but prefer the former if both apply. There is no point in using the old value of TEMP1 if it is a register, since cse will alias them. It can |