From patchwork Tue Feb 22 16:39:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 51304 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5B73388CC12 for ; Tue, 22 Feb 2022 16:40:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5B73388CC12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1645548016; bh=TRgSXCZmrR4+mjcuQ05HUkpgKk/I4K8c/rthBkx18Jw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Vd6rRKl4WIlZ2LDTTrnGzJ9Q+PE40S5CPb0g9qdstLF4Cp+Gm8b8Iv/p5QWe5Qd42 Ee1VPVXOPrNhWshU7x87FwznLIs1FlLEkwdbmSrXPCo1oxdz7e8ABC8OUUB+1qgbBH Jl9QyicmjIZEJyIWY7nOon/i0R/jLyh9VdI8u+SA= 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 ESMTPS id 3A9393857817 for ; Tue, 22 Feb 2022 16:39:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A9393857817 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-2-vBqmbEbrMYeSw9G35nVgWQ-1; Tue, 22 Feb 2022 11:39:45 -0500 X-MC-Unique: vBqmbEbrMYeSw9G35nVgWQ-1 Received: by mail-qv1-f72.google.com with SMTP id s8-20020ad45008000000b004325198c76bso90033qvo.19 for ; Tue, 22 Feb 2022 08:39:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject:cc:content-transfer-encoding; bh=TRgSXCZmrR4+mjcuQ05HUkpgKk/I4K8c/rthBkx18Jw=; b=Xgzx/8eRcGb63nEt28x51QD8YBcI5GDt1/j22d+ACJ59l1Q08fjaVgKMjEXO+R9ZSA SELsRXUw2OyJFF4I7/++TChPmuAJNfTrPY/o85rPHMC5Z1FXOOIJe0VDqjS3s0Z+3g0E DuDCyro4TXqa36GoEgLqUesw49R5PTBexsTk22KuVKYSzFW50UG6V4nluZ1o0VJmXWOT l0Lg54K0ecLBx0Ugkrf2AyHsgGaWlQRnRDZoH2gxMxEer8r1ddZlT2B6Y/xREWT3B6u8 tofUuOq7/U7/bU8Ii4kWccwRqZCh0vW4DT/7uwAVUmjSgFfu85X4h5syVKbtxPLmKVu5 owkA== X-Gm-Message-State: AOAM530pwyC8NZltykifS42fEcQT70T5uYcf3pUTLXiQU8l4QEOVW+WQ RQP7oiwlx2Zu4WgGlItXXk+XHyF1qODrJPyXYaunXs1FjGDxZJc4o4qSMf5pRKo6Cq7M4KroykI jQUIoFW4ldmCU2tdgV+FFHoPizlA1B5uFeJ4Wv4yIfPsKXsZuICjZSCdOwqIT3yAigTvmYw== X-Received: by 2002:a05:622a:155:b0:2de:466:ad1d with SMTP id v21-20020a05622a015500b002de0466ad1dmr12534466qtw.246.1645547984512; Tue, 22 Feb 2022 08:39:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQmBfJrY13dZAbNy1PqlgW4OjxX+hAyHqKgeMkYgUAIrT7/lEASfTPt8QT5Tv8yDOFgL62KQ== X-Received: by 2002:a05:622a:155:b0:2de:466:ad1d with SMTP id v21-20020a05622a015500b002de0466ad1dmr12534440qtw.246.1645547984237; Tue, 22 Feb 2022 08:39:44 -0800 (PST) Received: from ?IPV6:2607:fea8:a262:5f00::9b6f? ([2607:fea8:a262:5f00::9b6f]) by smtp.gmail.com with ESMTPSA id m1sm89324qkn.19.2022.02.22.08.39.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Feb 2022 08:39:43 -0800 (PST) Message-ID: Date: Tue, 22 Feb 2022 11:39:41 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 To: gcc-patches Subject: [PATCH 0/2] tree-optimization/104530 - proposed re-evaluation. X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-CA X-Spam-Status: No, score=-6.0 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_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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 Cc: Jakub Jelinek Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" I'd like to get clarification on some subtle terminology. I find I am conflating calls that don't return with calls that may throw, and I think they have different considerations. My experiments with calls that can throw indicate that they always end a basic block.  This makes sense to me as there is the outgoing fall-thru edge and an outgoing EH edge.  Are there any conditions under which this is not the case? (other than non-call exceptions) If that supposition is true, that leaves us with calls in the middle of the block which may not return.  This prevents us from allowing later calculations from impacting anything which happens before the call. I believe the following 2 small patches could then resolve this.  1 - Export global names to SSA_NAME_RANGE_INFO during the statement walk instead of at the end of the pass  2 - Use the existing lazy recomputation machinery to recompute any globals which are defined in the block where a dependent value becomes non-null. More details in each patch.  Neither is very large.  We could add this to this release or wait for stage 1. Andrew