mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 09:44:57 +08:00
cse.c (canon_hash): Reorder do_not_record test.
* cse.c (canon_hash): Reorder do_not_record test. Always allow pic_offset_table_rtx. From-SVN: r53665
This commit is contained in:
parent
9aa338ece2
commit
1441374bc9
@ -1,3 +1,8 @@
|
|||||||
|
2002-05-20 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* cse.c (canon_hash): Reorder do_not_record test. Always
|
||||||
|
allow pic_offset_table_rtx.
|
||||||
|
|
||||||
2002-05-19 Toon Moene <toon@moene.indiv.nluug.nl>
|
2002-05-19 Toon Moene <toon@moene.indiv.nluug.nl>
|
||||||
|
|
||||||
* optabs.c (expand_cmplxdiv_wide): Use complex_part_zero_p.
|
* optabs.c (expand_cmplxdiv_wide): Use complex_part_zero_p.
|
||||||
|
35
gcc/cse.c
35
gcc/cse.c
@ -2249,10 +2249,11 @@ canon_hash (x, mode)
|
|||||||
case REG:
|
case REG:
|
||||||
{
|
{
|
||||||
unsigned int regno = REGNO (x);
|
unsigned int regno = REGNO (x);
|
||||||
|
bool record;
|
||||||
|
|
||||||
/* On some machines, we can't record any non-fixed hard register,
|
/* On some machines, we can't record any non-fixed hard register,
|
||||||
because extending its life will cause reload problems. We
|
because extending its life will cause reload problems. We
|
||||||
consider ap, fp, and sp to be fixed for this purpose.
|
consider ap, fp, sp, gp to be fixed for this purpose.
|
||||||
|
|
||||||
We also consider CCmode registers to be fixed for this purpose;
|
We also consider CCmode registers to be fixed for this purpose;
|
||||||
failure to do so leads to failure to simplify 0<100 type of
|
failure to do so leads to failure to simplify 0<100 type of
|
||||||
@ -2262,16 +2263,28 @@ canon_hash (x, mode)
|
|||||||
Nor should we record any register that is in a small
|
Nor should we record any register that is in a small
|
||||||
class, as defined by CLASS_LIKELY_SPILLED_P. */
|
class, as defined by CLASS_LIKELY_SPILLED_P. */
|
||||||
|
|
||||||
if (regno < FIRST_PSEUDO_REGISTER
|
if (regno >= FIRST_PSEUDO_REGISTER)
|
||||||
&& (global_regs[regno]
|
record = true;
|
||||||
|| CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (regno))
|
else if (x == frame_pointer_rtx
|
||||||
|| (SMALL_REGISTER_CLASSES
|
|| x == hard_frame_pointer_rtx
|
||||||
&& ! fixed_regs[regno]
|
|| x == arg_pointer_rtx
|
||||||
&& x != frame_pointer_rtx
|
|| x == stack_pointer_rtx
|
||||||
&& x != hard_frame_pointer_rtx
|
|| x == pic_offset_table_rtx)
|
||||||
&& x != arg_pointer_rtx
|
record = true;
|
||||||
&& x != stack_pointer_rtx
|
else if (global_regs[regno])
|
||||||
&& GET_MODE_CLASS (GET_MODE (x)) != MODE_CC)))
|
record = false;
|
||||||
|
else if (fixed_regs[regno])
|
||||||
|
record = true;
|
||||||
|
else if (GET_MODE_CLASS (GET_MODE (x)) == MODE_CC)
|
||||||
|
record = true;
|
||||||
|
else if (SMALL_REGISTER_CLASSES)
|
||||||
|
record = false;
|
||||||
|
else if (CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (regno)))
|
||||||
|
record = false;
|
||||||
|
else
|
||||||
|
record = true;
|
||||||
|
|
||||||
|
if (!record)
|
||||||
{
|
{
|
||||||
do_not_record = 1;
|
do_not_record = 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user