This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: CPROP and spec2000 slowdown in mid february
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc-patches at gcc dot gnu dot org
- Subject: Re: CPROP and spec2000 slowdown in mid february
- From: Jan Hubicka <jh at suse dot cz>
- Date: Fri, 18 May 2001 11:07:11 +0200
- Cc: jh at suse dot cz
- References: <10105172146.AA00766@vlsi1.ultra.nyu.edu>
> I'd prefer to do this by reversing the two choices: so first try t9
> do the global replace. Then if that fails, try the replace in the
> SET_SRC. Can you see if that fixes the slowdown and passes tests?
Sorry, once again as I've misspeled the address
Fri May 18 10:59:21 CEST 2001 Jan Hubicka <jh@suse.cz>
* gcse.c (try_replace_reg): First try global replace, later try to simplify
the expression.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcse.c,v
retrieving revision 1.130
diff -c -3 -p -r1.130 gcse.c
*** gcse.c 2001/05/11 22:07:58 1.130
--- gcse.c 2001/05/18 08:58:33
*************** try_replace_reg (from, to, insn)
*** 4024,4053 ****
int success = 0;
rtx set = single_set (insn);
/* If this is a single set, try to simplify the source of the set given
our substitution. We could perhaps try this for multiple SETs, but
it probably won't buy us anything. */
! if (set != 0)
{
src = simplify_replace_rtx (SET_SRC (set), from, to);
! /* Try this two ways: first just replace SET_SRC. If that doesn't
! work and this is a PARALLEL, try to replace the whole pattern
! with a new SET. */
! if (validate_change (insn, &SET_SRC (set), src, 0))
! success = 1;
! else if (GET_CODE (PATTERN (insn)) == PARALLEL
! && validate_change (insn, &PATTERN (insn),
! gen_rtx_SET (VOIDmode, SET_DEST (set),
! src),
! 0))
success = 1;
}
- /* Otherwise, try to do a global replacement within the insn. */
- if (!success)
- success = validate_replace_src (from, to, insn);
-
/* If we've failed to do replacement, have a single SET, and don't already
have a note, add a REG_EQUAL note to not lose information. */
if (!success && note == 0 && set != 0)
--- 3997,4016 ----
int success = 0;
rtx set = single_set (insn);
+ success = validate_replace_src (from, to, insn);
+
/* If this is a single set, try to simplify the source of the set given
our substitution. We could perhaps try this for multiple SETs, but
it probably won't buy us anything. */
! if (!success && set != 0)
{
src = simplify_replace_rtx (SET_SRC (set), from, to);
! if (!rtx_equal_p (src, SET_SRC (set))
! && validate_change (insn, &SET_SRC (set), src, 0))
success = 1;
}
/* If we've failed to do replacement, have a single SET, and don't already
have a note, add a REG_EQUAL note to not lose information. */
if (!success && note == 0 && set != 0)