get_ebb_head_tail works with rtx_insn

gcc/
	* 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 *.

From-SVN: r214352
This commit is contained in:
David Malcolm 2014-08-22 18:47:27 +00:00 committed by David Malcolm
parent f172301ff4
commit 52d251b522
8 changed files with 64 additions and 32 deletions

View File

@ -1,3 +1,33 @@
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"

View File

@ -11094,7 +11094,7 @@ find_insn_regmode_weight (rtx insn, enum machine_mode mode)
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);

View File

@ -507,7 +507,7 @@ build_intra_loop_deps (ddg_ptr g)
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 ();

View File

@ -4738,12 +4738,13 @@ resolve_dependencies (rtx insn)
/* 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. */
@ -4756,7 +4757,7 @@ get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp)
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;
@ -4794,7 +4795,7 @@ get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp)
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;

View File

@ -392,17 +392,17 @@ doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail ATTRIBUTE_UNUSED)
/* 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);
@ -418,10 +418,10 @@ const_iteration_count (rtx count_reg, basic_block pre_header,
return insn;
}
return NULL_RTX;
return NULL;
}
return NULL_RTX;
return NULL;
}
/* A very simple resource-based lower bound on the initiation interval.
@ -1211,7 +1211,7 @@ loop_single_full_bb_p (struct loop *loop)
for (i = 0; i < loop->num_nodes ; i++)
{
rtx head, tail;
rtx_insn *head, *tail;
bool empty_bb = true;
if (bbs[i] == loop->header)
@ -1398,7 +1398,7 @@ sms_schedule (void)
indexed by the loop index. */
FOR_EACH_LOOP (loop, 0)
{
rtx head, tail;
rtx_insn *head, *tail;
rtx count_reg;
/* For debugging. */
@ -1536,7 +1536,7 @@ sms_schedule (void)
/* 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;

View File

@ -1342,7 +1342,8 @@ extern void finish_live_range_shrinkage (void);
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);

View File

@ -2140,9 +2140,9 @@ init_ready_list (void)
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);
@ -2721,7 +2721,7 @@ propagate_deps (int bb, struct deps_desc *pred_deps)
static void
compute_block_dependences (int bb)
{
rtx head, tail;
rtx_insn *head, *tail;
struct deps_desc tmp_deps;
tmp_deps = bb_deps[bb];
@ -2750,8 +2750,8 @@ compute_block_dependences (int 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);
@ -2793,7 +2793,7 @@ debug_rgn_dependencies (int from_bb)
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",
@ -2894,7 +2894,7 @@ free_rgn_deps (void)
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);
@ -2914,7 +2914,7 @@ compute_priorities (void)
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);
@ -3025,7 +3025,7 @@ schedule_region (int rgn)
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);
@ -3045,7 +3045,7 @@ schedule_region (int rgn)
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);

View File

@ -7024,7 +7024,7 @@ simplify_changed_insns (void)
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: ");