From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56296 invoked by alias); 20 May 2016 09:44:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 56281 invoked by uid 89); 20 May 2016 09:44:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=enkovich.gnu@gmail.com, enkovichgnugmailcom, Hx-languages-length:1393, (unknown) X-HELO: mail-vk0-f43.google.com Received: from mail-vk0-f43.google.com (HELO mail-vk0-f43.google.com) (209.85.213.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 20 May 2016 09:44:34 +0000 Received: by mail-vk0-f43.google.com with SMTP id c189so136953204vkb.1 for ; Fri, 20 May 2016 02:44:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=07X19b9NyJ3bZ/wiYf7EHmmOt6lQ2UNYs3U/7gxW+bo=; b=OMdkleBFc74vli+kamoj2Ehbhgv/XCwrmesWYttPda/yFUexNaQ/8is7v/h+D7HA3h Tm0Fe/z4vJUi4kzTndy4tycG6XmqZ8eThJjByHgEpn2ul7vX3n6Cy9vMDj7gT9jLwJac 6UM/4kMct6IYk18o66TJcCF6wy08/inLTeCaZ9mDgvLESd2fs7kb7pWmCqMgg+PH8fgN msdK8ljVEnfio9norCHNcxULy81Ysf4r+Hx/ZXKnqPRg0cs26PGJPDJ1v+iXl+Dx6ST4 ZJg0hgn1XfqBv9oXz0EgXqKGhPKrRP+XLfnr+MtSmeEC3pV79uwCgqmY7ObSibKxBmGm AGKg== X-Gm-Message-State: AOPr4FXB0e6UEwK29bxk9wQtQZtBxra0P1bJaPmOVLw9Twdk/b9YpoQXCuLAV21m7PdYvtbUoScAUiaqgjNe/A== MIME-Version: 1.0 X-Received: by 10.159.38.196 with SMTP id 62mr1102189uay.29.1463737472286; Fri, 20 May 2016 02:44:32 -0700 (PDT) Received: by 10.176.3.208 with HTTP; Fri, 20 May 2016 02:44:32 -0700 (PDT) In-Reply-To: References: <20160519194036.GE40563@msticlxl57.ims.intel.com> Date: Fri, 20 May 2016 09:44:00 -0000 Message-ID: Subject: Re: [PATCH, vec-tails 04/10] Add masking cost From: Ilya Enkovich To: Richard Biener Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg01615.txt.bz2 2016-05-20 12:24 GMT+03:00 Richard Biener : > On Thu, May 19, 2016 at 9:40 PM, Ilya Enkovich wrote: >> Hi, >> >> This patch extends vectorizer cost model to include masking cost by >> adding new cost model locations and new target hook to compute >> masking cost. > > Can you explain a bit why you add separate overall > masking_prologue/body_cost rather > than using the existing prologue/body cost for that? When I make a decision I need vector loop cost without masking (what we currently have) and with masking (what I add). This allows me to compute profitability for all options (scalar epilogue, combined epilogue, masked epilogue) and choose one of them. Using existing prologue/body cost would allow me compute masking profitability with no fall back to scalar loop profitability. > > I realize that the current vectorizer cost infrastructure is a big > mess, but isn't it possible > to achieve what you did with the current add_stmt_cost hook? (by > inspecting stmt_info) Cost of a statement and cost of masking a statement are different things. Two hooks called for the same statement return different values. I can add vect_cost_for_stmt enum elements to cover masking but I thought having stmt_masking_cost would me more clear. Thanks, Ilya > > Richard. > >> Thanks, >> Ilya