summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-08 08:57:39 +0000
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-08 08:57:39 +0000
commitf48e5cbc9937ab3faa3a5ee41738d6f3c095646e (patch)
tree4adf666d83553cb88ff315152a87a159b4cfc32c /gcc/cgraphunit.c
parentc464be083ada5e27b83e8a3094658cd715bf15a1 (diff)
downloadgcc-f48e5cbc9937ab3faa3a5ee41738d6f3c095646e.tar.gz
Add debug msg to dump_file in add_new_function
2015-06-08 Tom de Vries <tom@codesourcery.com> PR tree-optimization/66435 * cgraphunit.c (cgraph_node::add_new_function): Dump message on new function. * gcc.dg/gomp/notify-new-function-2.c: New test. * gcc.dg/gomp/notify-new-function-3.c: Same. * gcc.dg/gomp/notify-new-function.c: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224209 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 722c4f4d063..6a1f0c1dd2f 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -507,6 +507,23 @@ cgraph_node::add_new_function (tree fndecl, bool lowered)
{
gcc::pass_manager *passes = g->get_passes ();
cgraph_node *node;
+
+ if (dump_file)
+ {
+ struct function *fn = DECL_STRUCT_FUNCTION (fndecl);
+ const char *function_type = ((gimple_has_body_p (fndecl))
+ ? (lowered
+ ? (gimple_in_ssa_p (fn)
+ ? "ssa gimple"
+ : "low gimple")
+ : "high gimple")
+ : "to-be-gimplified");
+ fprintf (dump_file,
+ "Added new %s function %s to callgraph\n",
+ function_type,
+ fndecl_name (fndecl));
+ }
+
switch (symtab->state)
{
case PARSING: