From patchwork Fri Sep 16 21:40:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 671166 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 3sbTHf1JX7z9sC3 for ; Sat, 17 Sep 2016 07:41:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=haN62n/S; 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:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=kEQE59lg5BNF81kP G/R0kT5puOxfH5q2pjqkUAmAKkSG9fYJ03R0CgDyd1u9ahHZZwrnHcfCCGeIDPw0 mTaReXmwJvHJkBcvGdFRn+nu+6DvrDz/ydZ0f2v7ATWe4tHD3faf5lvvbETdAFYM 5wOYWp75OZIN24EtJVHUIUUrnrw= 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:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=1wQa0u63It/+YVz4lAU255 1zwxw=; b=haN62n/SY5279mI07utUKNWSZc5WylkdW9tXUTvgqIML/XbPXRhp7q BxBHH8mTK2P3hcE6Gqmel8fWgdHuJ+3IsIgeZWEDyMQe2AXKwLB7bZIu0YpLQ5Wh P6pgufDMc/cN6pIDPY0oc7NORk/7tHwn9bu6F3cHFI/JuuMLm3Mso= Received: (qmail 94278 invoked by alias); 16 Sep 2016 21:41:03 -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 94260 invoked by uid 89); 16 Sep 2016 21:41:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=burn, 240142, dozen, HContent-Transfer-Encoding:7Bit X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Sep 2016 21:40:52 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 52A5E812CD for ; Fri, 16 Sep 2016 23:40:50 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tBSPhmzfCZ09 for ; Fri, 16 Sep 2016 23:40:50 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 2EA9C812C9 for ; Fri, 16 Sep 2016 23:40:50 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Delete useless .split2 dump file at -O0 on non-x86 targets Date: Fri, 16 Sep 2016 23:40:49 +0200 Message-ID: <2011055.s51WaSCRzN@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-42-desktop; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Doing -fdump-rtl-all at -O0 on a non-x86 target yields a .split2 file which is mightily confusing since nothing is split, so you can easily burn a dozen of minutes trying to pinpoint the first split point after reload... Tested on x86-64/Linux and SPARC/Solaris, applied on the mainline. 2016-09-16 Eric Botcazou * recog.c (rest_of_handle_split_after_reload): Delete. (pass_split_after_reload::gate): New method. (pass_split_after_reload::execute): Call split_all_insns directly. Index: recog.c =================================================================== --- recog.c (revision 240142) +++ recog.c (working copy) @@ -3901,17 +3901,6 @@ make_pass_split_all_insns (gcc::context return new pass_split_all_insns (ctxt); } -static unsigned int -rest_of_handle_split_after_reload (void) -{ - /* If optimizing, then go ahead and split insns now. */ -#ifndef STACK_REGS - if (optimize > 0) -#endif - split_all_insns (); - return 0; -} - namespace { const pass_data pass_data_split_after_reload = @@ -3935,9 +3924,23 @@ public: {} /* opt_pass methods: */ + virtual bool gate (function *) + { + /* If optimizing, then go ahead and split insns now. */ + if (optimize > 0) + return true; + +#ifdef STACK_REGS + return true; +#else + return false; +#endif + } + virtual unsigned int execute (function *) { - return rest_of_handle_split_after_reload (); + split_all_insns (); + return 0; } }; // class pass_split_after_reload