From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26789 invoked by alias); 12 Aug 2014 20:23:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26778 invoked by uid 89); 12 Aug 2014 20:23:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f180.google.com Received: from mail-lb0-f180.google.com (HELO mail-lb0-f180.google.com) (209.85.217.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 12 Aug 2014 20:23:08 +0000 Received: by mail-lb0-f180.google.com with SMTP id v6so7337383lbi.25 for ; Tue, 12 Aug 2014 13:23:04 -0700 (PDT) X-Received: by 10.112.28.41 with SMTP id y9mr6161056lbg.67.1407874984294; Tue, 12 Aug 2014 13:23:04 -0700 (PDT) Received: from android-4c5a376a18c0e957.fritz.box (p5495917E.dip0.t-ipconnect.de. [84.149.145.126]) by mx.google.com with ESMTPSA id kz1sm8431503lab.11.2014.08.12.13.23.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 13:23:03 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <53EA5D74.9020809@redhat.com> References: <1407865606.2601.74.camel@ubuntu-sellcey> <53EA5D74.9020809@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: RFC: Patch for switch elimination (PR 54742) From: Richard Biener Date: Tue, 12 Aug 2014 20:23:00 -0000 To: Jeff Law ,Steve Ellcey ,GCC Patches CC: james.greenhalgh@arm.com Message-ID: <47b32a49-298e-44f0-b84b-b8f664847a67@email.android.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg01197.txt.bz2 On August 12, 2014 8:31:16 PM CEST, Jeff Law wrote: >On 08/12/14 11:46, Steve Ellcey wrote: >> After talking to Jeff Law at the GCC Cauldron I have updated my >switch >> shortcut plugin pass to try and address this optimization in the >hopes of >> getting it added to GCC as a static pass. I fixed the code to build >with >> the various C++ changes that have been happening in GCC but the >current >> version I have included in this email is not working yet. When I run >it >> on coremark I get errors like: >> >> core_state.c: In function 'core_bench_state': >> core_state.c:43:8: error: size of loop 16 should be 13, not 5 >> ee_u16 core_bench_state(ee_u32 blksize, ee_u8 *memblock, >> ^ >> core_state.c:43:8: error: bb 15 does not belong to loop 16 >> core_state.c:43:8: error: bb 113 does not belong to loop 16 >> core_state.c:43:8: error: bb 118 does not belong to loop 16 >> core_state.c:43:8: error: bb 117 does not belong to loop 16 >> (etc) >> >> Apparently there have been some changes to the loop information that >> is built since GCC 4.9. I had hoped that adding a call to >fix_loop_structure >> after recalculating the dominance information would fix this but it >didn't. >> >> Does anyone have any ideas on how to fix up the loop information that >my >> optimization has messed as it duplicates blocks? I tried adding a >call >> 'loop_optimizer_init (LOOPS_NORMAL)' before the fix_loop_structure >but that >> did not seem to have any affect. >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! Richard. >Jeff