public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6067] Fix early exit in modref_merge_call_site_flags
@ 2021-12-19 21:40 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-12-19 21:40 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fcbf94a5be9e0c1ecad92da773a6632b86b7f70a
commit r12-6067-gfcbf94a5be9e0c1ecad92da773a6632b86b7f70a
Author: Jan Hubicka <jh@suse.cz>
Date: Sun Dec 19 22:28:40 2021 +0100
Fix early exit in modref_merge_call_site_flags
When adding support for static chain and return slot flags I forgot to update
early exit condition in modref_merge_call_site_flags. This yields to wrong
code as demonstrated by the Fortran testcase attached to PR (which I hope
someone will help me to turn into testuite one).
gcc/ChangeLog:
2021-12-19 Jan Hubicka <hubicka@ucw.cz>
PR ipa/103766
* ipa-modref.c (modref_merge_call_site_flags): Fix early exit condition
Diff:
---
gcc/ipa-modref.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
index d3590f0b62b..9c411a6297a 100644
--- a/gcc/ipa-modref.c
+++ b/gcc/ipa-modref.c
@@ -5019,9 +5019,15 @@ modref_merge_call_site_flags (escape_summary *sum,
bool changed = false;
bool ignore_stores = ignore_stores_p (caller, callee_ecf_flags);
- /* If we have no useful info to propagate. */
- if ((!cur_summary || !cur_summary->arg_flags.length ())
- && (!cur_summary_lto || !cur_summary_lto->arg_flags.length ()))
+ /* Return early if we have no useful info to propagate. */
+ if ((!cur_summary
+ || (!cur_summary->arg_flags.length ()
+ && !cur_summary->static_chain_flags
+ && !cur_summary->retslot_flags))
+ && (!cur_summary_lto
+ || (!cur_summary_lto->arg_flags.length ()
+ && !cur_summary_lto->static_chain_flags
+ && !cur_summary_lto->retslot_flags)))
return false;
FOR_EACH_VEC_ELT (sum->esc, i, ee)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-19 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-19 21:40 [gcc r12-6067] Fix early exit in modref_merge_call_site_flags Jan Hubicka
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).