This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Improving jump-thread pass for PR 54742
- From: Sebastian Pop <sebpop at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, Steve Ellcey <sellcey at mips dot com>, James Greenhalgh <james dot greenhalgh at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 Dec 2014 21:12:16 +0000
- Subject: Re: [Patch] Improving jump-thread pass for PR 54742
- Authentication-results: sourceware.org; auth=none
- References: <20141204110428 dot GC18834 at f1 dot c dot bardezibar dot internal> <20141204142956 dot GD18834 at f1 dot c dot bardezibar dot internal> <548211B9 dot 6020307 at redhat dot com> <20141206134728 dot GA29926 at f1 dot c dot bardezibar dot internal> <20141206192113 dot GB29926 at f1 dot c dot bardezibar dot internal> <1418075397 dot 2196 dot 76 dot camel at ubuntu-sellcey> <CAFiYyc0vm39Od7xEbAyu-6Uefv2YKQNVQ3wmX_f1hBcAek8ADg at mail dot gmail dot com> <20141209173842 dot GA31443 at f1 dot c dot bardezibar dot internal> <548741F4 dot 1080202 at redhat dot com> <1EF150F5-A027-450B-B3AA-E5F33B09D40A at gmail dot com>
Richard Biener wrote:
>
> >
> >>
> >> On the llvm test-suite, I have seen one ICE with my fsm jump-thread
> >patch.
> >> This patch fixes the problem:
> >>
> >> diff --git a/gcc/tree-ssa-threadupdate.c
> >b/gcc/tree-ssa-threadupdate.c
> >> index 12f83ba..f8c736e 100644
> >> --- a/gcc/tree-ssa-threadupdate.c
> >> +++ b/gcc/tree-ssa-threadupdate.c
> >> @@ -2564,6 +2564,7 @@ thread_through_all_blocks (bool
> >may_peel_loop_headers)
> >> FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
> >> {
> >> if (!loop->header
> >> + || !loop_latch_edge (loop)
> >> || !bitmap_bit_p (threaded_blocks, loop->header->index))
> >> continue;
> >>
> >> retval |= thread_through_loop_header (loop,
> >may_peel_loop_headers);
> >>
> >> Ok to commit after regstrap?
> >This seems to be indicating that we have with no edge from the latch
> >block to the header block. I'd like to know better how we got into
> >that
> >state.
>
> It Also returns null for loops with multiple latches. So the patch looks OK for me.
The bug I was seeing has been fixed by the patch for:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64284
Thanks,
Sebastian