From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125135 invoked by alias); 6 Jul 2015 12:51:41 -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 125110 invoked by uid 89); 6 Jul 2015 12:51:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Jul 2015 12:51:36 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZC5rv-0003Sk-Sd from Bernd_Schmidt@mentor.com ; Mon, 06 Jul 2015 05:51:32 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Mon, 6 Jul 2015 13:51:30 +0100 Message-ID: <559A79CE.6070809@codesourcery.com> Date: Mon, 06 Jul 2015 12:51:00 -0000 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Chen Gang , Jeff Law , Richard Henderson , 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"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-07/txt/msg00327.txt.bz2 On 07/03/2015 04:13 AM, Chen Gang wrote: > On 07/01/2015 11:27 PM, Chen Gang wrote: >> On 7/1/15 21:52, Bernd Schmidt wrote: >>> 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). I've committed my patch after testing bfin-elf. There's no great mystery why the second optimization doesn't happen: the point where it thinks it has to insert the LSETUP is after the loop, and the instruction doesn't allow that. Possibly we could change that - when the loop is entered at the top but not through a fallthrough edge, we could make a new block ahead of it and put the LSETUP in there. Bernd