GCC Middle and Back End API Reference
symtab-clones.h
Go to the documentation of this file.
1/* Representation of adjustment made to virtual clones in the symbol table.
2 Copyright (C) 2003-2024 Free Software Foundation, Inc.
3 Contributed by Jan Hubicka
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_SYMTAB_CLONES_H
22#define GCC_SYMTAB_CLONES_H
23
24struct GTY(()) clone_info
25{
26 /* Constructor. */
28 : tree_map (NULL),
29 param_adjustments (NULL)
30 {
31 }
32 /* Constants discovered by IPA-CP, i.e. which parameter should be replaced
33 with what. */
35 /* Parameter modification that IPA-SRA decided to perform. */
37
38 /* Return clone_info, if available. */
39 static clone_info *get (cgraph_node *node);
40
41 /* Return clone_info possibly creating new one. */
42 static clone_info *get_create (cgraph_node *node);
43
44 /* Remove clone_info. */
45 static void remove (cgraph_node *node);
46
47 /* Release all clone_infos. */
48 static void release (void);
49};
50
51/* Return clone_info, if available. */
52inline clone_info *
54{
55 if (!symtab->m_clones)
56 return NULL;
57 return symtab->m_clones->get (node);
58}
59
60
61/* Remove clone_info association for NODE. */
62inline void
64{
65 symtab->m_clones->remove (node);
66}
67
68/* Free clone info summaries. */
69inline void
76
77#endif /* GCC_SYMTAB_CLONES_H */
symbol_table * symtab
Definition cgraph.cc:81
Definition ipa-param-manipulation.h:211
clone_summary * m_clones
Definition cgraph.h:2524
#define GTY(x)
Definition coretypes.h:41
void ggc_delete(T *ptr)
Definition ggc.h:255
Definition cgraph.h:875
Definition symtab-clones.h:25
static clone_info * get_create(cgraph_node *node)
Definition symtab-clones.cc:51
ipa_param_adjustments * param_adjustments
Definition symtab-clones.h:36
static void release(void)
Definition symtab-clones.h:70
vec< ipa_replace_map *, va_gc > * tree_map
Definition symtab-clones.h:34
static void remove(cgraph_node *node)
Definition symtab-clones.h:63
clone_info()
Definition symtab-clones.h:27
static clone_info * get(cgraph_node *node)
Definition symtab-clones.h:53
Definition vec.h:450
#define NULL
Definition system.h:50