2014-08-22 David Malcolm <dmalcolm@redhat.com>
+ * modulo-sched.c (struct ps_reg_move_info): Strengthen field
+ "insn" from rtx to rtx_insn *.
+ (ps_rtl_insn): Likewise for return type.
+ (doloop_register_get): Likewise for params "head", "tail" and
+ locals "insn", "first_insn_not_to_check".
+ (schedule_reg_move): Likewise for local "this_insn".
+ (schedule_reg_moves): Add a checked cast to rtx_insn * to result
+ of gen_move_insn for now.
+ (reset_sched_times): Strengthen local "insn" from rtx to
+ rtx_insn *.
+ (permute_partial_schedule): Likewise.
+ (duplicate_insns_of_cycles): Likewise for local "u_insn".
+ (dump_insn_location): Likewise for param "insn".
+ (loop_canon_p): Likewise for local "insn".
+ (sms_schedule): Likewise.
+ (print_partial_schedule): Likewise.
+ (ps_has_conflicts): Likewise.
+
+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 **.
/* An instruction that sets NEW_REG to the correct value. The first
move associated with DEF will have an rhs of OLD_REG; later moves
use the result of the previous move. */
- rtx insn;
+ rtx_insn *insn;
};
typedef struct ps_reg_move_info ps_reg_move_info;
/* Return the rtl instruction that is being scheduled by partial schedule
instruction ID, which belongs to schedule PS. */
-static rtx
+static rtx_insn *
ps_rtl_insn (partial_schedule_ptr ps, int id)
{
if (id < ps->g->num_nodes)
more than one occurrence in the loop besides the control part or the
do-loop pattern is not of the form we expect. */
static rtx
-doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail ATTRIBUTE_UNUSED)
+doloop_register_get (rtx_insn *head ATTRIBUTE_UNUSED, rtx_insn *tail ATTRIBUTE_UNUSED)
{
#ifdef HAVE_doloop_end
- rtx reg, condition, insn, first_insn_not_to_check;
+ rtx reg, condition;
+ rtx_insn *insn, *first_insn_not_to_check;
if (!JUMP_P (tail))
return NULL_RTX;
int start, end, c, ii;
sbitmap_iterator sbi;
ps_reg_move_info *move;
- rtx this_insn;
+ rtx_insn *this_insn;
ps_insn_ptr psi;
move = ps_reg_move (ps, i_reg_move);
move->old_reg = old_reg;
move->new_reg = gen_reg_rtx (GET_MODE (prev_reg));
move->num_consecutive_stages = distances[0] && distances[1] ? 2 : 1;
- move->insn = gen_move_insn (move->new_reg, copy_rtx (prev_reg));
+ move->insn = as_a <rtx_insn *> (gen_move_insn (move->new_reg,
+ copy_rtx (prev_reg)));
bitmap_clear (move->uses);
prev_reg = move->new_reg;
if (dump_file)
{
/* Print the scheduling times after the rotation. */
- rtx insn = ps_rtl_insn (ps, u);
+ rtx_insn *insn = ps_rtl_insn (ps, u);
fprintf (dump_file, "crr_insn->node=%d (insn id %d), "
"crr_insn->cycle=%d, min_cycle=%d", u,
for (row = 0; row < ii ; row++)
for (ps_ij = ps->rows[row]; ps_ij; ps_ij = ps_ij->next_in_row)
{
- rtx insn = ps_rtl_insn (ps, ps_ij->id);
+ rtx_insn *insn = ps_rtl_insn (ps, ps_ij->id);
if (PREV_INSN (last) != insn)
{
{
int u = ps_ij->id;
int first_u, last_u;
- rtx u_insn;
+ rtx_insn *u_insn;
/* Do not duplicate any insn which refers to count_reg as it
belongs to the control part.
/* Dump file:line from INSN's location info to dump_file. */
static void
-dump_insn_location (rtx insn)
+dump_insn_location (rtx_insn *insn)
{
if (dump_file && INSN_HAS_LOCATION (insn))
{
{
if (dump_file)
{
- rtx insn = BB_END (loop->header);
+ rtx_insn *insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop many exits");
dump_insn_location (insn);
{
if (dump_file)
{
- rtx insn = BB_END (loop->header);
+ rtx_insn *insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop many BBs.");
dump_insn_location (insn);
static void
sms_schedule (void)
{
- rtx insn;
+ rtx_insn *insn;
ddg_ptr *g_arr, g;
int * node_order;
int maxii, max_asap;
if (dump_file)
{
- rtx insn = BB_END (loop->header);
+ rtx_insn *insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop num: %d", loop->num);
dump_insn_location (insn);
if (dump_file)
{
- rtx insn = BB_END (loop->header);
+ rtx_insn *insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop num: %d", loop->num);
dump_insn_location (insn);
fprintf (dump, "\n[ROW %d ]: ", i);
while (ps_i)
{
- rtx insn = ps_rtl_insn (ps, ps_i->id);
+ rtx_insn *insn = ps_rtl_insn (ps, ps_i->id);
if (JUMP_P (insn))
fprintf (dump, "%d (branch), ", INSN_UID (insn));
crr_insn;
crr_insn = crr_insn->next_in_row)
{
- rtx insn = ps_rtl_insn (ps, crr_insn->id);
+ rtx_insn *insn = ps_rtl_insn (ps, crr_insn->id);
if (!NONDEBUG_INSN_P (insn))
continue;