From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119746 invoked by alias); 21 Nov 2017 16:57:53 -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 119737 invoked by uid 89); 21 Nov 2017 16:57:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=AB, CA, Hx-languages-length:1880 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Nov 2017 16:57:51 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3290356DC; Tue, 21 Nov 2017 16:57:50 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-12.rdu2.redhat.com [10.10.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F08F5C542; Tue, 21 Nov 2017 16:57:48 +0000 (UTC) Subject: Re: [RFTesting] New POINTER_DIFF_EXPR To: Marc Glisse , Jason Merrill Cc: Richard Biener , "Joseph S. Myers" , GCC Patches References: From: Jeff Law Message-ID: <7b5ec281-f3a2-c009-5e1d-f0be15551b87@redhat.com> Date: Tue, 21 Nov 2017 17:06:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg01924.txt.bz2 On 11/19/2017 04:54 PM, Marc Glisse wrote: > Hello, > > new version, regtested on powerpc64le-unknown-linux-gnu. The front-end > parts are up for review. > > 2017-10-28  Marc Glisse  > > gcc/c/ >     * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR. >     * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR. > > gcc/c-family/ >     * c-pretty-print.c (pp_c_additive_expression, >     c_pretty_printer::expression): Handle POINTER_DIFF_EXPR. > > gcc/cp/ >     * constexpr.c (cxx_eval_constant_expression, >     potential_constant_expression_1): Handle POINTER_DIFF_EXPR. >     * cp-gimplify.c (cp_fold): Likewise. >     * error.c (dump_expr): Likewise. >     * typeck.c (pointer_diff): Use POINTER_DIFF_EXPR. > > gcc/ >     * doc/generic.texi: Document POINTER_DIFF_EXPR, update >     POINTER_PLUS_EXPR. >     * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR. >     * expr.c (expand_expr_real_2): Likewise. >     * fold-const.c (const_binop, fold_addr_of_array_ref_difference, >     fold_binary_loc): Likewise. >     * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N), >     P-Q==0, -(A-B), X-Z     (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on >     MINUS_EXPR transformations. >     * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR. >     * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise. >     * tree-inline.c (estimate_operator_cost): Likewise. >     * tree-pretty-print.c (dump_generic_node, op_code_prio, >     op_symbol_code): Likewise. >     * tree-vect-stmts.c (vectorizable_operation): Likewise. >     * vr-values.c (extract_range_from_binary_expr): Likewise. >     * varasm.c (initializer_constant_valid_p_1): Likewise. >     * tree.def: New tree code POINTER_DIFF_EXPR. > The front-end bits seem very reasonable to me. If the rest is ACK'd then you should consider the full patch ack'd. jeff