public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-1377] Use stablesort for sorting association chain
Date: Fri, 11 Jun 2021 07:30:00 +0000 (GMT)	[thread overview]
Message-ID: <20210611073000.7B12D39BE821@sourceware.org> (raw)

https://gcc.gnu.org/g:e9d322ced1433da8e7c69243cfa941ea462d6290

commit r12-1377-ge9d322ced1433da8e7c69243cfa941ea462d6290
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jun 11 08:04:41 2021 +0200

    Use stablesort for sorting association chain
    
    This should preserve the original association order as much as possible
    for the initial SLP discovery attempt and also improve consistency.
    
    2021-06-11  Richard Biener  <rguenther@suse.de>
    
            * tree-vect-slp.c (vect_build_slp_tree_2): Use stablesort
            to sort operands of the associative chain.

Diff:
---
 gcc/tree-vect-slp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index c4f8f38012f..6237a61ffd4 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1865,7 +1865,7 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
 	  /* Now we have a set of chains with the same length.  */
 	  /* 1. pre-sort according to def_type and operation.  */
 	  for (unsigned lane = 0; lane < group_size; ++lane)
-	    chains[lane].sort (dt_sort_cmp, vinfo);
+	    chains[lane].stablesort (dt_sort_cmp, vinfo);
 	  if (dump_enabled_p ())
 	    {
 	      dump_printf_loc (MSG_NOTE, vect_location,


                 reply	other threads:[~2021-06-11  7:30 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=20210611073000.7B12D39BE821@sourceware.org \
    --to=rguenth@gcc.gnu.org \
    --cc=gcc-cvs@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).