From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by sourceware.org (Postfix) with ESMTPS id 9C44D3850418 for ; Tue, 2 Mar 2021 23:39:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9C44D3850418 Received: by mail-io1-xd2f.google.com with SMTP id k2so18267669ioh.5 for ; Tue, 02 Mar 2021 15:39:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=G85RquGomLEa07NsE2egDoB9lC8d3EQtTHuv3D8UoEI=; b=n62wouHBt9DzGZ1u/oVApmNiTmXbFViZQ+agfUGcECfoGzFXP5p5Ro4THKLfovJcJg ff1rsBElpHOl7AWQNUNQIh84+ViUMPdQ6bTFf5r7rbozzD1lXevtoq3orjLnNk+HZcqb Rq64lt9V54b6HUjJ7kOCTcLpW7Xt4wvvMtVVlWciXmbU9UnI5O3BAWCC6LknBMrvcfKn SW7rSmrWRCWDrZD4+H8X1l3GTg8HTdnHr+bysPEC19TiWtrMj5g2B0j9Mck5hsFNOSCj jIMuTgjs2tvh6hpPHGNQ0Hnw/u0EFQ1DPchbXBl4CKIsr71NqfhxCHDpv42WH3GpRbJw 8ccg== X-Gm-Message-State: AOAM532B0qg0y/gdNNJqBulhA+aQ0Q1vHfieWahuwCZs8WW2kH28kwWa v4IF+wCvoSKLOBbvtMh/xoM2rbrY1GQJjg== X-Google-Smtp-Source: ABdhPJwCWCM0xLrtexd0SBR5Lqcc820oaYhgQiUJkpfqvzNZ0kbuw1r/0BKU3cw0l0ULNNYsLXCodA== X-Received: by 2002:a02:94a9:: with SMTP id x38mr17399495jah.50.1614728364692; Tue, 02 Mar 2021 15:39:24 -0800 (PST) Received: from localhost.localdomain (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id y11sm10898682ilv.64.2021.03.02.15.39.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 15:39:24 -0800 (PST) Subject: Re: [PATCH] cfgrtl: Fix up fixup_partitions caused ICE [PR99085] To: Jakub Jelinek , Richard Biener , Jan Hubicka Cc: gcc-patches@gcc.gnu.org References: <20210216081359.GU4020736@tucnak> From: Jeff Law Message-ID: Date: Tue, 2 Mar 2021 16:39:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210216081359.GU4020736@tucnak> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 23:39:26 -0000 On 2/16/21 1:13 AM, Jakub Jelinek via Gcc-patches wrote: > Hi! > > fixup_partitions sometimes changes some basic blocks from hot partition to > cold partition, in particular if after unreachable block removal or other > optimizations a hot partition block is dominated by cold partition block(s). > It fixes up the edges and jumps on those edges, but when after reorder > blocks and in rtl (non-cfglayout) mode that is clearly not enough, because > it keeps the block order the same and so we can end up with more than > 1 hot/cold section transition in the same function. > > So, this patch fixes that up too. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2021-02-15 Jakub Jelinek > > PR target/99085 > * cfgrtl.c (fixup_partitions): When changing some bbs from hot to cold > partitions, if in non-layout mode after reorder_blocks also move > affected blocks to ensure a single partition transition. > > * gcc.dg/graphite/pr99085.c: New test. OK jeff