public inbox for
 help / color / mirror / Atom feed
From: Martin Jambor <>
To: GCC Patches <>
Cc: Jan Hubicka <>, Jan Hubicka <>
Subject: [PATCH 02/12] ipa-cp: Do not consider useless aggregate constants
Date: Sat, 12 Nov 2022 02:45:28 +0100	[thread overview]
Message-ID: <> (raw)


When building vectors of known aggregate values, there is no point in
including those for parameters which are not used in any way

Bootstrapped and tested on x86_64-linux.  OK for master?




2022-11-11  Martin Jambor  <>

	* (push_agg_values_from_edge): Do not consider constants
	in unused aggregate parameters.
 gcc/ | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/ b/gcc/
index d2bcd5e5e69..02bd6a0fd1a 100644
--- a/gcc/
+++ b/gcc/
@@ -5783,7 +5783,8 @@ push_agg_values_from_edge (struct cgraph_edge *cs,
       ipcp_param_lattices *plats = ipa_get_parm_lattices (dest_info, index);
-      if (plats->aggs_bottom)
+      if (!ipa_is_param_used (dest_info, index)
+	  || plats->aggs_bottom)
       push_agg_values_for_index_from_edge (cs, index, res, interim);

             reply	other threads:[~2022-11-12  1:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12  1:45 Martin Jambor [this message]
2022-11-13 21:06 ` Martin Jambor
2022-11-16 10:50 ` Jan Hubicka

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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).