Commit 83ab3839 by Richard Henderson Committed by Richard Henderson

flow.c (propagate_block): Use XEXP not SET_DEST for a USE.

        * flow.c (propagate_block): Use XEXP not SET_DEST for a USE.
        (recompute_reg_usage): Likewise.
        * rtlanal.c (find_regno_fusage): Likewise.

        * rtl.c (rtl_check_failed_code1): New function.
        (rtl_check_failed_code2): New.
        * rtl.h (RTL_CHECK1, RTL_CHECK2, RTVEC_ELT): Parenthesize args.
        (RTL_CHECKC1, RTL_CHECKC2): New.
        (XC*): New accessor macros.
        (NOTE_*, LABEL_NAME, LABEL_NUSES, ADDRESSOF_REGNO): Use them.
        (ADDRESSOF_DECL, JUMP_LABEL, LABEL_REFS, LABEL_NEXTREF): Likewise.
        (CONTAINING_INSN, REGNO, INTVAL, SUBREG_REG, SUBREG_WORD): Likewise.
        (ASM_OPERANDS_*, MEM_ALIAS_SET, SET_SRC, SET_DEST): Likewise.
        (TRAP_*, RANGE_INFO_*): Likewise.

From-SVN: r29089
parent 02aadb7a
No preview for this file type
......@@ -2845,7 +2845,7 @@ propagate_block (old, first, last, final, significant, bnum, remove_dead_code)
note;
note = XEXP (note, 1))
if (GET_CODE (XEXP (note, 0)) == USE)
mark_used_regs (old, live, SET_DEST (XEXP (note, 0)),
mark_used_regs (old, live, XEXP (XEXP (note, 0), 0),
final, insn);
/* Each call clobbers all call-clobbered regs that are not
......@@ -5048,7 +5048,7 @@ recompute_reg_usage (f, loop_step)
note;
note = XEXP (note, 1))
if (GET_CODE (XEXP (note, 0)) == USE)
count_reg_references (SET_DEST (XEXP (note, 0)));
count_reg_references (XEXP (XEXP (note, 0), 0));
}
}
}
......
......@@ -986,6 +986,33 @@ rtl_check_failed_type2 (r, n, c1, c2, file, line, func)
fancy_abort (file, line, func);
}
void
rtl_check_failed_code1 (r, code, file, line, func)
rtx r;
enum rtx_code code;
const char *file;
int line;
const char *func;
{
error ("RTL check: expected code `%s', have `%s'",
GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)));
fancy_abort (file, line, func);
}
void
rtl_check_failed_code2 (r, code1, code2, file, line, func)
rtx r;
enum rtx_code code1, code2;
const char *file;
int line;
const char *func;
{
error ("RTL check: expected code `%s' or `%s', have `%s'",
GET_RTX_NAME (code1), GET_RTX_NAME (code2),
GET_RTX_NAME (GET_CODE (r)));
fancy_abort (file, line, func);
}
/* XXX Maybe print the vector? */
void
rtvec_check_failed_bounds (r, n, file, line, func)
......
......@@ -1495,18 +1495,16 @@ find_regno_fusage (insn, code, regno)
return 0;
for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
{
register int regnote;
register rtx op;
if (GET_CODE (op = XEXP (link, 0)) == code
&& GET_CODE (SET_DEST (op)) == REG
&& (regnote = REGNO (SET_DEST (op))) <= regno
&& regnote
+ HARD_REGNO_NREGS (regnote, GET_MODE (SET_DEST (op)))
> regno)
return 1;
}
{
register int regnote;
register rtx op, reg;
if (GET_CODE (op = XEXP (link, 0)) == code
&& GET_CODE (reg = XEXP (op, 0)) == REG
&& (regnote = REGNO (reg)) <= regno
&& regnote + HARD_REGNO_NREGS (regnote, GET_MODE (reg)) > regno)
return 1;
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment