aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index e6af33d..9a47ba2 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -39,6 +39,10 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "debug.h"
#include "target.h"
+#include "predict.h"
+#include "dominance.h"
+#include "cfg.h"
+#include "basic-block.h"
#include "cgraph.h"
#include "intl.h"
#include "tree-ssa-alias.h"
@@ -239,6 +243,21 @@ cgraph_node::record_function_versions (tree decl1, tree decl2)
after->prev = before;
}
+/* Allocate new callgraph node and insert it into basic data structures. */
+
+cgraph_node *
+symbol_table::create_empty (void)
+{
+ cgraph_node *node = allocate_cgraph_symbol ();
+
+ node->type = SYMTAB_FUNCTION;
+ node->frequency = NODE_FREQUENCY_NORMAL;
+ node->count_materialization_scale = REG_BR_PROB_BASE;
+ cgraph_count++;
+
+ return node;
+}
+
/* Register HOOK to be called with DATA on each removed edge. */
cgraph_edge_hook_list *
symbol_table::add_edge_removal_hook (cgraph_edge_hook hook, void *data)