diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-22 17:05:45 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-22 17:05:45 +0000 |
commit | da76d746a2652ecac3576986c206d2809333f1b4 (patch) | |
tree | ae7c1364d7c43b17d18ffa127700f450ad7298b3 /gcc | |
parent | 2d7d7f0fe49688f097720cd921ae65921034cd59 (diff) | |
download | gcc-da76d746a2652ecac3576986c206d2809333f1b4.zip gcc-da76d746a2652ecac3576986c206d2809333f1b4.tar.gz gcc-da76d746a2652ecac3576986c206d2809333f1b4.tar.bz2 |
hw-doloop: Use rtx_insn (touches config/bfin/bfin.c)
gcc/
* hw-doloop.h (struct hwloop_info_d): Strengthen fields
"last_insn", "loop_end" from rtx to rtx_insn *.
* hw-doloop.c (scan_loop): Likewise for local "insn".
(discover_loop): Likewise for param "tail_insn".
(discover_loops): Likewise for local "tail".
* config/bfin/bfin.c (hwloop_optimize): For now, add a checked
cast to rtx_insn * when assigning from an rtx local to a
hwloop_info's "last_insn" field.
From-SVN: r214334
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.c | 2 | ||||
-rw-r--r-- | gcc/hw-doloop.c | 6 | ||||
-rw-r--r-- | gcc/hw-doloop.h | 4 |
4 files changed, 19 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 66642ff..1f9ef87 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,18 @@ 2014-08-22 David Malcolm <dmalcolm@redhat.com> + * hw-doloop.h (struct hwloop_info_d): Strengthen fields + "last_insn", "loop_end" from rtx to rtx_insn *. + + * hw-doloop.c (scan_loop): Likewise for local "insn". + (discover_loop): Likewise for param "tail_insn". + (discover_loops): Likewise for local "tail". + + * config/bfin/bfin.c (hwloop_optimize): For now, add a checked + cast to rtx_insn * when assigning from an rtx local to a + hwloop_info's "last_insn" field. + +2014-08-22 David Malcolm <dmalcolm@redhat.com> + * haifa-sched.c (bb_header): Strengthen from rtx * to rtx_insn **. (add_delay_dependencies): Strengthen local "pro" from rtx to rtx_insn *. diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 5800ad5..07edad2 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -3655,7 +3655,7 @@ hwloop_optimize (hwloop_info loop) last_insn = emit_insn_after (gen_forced_nop (), last_insn); } - loop->last_insn = last_insn; + loop->last_insn = safe_as_a <rtx_insn *> (last_insn); /* The loop is good for replacement. */ start_label = loop->start_label; diff --git a/gcc/hw-doloop.c b/gcc/hw-doloop.c index 9ab7e65..131e71d 100644 --- a/gcc/hw-doloop.c +++ b/gcc/hw-doloop.c @@ -94,7 +94,7 @@ scan_loop (hwloop_info loop) for (ix = 0; loop->blocks.iterate (ix, &bb); ix++) { - rtx insn; + rtx_insn *insn; edge e; edge_iterator ei; @@ -232,7 +232,7 @@ add_forwarder_blocks (hwloop_info loop) the expected use; targets that call into this code usually replace the loop counter with a different special register. */ static void -discover_loop (hwloop_info loop, basic_block tail_bb, rtx tail_insn, rtx reg) +discover_loop (hwloop_info loop, basic_block tail_bb, rtx_insn *tail_insn, rtx reg) { bool found_tail; unsigned dwork = 0; @@ -359,7 +359,7 @@ discover_loops (bitmap_obstack *loop_stack, struct hw_doloop_hooks *hooks) structure and add the head block to the work list. */ FOR_EACH_BB_FN (bb, cfun) { - rtx tail = BB_END (bb); + rtx_insn *tail = BB_END (bb); rtx insn, reg; while (tail && NOTE_P (tail) && tail != BB_HEAD (bb)) diff --git a/gcc/hw-doloop.h b/gcc/hw-doloop.h index 9fc3c15..a98f213 100644 --- a/gcc/hw-doloop.h +++ b/gcc/hw-doloop.h @@ -66,10 +66,10 @@ struct GTY (()) hwloop_info_d basic_block successor; /* The last instruction in the tail. */ - rtx last_insn; + rtx_insn *last_insn; /* The loop_end insn. */ - rtx loop_end; + rtx_insn *loop_end; /* The iteration register. */ rtx iter_reg; |