From: Richard Biener <richard.guenther@gmail.com>
To: Bin Cheng <Bin.Cheng@arm.com>, Jan Hubicka <hubicka@ucw.cz>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
nd <nd@arm.com>,
"pthaugen@linux.vnet.ibm.com" <pthaugen@linux.vnet.ibm.com>
Subject: Re: [PATCH PR77536]Generate correct profiling information for vectorized loop
Date: Mon, 20 Feb 2017 12:54:00 -0000 [thread overview]
Message-ID: <CAFiYyc2C2jr8+aJgdN5s_WEbg6Hh_1B2jzJ3TAvLxJJBZ-i70Q@mail.gmail.com> (raw)
In-Reply-To: <VI1PR0802MB217672F0D45BA9EA238CA7BDE75A0@VI1PR0802MB2176.eurprd08.prod.outlook.com>
On Thu, Feb 16, 2017 at 6:48 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> After fixing PR79347, the main problem with vectorizer is we scale down profiling counters
> for vect_loop by VF, regardless of context CFG's profiling information. This is wrong and
> sometimes makes vect_loop not hot code, which may confuses following optimizers. This
> patch generates well-formed profiling information as generic tree unroller does. It borrows
> code from tree-ssa-loop-manip.c and does small refactors to existing code. Vectorizer will
> not introduce mismatch counters with it, and unroll and vrp2 are the two major passes
> messing up profiling counters now. Though it removes all mismatch in vectorizer, I am not
> sure if this counts as a regression fix.
> BTW, it may also help PR78116? Hi Pat, could you please help verify this? Thanks!
>
> Bootstrap and test on x86_64 and AArch64 ongoing. Is it OK if no failures?
The patch looks good to me but please wait for Honza to comment.
Thanks,
Richard.
> Thanks,
> bin
>
> 2017-02-16 Bin Cheng <bin.cheng@arm.com>
>
> PR tree-optimization/77536
> * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
> (tree_transform_and_unroll_loop): Use above function to compute the
> estimated niter of unrolled loop.
> * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
> * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
> (vect_transform_loop): Call above function.
>
> gcc/testsuite/ChangeLog
> 2017-02-16 Bin Cheng <bin.cheng@arm.com>
>
> PR tree-optimization/77536
> * gcc.dg/vect/pr79347.c: Revise testing string.
next prev parent reply other threads:[~2017-02-20 12:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 18:38 Bin Cheng
2017-02-17 1:39 ` Pat Haugen
2017-02-20 12:54 ` Richard Biener [this message]
2017-02-20 14:21 ` Jan Hubicka
2017-02-20 15:16 ` Bin.Cheng
2017-02-20 15:44 ` Jan Hubicka
2017-02-20 16:05 ` Bin.Cheng
2017-02-20 17:02 ` Jan Hubicka
2017-02-20 17:53 ` Bin.Cheng
2017-02-21 14:48 ` Bin.Cheng
2017-02-21 15:52 ` Jan Hubicka
2017-02-22 12:23 ` Bin.Cheng
2017-02-22 14:59 ` Jan Hubicka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFiYyc2C2jr8+aJgdN5s_WEbg6Hh_1B2jzJ3TAvLxJJBZ-i70Q@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=Bin.Cheng@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=nd@arm.com \
--cc=pthaugen@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).