From patchwork Mon Jun 27 15:47:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Enkovich X-Patchwork-Id: 641117 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 3rdYKf48SCz9s5M for ; Tue, 28 Jun 2016 01:49:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=H6JY+p5r; 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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=Y4JbXLjokSQXvvMvJEgLSG3A0wSf1I+P9b+6wZZSmC2D/j+P5ONkH BAozxdZSWpOr3JLiye5/Z/G1binZIGyJgLr+BsPJs7KwGrGGUGeml03iZlduFT+C JmsdfI4QJOm70ZGcr7vdhUqzdGSm6MbDO4bf4/rNmyNPrDkkVTf7M0= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=OmkWSvtzIt8nSOGLI17Bl/j4v/4=; b=H6JY+p5r0SCjVzWk+UBP Epx5S2bG/QAYUH7rcoJaOA79h/mFIs38L5mcDcBDE48+BT+ToPiWK95UnmI+o/zQ m3OovD6yeWpjsWM9pYoSX2u3yKGGFLFcTzalAeV/yUQzxr2qaqPuDkRqxRo6Ufgj cKupXO+vM0R4eJul9rzO2PU= Received: (qmail 85436 invoked by alias); 27 Jun 2016 15:49:51 -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 85421 invoked by uid 89); 27 Jun 2016 15:49:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=ilya.enkovich@intel.com, ilyaenkovichintelcom, Hx-languages-length:2953 X-HELO: mail-wm0-f44.google.com Received: from mail-wm0-f44.google.com (HELO mail-wm0-f44.google.com) (74.125.82.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 27 Jun 2016 15:49:40 +0000 Received: by mail-wm0-f44.google.com with SMTP id f126so106078776wma.1 for ; Mon, 27 Jun 2016 08:49:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=JJkGCBryRvAOswNYwZ6R/OrfBOJ8nKCtAcqXWznjFck=; b=A9GCzltiU5Ps8Vltl+zFmPB5A+AXT7+8quCljssEaYNj7V9xmlvaYZdWYhsyy9C9IM mnOdmnHL7Uiu7t2aLlnTQUniC6/tHDooTrGgjSnTNkpL9zDic6REmhq6cD7Z4kXXgNNg NRK7h6n3eLfd3qCmNqaVfOXOkTYmpiZkDZzm8OIOy3N5fDpUO7nM6Ql47Yp3NTuYC4Yt aPQq0nXFg1jmmhwVKdHTHLP7UMiUa3e+SQ0VsKeRjgc+CLZbNi3Z/gr1JZ+Od75BG9nM 2k1ecjZ4Mst3UnwuJy+xFEpWpJgCoH129MwaDMR1sUvvveiuRx3St9yAqAPxu1Vs0F/+ UddA== X-Gm-Message-State: ALyK8tK+pchXSj8Z7pXD1JdIiadA6/UvTNuRoidqqCtHpD9VGccNDQe17wiSjh0YtgEDAA== X-Received: by 10.28.181.146 with SMTP id e140mr10752320wmf.38.1467042577483; Mon, 27 Jun 2016 08:49:37 -0700 (PDT) Received: from msticlxl57.ims.intel.com (irdmzpr02-ext.ir.intel.com. [192.198.151.37]) by smtp.gmail.com with ESMTPSA id b4sm2447622wjd.16.2016.06.27.08.49.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jun 2016 08:49:36 -0700 (PDT) Date: Mon, 27 Jun 2016 18:47:11 +0300 From: Ilya Enkovich To: gcc-patches@gcc.gnu.org Subject: [PATCH, obvious] Update comments for several vectorizator functions Message-ID: <20160627154711.GB33785@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Hi, This patch adds args description for some vectorizer functions. I'm going to commit it to trunk. Thanks, Ilya --- gcc/ 2016-06-27 Ilya Enkovich * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Update comment. (vect_update_inits_of_drs): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Likewise. diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index fab5879..c26aa1d 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -1738,6 +1738,10 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters, iterates NITERS times, the new epilog loop iterates NITERS % VECTORIZATION_FACTOR times. + If CHECK_PROFITABILITY is 1 then profitability check is generated + using TH as a cost model profitability threshold of iterations for + vectorization. + The original loop will later be made to iterate NITERS / VECTORIZATION_FACTOR times (this value is placed into RATIO). @@ -2000,7 +2004,11 @@ vect_update_inits_of_drs (loop_vec_info loop_vinfo, tree niters) 'niters' is set to the misalignment of one of the data references in the loop, thereby forcing it to refer to an aligned location at the beginning of the execution of this loop. The data reference for which we are - peeling is recorded in LOOP_VINFO_UNALIGNED_DR. */ + peeling is recorded in LOOP_VINFO_UNALIGNED_DR. + + If CHECK_PROFITABILITY is 1 then profitability check is generated + using TH as a cost model profitability threshold of iterations for + vectorization. */ void vect_do_peeling_for_alignment (loop_vec_info loop_vinfo, tree ni_name, @@ -2315,7 +2323,7 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree * cond_expr) The test generated to check which version of loop is executed is modified to also check for profitability as indicated by the - cost model initially. + cost model threshold TH. The versioning precondition(s) are placed in *COND_EXPR and *COND_EXPR_STMT_LIST. */ diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 1146de9..41b9380 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3384,7 +3384,15 @@ vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue, Return the number of iterations required for the vector version of the loop to be profitable relative to the cost of the scalar version of the - loop. */ + loop. + + *RET_MIN_PROFITABLE_NITERS is a cost model profitability threshold + of iterations for vectorization. -1 value means loop vectorization + is not profitable. This returned value may be used for dynamic + profitability check. + + *RET_MIN_PROFITABLE_ESTIMATE is a profitability threshold to be used + for static check against estimated number of iterations. */ static void vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo,