From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id F3CD63858423 for ; Fri, 14 Jan 2022 18:21:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F3CD63858423 Received: from localhost.intra.ispras.ru (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTP id 62E2440D403D; Fri, 14 Jan 2022 18:21:11 +0000 (UTC) From: Alexander Monakov To: gcc-patches@gcc.gnu.org Cc: Alexander Monakov , Richard Biener Subject: Re: [RFC PATCH] tree-ssa-sink: do not sink to in front of setjmp Date: Fri, 14 Jan 2022 21:20:44 +0300 Message-Id: <20220114182047.6270-1-amonakov@ispras.ru> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, 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: Fri, 14 Jan 2022 18:21:17 -0000 > I approved the initial sink patch (maybe not clearly enough). I wasn't entirely happy with that patch. The new version solves this better. > Can you open > a bugreport about the missing CFG verification and list the set of FAILs > (all errors in some passes similar to the one you fixed in sinking I guess)? > It indeed sounds like something to tackle during next stage1 (unless you > already narrowed down the culprit to a single offender...) Most of the failures were related to transactional memory, and the rest are seemingly solved by forbidding duplication of returns_twice calls. In reply to this email I'm sending three patches, the first is a revised patch for tree-ssa-sink, the second forbids duplication of setjmp-like calls, and the third implements the checks in verify_flow_info: tree-ssa-sink: do not sink to in front of setjmp tree-cfg: do not duplicate returns_twice calls tree-cfg: check placement of returns_twice calls gcc/testsuite/gcc.dg/setjmp-7.c | 13 +++++++++++ gcc/tree-cfg.c | 40 +++++++++++++++++++++++++++++++-- gcc/tree-ssa-sink.c | 6 +++++ 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/setjmp-7.c -- 2.33.1