/* 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, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GCC.
#include "basic-block.h"
/* For reg_note. */
#include "rtl.h"
+#include "df.h"
/* Pointer to data describing the current DFA state. */
extern state_t curr_state;
void debug_dep_links (dep_link_t);
-/* A list of dep_links. Lists of this type are now used instead of rtx
- LOG_LINKS and alike lists. */
+/* A list of dep_links. */
struct _deps_list
{
dep_link_t first;
parameter. */
void (*fix_recovery_cfg) (int, int, int);
-#ifdef ENABLE_CHECKING
- /* If the second parameter is zero, return nonzero, if block is head of the
- region.
- If the second parameter is nonzero, return nonzero, if block is leaf of
- the region.
- global_live_at_start should not change in region heads and
- global_live_at_end should not change in region leafs due to scheduling. */
- int (*region_head_or_leaf_p) (basic_block, int);
-#endif
-
/* ??? FIXME: should use straight bitfields inside sched_info instead of
this flag field. */
unsigned int flags;
unsigned int fed_by_spec_load : 1;
unsigned int is_load_insn : 1;
- /* Nonzero if priority has been computed already. */
- unsigned int priority_known : 1;
+ /* '> 0' if priority is valid,
+ '== 0' if priority was not yet computed,
+ '< 0' if priority in invalid and should be recomputed. */
+ signed char priority_status;
/* Nonzero if instruction has internal dependence
(e.g. add_dependence was invoked with (insn == elem)). */
};
extern struct haifa_insn_data *h_i_d;
-/* Used only if (current_sched_info->flags & USE_GLAT) != 0.
- These regsets store global_live_at_{start, end} information
- for each basic block. */
-extern regset *glat_start, *glat_end;
/* Accessor macros for h_i_d. There are more in haifa-sched.c and
sched-rgn.c. */
#define CANT_MOVE(insn) (h_i_d[INSN_UID (insn)].cant_move)
#define INSN_DEP_COUNT(INSN) (h_i_d[INSN_UID (INSN)].dep_count)
#define INSN_PRIORITY(INSN) (h_i_d[INSN_UID (INSN)].priority)
-#define INSN_PRIORITY_KNOWN(INSN) (h_i_d[INSN_UID (INSN)].priority_known)
+#define INSN_PRIORITY_STATUS(INSN) (h_i_d[INSN_UID (INSN)].priority_status)
+#define INSN_PRIORITY_KNOWN(INSN) (INSN_PRIORITY_STATUS (INSN) > 0)
#define INSN_REG_WEIGHT(INSN) (h_i_d[INSN_UID (INSN)].reg_weight)
#define HAS_INTERNAL_DEP(INSN) (h_i_d[INSN_UID (INSN)].has_internal_dep)
#define TODO_SPEC(INSN) (h_i_d[INSN_UID (INSN)].todo_spec)
DO_SPECULATION = USE_DEPS_LIST << 1,
SCHED_RGN = DO_SPECULATION << 1,
SCHED_EBB = SCHED_RGN << 1,
- /* Detach register live information from basic block headers.
- This is necessary to invoke functions, that change CFG (e.g. split_edge).
- Requires USE_GLAT. */
- DETACH_LIFE_INFO = SCHED_EBB << 1,
- /* Save register live information from basic block headers to
- glat_{start, end} arrays. */
- USE_GLAT = DETACH_LIFE_INFO << 1
+ /* Scheduler can possible create new basic blocks. Used for assertions. */
+ NEW_BBS = SCHED_EBB << 1
};
enum SPEC_SCHED_FLAGS {
PREFER_NON_CONTROL_SPEC = PREFER_NON_DATA_SPEC << 1
};
-#define NOTE_NOT_BB_P(NOTE) (NOTE_P (NOTE) && (NOTE_LINE_NUMBER (NOTE) \
+#define NOTE_NOT_BB_P(NOTE) (NOTE_P (NOTE) && (NOTE_KIND (NOTE) \
!= NOTE_INSN_BASIC_BLOCK))
extern FILE *sched_dump;
extern void * xrecalloc (void *, size_t, size_t, size_t);
extern void unlink_bb_notes (basic_block, basic_block);
extern void add_block (basic_block, basic_block);
-extern void attach_life_info (void);
extern rtx bb_note (basic_block);
-#ifdef ENABLE_CHECKING
-extern void check_reg_live (bool);
-#endif
-
/* Functions in sched-rgn.c. */
extern void debug_dependencies (rtx, rtx);