OSDN Git Service

update
[pf3gnuchains/gcc-fork.git] / gcc / reload.h
index 68c59bb..d99b0c1 100644 (file)
@@ -1,5 +1,5 @@
 /* Communication between reload.c and reload1.c.
-   Copyright (C) 1987, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+   Copyright (C) 1987, 91-95, 97, 1998 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -15,7 +15,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 
 /* If secondary reloads are the same for inputs and outputs, define those
@@ -33,11 +34,24 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define HAVE_SECONDARY_RELOADS
 #endif
 
+/* If MEMORY_MOVE_COST isn't defined, give it a default here.  */
+#ifndef MEMORY_MOVE_COST
+#ifdef HAVE_SECONDARY_RELOADS
+#define MEMORY_MOVE_COST(MODE,CLASS,IN) \
+  (4 + memory_move_secondary_cost ((MODE), (CLASS), (IN)))
+#else
+#define MEMORY_MOVE_COST(MODE,CLASS,IN) 4
+#endif
+#endif
+extern int memory_move_secondary_cost PROTO ((enum machine_mode, enum reg_class, int));
+
 /* See reload.c and reload1.c for comments on these variables.  */
 
 /* Maximum number of reloads we can need.  */
 #define MAX_RELOADS (2 * MAX_RECOG_OPERANDS * (MAX_REGS_PER_ADDRESS + 1))
 
+extern enum reg_class reload_address_base_reg_class;
+extern enum reg_class reload_address_index_reg_class;
 extern rtx reload_in[MAX_RELOADS];
 extern rtx reload_out[MAX_RELOADS];
 extern rtx reload_in_reg[MAX_RELOADS];
@@ -45,6 +59,7 @@ extern enum reg_class reload_reg_class[MAX_RELOADS];
 extern enum machine_mode reload_inmode[MAX_RELOADS];
 extern enum machine_mode reload_outmode[MAX_RELOADS];
 extern char reload_optional[MAX_RELOADS];
+extern char reload_nongroup[MAX_RELOADS];
 extern int reload_inc[MAX_RELOADS];
 extern int reload_opnum[MAX_RELOADS];
 extern int reload_secondary_p[MAX_RELOADS];
@@ -67,7 +82,9 @@ extern rtx reload_reg_rtx[MAX_RELOADS];
                                something used before or after the insn
    RELOAD_FOR_INPUT_ADDRESS    reload for parts of the address of an object
                                that is an input reload
-   RELOAD_FOR_OUTPUT_ADDRESS   likewise, for output reload
+   RELOAD_FOR_INPADDR_ADDRESS  reload needed for RELOAD_FOR_INPUT_ADDRESS
+   RELOAD_FOR_OUTPUT_ADDRESS   like RELOAD_FOR INPUT_ADDRESS, for output
+   RELOAD_FOR_OUTADDR_ADDRESS  reload needed for RELOAD_FOR_OUTPUT_ADDRESS
    RELOAD_FOR_OPERAND_ADDRESS  reload for the address of a non-reloaded
                                operand; these don't conflict with
                                any other addresses.
@@ -83,7 +100,8 @@ extern rtx reload_reg_rtx[MAX_RELOADS];
 enum reload_type
 {
   RELOAD_FOR_INPUT, RELOAD_FOR_OUTPUT, RELOAD_FOR_INSN, 
-  RELOAD_FOR_INPUT_ADDRESS, RELOAD_FOR_OUTPUT_ADDRESS,
+  RELOAD_FOR_INPUT_ADDRESS, RELOAD_FOR_INPADDR_ADDRESS,
+  RELOAD_FOR_OUTPUT_ADDRESS, RELOAD_FOR_OUTADDR_ADDRESS,
   RELOAD_FOR_OPERAND_ADDRESS, RELOAD_FOR_OPADDR_ADDR,
   RELOAD_OTHER, RELOAD_FOR_OTHER_ADDRESS
 };
@@ -139,10 +157,8 @@ extern void clear_secondary_mem PROTO((void));
    reload TO.  */
 extern void transfer_replacements PROTO((int, int));
 
-/* Return 1 if ADDR is a valid memory address for mode MODE,
-   and check that each pseudo reg has the proper kind of
-   hard reg.  */
-extern int strict_memory_address_p PROTO((enum machine_mode, rtx));
+/* Remove all replacements in reload FROM.  */
+extern void remove_replacements PROTO((int));
 
 /* Like rtx_equal_p except that it allows a REG and a SUBREG to match
    if they are the same hard reg, and has special hacks for
@@ -175,6 +191,9 @@ extern void subst_reloads PROTO((void));
    the RTL.  */
 extern void copy_replacements PROTO((rtx, rtx));
 
+/* Change any replacements being done to *X to be done to *Y */
+extern void move_replacements PROTO((rtx *x, rtx *y));
+
 /* If LOC was scheduled to be replaced by something, return the replacement.
    Otherwise, return *LOC.  */
 extern rtx find_replacement PROTO((rtx *));
@@ -199,14 +218,17 @@ extern rtx find_equiv_reg PROTO((rtx, rtx, enum reg_class, int, short *,
 /* Return 1 if register REGNO is the subject of a clobber in insn INSN.  */
 extern int regno_clobbered_p PROTO((int, rtx));
 
-
 /* Functions in reload1.c:  */
 
+extern int reloads_conflict            PROTO ((int, int));
+
+int count_occurrences            PROTO((rtx, rtx));
+
 /* Initialize the reload pass once per compilation.  */
 extern void init_reload PROTO((void));
 
 /* The reload pass itself.  */
-extern int reload STDIO_PROTO((rtx, int, FILE *));
+extern int reload PROTO((rtx, int, FILE *));
 
 /* Mark the slots in regs_ever_live for the hard regs
    used by pseudo-reg number REGNO.  */