From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124780 invoked by alias); 9 Aug 2019 11:20:01 -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 124771 invoked by uid 89); 9 Aug 2019 11:20:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Whats, What's, ICF, operand_equal_p X-HELO: mail-lf1-f68.google.com Received: from mail-lf1-f68.google.com (HELO mail-lf1-f68.google.com) (209.85.167.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Aug 2019 11:19:59 +0000 Received: by mail-lf1-f68.google.com with SMTP id h28so69201057lfj.5 for ; Fri, 09 Aug 2019 04:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6Jfg8kQAk0AWVBkvcNUzyYPNKOqH6DnTKG3v+IEV5cI=; b=ffDLufJ9eEZxpdnfEspWBNMkkZpDUXi2ePaBNOdkJNy7MtfODrlSbgQBn/9aGxyqGp cI6mmy80tvhLQfZgl5LGjzOYq/mfSyW20tuTCZ9vCq2Np+DzNxvwwnw/OqK/clInnfNf BoutA9cNBFTpwUVP5JF3tgvYDLUsFFnVt+ZMiWKHFsRUAHbhxy5yVWvSfxLGN2iA8EyU 8AW+akBgW7YB6z1sM6MQCILLGOpuU0zZCBp7433RmEAsEBA4ttCJ666sxwozCE3fJz/j rB2CTz7AjiCqTLLb8ccdIzkDjFT4ZHYb8rTwQJY9fj6EuLGq4nUYv+RQKXEt79Q15F2+ YurA== MIME-Version: 1.0 References: <24e91baf28c01421ba05c877e00c058a2008a5cc.1565105736.git.mliska@suse.cz> In-Reply-To: <24e91baf28c01421ba05c877e00c058a2008a5cc.1565105736.git.mliska@suse.cz> From: Richard Biener Date: Fri, 09 Aug 2019 11:48:00 -0000 Message-ID: Subject: Re: [PATCH 5/9] Come up with an abstraction. To: Martin Liska Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00625.txt.bz2 On Tue, Aug 6, 2019 at 5:44 PM Martin Liska wrote: > > > gcc/ChangeLog: Hum. I don't like the "abstraction" - how is it going to help you to not duplicate all the code? What's wrong with doing this all in ICF? Richard. > 2019-07-24 Martin Liska > > * fold-const.c (operand_equal_p): Rename to ... > (operand_compare::operand_equal_p): ... this. > (add_expr): Rename to ... > (operand_compare::hash_operand): ... this. > (operand_compare::operand_equal_valueize): Likewise. > (operand_compare::hash_operand_valueize): Likewise. > * fold-const.h (operand_equal_p): Set default > value for last argument. > (class operand_compare): New. > * tree.c (add_expr): Move content to hash_operand. > --- > gcc/fold-const.c | 346 ++++++++++++++++++++++++++++++++++++++++++++++- > gcc/fold-const.h | 30 +++- > gcc/tree.c | 286 --------------------------------------- > 3 files changed, 372 insertions(+), 290 deletions(-) >