sched-deps.c (get_condition): Rewrite using jump support functions.
* sched-deps.c (get_condition): Rewrite using jump support functions. Use reversed_comparison_code. (conditions_mutex_p): Use reversed_comparison_code. From-SVN: r86736
This commit is contained in:
parent
ea9bfbf28f
commit
6903ecd491
|
@ -1,3 +1,9 @@
|
|||
2004-08-29 Richard Earnshaw <rearnsha@arm.com>
|
||||
|
||||
* sched-deps.c (get_condition): Rewrite using jump support functions.
|
||||
Use reversed_comparison_code.
|
||||
(conditions_mutex_p): Use reversed_comparison_code.
|
||||
|
||||
2004-08-29 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* config/mips/mips.c (override_options): Disable hot/cold partitioning
|
||||
|
|
|
@ -145,23 +145,25 @@ get_condition (rtx insn)
|
|||
|
||||
if (pat == 0)
|
||||
return 0;
|
||||
|
||||
if (GET_CODE (pat) == COND_EXEC)
|
||||
return COND_EXEC_TEST (pat);
|
||||
if (!JUMP_P (insn))
|
||||
|
||||
if (!any_condjump_p (insn) || !onlyjump_p (insn))
|
||||
return 0;
|
||||
if (GET_CODE (pat) != SET || SET_SRC (pat) != pc_rtx)
|
||||
return 0;
|
||||
if (GET_CODE (SET_DEST (pat)) != IF_THEN_ELSE)
|
||||
return 0;
|
||||
pat = SET_DEST (pat);
|
||||
cond = XEXP (pat, 0);
|
||||
if (GET_CODE (XEXP (cond, 1)) == LABEL_REF
|
||||
&& XEXP (cond, 2) == pc_rtx)
|
||||
|
||||
cond = XEXP (SET_SRC (pc_set (insn)), 0);
|
||||
if (XEXP (cond, 2) == pc_rtx)
|
||||
return cond;
|
||||
else if (GET_CODE (XEXP (cond, 2)) == LABEL_REF
|
||||
&& XEXP (cond, 1) == pc_rtx)
|
||||
return gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond)), GET_MODE (cond),
|
||||
XEXP (cond, 0), XEXP (cond, 1));
|
||||
else if (XEXP (cond, 1) == pc_rtx)
|
||||
{
|
||||
enum rtx_code revcode = reversed_comparison_code (cond, insn);
|
||||
|
||||
if (revcode == UNKNOWN)
|
||||
return 0;
|
||||
return gen_rtx_fmt_ee (revcode, GET_MODE (cond), XEXP (cond, 0),
|
||||
XEXP (cond, 1));
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
@ -173,7 +175,7 @@ conditions_mutex_p (rtx cond1, rtx cond2)
|
|||
{
|
||||
if (COMPARISON_P (cond1)
|
||||
&& COMPARISON_P (cond2)
|
||||
&& GET_CODE (cond1) == reverse_condition (GET_CODE (cond2))
|
||||
&& GET_CODE (cond1) == reversed_comparison_code (cond2, NULL)
|
||||
&& XEXP (cond1, 0) == XEXP (cond2, 0)
|
||||
&& XEXP (cond1, 1) == XEXP (cond2, 1))
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue