From patchwork Tue Nov 5 04:14:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 1189301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-512389-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="jbwUih0d"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="KoD7KFfs"; dkim-atps=neutral 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 476bsB6VMlz9sNT for ; Tue, 5 Nov 2019 15:14:20 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=uYQHWj8nFBK0X3B0if+0hO0XYXXH2QhfLVnvOrGJIgw+IGAHMn jvl/XsJjKUcauxiZmyceryPM8jIT/zV8r3hyW0JxNB3hsLFiVReiQfFQlw1SlpYi WxmoNZCh5pHdLxoWRGbdiP6pM9llG2kyc9R8bSpq6C4R0PMiypXPHjcC0= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=2izM1XC6lmZimrYjy49df0C2VWo=; b=jbwUih0dxHPRNjIC/Ir0 e6A5gu0dR6x/rzumxA4vWaWDVfY/9L5FubeaCifc+6mwF9NWyAWGz8GJf1lokwPg r4UiW6g7+wz3hxW+MhbhZjW3AvB+w0vP15OYxPg94UXNLbPhaTSejUJk/CZ5WWB4 ygZtha1D3rlF4LIT+ocLVCw= Received: (qmail 61224 invoked by alias); 5 Nov 2019 04:14:12 -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 61216 invoked by uid 89); 5 Nov 2019 04:14:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=2798, b1 X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Nov 2019 04:14:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572927250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=+eyLYhNoveXilqVwPNVaHE/oTB01mCJT6thJjpFZXSc=; b=KoD7KFfs0257ka77dVJYqYxvdQwv4d4bKOq/xqW9kIQKAuhLeRPhoe5I2lCODkRjw3cQ9U nld1X0ZqaLLpzoKv52iyO/KhHfTYFlOSpoCMHok+pY3D9qHE/+4yYnalst6k3qAigdDQLX 4YN9zQjqGYwvoT8eTZOft0DcnZPyMhg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-218-a9LhqMjtN52j0cJRvX0mXQ-1; Mon, 04 Nov 2019 23:14:08 -0500 Received: by mail-wm1-f70.google.com with SMTP id d140so6791146wmd.1 for ; Mon, 04 Nov 2019 20:14:07 -0800 (PST) Received: from abulafia.quesejoda.com (149.red-81-32-135.dynamicip.rima-tde.net. [81.32.135.149]) by smtp.gmail.com with ESMTPSA id v128sm25281278wmb.14.2019.11.04.20.14.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Nov 2019 20:14:04 -0800 (PST) To: gcc-patches From: Aldy Hernandez Subject: [committed] make vrp_bitmap_equal_p static Message-ID: Date: Tue, 5 Nov 2019 05:14:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-IsSubscribed: yes This function is only used once, so there's no need for it to be externally visible. Committed as obvious. commit 53363b9234db6e3b696abc53b24ea1e0d2547038 Author: Aldy Hernandez Date: Tue Nov 5 05:10:41 2019 +0100 Move vrp_bitmap_equal_p above its only use and make it static. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1c2fff16295..f492ea6da0c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-11-05 Aldy Hernandez + + * tree-vrp.h (vrp_bitmap_equal_p): Remove. + * tree-vrp.c (vrp_bitmap_equal_p): Move before use and make + static. + 2019-11-05 Aldy Hernandez * tree-vrp.c (value_range_base::operator==): Use equal_p to diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index a6d44e9dc6d..e926670b962 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -254,6 +254,18 @@ value_range_base::equal_p (const value_range_base &other) const && vrp_operand_equal_p (m_max, other.m_max)); } +/* Return true if the bitmaps B1 and B2 are equal. */ + +static bool +vrp_bitmap_equal_p (const_bitmap b1, const_bitmap b2) +{ + return (b1 == b2 + || ((!b1 || bitmap_empty_p (b1)) + && (!b2 || bitmap_empty_p (b2))) + || (b1 && b2 + && bitmap_equal_p (b1, b2))); +} + /* Returns TRUE if THIS == OTHER. Ignores the equivalence bitmap if IGNORE_EQUIVS is TRUE. */ @@ -910,18 +922,6 @@ vrp_operand_equal_p (const_tree val1, const_tree val2) return true; } -/* Return true, if the bitmaps B1 and B2 are equal. */ - -bool -vrp_bitmap_equal_p (const_bitmap b1, const_bitmap b2) -{ - return (b1 == b2 - || ((!b1 || bitmap_empty_p (b1)) - && (!b2 || bitmap_empty_p (b2))) - || (b1 && b2 - && bitmap_equal_p (b1, b2))); -} - static bool range_has_numeric_bounds_p (const value_range_base *vr) { diff --git a/gcc/tree-vrp.h b/gcc/tree-vrp.h index 5cd94733188..3861634fb7e 100644 --- a/gcc/tree-vrp.h +++ b/gcc/tree-vrp.h @@ -279,8 +279,6 @@ extern void register_edge_assert_for (tree, edge, enum tree_code, extern bool stmt_interesting_for_vrp (gimple *); extern bool infer_value_range (gimple *, tree, tree_code *, tree *); -extern bool vrp_bitmap_equal_p (const_bitmap, const_bitmap); - extern bool range_int_cst_p (const value_range_base *); extern int compare_values (tree, tree);