/* Instruction scheduling pass. This file contains definitions used
internally in the scheduler.
- Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GCC.
/* For state_t. */
#include "insn-attr.h"
-/* For regset_head. */
+#include "regset.h"
#include "basic-block.h"
/* For reg_note. */
#include "rtl.h"
/* Insn, which has been scheduled last on this fence. */
rtx last_scheduled_insn;
+ /* The last value of can_issue_more variable on this fence. */
+ int issue_more;
+
/* If non-NULL force the next scheduled insn to be SCHED_NEXT. */
rtx sched_next;
#define FENCE_DC(F) ((F)->dc)
#define FENCE_TC(F) ((F)->tc)
#define FENCE_LAST_SCHEDULED_INSN(F) ((F)->last_scheduled_insn)
+#define FENCE_ISSUE_MORE(F) ((F)->issue_more)
#define FENCE_EXECUTING_INSNS(F) ((F)->executing_insns)
#define FENCE_READY_TICKS(F) ((F)->ready_ticks)
#define FENCE_READY_TICKS_SIZE(F) ((F)->ready_ticks_size)
bitmap found_deps;
/* An INSN_UID bit is set when this is a bookkeeping insn generated from
- a parent with this uid. */
+ a parent with this uid. If a parent is a bookkeeping copy, all its
+ originators are transitively included in this set. */
bitmap originators;
/* A hashtable caching the result of insn transformations through this one. */
htab_t transformed_insns;
/* A context incapsulating this insn. */
- struct deps deps_context;
+ struct deps_desc deps_context;
/* This field is initialized at the beginning of scheduling and is used
to handle sched group instructions. If it is non-null, then it points
/* Traverse all loop headers. */
for (i = 0; VEC_iterate (edge, exits, i, e); i++)
- if (in_current_region_p (e->dest))
+ if (in_current_region_p (e->dest)
+ || inner_loop_header_p (e->dest))
{
VEC(edge, heap) *next_exits = get_all_loop_exits (e->dest);
extern expr_t av_set_element (av_set_t, int);
extern void av_set_substract_cond_branches (av_set_t *);
extern void av_set_split_usefulness (av_set_t, int, int);
-extern void av_set_intersect (av_set_t *, av_set_t);
+extern void av_set_code_motion_filter (av_set_t *, av_set_t);
extern void sel_save_haifa_priorities (void);
extern void sel_finish_global_and_expr (void);
extern regset compute_live (insn_t);
+extern bool register_unavailable_p (regset, rtx);
/* Dependence analysis functions. */
extern void sel_clear_has_dependence (void);
extern bool bb_header_p (insn_t);
extern void sel_init_invalid_data_sets (insn_t);
extern bool insn_at_boundary_p (insn_t);
-extern bool jump_leads_only_to_bb_p (insn_t, basic_block);
/* Basic block and CFG functions. */
extern bool in_current_region_p (basic_block);
extern basic_block fallthru_bb_of_jump (rtx);
-extern void sel_init_bbs (bb_vec_t, basic_block);
+extern void sel_init_bbs (bb_vec_t);
extern void sel_finish_bbs (void);
extern struct succs_info * compute_succs_info (insn_t, short);
extern bool tidy_control_flow (basic_block, bool);
extern void free_bb_note_pool (void);
-extern void sel_remove_empty_bb (basic_block, bool, bool);
-extern bool maybe_tidy_empty_bb (basic_block bb);
+extern void purge_empty_blocks (void);
extern basic_block sel_split_edge (edge);
extern basic_block sel_create_recovery_block (insn_t);
-extern void sel_merge_blocks (basic_block, basic_block);
-extern void sel_redirect_edge_and_branch (edge, basic_block);
+extern bool sel_redirect_edge_and_branch (edge, basic_block);
extern void sel_redirect_edge_and_branch_force (edge, basic_block);
extern void sel_init_pipelining (void);
extern void sel_finish_pipelining (void);
extern loop_p get_loop_nest_for_rgn (unsigned int);
extern bool considered_for_pipelining_p (struct loop *);
extern void make_region_from_loop_preheader (VEC(basic_block, heap) **);
-extern void sel_add_loop_preheaders (void);
+extern void sel_add_loop_preheaders (bb_vec_t *);
extern bool sel_is_loop_preheader_p (basic_block);
extern void clear_outdated_rtx_info (basic_block);
extern void free_data_sets (basic_block);