From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93640 invoked by alias); 16 May 2016 10:14:11 -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 93606 invoked by uid 89); 16 May 2016 10:14:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:get_add, UD:se, U*mliska, D*suse.cz X-HELO: mail-vk0-f66.google.com Received: from mail-vk0-f66.google.com (HELO mail-vk0-f66.google.com) (209.85.213.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 16 May 2016 10:14:00 +0000 Received: by mail-vk0-f66.google.com with SMTP id c189so20213830vkb.3 for ; Mon, 16 May 2016 03:13:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=mhQ5yJ8ZA1SzLksvigC/lMXFGzvj2xM+4S2wcayZ8ns=; b=SxrFFmcB5sP++sgcYf6pLTjsy0m7D2s5emrQU7k5JIHooqhkTI/PEkDGXcn1bth1S+ xTAzSLSRiyT5V6jGKWm/SmrJcMdF0oMtmRlCm3jm/3bplEcqKfC2ahLX1Do4JbEd8Rik sm+YD+OaiZ7o5GPq0mI1VmIi6jvGdOCSO4MS2E/R2UWnFnYGSf70g6zUHW6GB3yPh8i2 ACsex3Q5YwZ9hIe2zfRUr0DJRSY5nM29iHh7b8YkurBpyUaatNrC2iiZW0mBJ5cW8kyH lCQ2el7Vv8NmOJzPotCk9gbSk72pTnZMz/A15Wbv5kcN9PNNMpZrKtnuMf+CeXsNpEgO 7CZg== X-Gm-Message-State: AOPr4FVtKtZZfjYtvXD9IFrs+Sk54uBb++7reaToAGewtfKvRlC0n90yEnC/4cW+IYM8JintU5+cY5ripG9mtw== MIME-Version: 1.0 X-Received: by 10.159.40.38 with SMTP id c35mr14562845uac.91.1463393637680; Mon, 16 May 2016 03:13:57 -0700 (PDT) Received: by 10.103.44.148 with HTTP; Mon, 16 May 2016 03:13:57 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 May 2016 10:14:00 -0000 Message-ID: Subject: Re: [PATCH 1/3] Encapsulate comp_cost within a class with methods. From: "Bin.Cheng" To: marxin Cc: gcc-patches List Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg01090.txt.bz2 On Mon, Apr 25, 2016 at 10:42 AM, marxin wrote: > gcc/ChangeLog: > > 2016-04-25 Martin Liska > > * tree-ssa-loop-ivopts.c(comp_cost::operator=): New function. > (comp_cost::infinite_cost_p): Likewise. > (operator+): Likewise. > (comp_cost::operator+=): Likewise. > (comp_cost::operator-=): Likewise. > (comp_cost::operator/=): Likewise. > (comp_cost::operator*=): Likewise. > (operator-): Likewise. > (operator<): Likewise. > (operator==): Likewise. > (operator<=): Likewise. > (comp_cost::get_cost): Likewise. > (comp_cost::set_cost): Likewise. > (comp_cost::get_complexity): Likewise. > (comp_cost::set_complexity): Likewise. > (comp_cost::get_scratch): Likewise. > (comp_cost::set_scratch): Likewise. > (comp_cost::get_infinite): Likewise. > (comp_cost::get_no_cost): Likewise. > (struct ivopts_data): Rename inv_expr_id to max_inv_expr_id; > (tree_ssa_iv_optimize_init): Use the renamed property. > (new_cost): Remove. > (infinite_cost_p): Likewise. > (add_costs): Likewise. > (sub_costs): Likewise. > (compare_costs): Likewise. > (set_group_iv_cost): Use comp_cost::infinite_cost_p. > (get_address_cost): Use new comp_cost::comp_cost. > (get_shiftadd_cost): Likewise. > (force_expr_to_var_cost): Use new comp_cost::get_no_cost. > (split_address_cost): Likewise. > (ptr_difference_cost): Likewise. > (difference_cost): Likewise. > (get_expr_id): Use max_inv_expr_id. > (get_computation_cost_at): Use comp_cost::get_infinite. > (determine_group_iv_cost_generic): Use comp_cost::get_no_cost. > (determine_group_iv_cost_address): Likewise. > (determine_group_iv_cost_cond): Use comp_const::infinite_cost_p. > (autoinc_possible_for_pair): Likewise. > (determine_group_iv_costs): Use new methods of comp_cost. > (determine_iv_cost): Likewise. > (cheaper_cost_pair): Use comp_cost operators. > (iv_ca_recount_cost): Likewise. > (iv_ca_set_no_cp): Likewise. > (iv_ca_set_cp): Likewise. > (iv_ca_cost): Use comp_cost::get_infinite. > (iv_ca_new): Use comp_cost::get_no_cost. > (iv_ca_dump): Use new methods of comp_cost. > (iv_ca_narrow): Use operators of comp_cost. > (iv_ca_prune): Likewi.se > (iv_ca_replace): Likewise. > (try_add_cand_for): Likewise. > (try_improve_iv_set): Likewise. > (find_optimal_iv_set): Use new methods of comp_cost. > (free_loop_data): Use renamed max_inv_expr_id. > --- Hi Martin, Could you please rebase this patch and the profiling one against latest trunk? The third patch was applied before these two now. Thanks, bin