From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1285) id 51A263858425; Fri, 13 Jan 2023 21:15:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51A263858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673644552; bh=Y/kz0ljZN6/OWaayYeW+BYalvfOsLhDOo9wDo0A07u0=; h=From:To:Subject:Date:From; b=pbWg8EHFXCnEhMi4HkutWItRvhfUrFN/Qpsr8JtTXtH0E+bEKwKIzTrOudUOvRo2S Ie9MmF7KruBOn9PrbDT+l9PULgMjiVoj32xCR26Q9qFc5l6T/UEe0kIaTf2y0/Txuy M2X52bqjs3ydTiu8YcvTSAdDMQLyiVGKWJI6VnCM= 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-5157] Fix PR rtl-optimization/108274 X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: 1a460d19ba0939e05b38befb6256f4f4bb416e0d X-Git-Newrev: 4fa6845b4b29f33cc7ea3d8ff49b61bb1f460561 Message-Id: <20230113211552.51A263858425@sourceware.org> Date: Fri, 13 Jan 2023 21:15:52 +0000 (GMT) List-Id: https://gcc.gnu.org/g:4fa6845b4b29f33cc7ea3d8ff49b61bb1f460561 commit r13-5157-g4fa6845b4b29f33cc7ea3d8ff49b61bb1f460561 Author: Eric Botcazou Date: Fri Jan 13 22:05:28 2023 +0100 Fix PR rtl-optimization/108274 Unlike other IPA passes, the ICF pass can be run at -O0 and some testcases rely on this in the testsuite. Now it effectively creates a tail call so the DF information needs be updated in this case after epilogue creation. gcc/ PR rtl-optimization/108274 * function.cc (thread_prologue_and_epilogue_insns): Also update the DF information for calls in a few more cases. Diff: --- gcc/function.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/function.cc b/gcc/function.cc index 27ba880368a..cfc4d2f74af 100644 --- a/gcc/function.cc +++ b/gcc/function.cc @@ -6266,7 +6266,10 @@ thread_prologue_and_epilogue_insns (void) /* 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) + if (optimize + || flag_optimize_sibling_calls + || flag_ipa_icf_functions + || in_lto_p) df_update_entry_exit_and_calls (); else {