aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2021-10-29 16:01:51 +0200
committerJan Hubicka <hubicka@ucw.cz>2021-10-29 16:01:51 +0200
commitb8ef019ab938471f7f877a1eee3a6374fd8a6ae9 (patch)
treed7bf60ed504c5a2116becd99e9c9f88d7a4ba63c /gcc/gimple.h
parent4045d5fa42f2ee7b284977c8f2f0edc300a63e43 (diff)
downloadgcc-b8ef019ab938471f7f877a1eee3a6374fd8a6ae9.zip
gcc-b8ef019ab938471f7f877a1eee3a6374fd8a6ae9.tar.gz
gcc-b8ef019ab938471f7f877a1eee3a6374fd8a6ae9.tar.bz2
handle retslot in modref
Extend modref and tree-ssa-structalias to handle retslot flags. Since retslot it essentially a hidden argument that is known to be write-only we can do pretty much the same stuff as we do for regular parameters. I plan to add static chain handling similar way. We do not handle IPA propagation of retslot flags (where return slot is initialized via return slot of other function). For this ipa-prop needs to be extended to understand retslot as well. Bootstrapped/regtested x86_64-linux, OK for the gimple bits? Honza gcc/ChangeLog: * gimple.c (gimple_call_retslot_flags): New function. * gimple.h (gimple_call_retslot_flags): Declare. * ipa-modref.c: Include tree-cfg.h. (struct escape_entry): Turn parm_index to signed. (modref_summary_lto::modref_summary_lto): Add retslot_flags. (modref_summary::modref_summary): Initialize retslot_flags. (struct modref_summary_lto): Likewise. (modref_summary::useful_p): Check retslot_flags. (modref_summary_lto::useful_p): Likewise. (modref_summary::dump): Dump retslot_flags. (modref_summary_lto::dump): Likewise. (struct escape_point): Add hidden_args enum. (analyze_ssa_name_flags): Ignore return slot return; use gimple_call_retslot_flags. (record_escape_points): Break out from ... (analyze_parms): ... here; handle retslot_flags. (modref_summaries::duplicate): Duplicate retslot_flags. (modref_summaries_lto::duplicate): Likewise. (modref_write_escape_summary): Stream parm_index as signed. (modref_read_escape_summary): Likewise. (modref_write): Stream retslot_flags. (read_section): Likewise. (struct escape_map): Fix typo in comment. (update_escape_summary_1): Fix whitespace. (ipa_merge_modref_summary_after_inlining): Drop retslot_flags. (modref_merge_call_site_flags): Merge retslot_flags. * ipa-modref.h (struct modref_summary): Add retslot_flags. * tree-ssa-structalias.c (handle_rhs_call): Handle retslot_flags.
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 303623b..23a124e 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1589,6 +1589,7 @@ gimple_seq gimple_seq_copy (gimple_seq);
bool gimple_call_same_target_p (const gimple *, const gimple *);
int gimple_call_flags (const gimple *);
int gimple_call_arg_flags (const gcall *, unsigned);
+int gimple_call_retslot_flags (const gcall *);
int gimple_call_return_flags (const gcall *);
bool gimple_call_nonnull_result_p (gcall *);
tree gimple_call_nonnull_arg (gcall *);