From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Remove restrictions on group gaps in SLP
Date: Tue, 09 Jun 2015 14:12:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.11.1506091610120.30088@zhemvz.fhfr.qr> (raw)
The following patch does $subject by fixing the bogus removal of
load-permutations. This means gaps are now handled by the
permutation support (well, if the required permutation is supported).
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2015-06-09 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_build_slp_tree_1): Remove bailout on gaps.
(vect_analyze_slp_instance): Instead do not falsely drop
load permutations.
Index: gcc/tree-vect-slp.c
===================================================================
*** gcc/tree-vect-slp.c (revision 224271)
--- gcc/tree-vect-slp.c (working copy)
*************** vect_build_slp_tree_1 (loop_vec_info loo
*** 762,794 ****
else
{
/* Load. */
- unsigned unrolling_factor
- = least_common_multiple
- (*max_nunits, group_size) / group_size;
- /* FORNOW: Check that there is no gap between the loads
- and no gap between the groups when we need to load
- multiple groups at once. */
- if (unrolling_factor > 1
- && ((GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) == stmt
- && GROUP_GAP (vinfo_for_stmt (stmt)) != 0)
- /* If the group is split up then GROUP_GAP
- isn't correct here, nor is GROUP_FIRST_ELEMENT. */
- || GROUP_SIZE (vinfo_for_stmt (stmt)) > group_size))
- {
- if (dump_enabled_p ())
- {
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "Build SLP failed: grouped "
- "loads have gaps ");
- dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
- stmt, 0);
- dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
- }
- /* Fatal mismatch. */
- matches[0] = false;
- return false;
- }
-
/* Check that the size of interleaved loads group is not
greater than the SLP group size. */
unsigned ncopies
--- 762,767 ----
*************** vect_analyze_slp_instance (loop_vec_info
*** 1846,1852 ****
this_load_permuted = true;
load_permutation.safe_push (load_place);
}
! if (!this_load_permuted)
{
load_permutation.release ();
continue;
--- 1834,1846 ----
this_load_permuted = true;
load_permutation.safe_push (load_place);
}
! if (!this_load_permuted
! /* The load requires permutation when unrolling exposes
! a gap either because the group is larger than the SLP
! group-size or because there is a gap between the groups. */
! && (unrolling_factor == 1
! || (group_size == GROUP_SIZE (vinfo_for_stmt (first_stmt))
! && GROUP_GAP (vinfo_for_stmt (first_stmt)) == 0)))
{
load_permutation.release ();
continue;
reply other threads:[~2015-06-09 14:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=alpine.LSU.2.11.1506091610120.30088@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
/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).