From patchwork Sat Nov 15 12:04:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 411171 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 F11C314009B for ; Sat, 15 Nov 2014 23:06:55 +1100 (AEDT) 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=AilpgHefUznEh35S E7GMEYR/MXU66nviKtbPzhgvtscptazJB3dwlOlFbko6xp9xa6Jaw5giAKGvr2VY QFvFeGtrKsmghhn+oAxNNzTOF0sT0qtL3tS11dIEoZefhSoh4uf+LClWfd7r5qjy LwvLlFpk+etbtS5ooNTLDGK/3MY= 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=Na3e2wxMyvSD8cTTNx/HsO 0sl8o=; b=PRt6aPPTkVGM6qMWEwNXYhg7WjUK14j3WXIJXy197Gj0Y3cVD1NAiw oJd8DtJvHruSN5mkRcHPClyREp8QuIIXNPS5JOaxHM3Yr+slqtCDs83RRODVakbi aIZOA5R1fByfKZI2qyT/BbF4UmUauTj9z1Kk++G/W6GN9ZlERdd6M= Received: (qmail 23696 invoked by alias); 15 Nov 2014 12:06:49 -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 23681 invoked by uid 89); 15 Nov 2014 12:06:48 -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: 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 15 Nov 2014 12:06:47 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id F01CF2B5E067 for ; Sat, 15 Nov 2014 13:06:44 +0100 (CET) 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 u7B1fK7VpC8d for ; Sat, 15 Nov 2014 13:06:44 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id CDB792B5E065 for ; Sat, 15 Nov 2014 13:06:44 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Add log message for max-completely-peeled-times Date: Sat, 15 Nov 2014 13:04:08 +0100 Message-ID: <12136300.x9218HV0VX@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 Try_unroll_loop_completely logs a message for max-completely-peeled-insns: else if (unr_insns > (unsigned) PARAM_VALUE (PARAM_MAX_COMPLETELY_PEELED_INSNS)) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "Not unrolling loop %d: " "(--param max-completely-peeled-insns limit reached).\n", loop->num); return false; } but not for max-completely-peeled-times: max_unroll = PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES); if (n_unroll > max_unroll) return false; so the attached patch adds one. Tested on x86_64-suse-linux, applied on the mainline as obvious. 2014-11-15 Eric Botcazou * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add log message for max-completely-peeled-insns limit. Index: tree-ssa-loop-ivcanon.c =================================================================== --- tree-ssa-loop-ivcanon.c (revision 217538) +++ tree-ssa-loop-ivcanon.c (working copy) @@ -674,7 +674,7 @@ try_unroll_loop_completely (struct loop HOST_WIDE_INT maxiter, location_t locus) { - unsigned HOST_WIDE_INT n_unroll = 0, ninsns, max_unroll, unr_insns; + unsigned HOST_WIDE_INT n_unroll = 0, ninsns, unr_insns; gimple cond; struct loop_size size; bool n_unroll_found = false; @@ -720,9 +720,14 @@ try_unroll_loop_completely (struct loop if (!n_unroll_found) return false; - max_unroll = PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES); - if (n_unroll > max_unroll) - return false; + if (n_unroll > (unsigned) PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES)) + { + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, "Not unrolling loop %d " + "(--param max-completely-peeled-times limit reached).\n", + loop->num); + return false; + } if (!edge_to_cancel) edge_to_cancel = loop_edge_to_cancel (loop);