+2014-08-26 David Malcolm <dmalcolm@redhat.com>
+
+ * rtl.h (canonicalize_condition): Strengthen param 1 from rtx to
+ rtx_insn * and param 4 from rtx * to rtx_insn **.
+ (get_condition): Strengthen param 1 from rtx to rtx_insn * and
+ param 2 from rtx * to rtx_insn **.
+
+ * df.h (can_move_insns_across): Strengthen params 1-4 from rtx to
+ rtx_insn * and final param from rtx * to rtx_insn **.
+
+ * cfgcleanup.c (try_head_merge_bb): Strengthen local "move_before"
+ from rtx to rtx_insn *.
+ (try_head_merge_bb): Likewise for both locals named "move_upto".
+ * df-problems.c (can_move_insns_across): Likewise for params
+ "from", "to", "across_from", "across_to" and locals "insn",
+ "next", "max_to". Strengthen param "pmove_upto" from rtx * to
+ rtx_insn **.
+ * ifcvt.c (struct noce_if_info): Strengthen field "cond_earliest"
+ from rtx to rtx_insn *.
+ (noce_get_alt_condition): Strengthen param "earliest" from rtx *
+ to rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *.
+ (noce_try_minmax): Strengthen locals "earliest", "seq" from rtx to
+ rtx_insn *.
+ (noce_try_abs): Likewise.
+ (noce_get_condition): Likewise for param "jump". Strengthen param
+ "earliest" from rtx * to rtx_insn **.
+ (noce_find_if_block): Strengthen local "cond_earliest" from rtx to
+ rtx_insn *.
+ (find_cond_trap): Likewise.
+ (dead_or_predicable): Likewise for local "earliest".
+ * loop-iv.c (check_simple_exit): Likewise for local "at". Add
+ checked cast.
+ * rtlanal.c (canonicalize_condition): Likewise for param "insn"
+ and local "prev". Strengthen param "earliest" from rtx * to
+ rtx_insn **.
+ (get_condition): Strengthen param "jump" from rtx to rtx_insn *
+ Strengthen param "earliest" from rtx * to rtx_insn **.
+
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* fwprop.c (local_ref_killed_between_p): Strengthen params "from",
bool changed, moveall;
unsigned ix;
rtx_insn *e0_last_head;
- rtx cond, move_before;
+ rtx cond;
+ rtx_insn *move_before;
unsigned nedges = EDGE_COUNT (bb->succs);
rtx_insn *jump = BB_END (bb);
regset live, live_union;
with the final move. */
if (final_dest_bb != NULL)
{
- rtx move_upto;
+ rtx_insn *move_upto;
moveall = can_move_insns_across (currptr[0], e0_last_head, move_before,
jump, e0->dest, live_union,
do
{
- rtx move_upto;
+ rtx_insn *move_upto;
moveall = can_move_insns_across (currptr[0], e0_last_head,
move_before, jump, e0->dest, live_union,
NULL, &move_upto);
is set to point at the last moveable insn in such a case. */
bool
-can_move_insns_across (rtx from, rtx to, rtx across_from, rtx across_to,
+can_move_insns_across (rtx_insn *from, rtx_insn *to,
+ rtx_insn *across_from, rtx_insn *across_to,
basic_block merge_bb, regset merge_live,
- regset other_branch_live, rtx *pmove_upto)
+ regset other_branch_live, rtx_insn **pmove_upto)
{
- rtx insn, next, max_to;
+ rtx_insn *insn, *next, *max_to;
bitmap merge_set, merge_use, local_merge_live;
bitmap test_set, test_use;
unsigned i, fail = 0;
bool trapping_insns_in_across = false;
if (pmove_upto != NULL)
- *pmove_upto = NULL_RTX;
+ *pmove_upto = NULL;
/* Find real bounds, ignoring debug insns. */
while (!NONDEBUG_INSN_P (from) && from != to)
the first insn in MERGE that sets a register in TEST_USE, or uses
a register in TEST_SET. We also check for calls, trapping operations,
and memory references. */
- max_to = NULL_RTX;
+ max_to = NULL;
for (insn = from; ; insn = next)
{
if (CALL_P (insn))
extern void df_simulate_initialize_forwards (basic_block, bitmap);
extern void df_simulate_one_insn_forwards (basic_block, rtx, bitmap);
extern void simulate_backwards_to_point (basic_block, regset, rtx);
-extern bool can_move_insns_across (rtx, rtx, rtx, rtx, basic_block, regset,
- regset, rtx *);
+extern bool can_move_insns_across (rtx_insn *, rtx_insn *,
+ rtx_insn *, rtx_insn *,
+ basic_block, regset,
+ regset, rtx_insn **);
/* Functions defined in df-scan.c. */
extern void df_scan_alloc (bitmap);
static basic_block block_fallthru (basic_block);
static int cond_exec_process_insns (ce_if_block *, rtx, rtx, rtx, int, int);
static rtx cond_exec_get_condition (rtx);
-static rtx noce_get_condition (rtx, rtx *, bool);
+static rtx noce_get_condition (rtx_insn *, rtx_insn **, bool);
static int noce_operand_ok (const_rtx);
static void merge_if_block (ce_if_block *);
static int find_cond_trap (basic_block, edge, edge);
rtx cond;
/* New insns should be inserted before this one. */
- rtx cond_earliest;
+ rtx_insn *cond_earliest;
/* Insns in the THEN and ELSE block. There is always just this
one insns in those blocks. The insns are single_set insns.
rtx, rtx, rtx);
static int noce_try_cmove (struct noce_if_info *);
static int noce_try_cmove_arith (struct noce_if_info *);
-static rtx noce_get_alt_condition (struct noce_if_info *, rtx, rtx *);
+static rtx noce_get_alt_condition (struct noce_if_info *, rtx, rtx_insn **);
static int noce_try_minmax (struct noce_if_info *);
static int noce_try_abs (struct noce_if_info *);
static int noce_try_sign_mask (struct noce_if_info *);
static rtx
noce_get_alt_condition (struct noce_if_info *if_info, rtx target,
- rtx *earliest)
+ rtx_insn **earliest)
{
- rtx cond, set, insn;
+ rtx cond, set;
+ rtx_insn *insn;
int reverse;
/* If target is already mentioned in the known condition, return it. */
static int
noce_try_minmax (struct noce_if_info *if_info)
{
- rtx cond, earliest, target;
- rtx_insn *seq;
+ rtx cond, target;
+ rtx_insn *earliest, *seq;
enum rtx_code code, op;
int unsignedp;
static int
noce_try_abs (struct noce_if_info *if_info)
{
- rtx cond, earliest, target, a, b, c;
- rtx_insn *seq;
+ rtx cond, target, a, b, c;
+ rtx_insn *earliest, *seq;
int negate;
bool one_cmpl = false;
THEN block of the caller, and we have to reverse the condition. */
static rtx
-noce_get_condition (rtx jump, rtx *earliest, bool then_else_reversed)
+noce_get_condition (rtx_insn *jump, rtx_insn **earliest, bool then_else_reversed)
{
rtx cond, set, tmp;
bool reverse;
bool then_else_reversed = false;
rtx_insn *jump;
rtx cond;
- rtx cond_earliest;
+ rtx_insn *cond_earliest;
struct noce_if_info if_info;
/* We only ever should get here before reload. */
basic_block else_bb = else_edge->dest;
basic_block other_bb, trap_bb;
rtx_insn *trap, *jump;
- rtx cond, cond_earliest, seq;
+ rtx cond, seq;
+ rtx_insn *cond_earliest;
enum rtx_code code;
/* Locate the block with the trap instruction. */
{
basic_block new_dest = dest_edge->dest;
rtx_insn *head, *end, *jump;
- rtx earliest = NULL_RTX, old_dest;
+ rtx_insn *earliest = NULL;
+ rtx old_dest;
bitmap merge_set = NULL;
/* Number of pending changes. */
int n_validated_changes = 0;
check_simple_exit (struct loop *loop, edge e, struct niter_desc *desc)
{
basic_block exit_bb;
- rtx condition, at;
+ rtx condition;
+ rtx_insn *at;
edge ein;
exit_bb = e->src;
/* Check that we are able to determine number of iterations and fill
in information about it. */
- iv_number_of_iterations (loop, safe_as_a <rtx_insn *> (at),
- condition, desc);
+ iv_number_of_iterations (loop, at, condition, desc);
}
/* Finds a simple exit of LOOP and stores its description into DESC. */
/* Given an insn and condition, return a canonical description of
the test being made. */
-extern rtx canonicalize_condition (rtx, rtx, int, rtx *, rtx, int, int);
+extern rtx canonicalize_condition (rtx_insn *, rtx, int, rtx_insn **, rtx,
+ int, int);
/* Given a JUMP_INSN, return a canonical description of the test
being made. */
-extern rtx get_condition (rtx, rtx *, int, int);
+extern rtx get_condition (rtx_insn *, rtx_insn **, int, int);
/* Information about a subreg of a hard register. */
struct subreg_info
and at INSN. */
rtx
-canonicalize_condition (rtx insn, rtx cond, int reverse, rtx *earliest,
+canonicalize_condition (rtx_insn *insn, rtx cond, int reverse,
+ rtx_insn **earliest,
rtx want_reg, int allow_cc_mode, int valid_at_insn_p)
{
enum rtx_code code;
- rtx prev = insn;
+ rtx_insn *prev = insn;
const_rtx set;
rtx tem;
rtx op0, op1;
VALID_AT_INSN_P is the same as for canonicalize_condition. */
rtx
-get_condition (rtx jump, rtx *earliest, int allow_cc_mode, int valid_at_insn_p)
+get_condition (rtx_insn *jump, rtx_insn **earliest, int allow_cc_mode,
+ int valid_at_insn_p)
{
rtx cond;
int reverse;