From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68508 invoked by alias); 3 Jul 2015 02:13:54 -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 68499 invoked by uid 89); 3 Jul 2015 02:13:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: BLU004-OMC2S7.hotmail.com Received: from blu004-omc2s7.hotmail.com (HELO BLU004-OMC2S7.hotmail.com) (65.55.111.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Fri, 03 Jul 2015 02:13:52 +0000 Received: from BLU436-SMTP22 ([65.55.111.72]) by BLU004-OMC2S7.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Thu, 2 Jul 2015 19:13:50 -0700 X-TMN: [eQiD+TpLOvQZjBleMHxl0PaWn56WP/LI] Message-ID: Date: Fri, 03 Jul 2015 02:13:00 -0000 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Bernd Schmidt , Jeff Law , Richard Henderson , jzhang918@gmail.com CC: gcc-patches List Subject: Re: [PATCH] config/bfin/bfin.c (hwloop_optimize): Use return false instead of gcc_assert for checking jump_insn. References: <5591A09A.5050903@codesourcery.com> <5593F08D.6090107@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2015-07/txt/msg00173.txt.bz2 On 07/01/2015 11:27 PM, Chen Gang wrote: > On 7/1/15 21:52, Bernd Schmidt wrote: >> On 07/01/2015 03:04 AM, Chen Gang wrote: >> >>> For me, the more details are: >>> >>> - The insns have 2 loops which can be lsetup optimized. >>> >>> - After hwloop_optimize finishes 1st lsetup optimization, it generates >>> new lsetup insn which appends to jump insn in the basic block (which >>> causes the insns are not 'standard' but OK for code generation). >> >> The problem is that you can't append anything to a basic block after a jump. You need to create a new one. This problem doesn't usually show up since nothing ever looks at the basic block again, unless both directions from the conditional branch happen to branch to lsetup candidate loops. >> > > OK, thanks. What you said sound reasonable to me. > >> Below is a patch. Can you test this with anything you have beyond the testsuite? >> > > It can fix this issue (Bug66620), let the insns standard, and can build > the bfin kernel with allmodconfig successfully (although for bfin kernel > members, they stick to allmodconfig is not a good idea for bfin kernel). > > It finished lsetup optimization for one loop, but still left the other ( > get the same .s as my original fix). for 2nd times in hwloop_optimize, it > return false. And welcome any additional ideas for it. > I shall continue to analyse why 2nd lsetup optimiation has not happened. Hope I can finish within next week (2015-07-12). > For me, my original fix is incorrect: it still remains the insns in the > incorrect state (although my fix can generate the correct .s, and can > build bfin kernel with allmodconfig successfully). > > > Thanks. > -- Chen Gang Open, share, and attitude like air, water, and life which God blessed