+2014-08-23 David Malcolm <dmalcolm@redhat.com>
+
+ * store-motion.c (store_killed_in_insn): Strengthen param "insn"
+ from const_rtx to const rtx_insn *.
+ (store_killed_after): Likewise. Strengthen locals "last", "act"
+ from rtx to rtx_insn *.
+ (store_killed_before): Strengthen param "insn" from const_rtx to
+ const rtx_insn *. Strengthen local "first" from rtx to rtx_insn *.
+ (find_moveable_store): Strengthen param "insn" from rtx to
+ rtx_insn *.
+ (compute_store_table): Likewise for local "insn".
+ (insert_insn_start_basic_block): Likewise for param "insn" and
+ locals "prev", "before", "insn".
+ (insert_store): For now, add a checked cast to rtx_insn * on the
+ result of gen_move_insn.
+ (remove_reachable_equiv_notes): Strengthen local "insn" from rtx
+ to rtx_insn *.
+ (replace_store_insn): Likewise. For now, add a checked cast to
+ rtx_insn * on the result of gen_move_insn.
+
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* stmt.c (expand_case): Strengthen local "before_case" from rtx to
after the insn. Return true if it does. */
static bool
-store_killed_in_insn (const_rtx x, const_rtx x_regs, const_rtx insn, int after)
+store_killed_in_insn (const_rtx x, const_rtx x_regs, const rtx_insn *insn, int after)
{
const_rtx reg, note, pat;
is killed, return the last insn in that it occurs in FAIL_INSN. */
static bool
-store_killed_after (const_rtx x, const_rtx x_regs, const_rtx insn, const_basic_block bb,
+store_killed_after (const_rtx x, const_rtx x_regs, const rtx_insn *insn,
+ const_basic_block bb,
int *regs_set_after, rtx *fail_insn)
{
- rtx last = BB_END (bb), act;
+ rtx_insn *last = BB_END (bb), *act;
if (!store_ops_ok (x_regs, regs_set_after))
{
within basic block BB. X_REGS is list of registers mentioned in X.
REGS_SET_BEFORE is bitmap of registers set before or in this insn. */
static bool
-store_killed_before (const_rtx x, const_rtx x_regs, const_rtx insn, const_basic_block bb,
- int *regs_set_before)
+store_killed_before (const_rtx x, const_rtx x_regs, const rtx_insn *insn,
+ const_basic_block bb, int *regs_set_before)
{
- rtx first = BB_HEAD (bb);
+ rtx_insn *first = BB_HEAD (bb);
if (!store_ops_ok (x_regs, regs_set_before))
return true;
*/
static void
-find_moveable_store (rtx insn, int *regs_set_before, int *regs_set_after)
+find_moveable_store (rtx_insn *insn, int *regs_set_before, int *regs_set_after)
{
struct st_expr * ptr;
rtx dest, set, tmp;
#ifdef ENABLE_CHECKING
unsigned regno;
#endif
- rtx insn, tmp;
+ rtx_insn *insn;
+ rtx tmp;
df_ref def;
int *last_set_in, *already_set;
struct st_expr * ptr, **prev_next_ptr_ptr;
the BB_HEAD if needed. */
static void
-insert_insn_start_basic_block (rtx insn, basic_block bb)
+insert_insn_start_basic_block (rtx_insn *insn, basic_block bb)
{
/* Insert at start of successor block. */
- rtx prev = PREV_INSN (BB_HEAD (bb));
- rtx before = BB_HEAD (bb);
+ rtx_insn *prev = PREV_INSN (BB_HEAD (bb));
+ rtx_insn *before = BB_HEAD (bb);
while (before != 0)
{
if (! LABEL_P (before)
static int
insert_store (struct st_expr * expr, edge e)
{
- rtx reg, insn;
+ rtx reg;
+ rtx_insn *insn;
basic_block bb;
edge tmp;
edge_iterator ei;
return 0;
reg = expr->reaching_reg;
- insn = gen_move_insn (copy_rtx (expr->pattern), reg);
+ insn = as_a <rtx_insn *> (gen_move_insn (copy_rtx (expr->pattern), reg));
/* If we are inserting this expression on ALL predecessor edges of a BB,
insert it at the start of the BB, and reset the insert bits on the other
int sp;
edge act;
sbitmap visited = sbitmap_alloc (last_basic_block_for_fn (cfun));
- rtx last, insn, note;
+ rtx last, note;
+ rtx_insn *insn;
rtx mem = smexpr->pattern;
stack = XNEWVEC (edge_iterator, n_basic_blocks_for_fn (cfun));
static void
replace_store_insn (rtx reg, rtx del, basic_block bb, struct st_expr *smexpr)
{
- rtx insn, mem, note, set, ptr;
+ rtx_insn *insn;
+ rtx mem, note, set, ptr;
mem = smexpr->pattern;
- insn = gen_move_insn (reg, SET_SRC (single_set (del)));
+ insn = as_a <rtx_insn *> (gen_move_insn (reg, SET_SRC (single_set (del))));
for (ptr = smexpr->antic_stores; ptr; ptr = XEXP (ptr, 1))
if (XEXP (ptr, 0) == del)