mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 22:50:16 +08:00
* regmove.c (regmove_optimize): Avoid increasing of register pressure.
From-SVN: r49864
This commit is contained in:
parent
419a71d37c
commit
fd973d5630
@ -1,3 +1,7 @@
|
||||
Tue Feb 19 12:37:23 CET 2002 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* regmove.c (regmove_optimize): Avoid increasing of register pressure.
|
||||
|
||||
2002-02-19 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
PR other/5718
|
||||
|
@ -1328,6 +1328,21 @@ regmove_optimize (f, nregs, regmove_dump_file)
|
||||
}
|
||||
src_class = reg_preferred_class (REGNO (src));
|
||||
dst_class = reg_preferred_class (REGNO (dst));
|
||||
|
||||
if (! (src_note = find_reg_note (insn, REG_DEAD, src)))
|
||||
{
|
||||
/* We used to force the copy here like in other cases, but
|
||||
it produces worse code, as it eliminates no copy
|
||||
instructions and the copy emitted will be produced by
|
||||
reload anyway. On patterns with multiple alternatives,
|
||||
there may be better sollution availble.
|
||||
|
||||
In particular this change produced slower code for numeric
|
||||
i387 programs. */
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! regclass_compatible_p (src_class, dst_class))
|
||||
{
|
||||
if (!copy_src)
|
||||
@ -1350,17 +1365,6 @@ regmove_optimize (f, nregs, regmove_dump_file)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! (src_note = find_reg_note (insn, REG_DEAD, src)))
|
||||
{
|
||||
if (!copy_src)
|
||||
{
|
||||
copy_src = src;
|
||||
copy_dst = dst;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
/* If src is set once in a different basic block,
|
||||
and is set equal to a constant, then do not use
|
||||
it for this optimization, as this would make it
|
||||
|
Loading…
Reference in New Issue
Block a user