OSDN Git Service

* fold-const.c (fold) <TRUNC_MOD_EXPR>: The transformation "X % -Y"
[pf3gnuchains/gcc-fork.git] / gcc / sched-int.h
index f255b06..8dddc9e 100644 (file)
@@ -1,7 +1,7 @@
 /* Instruction scheduling pass.  This file contains definitions used
    internally in the scheduler.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -20,6 +20,16 @@ along 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_SCHED_INT_H
+#define GCC_SCHED_INT_H
+
+/* For state_t.  */
+#include "insn-attr.h"
+/* For regset_head.  */
+#include "basic-block.h"
+/* For reg_note.  */
+#include "rtl.h"
+
 /* Pointer to data describing the current DFA state.  */
 extern state_t curr_state;
 
@@ -82,9 +92,9 @@ struct deps
      scheduling is done.  */
   rtx sched_before_next_call;
 
-  /* Used to keep post-call psuedo/hard reg movements together with
+  /* Used to keep post-call pseudo/hard reg movements together with
      the call.  */
-  bool in_post_call_group_p;
+  enum { not_post_call, post_call, post_call_initial } in_post_call_group_p;
 
   /* Set to the tail insn of the outermost libcall block.
 
@@ -112,6 +122,9 @@ struct deps
   /* Element N is set for each register that has any nonzero element
      in reg_last[N].{uses,sets,clobbers}.  */
   regset_head reg_last_in_use;
+
+  /* Element N is set for each register that is conditionally set.  */
+  regset_head reg_conditional_sets;
 };
 
 /* This structure holds some state of the current scheduling pass, and
@@ -126,29 +139,29 @@ struct sched_info
   void (*init_ready_list) (struct ready_list *);
   /* Called after taking an insn from the ready list.  Returns nonzero if
      this insn can be scheduled, nonzero if we should silently discard it.  */
-  int (*can_schedule_ready_p) PARAMS ((rtx));
+  int (*can_schedule_ready_p) (rtx);
   /* Return nonzero if there are more insns that should be scheduled.  */
-  int (*schedule_more_p) PARAMS ((void));
+  int (*schedule_more_p) (void);
   /* Called after an insn has all its dependencies resolved.  Return nonzero
      if it should be moved to the ready list or the queue, or zero if we
      should silently discard it.  */
-  int (*new_ready) PARAMS ((rtx));
+  int (*new_ready) (rtx);
   /* Compare priority of two insns.  Return a positive number if the second
      insn is to be preferred for scheduling, and a negative one if the first
      is to be preferred.  Zero if they are equally good.  */
-  int (*rank) PARAMS ((rtx, rtx));
+  int (*rank) (rtx, rtx);
   /* Return a string that contains the insn uid and optionally anything else
      necessary to identify this insn in an output.  It's valid to use a
      static buffer for this.  The ALIGNED parameter should cause the string
      to be formatted so that multiple output lines will line up nicely.  */
-  const char *(*print_insn) PARAMS ((rtx, int));
+  const char *(*print_insn) (rtx, int);
   /* Return nonzero if an insn should be included in priority
      calculations.  */
-  int (*contributes_to_priority) PARAMS ((rtx, rtx));
+  int (*contributes_to_priority) (rtx, rtx);
   /* Called when computing dependencies for a JUMP_INSN.  This function
      should store the set of registers that must be considered as set by
      the jump in the regset.  */
-  void (*compute_jump_reg_dependencies) PARAMS ((rtx, regset));
+  void (*compute_jump_reg_dependencies) (rtx, regset, regset, regset);
 
   /* The boundaries of the set of insns to be scheduled.  */
   rtx prev_head, next_tail;
@@ -164,6 +177,9 @@ struct sched_info
      has completed, e.g. if we're using it to initialize state for successor
      blocks in region scheduling.  */
   unsigned int use_cselib:1;
+
+  /* Maximum priority that has been assigned to an insn.  */
+  int sched_max_insns_priority;
 };
 
 extern struct sched_info *current_sched_info;
@@ -337,15 +353,7 @@ enum INSN_TRAP_CLASS
 #endif
 
 /* Functions in sched-vis.c.  */
-extern void init_target_units (void);
-extern void insn_print_units (rtx);
-extern void init_block_visualization (void);
-extern void print_block_visualization (const char *);
-extern void visualize_scheduled_insns (int);
-extern void visualize_no_unit (rtx);
-extern void visualize_stall_cycles (int);
-extern void visualize_alloc (void);
-extern void visualize_free (void);
+extern void print_insn (char *, rtx, int);
 
 /* Functions in sched-deps.c.  */
 extern int add_dependence (rtx, rtx, enum reg_note);
@@ -372,20 +380,13 @@ extern void restore_line_notes (rtx, rtx);
 extern void rm_redundant_line_notes (void);
 extern void rm_other_notes (rtx, rtx);
 
-extern int insn_issue_delay (rtx);
+extern int insn_cost (rtx, rtx, rtx);
 extern int set_priorities (rtx, rtx);
 
-extern rtx sched_emit_insn (rtx);
 extern void schedule_block (int, int);
 extern void sched_init (FILE *);
 extern void sched_finish (void);
 
 extern void ready_add (struct ready_list *, rtx);
 
-/* The following are exported for the benefit of debugging functions.  It
-   would be nicer to keep them private to haifa-sched.c.  */
-extern int insn_unit (rtx);
-extern int insn_cost (rtx, rtx, rtx);
-extern rtx get_unit_last_insn (int);
-extern int actual_hazard_this_instance (int, int, rtx, int, int);
-extern void print_insn (char *, rtx, int);
+#endif /* GCC_SCHED_INT_H */