From patchwork Wed Jul 14 22:05:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 1505430 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=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) 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=pzWBp/lb; dkim-atps=neutral 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 4GQBQM4hs0z9sWX for ; Thu, 15 Jul 2021 08:05:30 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28E58398B8B0 for ; Wed, 14 Jul 2021 22:05:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28E58398B8B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1626300327; bh=xCn6jnCala3Tv4mjhn5wk99PdVO1bivkuLVuv0tn7Ms=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pzWBp/lbpofwmeZecHmk5PmUhnLjc7WLytPIqJmoaKaBj+YCnkL7SgT4kAtOWTAs2 g6fpOExsuqT3gs2B9z6vgKhfAsxluv2j7zwPgGIPIKbTftEO7/xdFaiin8m58WN09d 2qjEn9pXApIUCqQsjT2GRSUWZs76aU/QiT2ooxTM= 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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 49392398B86E for ; Wed, 14 Jul 2021 22:05:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 49392398B86E Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-vukDRa2BPhOLGXDO1bEOKQ-1; Wed, 14 Jul 2021 18:05:05 -0400 X-MC-Unique: vukDRa2BPhOLGXDO1bEOKQ-1 Received: by mail-qk1-f197.google.com with SMTP id t144-20020a3746960000b02903ad9c5e94baso2270077qka.16 for ; Wed, 14 Jul 2021 15:05:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=xCn6jnCala3Tv4mjhn5wk99PdVO1bivkuLVuv0tn7Ms=; b=rSP3f896LkwkdPbX11vHlS+BevS6KDOnOjDvMP6iY+3FAgvuRZlY3KMm+Fwwqh0nO/ ruQwUZCkF1FdZQXlucP+3A2LRGCf+lB6IgxpmCtpPihwCqv0OUKIa82eumakt1TAnnuc AzFX3Wanf8fh7BExO3NIc9q3qUBETx2Ur+X5wKjkc+l5MbsLNUnkzT1JGXp/mg4sOPRq tGCMceM8mRKnG6DPE2yK+ouMgywtMOWV5xrPvo9bRBqiMUaidxF1dOskojC0XPu+mVN2 zNfSXrIbb8yjEcYQeiaJG0VDFkoJgfWlI2jmovELCXOvyLeD9z1FBk1Xskr3LUegHU3B H7FA== X-Gm-Message-State: AOAM5321mDD70DgS1pYxrX81vUnrIcCIlR5VDG5NB+pWQTt3BfqbBqH+ a2UCkDpK20OihTJk3Q7mJWH47V2YkAuSYTC7igzjGMu2xcXpMaES/pLQ2UBryZoFh7JdOGBJGWW aeSVJ6oVGVzkP0JEPspG55N8TQcVAfF8xXpFkO4SDLNXkUTeokD9GaSlW5pQvP06WrA1OBQ== X-Received: by 2002:a0c:ba05:: with SMTP id w5mr297488qvf.60.1626300304665; Wed, 14 Jul 2021 15:05:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2UijWRG5bUtOY5uRHsn7TGkFH+7+VV9GBYRkUQ7692TM9lECCeraLpbY+XZIquTs/E/dbCw== X-Received: by 2002:a0c:ba05:: with SMTP id w5mr297477qvf.60.1626300304455; Wed, 14 Jul 2021 15:05:04 -0700 (PDT) Received: from [192.168.0.102] ([104.219.122.163]) by smtp.gmail.com with ESMTPSA id t64sm1656144qkd.71.2021.07.14.15.05.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jul 2021 15:05:04 -0700 (PDT) To: gcc-patches Subject: [GCC 11] [COMMITTED] Don't process lookups for debug statements in Ranger. Message-ID: <92587687-46a1-6220-742f-2dda1ce09305@redhat.com> Date: Wed, 14 Jul 2021 18:05:01 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-CA X-Spam-Status: No, score=-12.4 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_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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: Andrew MacLeod via Gcc-patches From: Andrew MacLeod Reply-To: Andrew MacLeod Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Short cut version to disable processing of debug statements by ranger in GCC 11. Although PR 100781 is not an issue in GCC11, its possible that a similar situation may arise.  The identical fix cannot be easily introduced. With EVRP always running in hybrid mode, there is no need for ranger to spawn a lookup for a debug statement in this release. bootstrapped with no regressions on x86_64-pc-linux-gnu.  pushed. Andrew From 263a7e20c88a35bdfaebfac3c9abb313c5867590 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 8 Jun 2021 09:43:17 -0400 Subject: [PATCH 4/8] Don't process lookups for debug statements in Ranger. Although PR 100781 is not an issue in GCC11, its possible that a similar situation may arise. The identical fix cannot be easily introduced. With EVRP always running in hybrid mode, there is no need for ranger to spawn a lookup for a debug statement in this release. * gimple-range.cc (gimple_ranger::range_of_expr): Treat debug statments as contextless queries to avoid additional lookups. --- gcc/gimple-range.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 6158a754dd6..fd7fa5e3dbb 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -945,7 +945,7 @@ gimple_ranger::range_of_expr (irange &r, tree expr, gimple *stmt) return get_tree_range (r, expr); // If there is no statement, just get the global value. - if (!stmt) + if (!stmt || is_gimple_debug (stmt)) { if (!m_cache.get_global_range (r, expr)) r = gimple_range_global (expr); -- 2.17.2