Commit 89ff14c2 by Bernd Schmidt Committed by Bernd Schmidt

haifa-sched.c (recompute_todo_spec): Simplify and correct the code checking for…

haifa-sched.c (recompute_todo_spec): Simplify and correct the code checking for a clobber of a condition register...

	* haifa-sched.c (recompute_todo_spec): Simplify and correct the
	code checking for a clobber of a condition register when deciding
	whether to predicate.

From-SVN: r181806
parent 4d5ae4ea
2011-11-29 Bernd Schmidt <bernds@codesourcery.com>
* haifa-sched.c (recompute_todo_spec): Simplify and correct the
code checking for a clobber of a condition register when deciding
whether to predicate.
2011-11-29 Diego Novillo <dnovillo@google.com> 2011-11-29 Diego Novillo <dnovillo@google.com>
* gimple.c (gimple_call_set_cannot_inline): Move from gimple.h. * gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
...@@ -1178,33 +1178,20 @@ recompute_todo_spec (rtx next) ...@@ -1178,33 +1178,20 @@ recompute_todo_spec (rtx next)
regno = REGNO (XEXP (cond, 0)); regno = REGNO (XEXP (cond, 0));
/* Find the last scheduled insn that modifies the condition register. /* Find the last scheduled insn that modifies the condition register.
If we have a true dependency on it, it sets it to the correct value, We can stop looking once we find the insn we depend on through the
otherwise it must be a later insn scheduled in-between that clobbers REG_DEP_CONTROL; if the condition register isn't modified after it,
the condition. */ we know that it still has the right value. */
FOR_EACH_VEC_ELT_REVERSE (rtx, scheduled_insns, i, prev) if (QUEUE_INDEX (pro) == QUEUE_SCHEDULED)
{ FOR_EACH_VEC_ELT_REVERSE (rtx, scheduled_insns, i, prev)
sd_iterator_def sd_it; {
dep_t dep; HARD_REG_SET t;
HARD_REG_SET t;
bool found;
find_all_hard_reg_sets (prev, &t);
if (!TEST_HARD_REG_BIT (t, regno))
continue;
found = false; find_all_hard_reg_sets (prev, &t);
FOR_EACH_DEP (next, SD_LIST_RES_BACK, sd_it, dep) if (TEST_HARD_REG_BIT (t, regno))
{ return HARD_DEP;
if (DEP_PRO (dep) == prev && DEP_TYPE (dep) == REG_DEP_TRUE) if (prev == pro)
{ break;
found = true; }
break;
}
}
if (!found)
return HARD_DEP;
break;
}
if (ORIG_PAT (next) == NULL_RTX) if (ORIG_PAT (next) == NULL_RTX)
{ {
ORIG_PAT (next) = PATTERN (next); ORIG_PAT (next) = PATTERN (next);
......
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