From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64930 invoked by alias); 19 May 2015 19:06:09 -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 64914 invoked by uid 89); 19 May 2015 19:06:08 -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_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f48.google.com Received: from mail-oi0-f48.google.com (HELO mail-oi0-f48.google.com) (209.85.218.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 19 May 2015 19:06:07 +0000 Received: by oign205 with SMTP id n205so18756487oig.2 for ; Tue, 19 May 2015 12:06:05 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.97.138 with SMTP id ea10mr25271321obb.11.1432062365168; Tue, 19 May 2015 12:06:05 -0700 (PDT) Received: by 10.76.160.68 with HTTP; Tue, 19 May 2015 12:06:05 -0700 (PDT) In-Reply-To: <555B87F4.30908@redhat.com> References: <20150515194824.GB14415@kam.mff.cuni.cz> <20150515202319.GE17573@brightrain.aerifal.cx> <20150515204237.GF17573@brightrain.aerifal.cx> <20150515230810.GA73210@kam.mff.cuni.cz> <20150515234403.GG17573@brightrain.aerifal.cx> <20150519180659.GG17573@brightrain.aerifal.cx> <555B87F4.30908@redhat.com> Date: Tue, 19 May 2015 19:10:00 -0000 Message-ID: Subject: Re: [PATCH i386] Allow sibcalls in no-PLT PIC From: "H.J. Lu" To: Richard Henderson Cc: Rich Felker , Michael Matz , Jan Hubicka , Alexander Monakov , GCC Patches , Uros Bizjak Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg01744.txt.bz2 On Tue, May 19, 2015 at 11:59 AM, Richard Henderson wrote: > On 05/19/2015 11:06 AM, Rich Felker wrote: >> I'm still mildly worried that concerns for supporting >> relaxation might lead to decisions not to optimize code in ways that >> would be difficult to relax (e.g. certain types of address load >> reordering or hoisting) but I don't understand GCC internals >> sufficiently to know if this concern is warranted or not. > > It is. The relaxation that HJ is working on requires that the reads from the > got not be hoisted. I'm not especially convinced that what he's working on is > a win. > > With LTO, the compiler can do the same job that he's attempting in the linker, > without an extra nop. Without LTO, leaving it to the linker means that you > can't hoist the load and hide the memory latency. > My relax approach won't take away any optimization done by compiler. It simply turns indirect branch into direct branch with a nop prefix at link-time. I am having a hard time to understand why we shouldn't do it. -- H.J.