OSDN Git Service

2004-11-04 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / ra.h
index a746d91..9bcc6f5 100644 (file)
--- a/gcc/ra.h
+++ b/gcc/ra.h
@@ -1,5 +1,5 @@
 /* Graph coloring register allocator
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Michael Matz <matz@suse.de>
    and Daniel Berlin <dan@cgsoftware.com>.
 
    with GCC; see the file COPYING.  If not, write to the Free Software
    Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#ifndef GCC_RA_H
+#define GCC_RA_H
+
+#include "bitmap.h"
+#include "sbitmap.h"
+#include "hard-reg-set.h"
+#include "insn-modes.h"
+
 /* Double linked list to implement the per-type lists of webs
    and moves.  */
 struct dlist
@@ -35,7 +43,7 @@ struct dlist
 #define DLIST_MOVE(l) ((l)->value.move)
 
 /* Classification of a given node (i.e. what state it's in).  */
-enum node_type
+enum ra_node_type
 {
   INITIAL = 0, FREE,
   PRECOLORED,
@@ -206,7 +214,7 @@ struct web
   unsigned int have_orig_conflicts:1;
 
   /* Current state of the node.  */
-  ENUM_BITFIELD(node_type) type:5;
+  ENUM_BITFIELD(ra_node_type) type:5;
 
   /* A regclass, combined from preferred and alternate class, or calculated
      from usable_regs.  Used only for debugging, and to determine
@@ -495,6 +503,9 @@ extern HARD_REG_SET never_use_colors;
 extern HARD_REG_SET usable_regs[N_REG_CLASSES];
 /* For each class C the count of hardregs in usable_regs[C].  */
 extern unsigned int num_free_regs[N_REG_CLASSES];
+/* For each class C which has num_free_regs[C]==1, the color of the
+   single register in that class, -1 otherwise.  */
+extern int single_reg_in_regclass[N_REG_CLASSES];
 /* For each mode M the hardregs, which are MODE_OK for M, and have
    enough space behind them to hold an M value.  Additionally
    if reg R is OK for mode M, but it needs two hardregs, then R+1 will
@@ -615,7 +626,7 @@ extern struct dlist * pop_list (struct dlist **);
 extern void record_conflict (struct web *, struct web *);
 extern int memref_is_stack_slot (rtx);
 extern void build_i_graph (struct df *);
-extern void put_web (struct web *, enum node_type);
+extern void put_web (struct web *, enum ra_node_type);
 extern void remove_web_from_list (struct web *);
 extern void reset_lists (void);
 extern struct web * alias (struct web *);
@@ -627,3 +638,5 @@ extern void emit_colors (struct df *);
 extern void delete_moves (void);
 extern void setup_renumber (int);
 extern void remove_suspicious_death_notes (void);
+
+#endif /* GCC_RA_H */