From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48765 invoked by alias); 26 Apr 2017 13:22:37 -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 48748 invoked by uid 89); 26 Apr 2017 13:22:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=caps, Hx-languages-length:1497 X-HELO: mail-oi0-f51.google.com Received: from mail-oi0-f51.google.com (HELO mail-oi0-f51.google.com) (209.85.218.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Apr 2017 13:22:35 +0000 Received: by mail-oi0-f51.google.com with SMTP id x184so195787oia.1 for ; Wed, 26 Apr 2017 06:22:37 -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=lAviPwf5I7TvEy1TxatD/mcijpxYegDavF4uaylcVvE=; b=lwVIWvOg4hX4Lr0WHkPhig9RjTHoncVDpSSZKqDMScKsctZOdQfUHkxCWX3OHuBL4S WLwsg5o0YA5d0ljQipvZgrYYmhz8YSrv2zJ++9LfiW8Bc6K/+tLEuySPDDOUOvSPPU5C m8TLyXVIcpb+V2b9/owQWDRSsdRUrDFiPMs/pyrg2PaWNEmOCTg8sW3QCBCLNCVYRWSu XdBd9v/vj9b7PvPhQLgfTTHH5VwwW/kOKAvrxG7H+qj2p51aBMPMoygTD93hzeY6DbFE aEdUr1lzAz8ZqIO1jVvwwnIoH9RdX14vRd4Mz9XBg719Rt9FJC0MEUK/uJXeVbJkv2P0 DnLg== X-Gm-Message-State: AN3rC/5CLxcsqmPoAKCxJ4tm4oGkpOp9DPIzkVzQ/yr15mWZRjjSGupA TCC4U7JFN1Ij1UVD8TL9WvB8MU4LDA== X-Received: by 10.157.63.143 with SMTP id r15mr8879817otc.89.1493212955694; Wed, 26 Apr 2017 06:22:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.26.34 with HTTP; Wed, 26 Apr 2017 06:22:35 -0700 (PDT) In-Reply-To: References: From: Richard Biener Date: Wed, 26 Apr 2017 13:30:00 -0000 Message-ID: Subject: Re: [PATCH 24/33]New parameter bound on number of selected candidates To: Bin Cheng Cc: "gcc-patches@gcc.gnu.org" , nd Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg01297.txt.bz2 On Tue, Apr 18, 2017 at 12:50 PM, Bin Cheng wrote: > Hi, > IVOPTs still have difficulty for outer loop (especially for large loop nest), and tend to select too many candidates. > It's generally bad because of unavoidable register spilling. In this case, we probably want to compute iv_uses with > small number of bivs. Though this results in more computation inside of loop, it could improve spilling. > This patch adds new parameter bound on number of selected candidates, it simply gives up if too many candidates are > selected. So far it works loop by loop, I am not sure if we want to by pass whole loop nest once this bound is hit. > Is it OK? Hmm, I don't like such kind of caps. We should simply add less candidates in such cases? Like cap this in find_optimal_iv_set instead, always using the original set of candidates just not trying harder? IIRC much of the problem is because the inner loop has been processed already and thus there may appear to be a very large number of "original" IVs already? I may misremeber though. I think this patch doesn't really belong in the series? Richard. > > Thanks, > bin > 2017-04-11 Bin Cheng > > * doc/invoke.texi (iv-max-selected-candidates): New. > * params.def (PARAM_IV_MAX_SELECTED_CANDIDATES): New. > * tree-ssa-loop-ivopts.c (MAX_SELECTED_CANDIDATES): New. > (tree_ssa_iv_optimize_loop): Skip if too many cands are selected.