From patchwork Wed Jun 8 01:47:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 631913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rPWjP3CNyz9sp7 for ; Wed, 8 Jun 2016 11:55:21 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=mP2o20gv; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; q=dns; s=default; b=WoZu5U55arBiKRUxIEJ BjfbtW3pk0/bSl9uVcbNgIL55xT+S7JsGgfgO0Wf1sf38MH/lcX5ziPXnlpN0z27 LfAmk70tXS12DfJX+muNEHuijw3tXekaIPGEKnIlawiLEGaqbpa0AfKv3PcxSEyM lLS7O7RU7CMuCcmWM7FzPd3U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; s=default; bh=acoFC1KxKKCO9/FtqeP7q0VCM 9M=; b=mP2o20gv8YEEFvjT7SI2dmNUkCSpoVEJUX/eRX9oSkOLuGRplEa0cZLxc iL58u/BwynbFxOlOT9Izc2SMj9nlrDpyGJ58S5jK3/KmyUDqvFM0UXdSOt6car6r hFFIlAQWQXNyFBy32x6exIcfJ1NIVoSUEDsyKPayPOGel9rrLk= Received: (qmail 5633 invoked by alias); 8 Jun 2016 01:54:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 5551 invoked by uid 89); 8 Jun 2016 01:54:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Jun 2016 01:53:49 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id A944F1C07D9; Wed, 8 Jun 2016 01:48:16 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped Date: Wed, 8 Jun 2016 01:47:36 +0000 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes Unfortunately even after the previous patch there are still a few cases where regrename creates invalid code when used together with separate shrink-wrapping. I haven't found the cause of those. This patch disables regrename for functions that were separately shrink-wrapped. 2016-06-07 Segher Boessenkool * regrename.c (gate): Disable regrename if shrink_wrapped_separate is set in crtl. --- gcc/regrename.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/regrename.c b/gcc/regrename.c index 00a5d02..5740b1a 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -1956,7 +1956,11 @@ public: /* opt_pass methods: */ virtual bool gate (function *) { - return (optimize > 0 && (flag_rename_registers)); + /* regrename creates wrong code for exception handling, if used together + with separate shrink-wrapping. Disable for now, until we have + figured out what exactly is going on. */ + return (optimize > 0 && flag_rename_registers + && !crtl->shrink_wrapped_separate); } virtual unsigned int execute (function *) { return regrename_optimize (); }