1 /* Representation of adjustment made to virtual clones in the symbol table.
2 Copyright (C) 2003-2021 Free Software Foundation, Inc.
3 Contributed by Jan Hubicka
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef GCC_SYMTAB_CLONES_H
22 #define GCC_SYMTAB_CLONES_H
24 struct GTY(()) clone_info
29 param_adjustments (NULL
)
32 /* Constants discovered by IPA-CP, i.e. which parameter should be replaced
34 vec
<ipa_replace_map
*, va_gc
> *tree_map
;
35 /* Parameter modification that IPA-SRA decided to perform. */
36 ipa_param_adjustments
*param_adjustments
;
38 /* Return clone_info, if available. */
39 static clone_info
*get (cgraph_node
*node
);
41 /* Return clone_info possibly creating new one. */
42 static clone_info
*get_create (cgraph_node
*node
);
44 /* Remove clone_info. */
45 static void remove (cgraph_node
*node
);
47 /* Release all clone_infos. */
48 static void release (void);
51 /* Return clone_info, if available. */
53 clone_info::get (cgraph_node
*node
)
55 if (!symtab
->m_clones
)
57 return symtab
->m_clones
->get (node
);
61 /* Remove clone_info association for NODE. */
63 clone_info::remove (cgraph_node
*node
)
65 symtab
->m_clones
->remove (node
);
68 /* Free clone info summaries. */
70 clone_info::release ()
73 ggc_delete (symtab
->m_clones
);
74 symtab
->m_clones
= NULL
;
77 #endif /* GCC_SYMTAB_CLONES_H */