public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7822] reload: Adjust comment in find_reloads about subset, not intersection Date: Sat, 26 Mar 2022 04:31:43 +0000 (GMT) [thread overview] Message-ID: <20220326043143.DDFA93858C74@sourceware.org> (raw) https://gcc.gnu.org/g:75d1c8fea9541dee5a4ce0aa7d8c199574fd42b9 commit r12-7822-g75d1c8fea9541dee5a4ce0aa7d8c199574fd42b9 Author: Hans-Peter Nilsson <hp@axis.com> Date: Sat Mar 26 05:31:22 2022 +0100 reload: Adjust comment in find_reloads about subset, not intersection gcc: * reload.cc (find_reloads): Align comment with code where considering the intersection of register classes then tweaking the regclass for the current alternative or rejecting it. Diff: --- gcc/reload.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gcc/reload.cc b/gcc/reload.cc index 664082a533d..3ed901e3944 100644 --- a/gcc/reload.cc +++ b/gcc/reload.cc @@ -3635,9 +3635,11 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known, a hard reg and this alternative accepts some register, see if the class that we want is a subset of the preferred class for this register. If not, - but it intersects that class, use the preferred class - instead. If it does not intersect the preferred - class, show that usage of this alternative should be + but it intersects that class, we'd like to use the + intersection, but the best we can do is to use the + preferred class, if it is instead a subset of the + class we want in this alternative. If we can't use + it, show that usage of this alternative should be discouraged; it will be discouraged more still if the register is `preferred or nothing'. We do this because it increases the chance of reusing our spill @@ -3664,9 +3666,10 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known, if (! reg_class_subset_p (this_alternative[i], preferred_class[i])) { - /* Since we don't have a way of forming the intersection, - we just do something special if the preferred class - is a subset of the class we have; that's the most + /* Since we don't have a way of forming a register + class for the intersection, we just do + something special if the preferred class is a + subset of the class we have; that's the most common case anyway. */ if (reg_class_subset_p (preferred_class[i], this_alternative[i]))
reply other threads:[~2022-03-26 4:31 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=20220326043143.DDFA93858C74@sourceware.org \ --to=hp@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: linkBe 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).