From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1285) id 20FF43858D3C; Fri, 7 Oct 2022 10:17:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20FF43858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665137865; bh=S1k/CpDcUxcF6cdstjWZMA0IPDE9syoce8ZpsC4FIHU=; h=From:To:Subject:Date:From; b=WJ/cdgz2DeNhhWyYCXPk617bTsqkGFjEXqC3ctlkRJuUL9wnmWFYJyM8bouLh5+G2 Fe17ogDobIE2/kXR1qgWZqWWAumDzBHoaPDIZL4mp0FL+Nz9DISxabnYvd8DKrwNvO +O8Fm+0ATTc8WGl+s5ragBytnxaAIvONdapLfaKE= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Eric Botcazou To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3156] Reduce DF computation at -O0 X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: ffaf244c442c575aadbe1c947e22f791a6f14c96 X-Git-Newrev: 7b8a77eba5efbc6d9556f026774fa1447675602c Message-Id: <20221007101745.20FF43858D3C@sourceware.org> Date: Fri, 7 Oct 2022 10:17:45 +0000 (GMT) List-Id: https://gcc.gnu.org/g:7b8a77eba5efbc6d9556f026774fa1447675602c commit r13-3156-g7b8a77eba5efbc6d9556f026774fa1447675602c Author: Eric Botcazou Date: Fri Oct 7 12:14:30 2022 +0200 Reduce DF computation at -O0 Even at -O0 there may be a fair amount of DF computation performed when compiling large units and part of it appears to be useless. gcc/ * function.cc (thread_prologue_and_epilogue_insns): Update only entry and exit blocks when not optimizing. Remove dead statement. Diff: --- gcc/function.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/function.cc b/gcc/function.cc index 5498a712c4a..6474a663b30 100644 --- a/gcc/function.cc +++ b/gcc/function.cc @@ -6249,10 +6249,15 @@ thread_prologue_and_epilogue_insns (void) } } - /* Threading the prologue and epilogue changes the artificial refs - in the entry and exit blocks. */ - epilogue_completed = 1; - df_update_entry_exit_and_calls (); + /* Threading the prologue and epilogue changes the artificial refs in the + entry and exit blocks, and may invalidate DF info for tail calls. */ + if (optimize) + df_update_entry_exit_and_calls (); + else + { + df_update_entry_block_defs (); + df_update_exit_block_uses (); + } } /* Reposition the prologue-end and epilogue-begin notes after