This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Patch for switch elimination (PR 54742)
- From: Steve Ellcey <sellcey at mips dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Bin.Cheng <amker dot cheng at gmail dot com>, Jeff Law <law at redhat dot com>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>, <james dot greenhalgh at arm dot com>
- Date: Thu, 14 Aug 2014 10:44:45 -0700
- Subject: Re: RFC: Patch for switch elimination (PR 54742)
- Authentication-results: sourceware.org; auth=none
- References: <1407865606 dot 2601 dot 74 dot camel at ubuntu-sellcey> <53EA5D74 dot 9020809 at redhat dot com> <47b32a49-298e-44f0-b84b-b8f664847a67 at email dot android dot com> <53EA7BD0 dot 1030901 at redhat dot com> <CAHFci2_vdMNhda7=mNP9_XhBLqMiwOC2c_nhqM-uSbESQn4dxA at mail dot gmail dot com> <CAFiYyc3vDORXyhhRuRjci+f1DqkwU_4qDWwZ1x3vbqcz_DnsRQ at mail dot gmail dot com>
On Wed, 2014-08-13 at 11:52 +0200, Richard Biener wrote:
> On Wed, Aug 13, 2014 at 4:54 AM, Bin.Cheng <email@example.com> wrote:
> > On Wed, Aug 13, 2014 at 4:40 AM, Jeff Law <firstname.lastname@example.org> wrote:
> >> On 08/12/14 14:23, Richard Biener wrote:
> >>> On August 12, 2014 8:31:16 PM CEST, Jeff Law <email@example.com> wrote:
> >>>> On 08/12/14 11:46, Steve Ellcey wrote:
> >>>> Try setting the header & latch fields for the loop structure to NULL,
> >>>> then call loops_set_state (LOOPS_NEED_FIXUP).
> >>> But that is _not_ the appropriate way of keeping loops preserved!
> >> I think that's done when we've scrogged the loop beyond repair and want the
> >> structures rebuilt. IIRC, that's what you recommended we do.
An update on this part of the patch. I found that just calling
'loops_set_state (LOOPS_NEED_FIXUP)' without setting the header and
latch fields to NULL first is enough to fix the problem I had earlier.
I thought I had tried that before but either I was calling something
else or I had put the call in the wrong place but it is working now.