From patchwork Fri Oct 16 19:14:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 1383518 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=X3HQEgis; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CCbS96XnGz9sSf for ; Sat, 17 Oct 2020 06:14:33 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EB82B396EC45; Fri, 16 Oct 2020 19:14:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB82B396EC45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1602875672; bh=DVZ8DbUcl5eS/chawKQkeiGs4V7+ZLBfYBQT56/b1bk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=X3HQEgisMuFBcc06t7lyl4JPDnBse8mJibDWu7hBoIPAtNtNNtHfl+KMe2Gv7bqZZ swOSHqPj8Dew/VMzks2AZMqa62BBSBTrcSvgphAulxDQ/GlyZC6WKiR0xQbpmNLvOn BO8bMIUGOT7YYxIT1HUxJWCt+zttHIDJ0hIZ/mKg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id B2B40384640D for ; Fri, 16 Oct 2020 19:14:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B2B40384640D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-55-zFJBtQ4hPs2s_1e6b2eqBg-1; Fri, 16 Oct 2020 15:14:27 -0400 X-MC-Unique: zFJBtQ4hPs2s_1e6b2eqBg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 42D9F6409C for ; Fri, 16 Oct 2020 19:14:26 +0000 (UTC) Received: from [10.10.118.239] (ovpn-118-239.rdu2.redhat.com [10.10.118.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F1AA60CD0; Fri, 16 Oct 2020 19:14:25 +0000 (UTC) To: gcc-patches Subject: [PATCH] Don't display ranges for dead ssa-names. Message-ID: Date: Fri, 16 Oct 2020 15:14:24 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Andrew MacLeod via Gcc-patches From: Andrew MacLeod Reply-To: Andrew MacLeod Cc: Jakub Jelinek Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" AS Jakub  observed in an earlier testcase (97325),  when EVRP dumps the known SSA_RANGES, it isn't expecting names to be deleted that it could not delete, so it wasn't checking. With the hybrid model, ranger sometimes deletes things that EVRP calculated a range for, and the resulting dump was confusing  _1: short unsigned int VARYING  _2: int [0, 65535]  _3: int [-65535, 0]  : int [0, 32]  : long long unsigned int [0, 0]  c_6(D): long long unsigned int VARYING  : long long unsigned int [0, 32] Now we just check if then name is valid before dumping. Bootstrapped on x86_64-pc-linux-gnu,  no regressions, pushed. 2020-10-16 Andrew MacLeod * vr-values.c (dump_all_value_ranges): Only dump names which are still active. diff --git a/gcc/vr-values.c b/gcc/vr-values.c index da0b249278b..e917704d9bb 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -1999,7 +1999,7 @@ vr_values::dump_all_value_ranges (FILE *file) for (i = 0; i < num_vr_values; i++) { - if (vr_value[i]) + if (vr_value[i] && ssa_name (i)) { print_generic_expr (file, ssa_name (i)); fprintf (file, ": ");