aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Van Artsdalen <jrv@gnu.org>1993-03-16 09:54:12 +0000
committerJames Van Artsdalen <jrv@gnu.org>1993-03-16 09:54:12 +0000
commit9798977501cfeda200514277bec653ec57259c97 (patch)
treeee785720e2673d66fc4acbae111453e812ace1ac
parentad0c9fa19945b1349c9a126e283170bc113ee08a (diff)
downloadgcc-9798977501cfeda200514277bec653ec57259c97.zip
gcc-9798977501cfeda200514277bec653ec57259c97.tar.gz
gcc-9798977501cfeda200514277bec653ec57259c97.tar.bz2
(FIXED_REGNO_P): Pseudos can't be fixed regs.
From-SVN: r3757
-rw-r--r--gcc/cse.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index d170046..f328ef8 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -438,11 +438,13 @@ struct table_elt
but not if it is an overlapping register. */
#ifdef OVERLAPPING_REGNO_P
#define FIXED_REGNO_P(N) \
- (((N) == FRAME_POINTER_REGNUM || fixed_regs[N]) \
+ (((N) == FRAME_POINTER_REGNUM \
+ || ((N) < FIRST_PSEUDO_REGISTER && fixed_regs[N])) \
&& ! OVERLAPPING_REGNO_P ((N)))
#else
#define FIXED_REGNO_P(N) \
- ((N) == FRAME_POINTER_REGNUM || fixed_regs[N])
+ ((N) == FRAME_POINTER_REGNUM \
+ || ((N) < FIRST_PSEUDO_REGISTER && fixed_regs[N]))
#endif
/* Compute cost of X, as stored in the `cost' field of a table_elt. Fixed
@@ -4472,9 +4474,11 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2)
Otherwise, return X, possibly with one or more operands
modified by recursive calls to this function.
- If X is a register whose contents are known, we do NOT
- return those contents. This is because an instruction that
- uses a register is usually faster than one that uses a constant.
+ If X is a register whose contents are known, we may or may not
+ return those contents. An instruction that uses a register is usually
+ faster than one that uses a constant. But on machines with few hard
+ regs, using a register instead of a constant increases register life,
+ hurting register allocation.
INSN is the insn that we may be modifying. If it is 0, make a copy
of X before modifying it. */