aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-06-27 13:52:16 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-06-27 13:52:16 -0400
commit54d234208a3cc73dc265529819e21eb9f1bd6b29 (patch)
tree04d8056c51a5f300b5bb5385ab886f284832d2b7 /gcc
parente4600702d9905d357c8efa158bc252b05bbc2e8c (diff)
downloadgcc-54d234208a3cc73dc265529819e21eb9f1bd6b29.zip
gcc-54d234208a3cc73dc265529819e21eb9f1bd6b29.tar.gz
gcc-54d234208a3cc73dc265529819e21eb9f1bd6b29.tar.bz2
*** empty log message ***
From-SVN: r1314
Diffstat (limited to 'gcc')
-rw-r--r--gcc/regclass.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 1c573b5..a219ff9 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -408,18 +408,30 @@ static struct costs op_costs[MAX_RECOG_OPERANDS];
static char *prefclass;
-/* preferred_or_nothing[R] is nonzero if we should put pseudo number R
- in memory if we can't get its preferred class.
+/* altclass[R] is a register class that we should use for allocating
+ pseudo number R if no register in the preferred class is available.
+ If no register in this class is available, memory is preferred.
+
+ It might appear to be more general to have a bitmask of classes here,
+ but since it is recommended that there be a class corresponding to the
+ union of most major pair of classes, that generality is not required.
+
This is available after `regclass' is run. */
-static char *preferred_or_nothing;
+static char *altclass;
-/* Record the depth of loops that we are in, 1 for no loops. */
+/* Record the depth of loops that we are in. */
static int loop_depth;
-void reg_class_record ();
-void record_address_regs ();
+/* Account for the fact that insns within a loop are executed very commonly,
+ but don't keep doing this as loops go too deep. */
+
+static int loop_cost;
+
+static int copy_cost ();
+static void record_reg_classes ();
+static void record_address_regs ();
/* Return the reg_class in which pseudo reg number REGNO is best allocated.