public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Patrick Palka <ppalka@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v3 1/3] c++: sort candidates according to viability
Date: Fri, 27 Oct 2023 18:05:00 -0400	[thread overview]
Message-ID: <8e117f80-49da-44d7-828b-9e22df879cb4@redhat.com> (raw)
In-Reply-To: <20231027195532.2566822-1-ppalka@redhat.com>

On 10/27/23 15:55, Patrick Palka wrote:
> New in patch 1/3:
>    * consistently use "non-viable" instead of "unviable"
>      throughout
>    * make 'champ' and 'challenger' in 'tourney' be z_candidate**
>      to simplify moving 'champ' to the front of the list.  drive-by
>      cleanups in tourney, including renaming 'champ_compared_to_predecessor'
>      to 'previous_worse_champ' for clarity.
> New in patch 2/3:
>    * consistently use "non-viable" instead of "unviable" throughout
> New in patch 3/3:
>    * introduce new -fnote-all-cands flag that controls noting other
>      candidates when diagnosing deletedness, and also controls
>      noting "ignored" candidates in general.
> 
> -- >8 --
> 
> This patch:
> 
>    * changes splice_viable to move the non-viable candidates to the end
>      of the list instead of removing them outright
>    * makes tourney move the best candidate to the front of the candidate
>      list
>    * adjusts print_z_candidates to preserve our behavior of printing only
>      viable candidates when diagnosing ambiguity
>    * adds a parameter to print_z_candidates to control this default behavior
>      (the follow-up patch will want to print all candidates when diagnosing
>      deletedness)
> 
> Thus after this patch we have access to the entire candidate list through
> the best viable candidate.
> 
> This change also happens to fix diagnostics for the below testcase where
> we currently neglect to note the third candidate, since the presence of
> the two unordered non-strictly viable candidates causes splice_viable to
> prematurely get rid of the non-viable third candidate.
> 
> gcc/cp/ChangeLog:
> 
> 	* call.cc: Include "tristate.h".
> 	(splice_viable): Sort the candidate list according to viability.
> 	Don't remove non-viable candidates from the list.
> 	(print_z_candidates): Add defaulted only_viable_p parameter.
> 	By default only print non-viable candidates if there is no
> 	viable candidate.
> 	(tourney): Make 'candidates' parameter a reference.

Why, when all the callers use the return value?

OK without that change.

Jason


      parent reply	other threads:[~2023-10-27 22:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 19:55 Patrick Palka
2023-10-27 19:55 ` [PATCH v3 2/3] c++: remember candidates that we ignored Patrick Palka
2023-10-27 19:55 ` [PATCH v3 3/3] c++: note other candidates when diagnosing deletedness Patrick Palka
2023-10-27 22:29   ` Jason Merrill
2023-10-27 23:22     ` Patrick Palka
2023-10-27 23:28       ` Patrick Palka
2023-11-30 15:46       ` Patrick Palka
2023-12-10 19:32         ` Jason Merrill
2023-10-27 22:05 ` Jason Merrill [this message]

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=8e117f80-49da-44d7-828b-9e22df879cb4@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ppalka@redhat.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).