From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117884 invoked by alias); 16 Jun 2017 13:06:12 -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 117454 invoked by uid 89); 16 Jun 2017 13:06:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=coming X-HELO: mail-vk0-f51.google.com Received: from mail-vk0-f51.google.com (HELO mail-vk0-f51.google.com) (209.85.213.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Jun 2017 13:06:10 +0000 Received: by mail-vk0-f51.google.com with SMTP id p62so21964348vkp.0 for ; Fri, 16 Jun 2017 06:06:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gH8nN3D6rcALaPp8eUgRAHcK1S5vtVaZhSsF35x3kZE=; b=tJ1V4pquutK7ZBmA4Idf2Gj+8FZeaovk5SB6S9hLQIWACHhb2ep2cla+wdOwwCunkp 57CQ1r3F0I69uc9ca+d7VHA5ZItNSlQAv5+lEmbO2dzJVgDwetAmgAl0wlUBHeaXEGz5 rIQfC+gDdGAceQTS4/O+Lnt6qgTicuaBXaTffjZfqtnVLv9U6aAF80C8NAkGfbD26FNh H38mOzdI/tGXPfaUGIXkUPhC855Gn5a9t1iPKVHXRqNgpg1KbD8MbBfwu7yFrrShqVXb o+uldMEtGbcTpu3YLK35qoV2heULoZZEUbU7X8azzW0J2oQtpPlSPJixJ5eo10OkKPRL lAlQ== X-Gm-Message-State: AKS2vOxCdN8KSsbnG2RW5RMYwRMowWexa6ZWT/NRAKtH1P6OzQwKvwf5 hebWbgWq4DDFJOTdRTHZvgcuPWkX6w== X-Received: by 10.31.84.4 with SMTP id i4mr6034785vkb.142.1497618373640; Fri, 16 Jun 2017 06:06:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.47.19 with HTTP; Fri, 16 Jun 2017 06:06:13 -0700 (PDT) In-Reply-To: References: From: "Bin.Cheng" Date: Fri, 16 Jun 2017 13:06:00 -0000 Message-ID: Subject: Re: [PATCH GCC][1/2]Feed bound computation to folder in loop split To: Richard Biener Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01188.txt.bz2 On Fri, Jun 16, 2017 at 11:49 AM, Richard Biener wrote: > On Wed, Jun 14, 2017 at 3:07 PM, Bin Cheng wrote: >> Hi, >> Loop split forces intermediate computation to gimple operands all the time when >> computing bound information. This is not good since folding opportunities are >> missed. This patch fixes the issue by feeding all computation to folder and only >> forcing to gimple operand at last. >> >> Bootstrap and test on x86_64 and AArch64. Is it OK? > > Hm? It uses gimple_build () which should do the same as fold_buildN in terms > of simplification. > > So where does that not work? It is supposed to be the prefered way and no > new code should use force_gimple_operand (unless dealing with generic > coming from other middle-end infrastructure like SCEV or niter analysis) Hmm, current code calls force_gimpele operand several times which causes the inefficiency. The patch avoids that and does one call at the end. Thanks, bin > > Richard. > >> >> Thanks, >> bin >> 2017-06-12 Bin Cheng >> >> * tree-ssa-loop-split.c (compute_new_first_bound): Feed bound >> computation to folder, rather than force to gimple operands too >> early.