Commit c2310f51 by Richard Henderson Committed by Richard Henderson

sched-deps.c (sched_analyze_insn): Make clobber insns depend on call insns.

        * sched-deps.c (sched_analyze_insn): Make clobber insns depend
        on call insns.
	* gcc.c-torture/compile/20020926-1.c: New.

From-SVN: r57566
parent 7847d627
2002-09-26 Richard Henderson <rth@redhat.com>
PR c/7160
* sched-deps.c (sched_analyze_insn): Make clobber insns depend
on call insns.
2002-09-26 Richard Henderson <rth@redhat.com>
* emit-rtl.c (const_double_htab_eq): Remove unused variable.
2002-09-26 Chris Lattner <sabre@nondot.org>
......
......@@ -922,7 +922,15 @@ sched_analyze_insn (deps, x, insn, loop_notes)
code = GET_CODE (x);
}
if (code == SET || code == CLOBBER)
sched_analyze_1 (deps, x, insn);
{
sched_analyze_1 (deps, x, insn);
/* Bare clobber insns are used for letting life analysis, reg-stack
and others know that a value is dead. Depend on the last call
instruction so that reg-stack won't get confused. */
if (code == CLOBBER)
add_dependence_list (insn, deps->last_function_call, REG_DEP_OUTPUT);
}
else if (code == PARALLEL)
{
int i;
......
/* PR c/7160 */
/* Verify that the register-to-stack converter properly handles
branches without return value containing function calls. */
extern int gi;
extern int foo1(int, int);
extern void foo2(int, int);
extern float foo3(int);
float bar(int i1, int i2)
{
int i3;
if (i2) {
i3 = foo1(i1, gi);
foo2(i1, i3);
}
else
return foo3(i2);
}
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