+2014-08-28 David Malcolm <dmalcolm@redhat.com>
+
+ * resource.h (clear_hashed_info_for_insn): Strengthen param from
+ rtx to rtx_insn *.
+ (incr_ticks_for_insn): Likewise.
+ (init_resource_info): Likewise.
+
+ * resource.c (init_resource_info): Likewise.
+ (clear_hashed_info_for_insn): Likewise.
+ (incr_ticks_for_insn): Likewise.
+
+ * reorg.c (delete_scheduled_jump): Strengthen param "insn" from
+ rtx to rtx_insn *.
+ (steal_delay_list_from_target): Use methods of "seq".
+ (try_merge_delay_insns): Use methods of "merged_insns".
+ (update_block): Strengthen param "insn" from rtx to rtx_insn *.
+ (reorg_redirect_jump): Likewise for param "jump".
+
2014-08-28 David Malcolm <dmalcolm@redhat.com>
* insn-addr.h (insn_addresses_new): Strengthen param "insn" from
static rtx_insn *emit_delay_sequence (rtx_insn *, rtx_insn_list *, int);
static rtx_insn_list *add_to_delay_list (rtx_insn *, rtx_insn_list *);
static rtx_insn *delete_from_delay_slot (rtx_insn *);
-static void delete_scheduled_jump (rtx);
+static void delete_scheduled_jump (rtx_insn *);
static void note_delay_statistics (int, int);
#if defined(ANNUL_IFFALSE_SLOTS) || defined(ANNUL_IFTRUE_SLOTS)
static rtx_insn_list *optimize_skip (rtx_insn *);
static void try_merge_delay_insns (rtx, rtx_insn *);
static rtx redundant_insn (rtx, rtx_insn *, rtx);
static int own_thread_p (rtx_insn *, rtx, int);
-static void update_block (rtx, rtx);
-static int reorg_redirect_jump (rtx, rtx);
+static void update_block (rtx_insn *, rtx);
+static int reorg_redirect_jump (rtx_insn *, rtx);
static void update_reg_dead_notes (rtx, rtx);
static void fix_reg_dead_note (rtx, rtx);
static void update_reg_unused_notes (rtx, rtx);
the insn that sets CC0 for it and delete it too. */
static void
-delete_scheduled_jump (rtx insn)
+delete_scheduled_jump (rtx_insn *insn)
{
/* Delete the insn that sets cc0 for us. On machines without cc0, we could
delete the insn that sets the condition code, but it is hard to find it.
/* Record the effect of the instructions that were redundant and which
we therefore decided not to copy. */
- for (i = 1; i < XVECLEN (seq, 0); i++)
+ for (i = 1; i < seq->len (); i++)
if (redundant[i])
- update_block (XVECEXP (seq, 0, i), insn);
+ update_block (seq->insn (i), insn);
/* Show the place to which we will be branching. */
*pnew_thread = first_active_target_insn (JUMP_LABEL_AS_INSN (seq->insn (0)));
{
rtx_insn *new_rtx;
- update_block (XEXP (merged_insns, 0), thread);
+ update_block (merged_insns->insn (), thread);
new_rtx = delete_from_delay_slot (merged_insns->insn ());
if (INSN_DELETED_P (thread))
thread = new_rtx;
}
else
{
- update_block (XEXP (merged_insns, 0), thread);
- delete_related_insns (XEXP (merged_insns, 0));
+ update_block (merged_insns->insn (), thread);
+ delete_related_insns (merged_insns->insn ());
}
}
BARRIER in relax_delay_slots. */
static void
-update_block (rtx insn, rtx where)
+update_block (rtx_insn *insn, rtx where)
{
/* Ignore if this was in a delay slot and it came from the target of
a branch. */
the basic block containing the jump. */
static int
-reorg_redirect_jump (rtx jump, rtx nlabel)
+reorg_redirect_jump (rtx_insn *jump, rtx nlabel)
{
incr_ticks_for_insn (jump);
return redirect_jump (jump, nlabel, 1);
This should be invoked before the first call to mark_target_live_regs. */
void
-init_resource_info (rtx epilogue_insn)
+init_resource_info (rtx_insn *epilogue_insn)
{
int i;
basic_block bb;
/* Clear any hashed information that we have stored for INSN. */
void
-clear_hashed_info_for_insn (rtx insn)
+clear_hashed_info_for_insn (rtx_insn *insn)
{
struct target_info *tinfo;
/* Increment the tick count for the basic block that contains INSN. */
void
-incr_ticks_for_insn (rtx insn)
+incr_ticks_for_insn (rtx_insn *insn)
{
int b = find_basic_block (insn, MAX_DELAY_SLOT_LIVE_SEARCH);
extern void mark_set_resources (rtx, struct resources *, int,
enum mark_resource_type);
extern void mark_referenced_resources (rtx, struct resources *, bool);
-extern void clear_hashed_info_for_insn (rtx);
-extern void incr_ticks_for_insn (rtx);
+extern void clear_hashed_info_for_insn (rtx_insn *);
+extern void incr_ticks_for_insn (rtx_insn *);
extern void mark_end_of_function_resources (rtx, bool);
-extern void init_resource_info (rtx);
+extern void init_resource_info (rtx_insn *);
extern void free_resource_info (void);
#endif /* GCC_RESOURCE_H */