From patchwork Tue Oct 9 13:17:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Gretton-Dann X-Patchwork-Id: 190297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 28A2A2C00D6 for ; Wed, 10 Oct 2012 00:17:19 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350393440; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=CoRn71ugtYxuOLQWcHD29ookPyo=; b=x9obvva3gZiFsnkFINdybOmzB3dzNOzA9rjlg/y4eA3U9QIqO76SgnO9yZT1Vy G5YDFkE1xgW47wuP9M5/fRBG2dMyZ+DO8B2UAiUI9rrjYiClCkAEuUnPkh1ljYap 675NMteqKBddGufGBsTAdYBhvNBggfqBcetkAaVNK7saQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PLMmYeF02pcLRoLYWr7rClA9NQkH03MdTH0xwOoNk9hKHWroFvUaqsr7fTE2rh HYTHwbcAe83Cwbu+KJjDxHXjJ+q+Nj0hDplJhhKep3ipkODsxeLeJDpDrQDkbp5n BiSYOltBenujgpgscOHss/93hWeKvxtGwAElFVwpjcn54=; Received: (qmail 13099 invoked by alias); 9 Oct 2012 13:17:14 -0000 Received: (qmail 13083 invoked by uid 22791); 9 Oct 2012 13:17:08 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-la0-f47.google.com (HELO mail-la0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Oct 2012 13:17:04 +0000 Received: by mail-la0-f47.google.com with SMTP id h5so3037420lam.20 for ; Tue, 09 Oct 2012 06:17:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=JL2MKLCUYZeWoNspVennyzPD2JpT0FsyDSt1B45an6U=; b=RuP+9WKfOL/ojB8GuQ8ni6s7EcUisLZdea5NisjKNcSkZNTCeMoHdO9Mahi+RH0PsC CtCnAT0j0s27HnXQ9tYHNhcaiq7fts6670JO2ptlIsPoHd4/6tShacGgU9I+k++b7oXD 5JXByQhM2izLco0FibUHo+bkAx5MJ3sKQ+vNoeORfVWhYQkyVOUzi7iBMF765jKyioV8 hTVAy8CBQcq0FKqyXi9nTvaRXBUz+aDBInl1dOwJGAAk1lgY3Pl/RS3eXrFKZjJ5oeJS 2dTnCscTmHIY5YTDgb9A/iS7jHhadYvZ3mbgUhmnoHEzSZLFFEfJErRbUCJLHSU2Go7c mLKw== MIME-Version: 1.0 Received: by 10.152.123.103 with SMTP id lz7mr16560716lab.21.1349788623009; Tue, 09 Oct 2012 06:17:03 -0700 (PDT) Received: by 10.114.1.80 with HTTP; Tue, 9 Oct 2012 06:17:02 -0700 (PDT) In-Reply-To: <1586422.8dgmbajGbX@e103209-lin> References: <3426629.1pGjjBJZRU@e103209-lin> <1586422.8dgmbajGbX@e103209-lin> Date: Tue, 9 Oct 2012 14:17:02 +0100 Message-ID: Subject: [PING] Re: [RFA 1/n] Fix if conversion interactions with block partitioning From: Matthew Gretton-Dann To: Steven Bosscher Cc: gcc-patches@gcc.gnu.org, jle@rice.edu, rdsandiford@googlemail.com, ebotcazou@libertysurf.fr, rearnsha@arm.com, ramrad01@arm.com X-Gm-Message-State: ALoCoQkjPBwo0IQEGgVxXAb3fmkxkxXt7xH63fYi9w+tU8NFs69HhsDthEtzOUOycyQHZX8vsq2B X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org PING. On 24 September 2012 11:34, Matthew Gretton-Dann wrote: > On Wednesday 05 September 2012 13:47:19 Steven Bosscher wrote: >> On Wed, Sep 5, 2012 at 1:25 PM, Matthew Gretton-Dann wrote: >> > + /* If the two blocks are in different partitions we do not want to mark >> > + this as a fallthru edge. */ >> > + if (BB_PARTITION (b) != BB_PARTITION (c)) >> > + return; >> > + >> >> I think you should look for a REG_CROSSING_JUMP note on BB_END instead >> of comparing BB_PARTITION. > > Sorry for the delay in getting back to this. > > Anyway, I had a look at how other parts of cfgrtl.c handled this and it seems > as if they do both your suggestion and the check against different partitions. > > So this is what I have implemented in the attached patch. > > Cross tested arm-none-linux-gnueabi with QEmu. > > OK for trunk? > > Thanks, > > Matt > > gcc/ChangeLog: > > 2012-09-24 Matthew Gretton-Dann > > * cfgrtl.c (rtl_tidy_fallthru_edge): Don't tidy edges which > cross partitions. > > -- > Matthew Gretton-Dann > Linaro Toolchain Working Group > matthew.gretton-dann@linaro.org diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index c62b5bc..8fcf7e4 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -1572,6 +1572,12 @@ rtl_tidy_fallthru_edge (edge e) if (INSN_P (q)) return; + /* If the two blocks are in different partitions we do not want to mark + this as a fallthru edge. */ + if (find_reg_note (BB_END (b), REG_CROSSING_JUMP, NULL_RTX) + || BB_PARTITION (b) != BB_PARTITION (c)) + return; + /* Remove what will soon cease being the jump insn from the source block. If block B consisted only of this single jump, turn it into a deleted note. */