+2014-09-05 David Malcolm <dmalcolm@redhat.com>
+
+ * caller-save.c (setup_save_areas): Strengthen local "insn" from
+ rtx to rtx_insn *.
+ * final.c (get_call_reg_set_usage): Likewise for first param,
+ eliminating a checked cast.
+ * regs.h (get_call_reg_set_usage): Likewise for first param.
+ * resource.c (mark_set_resources): Introduce local rtx_call_insn *
+ "call_insn" for the case of a MARK_SRC_DEST_CALL via a checked
+ cast, replacing references to "x" with "call_insn" where
+ appropriate.
+ (mark_target_live_regs): Strengthen local "real_insn" from rtx to
+ rtx_insn *, adding a checked cast.
+
2014-09-05 David Malcolm <dmalcolm@redhat.com>
* output.h (final_scan_insn): Strengthen first param from rtx to
int i, j, k, freq;
HARD_REG_SET hard_regs_used;
struct saved_hard_reg *saved_reg;
- rtx insn;
+ rtx_insn *insn;
struct insn_chain *chain, *next;
unsigned int regno;
HARD_REG_SET hard_regs_to_save, used_regs, this_insn_sets;
in REG_SET. Return DEFAULT_SET in REG_SET if not found. */
bool
-get_call_reg_set_usage (rtx uncast_insn, HARD_REG_SET *reg_set,
+get_call_reg_set_usage (rtx_insn *insn, HARD_REG_SET *reg_set,
HARD_REG_SET default_set)
{
- rtx_insn *insn = safe_as_a <rtx_insn *> (uncast_insn);
if (flag_use_caller_save)
{
struct cgraph_rtl_info *node = get_call_cgraph_rtl_info (insn);
}
/* Get registers used by given function call instruction. */
-extern bool get_call_reg_set_usage (rtx insn, HARD_REG_SET *reg_set,
+extern bool get_call_reg_set_usage (rtx_insn *insn, HARD_REG_SET *reg_set,
HARD_REG_SET default_set);
#endif /* GCC_REGS_H */
if (mark_type == MARK_SRC_DEST_CALL)
{
+ rtx_call_insn *call_insn = as_a <rtx_call_insn *> (x);
rtx link;
HARD_REG_SET regs;
res->cc = res->memory = 1;
- get_call_reg_set_usage (x, ®s, regs_invalidated_by_call);
+ get_call_reg_set_usage (call_insn, ®s, regs_invalidated_by_call);
IOR_HARD_REG_SET (res->regs, regs);
- for (link = CALL_INSN_FUNCTION_USAGE (x);
+ for (link = CALL_INSN_FUNCTION_USAGE (call_insn);
link; link = XEXP (link, 1))
if (GET_CODE (XEXP (link, 0)) == CLOBBER)
mark_set_resources (SET_DEST (XEXP (link, 0)), res, 1,
/* Check for a REG_SETJMP. If it exists, then we must
assume that this call can clobber any register. */
- if (find_reg_note (x, REG_SETJMP, NULL))
+ if (find_reg_note (call_insn, REG_SETJMP, NULL))
SET_HARD_REG_SET (res->regs);
}
insn = next_insn_no_annul (insn))
{
rtx link;
- rtx real_insn = insn;
+ rtx_insn *real_insn = insn;
enum rtx_code code = GET_CODE (insn);
if (DEBUG_INSN_P (insn))
if (code == INSN
&& GET_CODE (PATTERN (insn)) == USE
&& INSN_P (XEXP (PATTERN (insn), 0)))
- real_insn = XEXP (PATTERN (insn), 0);
+ real_insn = as_a <rtx_insn *> (XEXP (PATTERN (insn), 0));
if (CALL_P (real_insn))
{