From: Jakub Jelinek <jakub@redhat.com>
To: Yury Gribov <y.gribov@samsung.com>
Cc: Richard Biener <rguenther@suse.de>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Andrey Belevantsev <abel@ispras.ru>,
Andrew MacLeod <amacleod@redhat.com>,
Andrew Pinski <pinskia@gmail.com>,
Diego Novillo <dnovillo@google.com>,
Geoff Keating <geoffk@geoffk.org>,
Jason Merrill <jason@redhat.com>,
Steven Bosscher <steven@gcc.gnu.org>
Subject: Re: [PATCH 1/5] Fix asymmetric comparison functions
Date: Thu, 17 Dec 2015 11:57:00 -0000 [thread overview]
Message-ID: <20151217115720.GU18720@tucnak.redhat.com> (raw)
In-Reply-To: <5672A0D1.2040207@samsung.com>
On Thu, Dec 17, 2015 at 02:47:29PM +0300, Yury Gribov wrote:
> On 12/17/2015 02:41 PM, Richard Biener wrote:
> >On Thu, 17 Dec 2015, Yury Gribov wrote:
> >
> >>Some obvious symmetry fixes.
> >>
> >>Cc-ing
> >>* Andrey (Belevantsev) for bb_top_order_comparator
> >>* Andrew (MacLeod) for compare_case_labels
> >>* Andrew (Pinski) for resort_field_decl_cmp
> >>* Diego for pair_cmp
> >>* Geoff for resort_method_name_cmp
> >>* Jakub for compare_case_labels
> >>* Jason for method_name_cmp
> >>* Richard for insert_phi_nodes_compare_var_infos, compare_case_labels
> >>* Steven for cmp_v_in_regset_pool
> >
> >So for compare_case_labels we only ever have one label with
> >!CASE_LOW - which means you only run into the case that needs
> >!CASE_LOW && !CASE_LOW if comparing an element with itself, correct?
> >
> >In this case (missing "same element" handling rather than symmetry
> >fixing) I'd prefer a
> >
> > if (case1 == case2)
> > return 0;
> >
> >So just to confirm - do the patches also contain same element
> >compare fixings?
>
> Yes, that's a fix for same element. How about adding if + gcc_assert that
> both cases can't be NULL otherwise?
Some of the qsort comparison functions are hot paths, we don't really want
to slow them down. So, if anything, gcc_checking_assert rather than
gcc_assert.
But, which qsort is so lame that it calls comparison on the same element?
Jakub
next prev parent reply other threads:[~2015-12-17 11:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 8:55 [PATCH 0/5] Fix qsort " Yury Gribov
2015-12-17 8:58 ` [PATCH 1/5] Fix asymmetric " Yury Gribov
2015-12-17 11:39 ` Jakub Jelinek
2015-12-17 12:04 ` Yury Gribov
2015-12-18 19:40 ` Yury Gribov
2015-12-18 20:07 ` Jakub Jelinek
2015-12-18 20:09 ` Yury Gribov
2015-12-17 11:41 ` Richard Biener
2015-12-17 11:47 ` Yury Gribov
2015-12-17 11:57 ` Jakub Jelinek [this message]
2015-12-17 11:59 ` Richard Biener
2015-12-17 12:14 ` Yury Gribov
2015-12-17 12:25 ` Richard Biener
2015-12-17 12:36 ` Yury Gribov
2015-12-17 11:59 ` Andrey Belevantsev
2015-12-17 12:12 ` Yury Gribov
2015-12-17 12:48 ` Andrey Belevantsev
2015-12-17 19:39 ` Andrew Pinski
2015-12-17 22:00 ` Jason Merrill
2015-12-17 8:59 ` [PATCH 2/5] Fix more " Yury Gribov
2015-12-17 9:00 ` [PATCH 3/5] "Fix" intransitive comparison in reload_pseudo_compare_func Yury Gribov
2015-12-17 19:36 ` Vladimir Makarov
2015-12-18 19:50 ` Yury Gribov
2015-12-17 9:02 ` [PATCH 4/5] Fix intransitive comparison in compare_access_positions Yury Gribov
2015-12-17 14:58 ` Martin Jambor
2015-12-17 9:03 ` [PATCH 5/5] Fix intransitive comparison in dr_group_sort_cmp Yury Gribov
2015-12-17 11:57 ` Richard Biener
2015-12-17 12:33 ` Yury Gribov
2015-12-17 12:51 ` Richard Biener
2015-12-18 20:19 ` Yury Gribov
2015-12-18 22:30 ` Yuri Gribov
2015-12-25 11:42 ` Yury Gribov
2016-01-08 8:23 ` Richard Biener
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=20151217115720.GU18720@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=abel@ispras.ru \
--cc=amacleod@redhat.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=geoffk@geoffk.org \
--cc=jason@redhat.com \
--cc=pinskia@gmail.com \
--cc=rguenther@suse.de \
--cc=steven@gcc.gnu.org \
--cc=y.gribov@samsung.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).