aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-06-08 08:57:39 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-06-08 08:57:39 +0000
commit9452ef0663208d3908cbec66f1521b1f9e82d14a (patch)
tree4adf666d83553cb88ff315152a87a159b4cfc32c /gcc/cgraphunit.c
parentbd75ff94b295f58cdddd716a68c8c44b9a4e8c94 (diff)
downloadgcc-9452ef0663208d3908cbec66f1521b1f9e82d14a.zip
gcc-9452ef0663208d3908cbec66f1521b1f9e82d14a.tar.gz
gcc-9452ef0663208d3908cbec66f1521b1f9e82d14a.tar.bz2
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. From-SVN: r224209
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 722c4f4..6a1f0c1 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: