From patchwork Mon Oct 5 10:43:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 526281 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 243091401AF for ; Mon, 5 Oct 2015 21:43:20 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=g/T4xXDx; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=Elnx8PG8zN8Quxnb 8Mo4pf04qPmQJou5LkS2pQFlyukLxPupbmbHZXFy3aImuZ7aaQouV3Pk2gAt2Kl2 Q4b+BazqE7cDeWe5rXridJbpgMIvmfoXM+7wCedFlqtZzP4L+g8+7NRmXWNIQwjI AClx5iBBKxzdeUydqjgP/1zTV7s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=XzU+Rknp+qBy27mRRLpjyp UNXK8=; b=g/T4xXDxSvRgEny/WubAA9+sZFrVIRaT9EWQtfFAjdxj7IOFp+COHj KIa2yISFFHu86Nb/90YnQnhJNFTbrPuL5O37CLeYUN9Zw61I+0vAkU2PzXmoIidX +P3oItxYyDJ4UNPIOwk9R8m/kU7l7QXBxtsW0DoeG0GO2HPy2uUWo= Received: (qmail 71359 invoked by alias); 5 Oct 2015 10:43:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 71338 invoked by uid 89); 5 Oct 2015 10:43:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Oct 2015 10:43:11 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-5-Ye-U2OdVTFSrwyhG2ywqaQ-1; Mon, 05 Oct 2015 11:43:05 +0100 Received: from localhost ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 5 Oct 2015 11:43:04 +0100 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Remove remaining uses of REAL_VALUES_IDENTICAL Date: Mon, 05 Oct 2015 11:43:04 +0100 Message-ID: <87k2r1d29z.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: Ye-U2OdVTFSrwyhG2ywqaQ-1 This patch continues the removal of real-related macros. We already had both the old-style REAL_VALUES_IDENTICAL and the new-style real_identical, so this patch replaces all remaining uses of the former with the latter. Bootstrapped & regression-tested on x86_64-linux-gnu. Also tested by building one target per CPU directory and checking that there were no new warnings and no changes in testsuite output at -O2. OK to install? Thanks, Richard gcc/ * real.h (REAL_VALUES_IDENTICAL): Delete. * config/m68k/m68k.c (standard_68881_constant_p): Use real_identical instead of REAL_VALUES_IDENTICAL. * fold-const.c (operand_equal_p): Likewise. * ipa-icf.c (sem_variable::equals): Likewise. * tree-complex.c (some_nonzerop): Likewise. (expand_complex_multiplication): Likewise. * tree.c (simple_cst_equal): Likewise. * varasm.c (compare_constant): Likewise. diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index b7d96a5..487cbf4 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -4336,11 +4336,10 @@ standard_68881_constant_p (rtx x) REAL_VALUE_FROM_CONST_DOUBLE (r, x); - /* Use REAL_VALUES_IDENTICAL instead of real_equal so that -0.0 - is rejected. */ + /* Use real_identical instead of real_equal so that -0.0 is rejected. */ for (i = 0; i < 6; i++) { - if (REAL_VALUES_IDENTICAL (r, values_68881[i])) + if (real_identical (&r, &values_68881[i])) return (codes_68881[i]); } diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 768b39b..1c72af6 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2815,8 +2815,7 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) TREE_FIXED_CST (arg1)); case REAL_CST: - if (REAL_VALUES_IDENTICAL (TREE_REAL_CST (arg0), - TREE_REAL_CST (arg1))) + if (real_identical (&TREE_REAL_CST (arg0), &TREE_REAL_CST (arg1))) return 1; diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index d39a3c1..b076222 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -2030,8 +2030,8 @@ sem_variable::equals (tree t1, tree t2) /* Real constants are the same only if the same width of type. */ if (TYPE_PRECISION (TREE_TYPE (t1)) != TYPE_PRECISION (TREE_TYPE (t2))) return return_false_with_msg ("REAL_CST precision mismatch"); - return return_with_debug (REAL_VALUES_IDENTICAL (TREE_REAL_CST (t1), - TREE_REAL_CST (t2))); + return return_with_debug (real_identical (&TREE_REAL_CST (t1), + &TREE_REAL_CST (t2))); case VECTOR_CST: { unsigned i; diff --git a/gcc/real.h b/gcc/real.h index 2ffc0d2..1be4104 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -333,7 +333,6 @@ extern const struct real_format arm_half_format; #define REAL_ARITHMETIC(value, code, d1, d2) \ real_arithmetic (&(value), code, &(d1), &(d2)) -#define REAL_VALUES_IDENTICAL(x, y) real_identical (&(x), &(y)) #define REAL_VALUES_LESS(x, y) real_compare (LT_EXPR, &(x), &(y)) /* Determine whether a floating-point value X is infinite. */ diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index b0ffc00..93c0a54 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -118,7 +118,7 @@ some_nonzerop (tree t) cannot be treated the same as operations with a real or imaginary operand if we care about the signs of zeros in the result. */ if (TREE_CODE (t) == REAL_CST && !flag_signed_zeros) - zerop = REAL_VALUES_IDENTICAL (TREE_REAL_CST (t), dconst0); + zerop = real_identical (&TREE_REAL_CST (t), &dconst0); else if (TREE_CODE (t) == FIXED_CST) zerop = fixed_zerop (t); else if (TREE_CODE (t) == INTEGER_CST) @@ -1021,7 +1021,7 @@ expand_complex_multiplication (gimple_stmt_iterator *gsi, tree inner_type, case PAIR (ONLY_IMAG, ONLY_REAL): rr = ar; if (TREE_CODE (ai) == REAL_CST - && REAL_VALUES_IDENTICAL (TREE_REAL_CST (ai), dconst1)) + && real_identical (&TREE_REAL_CST (ai), &dconst1)) ri = br; else ri = gimplify_build2 (gsi, MULT_EXPR, inner_type, ai, br); diff --git a/gcc/tree.c b/gcc/tree.c index b432997..f78a2c2 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -7370,7 +7370,7 @@ simple_cst_equal (const_tree t1, const_tree t2) return wi::to_widest (t1) == wi::to_widest (t2); case REAL_CST: - return REAL_VALUES_IDENTICAL (TREE_REAL_CST (t1), TREE_REAL_CST (t2)); + return real_identical (&TREE_REAL_CST (t1), &TREE_REAL_CST (t2)); case FIXED_CST: return FIXED_VALUES_IDENTICAL (TREE_FIXED_CST (t1), TREE_FIXED_CST (t2)); diff --git a/gcc/varasm.c b/gcc/varasm.c index 706e652..a5bb2b5 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3076,7 +3076,7 @@ compare_constant (const tree t1, const tree t2) if (TYPE_PRECISION (TREE_TYPE (t1)) != TYPE_PRECISION (TREE_TYPE (t2))) return 0; - return REAL_VALUES_IDENTICAL (TREE_REAL_CST (t1), TREE_REAL_CST (t2)); + return real_identical (&TREE_REAL_CST (t1), &TREE_REAL_CST (t2)); case FIXED_CST: /* Fixed constants are the same only if the same width of type. */