Commit 2d34c587 by Ulrich Weigand Committed by Ulrich Weigand

re PR rtl-optimization/7409 (loop optimization)

PR opt/7409
	* loop.c (loop_regs_scan): Mark registers used for function
	argument passing as MAY_NOT_OPTIMIZE.

From-SVN: r58158
parent 38364bd2
2002-10-15 Ulrich Weigand <uweigand@de.ibm.com>
PR opt/7409
* loop.c (loop_regs_scan): Mark registers used for function
argument passing as MAY_NOT_OPTIMIZE.
Mon Oct 14 20:33:12 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.md (movv2di_internal): New pattern.
......
......@@ -9676,6 +9676,25 @@ loop_regs_scan (loop, extra_size)
if (GET_CODE (insn) == CODE_LABEL || GET_CODE (insn) == JUMP_INSN)
memset (last_set, 0, regs->num * sizeof (rtx));
/* Invalidate all registers used for function argument passing.
We check rtx_varies_p for the same reason as below, to allow
optimizing PIC calculations. */
if (GET_CODE (insn) == CALL_INSN)
{
rtx link;
for (link = CALL_INSN_FUNCTION_USAGE (insn);
link;
link = XEXP (link, 1))
{
rtx op, reg;
if (GET_CODE (op = XEXP (link, 0)) == USE
&& GET_CODE (reg = XEXP (op, 0)) == REG
&& rtx_varies_p (reg, 1))
regs->array[REGNO (reg)].may_not_optimize = 1;
}
}
}
/* Invalidate all hard registers clobbered by calls. With one exception:
......
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