From patchwork Mon Jul 3 14:38:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 115393 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp571720vqx; Mon, 3 Jul 2023 07:39:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlE3CHpTulUkCyVQVucwdGkMkgp8HXvCoh/dk/DPQVNOyAMpqjAnOLmajYGqSVXVjBhXWCiH X-Received: by 2002:a17:906:6a19:b0:992:462d:e2af with SMTP id qw25-20020a1709066a1900b00992462de2afmr10421598ejc.75.1688395162027; Mon, 03 Jul 2023 07:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688395162; cv=none; d=google.com; s=arc-20160816; b=H7/kfsf+INpmBOdWkl1OccZGxPYn8GSDHB4W1pYjFA88WmES8oHCpemPah5DL1GrVO 1znS+yjmQT9eclk31meWiy1fEA7hVep8L0SnWdLlpGJ9CANm7dY1nZv14FV0PZVvnIol lJ/gJhgAiyds4qcBSOmdXwnl/M5Qv8bN4dcSj4rL6MviF9VuszKGpImTLKYnMcNdrDvG j6qms3brVBTto+M4O4wQVplYT7zDZK6uWckqFpDxriYkhF8orKqjTJ7xLsVTWpLhLec1 Iqfels6gTDBsIqMWkUQ7zqKlhhv1T2vfet6okiHDuWDhy7lspmNCBxS8cB44/nCs5Z2d qEnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:to:subject :message-id:date:mime-version:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=j6wv3btwqaD79kOnT2K+ivGRyceen9t0+i/Jv0JjoRo=; fh=XNn3asQvIblazGK92GBt13dVv+YmGV3pBS0JC29ZQco=; b=vnN2btwX2KrMRMppNsja4bhHlxMEqarvusDYemGgOMrkapxOX4K6ttSCm7QIjFywsM U2h3SxkKZm7fIDpxDVSUKvCadaDgXEnMnQvLrkX/FhRihHU2L6vqAyucH9u4GZdekDFs +bKvjPU4Yw7p0ylVVTXcVerr7nwVaI9r6w8g2ecKhx/8gLhGWfd4kaeeBFOpvaB/NeV3 O9/qlypT6Pz2EYiil88d18reqzB11wodQXGZL6+edFK8yXrvd4d63imgdQnVkTtq9Zy5 6eAYt/QsjdZq2fg6wGydccxIjdSlHv9hRanJ3rCiOBqi8nzQoQE/In2RHMVL2DN4Tbod KIaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=i2XID8uX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id lr27-20020a170906fb9b00b00992437c5881si7788351ejb.198.2023.07.03.07.39.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 07:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=i2XID8uX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A1E293858296 for ; Mon, 3 Jul 2023 14:39:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1E293858296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688395150; bh=j6wv3btwqaD79kOnT2K+ivGRyceen9t0+i/Jv0JjoRo=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=i2XID8uXeHdRkYjQ6np5FNHn43L/XueqrZvYTuzhPyQ7YZUDllzntLwkokzaIhthm KuVLW9WbLOzjECpLOg/slHsUqm/q65z8xOQCg11ClEVALJ5PXq4+UsKHNoLffPHoYD Px6zPNZVG9tUNl86FU9gHMrVeDuLskMDhBc77NxY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 94F5B3858C52 for ; Mon, 3 Jul 2023 14:38:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94F5B3858C52 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-51d7f350758so5900651a12.3 for ; Mon, 03 Jul 2023 07:38:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688395103; x=1690987103; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=j6wv3btwqaD79kOnT2K+ivGRyceen9t0+i/Jv0JjoRo=; b=abutRn9JcuZsdLUVX/CogFWkUIeUEfGy0XSYsnMRQFaBSv9+kYKo5+QaHb5UMEYKQH jwiwVRj3Kg1VgNQ/c646hW6mbH5vOMCxaS/PiKqTyOCkZt7FIiOKa+XFr69qgpfIJpsD iWPW7JPl2FSIzxy7ykpNX3JoAs7yJpCan88nOTddtNmufBksHFFdGHiYba+zj8QjGZut 6QWEnuzHYlkJ/h01/KzljiGEBHaISU2Setvw/Ww2ei3Zf8zWVtoNHulY2ifOhZLlmZ/0 LQLaw5r9ReTjTy8/4z4CB6dCnjg9D5KcZ+Cmy5pmO+yHy4w0BF79acSY84ZF7oFjnkzi YW9A== X-Gm-Message-State: ABy/qLYE606doqIh+MLEsLYp8GGGqAhDKKubB2n5XLb6/ooGmEPlLaO7 mJN/x4MJnjKVXjeWDhvd+pr4+caUTBfDjXLoiIakzpEMKIHhcg== X-Received: by 2002:a50:ec98:0:b0:51d:d01c:a2c4 with SMTP id e24-20020a50ec98000000b0051dd01ca2c4mr8305609edr.7.1688395102871; Mon, 03 Jul 2023 07:38:22 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 3 Jul 2023 16:38:11 +0200 Message-ID: Subject: [committed] tree+ggc: Change return type of predicate functions from int to bool To: "gcc-patches@gcc.gnu.org" X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Uros Bizjak via Gcc-patches From: Uros Bizjak Reply-To: Uros Bizjak Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770410644997231844?= X-GMAIL-MSGID: =?utf-8?q?1770410644997231844?= Also change internal variable from int to bool. gcc/ChangeLog: * tree.h (tree_int_cst_equal): Change return type from int to bool. (operand_equal_for_phi_arg_p): Ditto. (tree_map_base_marked_p): Ditto. * tree.cc (contains_placeholder_p): Update function body for bool return type. (type_cache_hasher::equal): Ditto. (tree_map_base_hash): Change return type from int to void and adjust function body accordingly. (tree_int_cst_equal): Ditto. (operand_equal_for_phi_arg_p): Ditto. (get_narrower): Change "first" variable to bool. (cl_option_hasher::equal): Update function body for bool return type. * ggc.h (ggc_set_mark): Change return type from int to bool. (ggc_marked_p): Ditto. * ggc-page.cc (gt_ggc_mx): Change return type from int to void and adjust function body accordingly. (ggc_set_mark): Ditto. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Uros. diff --git a/gcc/ggc-page.cc b/gcc/ggc-page.cc index c25218d7415..2f0b72e1b22 100644 --- a/gcc/ggc-page.cc +++ b/gcc/ggc-page.cc @@ -1538,7 +1538,7 @@ gt_ggc_mx (unsigned char& x ATTRIBUTE_UNUSED) P must have been allocated by the GC allocator; it mustn't point to static objects, stack variables, or memory allocated with malloc. */ -int +bool ggc_set_mark (const void *p) { page_entry *entry; @@ -1558,7 +1558,7 @@ ggc_set_mark (const void *p) /* If the bit was previously set, skip it. */ if (entry->in_use_p[word] & mask) - return 1; + return true; /* Otherwise set it, and decrement the free object count. */ entry->in_use_p[word] |= mask; @@ -1567,14 +1567,14 @@ ggc_set_mark (const void *p) if (GGC_DEBUG_LEVEL >= 4) fprintf (G.debug_file, "Marking %p\n", p); - return 0; + return false; } -/* Return 1 if P has been marked, zero otherwise. +/* Return true if P has been marked, zero otherwise. P must have been allocated by the GC allocator; it mustn't point to static objects, stack variables, or memory allocated with malloc. */ -int +bool ggc_marked_p (const void *p) { page_entry *entry; diff --git a/gcc/ggc.h b/gcc/ggc.h index 78eab7eaba6..34108e2f006 100644 --- a/gcc/ggc.h +++ b/gcc/ggc.h @@ -90,15 +90,15 @@ extern const struct ggc_root_tab * const gt_pch_scalar_rtab[]; /* Actually set the mark on a particular region of memory, but don't follow pointers. This function is called by ggc_mark_*. It - returns zero if the object was not previously marked; nonzero if + returns false if the object was not previously marked; true if the object was already marked, or if, for any other reason, pointers in this data structure should not be traversed. */ -extern int ggc_set_mark (const void *); +extern bool ggc_set_mark (const void *); -/* Return 1 if P has been marked, zero otherwise. +/* Return true if P has been marked, zero otherwise. P must have been allocated by the GC allocator; it mustn't point to static objects, stack variables, or memory allocated with malloc. */ -extern int ggc_marked_p (const void *); +extern bool ggc_marked_p (const void *); /* PCH and GGC handling for strings, mostly trivial. */ extern void gt_pch_n_S (const void *); diff --git a/gcc/tree.cc b/gcc/tree.cc index 58288efa2e2..bd500ec72a5 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -2839,7 +2839,7 @@ grow_tree_vec (tree v, int len MEM_STAT_DECL) return v; } -/* Return 1 if EXPR is the constant zero, whether it is integral, float or +/* Return true if EXPR is the constant zero, whether it is integral, float or fixed, and scalar, complex or vector. */ bool @@ -2850,7 +2850,7 @@ zerop (const_tree expr) || fixed_zerop (expr)); } -/* Return 1 if EXPR is the integer constant zero or a complex constant +/* Return true if EXPR is the integer constant zero or a complex constant of zero, or a location wrapper for such a constant. */ bool @@ -2874,7 +2874,7 @@ integer_zerop (const_tree expr) } } -/* Return 1 if EXPR is the integer constant one or the corresponding +/* Return true if EXPR is the integer constant one or the corresponding complex constant, or a location wrapper for such a constant. */ bool @@ -2898,9 +2898,9 @@ integer_onep (const_tree expr) } } -/* Return 1 if EXPR is the integer constant one. For complex and vector, - return 1 if every piece is the integer constant one. - Also return 1 for location wrappers for such a constant. */ +/* Return true if EXPR is the integer constant one. For complex and vector, + return true if every piece is the integer constant one. + Also return true for location wrappers for such a constant. */ bool integer_each_onep (const_tree expr) @@ -2914,8 +2914,8 @@ integer_each_onep (const_tree expr) return integer_onep (expr); } -/* Return 1 if EXPR is an integer containing all 1's in as much precision as - it contains, or a complex or vector whose subparts are such integers, +/* Return true if EXPR is an integer containing all 1's in as much precision + as it contains, or a complex or vector whose subparts are such integers, or a location wrapper for such a constant. */ bool @@ -2940,8 +2940,8 @@ integer_all_onesp (const_tree expr) == wi::to_wide (expr)); } -/* Return 1 if EXPR is the integer constant minus one, or a location wrapper - for such a constant. */ +/* Return true if EXPR is the integer constant minus one, or a location + wrapper for such a constant. */ bool integer_minus_onep (const_tree expr) @@ -2955,8 +2955,8 @@ integer_minus_onep (const_tree expr) return integer_all_onesp (expr); } -/* Return 1 if EXPR is an integer constant that is a power of 2 (i.e., has only - one bit on), or a location wrapper for such a constant. */ +/* Return true if EXPR is an integer constant that is a power of 2 (i.e., has + only one bit on), or a location wrapper for such a constant. */ bool integer_pow2p (const_tree expr) @@ -2974,7 +2974,7 @@ integer_pow2p (const_tree expr) return wi::popcount (wi::to_wide (expr)) == 1; } -/* Return 1 if EXPR is an integer constant other than zero or a +/* Return true if EXPR is an integer constant other than zero or a complex constant other than zero, or a location wrapper for such a constant. */ @@ -2990,10 +2990,10 @@ integer_nonzerop (const_tree expr) || integer_nonzerop (TREE_IMAGPART (expr))))); } -/* Return 1 if EXPR is the integer constant one. For vector, - return 1 if every piece is the integer constant minus one +/* Return true if EXPR is the integer constant one. For vector, + return true if every piece is the integer constant minus one (representing the value TRUE). - Also return 1 for location wrappers for such a constant. */ + Also return true for location wrappers for such a constant. */ bool integer_truep (const_tree expr) @@ -3005,7 +3005,7 @@ integer_truep (const_tree expr) return integer_onep (expr); } -/* Return 1 if EXPR is the fixed-point constant zero, or a location wrapper +/* Return true if EXPR is the fixed-point constant zero, or a location wrapper for such a constant. */ bool @@ -3152,9 +3152,9 @@ tree_ctz (const_tree expr) } } -/* Return 1 if EXPR is the real constant zero. Trailing zeroes matter for - decimal float constants, so don't return 1 for them. - Also return 1 for location wrappers around such a constant. */ +/* Return true if EXPR is the real constant zero. Trailing zeroes matter for + decimal float constants, so don't return true for them. + Also return true for location wrappers around such a constant. */ bool real_zerop (const_tree expr) @@ -3184,10 +3184,10 @@ real_zerop (const_tree expr) } } -/* Return 1 if EXPR is the real constant one in real or complex form. +/* Return true if EXPR is the real constant one in real or complex form. Trailing zeroes matter for decimal float constants, so don't return - 1 for them. - Also return 1 for location wrappers around such a constant. */ + true for them. + Also return true for location wrappers around such a constant. */ bool real_onep (const_tree expr) @@ -3211,9 +3211,9 @@ real_onep (const_tree expr) } } -/* Return 1 if EXPR is the real constant minus one. Trailing zeroes - matter for decimal float constants, so don't return 1 for them. - Also return 1 for location wrappers around such a constant. */ +/* Return true if EXPR is the real constant minus one. Trailing zeroes + matter for decimal float constants, so don't return true for them. + Also return true for location wrappers around such a constant. */ bool real_minus_onep (const_tree expr) @@ -3266,7 +3266,7 @@ real_maybe_zerop (const_tree expr) } } -/* Nonzero if EXP is a constant or a cast of a constant. */ +/* True if EXP is a constant or a cast of a constant. */ bool really_constant_p (const_tree exp) @@ -3381,7 +3381,7 @@ chain_index (int idx, tree chain) return chain; } -/* Return nonzero if ELEM is part of the chain CHAIN. */ +/* Return true if ELEM is part of the chain CHAIN. */ bool chain_member (const_tree elem, const_tree chain) @@ -4099,11 +4099,11 @@ contains_placeholder_p (const_tree exp) enum tree_code code; if (!exp) - return 0; + return false; code = TREE_CODE (exp); if (code == PLACEHOLDER_EXPR) - return 1; + return true; switch (TREE_CODE_CLASS (code)) { @@ -4138,7 +4138,7 @@ contains_placeholder_p (const_tree exp) case SAVE_EXPR: /* The save_expr function never wraps anything containing a PLACEHOLDER_EXPR. */ - return 0; + return false; default: break; @@ -4152,7 +4152,7 @@ contains_placeholder_p (const_tree exp) return (CONTAINS_PLACEHOLDER_P (TREE_OPERAND (exp, 0)) || CONTAINS_PLACEHOLDER_P (TREE_OPERAND (exp, 1))); default: - return 0; + return false; } case tcc_vl_exp: @@ -4164,17 +4164,17 @@ contains_placeholder_p (const_tree exp) const_call_expr_arg_iterator iter; FOR_EACH_CONST_CALL_EXPR_ARG (arg, iter, exp) if (CONTAINS_PLACEHOLDER_P (arg)) - return 1; - return 0; + return true; + return false; } default: - return 0; + return false; } default: - return 0; + return false; } - return 0; + return false; } /* Return true if any part of the structure of TYPE involves a PLACEHOLDER_EXPR @@ -5792,7 +5792,7 @@ tree_map_base_hash (const void *item) purposes. We simply return true if the from tree is marked, so that this structure goes away when the from tree goes away. */ -int +bool tree_map_base_marked_p (const void *p) { return ggc_marked_p (((const struct tree_map_base *) p)->from); @@ -6088,7 +6088,7 @@ type_cache_hasher::equal (type_hash *a, type_hash *b) TYPE_ATTRIBUTES (b->type)) || (TREE_CODE (a->type) != COMPLEX_TYPE && TYPE_NAME (a->type) != TYPE_NAME (b->type))) - return 0; + return false; /* Be careful about comparing arrays before and after the element type has been completed; don't compare TYPE_ALIGN unless both types are @@ -6096,7 +6096,7 @@ type_cache_hasher::equal (type_hash *a, type_hash *b) if (COMPLETE_TYPE_P (a->type) && COMPLETE_TYPE_P (b->type) && (TYPE_ALIGN (a->type) != TYPE_ALIGN (b->type) || TYPE_MODE (a->type) != TYPE_MODE (b->type))) - return 0; + return false; switch (TREE_CODE (a->type)) { @@ -6106,7 +6106,7 @@ type_cache_hasher::equal (type_hash *a, type_hash *b) case POINTER_TYPE: case REFERENCE_TYPE: case NULLPTR_TYPE: - return 1; + return true; case VECTOR_TYPE: return known_eq (TYPE_VECTOR_SUBPARTS (a->type), @@ -6120,7 +6120,7 @@ type_cache_hasher::equal (type_hash *a, type_hash *b) && TREE_CODE (TYPE_VALUES (b->type)) == TREE_LIST && type_list_equal (TYPE_VALUES (a->type), TYPE_VALUES (b->type)))) - return 0; + return false; /* fall through */ @@ -6152,7 +6152,7 @@ type_cache_hasher::equal (type_hash *a, type_hash *b) && type_list_equal (TYPE_ARG_TYPES (a->type), TYPE_ARG_TYPES (b->type))))) break; - return 0; + return false; case ARRAY_TYPE: /* Don't compare TYPE_TYPELESS_STORAGE flag on aggregates, where the flag should be inherited from the element type @@ -6187,16 +6187,16 @@ type_cache_hasher::equal (type_hash *a, type_hash *b) && type_list_equal (TYPE_ARG_TYPES (a->type), TYPE_ARG_TYPES (b->type)))) break; - return 0; + return false; default: - return 0; + return false; } if (lang_hooks.types.type_hash_eq != NULL) return lang_hooks.types.type_hash_eq (a->type, b->type); - return 1; + return true; } /* Given TYPE, and HASHCODE its hash code, return the canonical @@ -6355,17 +6355,17 @@ type_argument_type (const_tree fntype, unsigned argno) return NULL_TREE; } -/* Nonzero if integer constants T1 and T2 +/* True if integer constants T1 and T2 represent the same constant value. */ -int +bool tree_int_cst_equal (const_tree t1, const_tree t2) { if (t1 == t2) - return 1; + return true; if (t1 == 0 || t2 == 0) - return 0; + return false; STRIP_ANY_LOCATION_WRAPPER (t1); STRIP_ANY_LOCATION_WRAPPER (t2); @@ -6373,9 +6373,9 @@ tree_int_cst_equal (const_tree t1, const_tree t2) if (TREE_CODE (t1) == INTEGER_CST && TREE_CODE (t2) == INTEGER_CST && wi::to_widest (t1) == wi::to_widest (t2)) - return 1; + return true; - return 0; + return false; } /* Return true if T is an INTEGER_CST whose numerical value (extended @@ -7978,7 +7978,7 @@ tree get_narrower (tree op, int *unsignedp_ptr) { int uns = 0; - int first = 1; + bool first = true; tree win = op; bool integral_p = INTEGRAL_TYPE_P (TREE_TYPE (op)); @@ -8026,7 +8026,7 @@ get_narrower (tree op, int *unsignedp_ptr) if a zero extension has been stripped, only zero-extensions. */ else if (uns != TYPE_UNSIGNED (TREE_TYPE (op))) break; - first = 0; + first = false; } else /* bitschange == 0 */ { @@ -8034,7 +8034,7 @@ get_narrower (tree op, int *unsignedp_ptr) preserve the unsignedness. */ if (first) uns = TYPE_UNSIGNED (TREE_TYPE (op)); - first = 0; + first = false; op = TREE_OPERAND (op, 0); /* Keep trying to narrow, but don't assign op to win if it would turn an integral type into something else. */ @@ -11194,19 +11194,19 @@ lower_bound_in_type (tree outer, tree inner) } } -/* Return nonzero if two operands that are suitable for PHI nodes are +/* Return true if two operands that are suitable for PHI nodes are necessarily equal. Specifically, both ARG0 and ARG1 must be either SSA_NAME or invariant. Note that this is strictly an optimization. That is, callers of this function can directly call operand_equal_p and get the same result, only slower. */ -int +bool operand_equal_for_phi_arg_p (const_tree arg0, const_tree arg1) { if (arg0 == arg1) - return 1; + return true; if (TREE_CODE (arg0) == SSA_NAME || TREE_CODE (arg1) == SSA_NAME) - return 0; + return false; return operand_equal_p (arg0, arg1, 0); } @@ -11825,7 +11825,7 @@ cl_option_hasher::equal (tree x, tree y) const_tree const yt = y; if (TREE_CODE (xt) != TREE_CODE (yt)) - return 0; + return false; if (TREE_CODE (xt) == OPTIMIZATION_NODE) return cl_optimization_option_eq (TREE_OPTIMIZATION (xt), diff --git a/gcc/tree.h b/gcc/tree.h index f11c758afb9..213a097ab55 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4810,7 +4810,7 @@ extern bool vec_member (const_tree, vec *); extern tree chain_index (int, tree); /* Arguments may be null. */ -extern int tree_int_cst_equal (const_tree, const_tree); +extern bool tree_int_cst_equal (const_tree, const_tree); /* The following predicates are safe to call with a null argument. */ extern bool tree_fits_shwi_p (const_tree) ATTRIBUTE_PURE; @@ -5418,7 +5418,7 @@ extern bool operation_can_overflow (enum tree_code); extern bool operation_no_trapping_overflow (tree, enum tree_code); extern tree upper_bound_in_type (tree, tree); extern tree lower_bound_in_type (tree, tree); -extern int operand_equal_for_phi_arg_p (const_tree, const_tree); +extern bool operand_equal_for_phi_arg_p (const_tree, const_tree); extern tree create_artificial_label (location_t); extern const char *get_name (tree); extern bool stdarg_p (const_tree); @@ -5662,7 +5662,7 @@ extern tree component_ref_size (tree, special_array_member * = NULL); extern int tree_map_base_eq (const void *, const void *); extern unsigned int tree_map_base_hash (const void *); -extern int tree_map_base_marked_p (const void *); +extern bool tree_map_base_marked_p (const void *); extern void DEBUG_FUNCTION verify_type (const_tree t); extern bool gimple_canonical_types_compatible_p (const_tree, const_tree, bool trust_type_canonical = true);