This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ICE on ARM due to recent patch
- From: Josh Conner <jconner at apple dot com>
- To: gcc-patches at gcc dot gnu dot org, Steven Bosscher <stevenb at suse dot de>
- Date: Thu, 28 Jul 2005 17:07:33 -0700
- Subject: ICE on ARM due to recent patch
With the following change:
2005-07-27 Steven Bosscher <stevenb@suse.de>
PR rtl-optimization/17808
* sched-deps.c (sched_get_condition): Enable #if 0'ed code.
(sched_insns_conditions_mutex_p): Split out from...
(add_dependence): ...here. But don't call it from here.
(add_dependence_list): Check sched_insns_conditions_mutex_p
before calling add_dependence.
(add_dependence_list_and_free): Likewise.
(fixup_sched_groups): Likewise.
(sched_analyze_1): Likewise.
(sched_analyze_2): Likewise (and replace a "0" with
REG_DEP_TRUE).
(sched_analyze): Likewise.
(sched_analyze_insn): Likewise.
* sched-ebb.c (add_deps_for_risky_insns): Likewise.
* sched-rgn.c (add_branch_dependences): Likewise. Also, add
dependencies on all COND_EXEC insns to jumps ending basic
blocks
when doing intrablock scheduling.
* sched-int.h (sched_insns_conditions_mutex_p): Add prototype.
I see an ICE during scheduling when trying to build for arm-none-
elf. I tracked the failures back to two issues in the following code
(from add_branch_dependences):
insn = PREV_INSN (tail);
while (insn != head)
{
/* Note that we want to add this dependency even when
sched_insns_conditions_mutex_p returns true. The whole point
is that we _want_ this dependency, even if these insns really
are independent. */
if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == COND_EXEC)
add_dependence (tail, insn, REG_DEP_ANTI);
insn = PREV_INSN (insn);
}
First, if head == tail, this code walks back into other bb's.
Second, it never generates a dependency for the head instruction,
since the loop exits as soon as head is reached -- without head ever
being processed.
To address these issues, I propose the replacement code in the
attached patch. I have verified that it gets past the build failures
I was seeing before, and I will do a full set of tests on arm-none-
elf and report the results. Might someone be willing to test it on
ia64?
- Josh
Attachment:
cond-exe.patch
Description: Binary data