From patchwork Wed May 7 12:44:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 346579 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 787F414009B for ; Wed, 7 May 2014 22:45:21 +1000 (EST) 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:in-reply-to:references:date:message-id:mime-version :content-type; q=dns; s=default; b=iZR3Die4+qZKVsf8+6BVCJhxBe5gH MOUJVxdX0FizbvsuSXzGUbANb6MFyyCI9tamuFTYCBejUeCHg4Woq1h85/MJf4ux eOvw9wREYdcCImolZLzotRA0VxAaJqrvZ5AhxloiGZGnLiPt2Lp3jEC1f2n7bOl2 9rltLLeidD+Ncg= 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:in-reply-to:references:date:message-id:mime-version :content-type; s=default; bh=s15rNyzCG99X9wpS1BnTkKlHpKE=; b=TZq fJlui7vXNxP0tZOVW5qPmtSybuQCls+QOgOhiOrM65+d60nF7YBwLKAVJ0zQ9NuN VceZcFjUz4gyJ58lyVxTo0k1z034WZSvE4xlePXNwh7DCgipDyabYUAN1TsYRqNL Qg7TIbY3NaJImgZWkqGcTF03xRA5PHbWeIgStK5w= Received: (qmail 11129 invoked by alias); 7 May 2014 12:45:04 -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 11022 invoked by uid 89); 7 May 2014 12:45:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 May 2014 12:45:01 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wi1DV-0001tw-Ia from Thomas_Schwinge@mentor.com ; Wed, 07 May 2014 05:44:57 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 7 May 2014 05:44:57 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Wed, 7 May 2014 13:44:55 +0100 From: Thomas Schwinge To: Richard Biener , Subject: Re: [PATCH][RFC] Remove RTL loop unswitching In-Reply-To: References: User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Wed, 7 May 2014 14:44:47 +0200 Message-ID: <87k39x3ghs.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Tue, 15 Apr 2014 11:26:29 +0200 (CEST), Richard Biener wrote: > This removes RTL loop unswitching > 2014-04-15 Richard Biener > > * Makefile.in (OBJS): Remove loop-unswitch.o. > * loop-unswitch.c: Delete. > * tree-pass.h (make_pass_rtl_unswitch): Remove. > * passes.def (pass_rtl_unswitch): Likewise. > * loop-init.c (gate_rtl_unswitch): Likewise. > (rtl_unswitch): Likewise. > (pass_data_rtl_unswitch): Likewise. > (pass_rtl_unswitch): Likewise. > (make_pass_rtl_unswitch): Likewise. > * rtl.h (reversed_condition): Likewise. > (compare_and_jump_seq): Likewise. > * loop-iv.c (reversed_condition): Move here from loop-unswitch.c > and make static. > * loop-unroll.c (compare_and_jump_seq): Likewise. I found some more; OK to commit? Is a non-bootstrap build enough for this, or is a full bootstrap build and test needed? commit 8a703b1e7adc6001f665a12f93601382e3eea806 Author: Thomas Schwinge Date: Wed May 7 13:01:47 2014 +0200 More gcc/loop-unswitch.c cleanup. gcc/ * cfgloop.h (unswitch_loops): Remove. * doc/passes.texi: Remove references to loop-unswitch.c * timevar.def (TV_LOOP_UNSWITCH): Remove. Grüße, Thomas diff --git gcc/cfgloop.h gcc/cfgloop.h index ab8b809..62a656a 100644 --- gcc/cfgloop.h +++ gcc/cfgloop.h @@ -711,8 +711,6 @@ extern void loop_optimizer_init (unsigned); extern void loop_optimizer_finalize (void); /* Optimization passes. */ -extern void unswitch_loops (void); - enum { UAP_PEEL = 1, /* Enables loop peeling. */ diff --git gcc/doc/passes.texi gcc/doc/passes.texi index 2727b2c..fb064db 100644 --- gcc/doc/passes.texi +++ gcc/doc/passes.texi @@ -474,10 +474,7 @@ merging and induction variable elimination. The pass is implemented in Loop unswitching. This pass moves the conditional jumps that are invariant out of the loops. To achieve this, a duplicate of the loop is created for each possible outcome of conditional jump(s). The pass is implemented in -@file{tree-ssa-loop-unswitch.c}. This pass should eventually replace the -RTL level loop unswitching in @file{loop-unswitch.c}, but currently -the RTL level pass is not completely redundant yet due to deficiencies -in tree level alias analysis. +@file{tree-ssa-loop-unswitch.c}. The optimizations also use various utility functions contained in @file{tree-ssa-loop-manip.c}, @file{cfgloop.c}, @file{cfgloopanal.c} and @@ -793,8 +790,8 @@ The source files @file{cfgloopanal.c} and @file{cfgloopmanip.c} contain generic loop analysis and manipulation code. Initialization and finalization of loop structures is handled by @file{loop-init.c}. A loop invariant motion pass is implemented in @file{loop-invariant.c}. -Basic block level optimizations---unrolling, peeling and unswitching loops--- -are implemented in @file{loop-unswitch.c} and @file{loop-unroll.c}. +Basic block level optimizations---unrolling, and peeling loops--- +are implemented in @file{loop-unroll.c}. Replacing of the exit condition of loops by special machine-dependent instructions is handled by @file{loop-doloop.c}. diff --git gcc/timevar.def gcc/timevar.def index 9faf98b..2db1943 100644 --- gcc/timevar.def +++ gcc/timevar.def @@ -207,7 +207,6 @@ DEFTIMEVAR (TV_DSE2 , "dead store elim2") DEFTIMEVAR (TV_LOOP , "loop analysis") DEFTIMEVAR (TV_LOOP_INIT , "loop init") DEFTIMEVAR (TV_LOOP_MOVE_INVARIANTS , "loop invariant motion") -DEFTIMEVAR (TV_LOOP_UNSWITCH , "loop unswitching") DEFTIMEVAR (TV_LOOP_UNROLL , "loop unrolling") DEFTIMEVAR (TV_LOOP_DOLOOP , "loop doloop") DEFTIMEVAR (TV_LOOP_FINI , "loop fini")