From: "Andre Vieira (lists)" <andre.simoesdiasvieira@arm.com>
To: Richard Biener <rguenther@suse.de>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
richard.sandiford@arm.com
Subject: Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling
Date: Thu, 25 Nov 2021 10:40:14 +0000 [thread overview]
Message-ID: <21e3500d-6cf5-ed46-6f95-1f554c5dbc50@arm.com> (raw)
In-Reply-To: <8p72o15s-5894-4or0-409r-oo4p74o238r1@fhfr.qr>
On 24/11/2021 11:00, Richard Biener wrote:
> On Wed, 24 Nov 2021, Andre Vieira (lists) wrote:
>
>> On 22/11/2021 12:39, Richard Biener wrote:
>>> + if (first_loop_vinfo->suggested_unroll_factor > 1)
>>> + {
>>> + if (LOOP_VINFO_EPIL_USING_PARTIAL_VECTORS_P (first_loop_vinfo))
>>> + {
>>> + if (dump_enabled_p ())
>>> + dump_printf_loc (MSG_NOTE, vect_location,
>>> + "***** Re-trying analysis with first vector
>>> mode"
>>> + " %s for epilogue with partial vectors of"
>>> + " unrolled first loop.\n",
>>> + GET_MODE_NAME (vector_modes[0]));
>>> + mode_i = 0;
>>>
>>> and the later done check for bigger VF than main loop - why would
>>> we re-start at 0 rather than at the old mode? Maybe we want to
>>> remember the iterator value we started at when arriving at the
>>> main loop mode? So if we analyzed successfully with mode_i == 2,
>>> then sucessfully at mode_i == 4 which suggested an unroll of 2,
>>> re-start at the mode_i we continued after the mode_i == 2
>>> successful analysis? To just consider the "simple" case of
>>> AVX vs SSE it IMHO doesn't make much sense to succeed with
>>> AVX V4DF, succeed with SSE V2DF and figure it's better than V4DF AVX
>>> but get a suggestion of 2 times unroll and then re-try AVX V4DF
>>> just to re-compute that yes, it's worse than SSE V2DF? You
>>> are probably thinking of SVE vs ADVSIMD here but do we need to
>>> start at 0? Adding a comment to the code would be nice.
>>>
>>> Thanks,
>> I was indeed thinking SVE vs Advanced SIMD where we end up having to compare
>> different vectorization strategies, which will have different costs depending.
>> The hypothetical case, as in I don't think I've come across one, is where if
>> we decide to vectorize the main loop for V8QI and unroll 2x, yielding a VF of
>> 16, we may then want to then use a predicated VNx16QI epilogue.
> But this isn't the epilogue handling ...
Am I misunderstanding the code here? To me it looks like this is picking
what mode_i to start the 'while (1)' loop does the loop analysis for the
epilogues?
next prev parent reply other threads:[~2021-11-25 10:40 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 15:27 [PATCH 0/3][vect] Enable vector unrolling of main loop Andre Vieira (lists)
2021-09-17 15:31 ` [PATCH 1/3][vect] Add main vectorized loop unrolling Andre Vieira (lists)
2021-09-21 12:30 ` Richard Biener
2021-09-21 16:34 ` Andre Vieira (lists)
2021-09-22 6:14 ` Richard Biener
2021-09-30 8:52 ` [PATCH 1v2/3][vect] " Andre Vieira (lists)
2021-10-01 8:19 ` Richard Biener
2021-10-04 16:30 ` Richard Sandiford
2021-10-12 10:35 ` Andre Vieira (lists)
2021-10-15 8:48 ` Richard Biener
2021-10-20 13:29 ` Andre Vieira (lists)
2021-10-21 12:14 ` Richard Biener
2021-10-22 10:18 ` Richard Sandiford
2021-11-11 16:02 ` Andre Vieira (lists)
2021-11-12 13:12 ` Richard Biener
2021-11-22 11:41 ` Andre Vieira (lists)
2021-11-22 12:39 ` Richard Biener
2021-11-24 9:46 ` Andre Vieira (lists)
2021-11-24 11:00 ` Richard Biener
2021-11-25 10:40 ` Andre Vieira (lists) [this message]
2021-11-25 12:46 ` Richard Biener
2021-11-30 11:36 ` Andre Vieira (lists)
2021-11-30 13:56 ` Richard Biener
2021-12-07 11:27 ` [vect] Re-analyze all modes for epilogues Andre Vieira (lists)
2021-12-07 11:31 ` Andre Vieira (lists)
2021-12-07 11:48 ` Richard Biener
2021-12-07 13:31 ` Richard Sandiford
2021-12-07 13:33 ` Richard Biener
2021-12-07 11:45 ` Richard Biener
2021-12-07 15:17 ` Andre Vieira (lists)
2021-12-13 16:41 ` Andre Vieira (lists)
2021-12-14 11:39 ` Richard Sandiford
2021-12-17 16:33 ` Andre Vieira (lists)
2022-01-07 12:39 ` Richard Sandiford
2022-01-10 18:31 ` [PATCH 1v2/3][vect] Add main vectorized loop unrolling Andre Vieira (lists)
2022-01-11 7:14 ` Richard Biener
2021-10-22 10:12 ` Richard Sandiford
2021-09-17 15:32 ` [PATCH 2/3][vect] Consider outside costs earlier for epilogue loops Andre Vieira (lists)
2021-10-14 13:44 ` Andre Vieira (lists)
2021-10-22 15:33 ` Richard Sandiford
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=21e3500d-6cf5-ed46-6f95-1f554c5dbc50@arm.com \
--to=andre.simoesdiasvieira@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
--cc=richard.sandiford@arm.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).