From patchwork Tue Sep 21 16:53:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 1530809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.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=mn8Y9DCV; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4HDSG22YVQz9shn for ; Wed, 22 Sep 2021 02:54:48 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 20DB8385800B for ; Tue, 21 Sep 2021 16:54:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20DB8385800B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1632243286; bh=lWdFc8/r8cz8Wy9dxAf/6njVR18Vp6b40hUOOaODb5s=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=mn8Y9DCVzthicw3q0BomzOtY6CNoTfrPq6aJ+EaVh4l260wApOOlItTytsPxy8VUr utIy+m7pT3zvz9tBdJaWqIT+abBrdnsYhcnd9PBtIN6b50+NF3cML7twguDlV7QMop 1cQA5+gR044BvdEVCJBfNMODj56gx2pKCx1kMf20= 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 A6C533858402 for ; Tue, 21 Sep 2021 16:54:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6C533858402 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-423-3vQX2BkLOo6RBPP7E3zyrQ-1; Tue, 21 Sep 2021 12:54:03 -0400 X-MC-Unique: 3vQX2BkLOo6RBPP7E3zyrQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EEC2A802E3B; Tue, 21 Sep 2021 16:54:01 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.248]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B0861017CE7; Tue, 21 Sep 2021 16:54:01 +0000 (UTC) Received: from abulafia.quesejoda.com (localhost [127.0.0.1]) by abulafia.quesejoda.com (8.16.1/8.15.2) with ESMTPS id 18LGrwaU414659 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 21 Sep 2021 18:53:58 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.16.1/8.16.1/Submit) id 18LGrvEv414658; Tue, 21 Sep 2021 18:53:57 +0200 To: Andrew MacLeod Subject: [PATCH 0/7] Add ability to resolve unknowns to path solver. Date: Tue, 21 Sep 2021 18:53:43 +0200 Message-Id: <20210921165350.414593-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Aldy Hernandez via Gcc-patches From: Aldy Hernandez Reply-To: Aldy Hernandez Cc: GCC patches Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" The default behavior for the path solver is to resort to VARYING when the range for a requested SSA is outside the given path. This is both cheap and fast, but fails to get a significant amount of ranges that traditionally the DOM and VRP threaders got. This patchset improves the path solver such that any names outside the given path are resolved with the ranger. It also adds the ability to resolve relations ocurring both within and without the path. This functionality is turned off by default. It will be used by the hybrid VRP threader replacement, as well as by the backward threader when it becomes the only threader in town. This entire patchset has been bootstrapped and tested on x86-64 Linux, both alone, and along with upcoming patches to the threader and VRP. Committing to trunk. Aldy Aldy Hernandez (7): Allocate non_null_ref tables at creation. Do not query SCEV in range_of_phi unless dominators are available. Move postfold_gcond_edges into fur_source. path solver: Add relation support. path solver: Remove useless code. path solver: Add related SSAs to solvable set. path solver: Use ranger to solve unknowns. gcc/gimple-range-cache.cc | 4 +- gcc/gimple-range-fold.cc | 48 ++--- gcc/gimple-range-fold.h | 4 +- gcc/gimple-range-path.cc | 375 +++++++++++++++++++++++++++++++--- gcc/gimple-range-path.h | 20 +- gcc/tree-ssa-threadbackward.c | 2 +- 6 files changed, 396 insertions(+), 57 deletions(-)