Daily bump.
[official-gcc.git] / gcc / ipa-modref.h
blobddc868690698022e12b0247821fb3534ba2f7c80
1 /* Search for references that a functions loads or stores.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef IPA_MODREF_H
21 #define IPA_MODREF_H
23 typedef modref_tree <alias_set_type> modref_records;
24 typedef unsigned char eaf_flags_t;
26 /* Single function summary. */
28 struct GTY(()) modref_summary
30 /* Load and stores in function (transitively closed to all callees) */
31 modref_records *loads;
32 modref_records *stores;
33 auto_vec<eaf_flags_t> GTY((skip)) arg_flags;
34 eaf_flags_t retslot_flags;
35 eaf_flags_t static_chain_flags;
36 bool writes_errno;
38 modref_summary ();
39 ~modref_summary ();
40 void dump (FILE *);
41 bool useful_p (int ecf_flags, bool check_flags = true);
42 bool global_memory_read_p ();
43 bool global_memory_written_p ();
46 modref_summary *get_modref_function_summary (cgraph_node *func);
47 void ipa_modref_c_finalize ();
48 void ipa_merge_modref_summary_after_inlining (cgraph_edge *e);
50 /* All flags that are implied by the ECF_CONST functions. */
51 static const int implicit_const_eaf_flags = EAF_DIRECT | EAF_NOCLOBBER | EAF_NOESCAPE
52 | EAF_NODIRECTESCAPE | EAF_NOREAD;
53 /* All flags that are implied by the ECF_PURE function. */
54 static const int implicit_pure_eaf_flags = EAF_NOCLOBBER | EAF_NOESCAPE
55 | EAF_NODIRECTESCAPE;
56 /* All flags implied when we know we can ignore stores (i.e. when handling
57 call to noreturn). */
58 static const int ignore_stores_eaf_flags = EAF_DIRECT | EAF_NOCLOBBER | EAF_NOESCAPE
59 | EAF_NODIRECTESCAPE;
61 #endif