Commit c42091c1 by Claudiu Zissulescu Committed by Joern Rennecke

resource.c (mark_target_live_regs): Compute resources taking into account if a…

resource.c (mark_target_live_regs): Compute resources taking into account if a call is predicated or not.

2013-09-06 Claudiu Zissulescu <claziss@synopsys.com>

        * resource.c (mark_target_live_regs): Compute resources taking
        into account if a call is predicated or not.

From-SVN: r202343
parent 2c641f8b
2013-09-06 Claudiu Zissulescu <claziss@synopsys.com>
* resource.c (mark_target_live_regs): Compute resources taking
into account if a call is predicated or not.
2013-09-06 Eric Botcazou <ebotcazou@adacore.com> 2013-09-06 Eric Botcazou <ebotcazou@adacore.com>
* toplev.c (output_stack_usage): Be prepared for suffixes created by * toplev.c (output_stack_usage): Be prepared for suffixes created by
......
...@@ -994,11 +994,18 @@ mark_target_live_regs (rtx insns, rtx target, struct resources *res) ...@@ -994,11 +994,18 @@ mark_target_live_regs (rtx insns, rtx target, struct resources *res)
if (CALL_P (real_insn)) if (CALL_P (real_insn))
{ {
/* CALL clobbers all call-used regs that aren't fixed except /* Values in call-clobbered registers survive a COND_EXEC CALL
sp, ap, and fp. Do this before setting the result of the if that is not executed; this matters for resoure use because
call live. */ they may be used by a complementarily (or more strictly)
AND_COMPL_HARD_REG_SET (current_live_regs, predicated instruction, or if the CALL is NORETURN. */
regs_invalidated_by_call); if (GET_CODE (PATTERN (real_insn)) != COND_EXEC)
{
/* CALL clobbers all call-used regs that aren't fixed except
sp, ap, and fp. Do this before setting the result of the
call live. */
AND_COMPL_HARD_REG_SET (current_live_regs,
regs_invalidated_by_call);
}
/* A CALL_INSN sets any global register live, since it may /* A CALL_INSN sets any global register live, since it may
have been modified by the call. */ have been modified by the call. */
......
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