+2014-08-22 David Malcolm <dmalcolm@redhat.com>
+
+ * sched-int.h (get_ebb_head_tail): Strengthen params "headp" and
+ "tailp" from rtx * to rtx_insn **.
+
+ * ddg.c (build_intra_loop_deps): Strengthen locals head", "tail"
+ from rtx to rtx_insn *.
+ * haifa-sched.c (get_ebb_head_tail): Strengthen params "headp" and
+ "tailp" from rtx * to rtx_insn **. Strengthen locals "beg_head",
+ "beg_tail", "end_head", "end_tail", "note", "next", "prev" from
+ rtx to rtx_insn *.
+ * modulo-sched.c (const_iteration_count): Strengthen return type
+ and locals "insn", "head", "tail" from rtx to rtx_insn *. Replace
+ use of NULL_RTX with NULL when working with insns.
+ (loop_single_full_bb_p): Strengthen locals "head", "tail" from rtx
+ to rtx_insn *.
+ (sms_schedule): Likewise.
+ * sched-rgn.c (init_ready_list): Likewise, also for locals
+ "src_head" and "src_next_tail".
+ (compute_block_dependences): Likewise.
+ (free_block_dependencies): Likewise.
+ (debug_rgn_dependencies): Likewise.
+ (free_rgn_deps): Likewise.
+ (compute_priorities): Likewise.
+ (schedule_region): Likewise.
+ * sel-sched.c (find_ebb_boundaries): Likewise.
+
+ * config/sh/sh.c (find_insn_regmode_weight): Strengthen locals
+ "insn", "next_tail", "head", "tail" from rtx to rtx_insn *.
+
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* mode-switching.c (struct seginfo): Strengthen field "insn_ptr"
static void
find_regmode_weight (basic_block b, enum machine_mode mode)
{
- rtx insn, next_tail, head, tail;
+ rtx_insn *insn, *next_tail, *head, *tail;
get_ebb_head_tail (b, b, &head, &tail);
next_tail = NEXT_INSN (tail);
int i;
/* Hold the dependency analysis state during dependency calculations. */
struct deps_desc tmp_deps;
- rtx head, tail;
+ rtx_insn *head, *tail;
/* Build the dependence information, using the sched_analyze function. */
init_deps_global ();
/* Return the head and tail pointers of ebb starting at BEG and ending
at END. */
void
-get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp)
+get_ebb_head_tail (basic_block beg, basic_block end,
+ rtx_insn **headp, rtx_insn **tailp)
{
- rtx beg_head = BB_HEAD (beg);
- rtx beg_tail = BB_END (beg);
- rtx end_head = BB_HEAD (end);
- rtx end_tail = BB_END (end);
+ rtx_insn *beg_head = BB_HEAD (beg);
+ rtx_insn * beg_tail = BB_END (beg);
+ rtx_insn * end_head = BB_HEAD (end);
+ rtx_insn * end_tail = BB_END (end);
/* Don't include any notes or labels at the beginning of the BEG
basic block, or notes at the end of the END basic blocks. */
beg_head = NEXT_INSN (beg_head);
else if (DEBUG_INSN_P (beg_head))
{
- rtx note, next;
+ rtx_insn * note, *next;
for (note = NEXT_INSN (beg_head);
note != beg_tail;
end_tail = PREV_INSN (end_tail);
else if (DEBUG_INSN_P (end_tail))
{
- rtx note, prev;
+ rtx_insn * note, *prev;
for (note = PREV_INSN (end_tail);
note != end_head;
/* Check if COUNT_REG is set to a constant in the PRE_HEADER block, so
that the number of iterations is a compile-time constant. If so,
- return the rtx that sets COUNT_REG to a constant, and set COUNT to
+ return the rtx_insn that sets COUNT_REG to a constant, and set COUNT to
this constant. Otherwise return 0. */
-static rtx
+static rtx_insn *
const_iteration_count (rtx count_reg, basic_block pre_header,
int64_t * count)
{
- rtx insn;
- rtx head, tail;
+ rtx_insn *insn;
+ rtx_insn *head, *tail;
if (! pre_header)
- return NULL_RTX;
+ return NULL;
get_ebb_head_tail (pre_header, pre_header, &head, &tail);
return insn;
}
- return NULL_RTX;
+ return NULL;
}
- return NULL_RTX;
+ return NULL;
}
/* A very simple resource-based lower bound on the initiation interval.
for (i = 0; i < loop->num_nodes ; i++)
{
- rtx head, tail;
+ rtx_insn *head, *tail;
bool empty_bb = true;
if (bbs[i] == loop->header)
indexed by the loop index. */
FOR_EACH_LOOP (loop, 0)
{
- rtx head, tail;
+ rtx_insn *head, *tail;
rtx count_reg;
/* For debugging. */
/* We don't want to perform SMS on new loops - created by versioning. */
FOR_EACH_LOOP (loop, 0)
{
- rtx head, tail;
+ rtx_insn *head, *tail;
rtx count_reg, count_init;
int mii, rec_mii, stage_count, min_cycle;
int64_t loop_count = 0;
extern void sched_init_region_reg_pressure_info (void);
extern void free_global_sched_pressure_data (void);
extern int haifa_classify_insn (const_rtx);
-extern void get_ebb_head_tail (basic_block, basic_block, rtx *, rtx *);
+extern void get_ebb_head_tail (basic_block, basic_block,
+ rtx_insn **, rtx_insn **);
extern int no_real_insns_p (const_rtx, const_rtx);
extern int insn_cost (rtx);
for (bb_src = target_bb + 1; bb_src < current_nr_blocks; bb_src++)
if (IS_VALID (bb_src))
{
- rtx src_head;
- rtx src_next_tail;
- rtx tail, head;
+ rtx_insn *src_head;
+ rtx_insn *src_next_tail;
+ rtx_insn *tail, *head;
get_ebb_head_tail (EBB_FIRST_BB (bb_src), EBB_LAST_BB (bb_src),
&head, &tail);
static void
compute_block_dependences (int bb)
{
- rtx head, tail;
+ rtx_insn *head, *tail;
struct deps_desc tmp_deps;
tmp_deps = bb_deps[bb];
static void
free_block_dependencies (int bb)
{
- rtx head;
- rtx tail;
+ rtx_insn *head;
+ rtx_insn *tail;
get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
for (bb = from_bb; bb < current_nr_blocks; bb++)
{
- rtx head, tail;
+ rtx_insn *head, *tail;
get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
fprintf (sched_dump, "\n;; --- Region Dependences --- b %d bb %d \n",
for (bb = 0; bb < current_nr_blocks; bb++)
{
- rtx head, tail;
+ rtx_insn *head, *tail;
gcc_assert (EBB_FIRST_BB (bb) == EBB_LAST_BB (bb));
get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
current_sched_info->sched_max_insns_priority = 0;
for (bb = 0; bb < current_nr_blocks; bb++)
{
- rtx head, tail;
+ rtx_insn *head, *tail;
gcc_assert (EBB_FIRST_BB (bb) == EBB_LAST_BB (bb));
get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
for (bb = 0; bb < current_nr_blocks; bb++)
{
basic_block first_bb, last_bb;
- rtx head, tail;
+ rtx_insn *head, *tail;
first_bb = EBB_FIRST_BB (bb);
last_bb = EBB_LAST_BB (bb);
for (bb = 0; bb < current_nr_blocks; bb++)
{
basic_block first_bb, last_bb, curr_bb;
- rtx head, tail;
+ rtx_insn *head, *tail;
first_bb = EBB_FIRST_BB (bb);
last_bb = EBB_LAST_BB (bb);
static void
find_ebb_boundaries (basic_block bb, bitmap scheduled_blocks)
{
- insn_t head, tail;
+ rtx_insn *head, *tail;
basic_block bb1 = bb;
if (sched_verbose >= 2)
sel_print ("Finishing schedule in bbs: ");