From patchwork Tue Nov 17 10:49:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 545501 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 29DC714031F for ; Tue, 17 Nov 2015 21:50:11 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=NF2fOpI6; 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:to :from:subject:cc:message-id:date:mime-version:content-type; q= dns; s=default; b=f3ixPH7vn8qmDOWWn/MXh0P6bXWdYI79f8Tu/9cAbKqPgz HsMHXTpkEIyQxHbo4j9PLlanbPyAYHVY2UzT+9QW2m/gMv+HE9no7QjSo152/KMB 1CMSRIiNX8oBmQcWhny+dHBZZTaPYr8hKYsyeA2BgLW0k2Sy9/XbA4y1EiAzE= 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:to :from:subject:cc:message-id:date:mime-version:content-type; s= default; bh=mXshZSEhsxn8zqKar4WFcc5Ydlo=; b=NF2fOpI6GmI2lklpfVyH HwZiHcB/UgNNE07cj2zghTP6kYoMxHpQYdCHBdmmpQyubI3zDAD4xVvarLQR7S5e h6m+ga0IqK7b7F22oRH4t596tgCiczYzU7/VsTPzY0fAyXIflkHgJT+R9eBw1Oca mB/FuI4czYtWSqtPGB26PIA= Received: (qmail 21304 invoked by alias); 17 Nov 2015 10:50: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 21292 invoked by uid 89); 17 Nov 2015 10:50:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 17 Nov 2015 10:49:59 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34319) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1Zydpl-0004Rw-HS for gcc-patches@gnu.org; Tue, 17 Nov 2015 05:49:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zydph-0004gM-SJ for gcc-patches@gnu.org; Tue, 17 Nov 2015 05:49:57 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:33053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zydph-0004gH-M4 for gcc-patches@gnu.org; Tue, 17 Nov 2015 05:49:53 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Zydpf-0002dC-Ts from Tom_deVries@mentor.com ; Tue, 17 Nov 2015 02:49:52 -0800 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Tue, 17 Nov 2015 10:49:50 +0000 To: "gcc-patches@gnu.org" From: Tom de Vries Subject: [PATCH] Improve comments in pass_tree_loop_init::execute CC: Richard Biener Message-ID: <564B062A.2030107@mentor.com> Date: Tue, 17 Nov 2015 11:49:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 Hi, this no-functional-changes patch improves comments in pass_tree_loop_init::execute. For the discussion related to the comment for scev_initialize, see: - https://gcc.gnu.org/ml/gcc-patches/2013-02/msg01127.html - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56426 OK for trunk? Thanks, - Tom Improve comments in pass_tree_loop_init::execute 2015-11-17 Tom de Vries * tree-ssa-loop.c (pass_tree_loop_init::execute): Improve comments. --- gcc/tree-ssa-loop.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 570406f..40df84f 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -276,12 +276,21 @@ public: unsigned int pass_tree_loop_init::execute (function *fun ATTRIBUTE_UNUSED) { + /* When processing a loop in the loop pipeline, we should be able to assert + that: + (loops_state_satisfies_p (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS + | LOOP_CLOSED_SSA) + && scev_initialized_p ()) + */ + loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS); rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa); - /* We might discover new loops, e.g. when turning irreducible - regions into reducible. */ + /* Note that we run scev_initialize here even if number_of_loops () <= 1. + Even if we have no real loops now, we might discover new loops while + executing the loop pipeline, e.g. when turning irreducible regions into + reducible, in which case we still would need scev to be initialized. */ scev_initialize (); return 0;