From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 83C0E385741D for ; Tue, 27 Jul 2021 15:21:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 83C0E385741D Received: by mail-pj1-x1029.google.com with SMTP id m2-20020a17090a71c2b0290175cf22899cso5320135pjs.2 for ; Tue, 27 Jul 2021 08:21:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=8tSkF/gB1WOve8v9k7mPpKWR9MwZYA0N4CwqEA/Y8Xs=; b=uArYXZe76fqO6TElQ8pNOffBKIXVVOLVfVkeJQEKMuv2QlrhSGF9Cp8sGzKCVhemTh Q2Ml7B44SWLd1weOv4mVWmTddfb/NJ7qbmNVetPuPmyKm49fsUMCAJ5JqHm9IFXriiAR P51mgll+DiYzqHGlSEmdPeAUfJ2r1WKU4eXkWQynF88nv3xeY50biNSYTc1fZAuckZYY tlGJtnzupY/PjVg7ql1SprgSeiSeMlkTaQ4TBgNrCp9ZgjrzJx6z81bCtx8CHx+/peJZ PvZZ/i48I46L21RRlfQBbpxsAFw9khOhZczPdX/x3yZFBYRI4R1yHRijSklp1aV3jdb/ Dd3Q== X-Gm-Message-State: AOAM532K2dQjLhnqAov9zwv+EwPOioRApONcqLOHWaUoBTXUqmWPPqD3 vfvFtlfObvZiaKjkyT78Wik= X-Google-Smtp-Source: ABdhPJz11Rbgmm3MfNW0qTxPVQVPFoRdWQcrbIRniI0tagIZ5cSNBO4xvqyDr7CmyKMSXsLumbiIiw== X-Received: by 2002:a63:449:: with SMTP id 70mr24178370pge.174.1627399261453; Tue, 27 Jul 2021 08:21:01 -0700 (PDT) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id e4sm4320436pgi.94.2021.07.27.08.20.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Jul 2021 08:21:01 -0700 (PDT) Subject: Re: 0001-Don-t-skip-prologue-instructions-as-it-could-affect-.patch To: Segher Boessenkool Cc: Richard Biener , "Bin.Cheng" , Eric Botcazou , Jeff Law , GCC Patches , "bin.cheng" References: <20210726225505.GU1583@gate.crashing.org> From: Jeff Law Message-ID: Date: Tue, 27 Jul 2021 09:20:57 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210726225505.GU1583@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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-List-Received-Date: Tue, 27 Jul 2021 15:21:04 -0000 On 7/26/2021 4:55 PM, Segher Boessenkool wrote: > On Fri, Jul 23, 2021 at 10:27:37AM -0600, Jeff Law wrote: >> On 7/22/2021 7:04 AM, Richard Biener via Gcc-patches wrote: >>> On Thu, Jul 22, 2021 at 9:02 AM Bin.Cheng via Gcc-patches >>> wrote: >>>> Gentle ping. Any suggestions would be appreciated. >>> So just to say something - does the existing code mean that any use of >>> the alias info on prologue/epilogue insns is wrong? We have >>> >>> /* The prologue/epilogue insns are not threaded onto the >>> insn chain until after reload has completed. Thus, >>> there is no sense wasting time checking if INSN is in >>> the prologue/epilogue until after reload has completed. */ >>> bool could_be_prologue_epilogue = ((targetm.have_prologue () >>> || targetm.have_epilogue ()) >>> && reload_completed); >>> >>> so when !could_be_prologue_epilogue then passes shouldn't run into >>> them if the comment is correct. But else even epilogue stmts could appear >>> anywhere (like scheduled around)? So why's skipping those OK? >> These insns don't exist until after reload has completed.  I think this >> code is just trying to be more compile-time efficient and not look for >> them when they're known to not exist. > Yeah. Unfortunately it isn't trivial to see if this is a premature > optimisation, or if this is needed for correctness instead. But it is > stage 1 still :-) https://gcc.gnu.org/pipermail/gcc-patches/2000-May/031560.html Jeff