+2014-09-05 David Malcolm <dmalcolm@redhat.com>
+
+ * haifa-sched.c (check_clobbered_conditions): Strengthen local
+ "link" from rtx to rtx_insn_list *, and use its methods for
+ clarity and type-safety.
+ (toggle_cancelled_flags): Likewise.
+ (restore_last_backtrack_point): Likewise.
+ (queue_to_ready): Use insn method of "link" in one place.
+ (schedule_block): Strengthen local "link" from rtx to
+ rtx_insn_list *, and use its methods for clarity and type-safety.
+
2014-09-05 David Malcolm <dmalcolm@redhat.com>
* sched-deps.c (sched_get_condition_with_rev_uncached): Strengthen
}
for (i = 0; i <= max_insn_queue_index; i++)
{
- rtx link;
+ rtx_insn_list *link;
int q = NEXT_Q_AFTER (q_ptr, i);
restart_queue:
- for (link = insn_queue[q]; link; link = XEXP (link, 1))
+ for (link = insn_queue[q]; link; link = link->next ())
{
- rtx_insn *x = as_a <rtx_insn *> (XEXP (link, 0));
+ rtx_insn *x = link->insn ();
if (TODO_SPEC (x) == DEP_CONTROL && cond_clobbered_p (x, t))
{
queue_remove (x);
for (i = 0; i <= max_insn_queue_index; i++)
{
int q = NEXT_Q_AFTER (q_ptr, i);
- rtx link;
- for (link = insn_queue[q]; link; link = XEXP (link, 1))
+ rtx_insn_list *link;
+ for (link = insn_queue[q]; link; link = link->next ())
{
- rtx insn = XEXP (link, 0);
+ rtx_insn *insn = link->insn ();
FOR_EACH_DEP (insn, SD_LIST_BACK, sd_it, dep)
if (!DEBUG_INSN_P (DEP_PRO (dep)))
{
static void
restore_last_backtrack_point (struct sched_block_state *psched_block)
{
- rtx link;
int i;
struct haifa_saved_data *save = backtrack_queue;
{
int q = NEXT_Q_AFTER (q_ptr, i);
- for (link = insn_queue[q]; link; link = XEXP (link, 1))
+ for (rtx_insn_list *link = insn_queue[q]; link; link = link->next ())
{
- rtx_insn *x = as_a <rtx_insn *> (XEXP (link, 0));
+ rtx_insn *x = link->insn ();
QUEUE_INDEX (x) = QUEUE_NOWHERE;
INSN_TICK (x) = INVALID_TICK;
}
insn_queue[q] = save->insn_queue[q];
- for (link = insn_queue[q]; link; link = XEXP (link, 1))
+ for (rtx_insn_list *link = insn_queue[q]; link; link = link->next ())
{
- rtx_insn *x = as_a <rtx_insn *> (XEXP (link, 0));
+ rtx_insn *x = link->insn ();
QUEUE_INDEX (x) = i;
TODO_SPEC (x) = recompute_todo_spec (x, true);
INSN_TICK (x) = save->clock_var + i;
{
for (; link; link = link->next ())
{
- insn = as_a <rtx_insn *> (XEXP (link, 0));
+ insn = link->insn ();
q_size -= 1;
if (sched_verbose >= 2)
if (q_size)
for (i = 0; i <= max_insn_queue_index; i++)
{
- rtx link;
- for (link = insn_queue[i]; link; link = XEXP (link, 1))
+ rtx_insn_list *link;
+ for (link = insn_queue[i]; link; link = link->next ())
{
rtx_insn *x;
- x = as_a <rtx_insn *> (XEXP (link, 0));
+ x = link->insn ();
QUEUE_INDEX (x) = QUEUE_NOWHERE;
TODO_SPEC (x) = HARD_DEP;
}