From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43011 invoked by alias); 9 Jun 2017 10:16:39 -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 42768 invoked by uid 89); 9 Jun 2017 10:16:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=heading, pads, Hx-languages-length:1502 X-HELO: atrey.karlin.mff.cuni.cz Received: from atrey.karlin.mff.cuni.cz (HELO atrey.karlin.mff.cuni.cz) (195.113.26.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Jun 2017 10:16:37 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id 64EDF82460; Fri, 9 Jun 2017 12:16:38 +0200 (CEST) Date: Fri, 09 Jun 2017 10:16:00 -0000 From: Jan Hubicka To: Ian Lance Taylor Cc: gcc-patches , "gofrontend-dev@googlegroups.com" , Jan Hubicka Subject: Re: Patch RFC: disable block partitioning with split stack Message-ID: <20170609101637.GC30427@atrey.karlin.mff.cuni.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00593.txt.bz2 > This recent patch > https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00518.html turned on > block partitioning even when profiling is not enabled. This can break I am heading towards enabling block partitioning by default (because we now have infrastructure to identify likely cold BBs), but I must admit I did not notice I made it happen by that patch. reorder_blocks_and_partition is not enabled in opts.c but I see it is hidden within common/config/i386/i386-common.c that I did not know even existed. > code compiled with -fsplit-stack, if the cold partition calls a > function that is not compiled with -fsplit-stack (such as a C library > function). The problem is that when the linker sees a split-stack > function call a non-split-stack function, it adjusts the function > header to request more stack space. This doesn't work if the call is > in the cold partition, as the linker doesn't know how to find the > header to adjust. You can see this by trying to build the Go library > using the gold linker with this patch. If code does not work, I wonder why we let user to overwrite the default by hand? In other cases we drop the flag with inform message. Also bb-reorder knows how to prevent landing pads to go to different sections, so perhaps same machinery can be used to prevent splitting blocks having calls that needs linker adjustments? But if fixing this is involved, I am fine with how it is done in your patch. Honza