GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
Called via walk_tree: TP is pointer to tree to be examined. */
static tree
-record_reference (tree *tp, int *walk_subtrees, void *data)
+record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
tree t = *tp;
{
varpool_mark_needed_node (varpool_node (t));
if (lang_hooks.callgraph.analyze_expr)
- return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees,
- data);
+ return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees);
}
break;
}
break;
+ case OMP_PARALLEL:
+ if (flag_unit_at_a_time)
+ {
+ if (OMP_PARALLEL_FN (*tp))
+ cgraph_mark_needed_node (cgraph_node (OMP_PARALLEL_FN (*tp)));
+ }
+ break;
+
+ case OMP_TASK:
+ if (flag_unit_at_a_time)
+ {
+ if (OMP_TASK_FN (*tp))
+ cgraph_mark_needed_node (cgraph_node (OMP_TASK_FN (*tp)));
+ if (OMP_TASK_COPYFN (*tp))
+ cgraph_mark_needed_node (cgraph_node (OMP_TASK_COPYFN (*tp)));
+ }
+ break;
+
default:
/* Save some cycles by not walking types and declaration as we
won't find anything useful there anyway. */
}
if ((unsigned int) TREE_CODE (t) >= LAST_AND_UNUSED_TREE_CODE)
- return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees, data);
+ return lang_hooks.callgraph.analyze_expr (tp, walk_subtrees);
break;
}
"considered for inlining");
else if (!node->local.inlinable)
e->inline_failed = N_("function not inlinable");
- else if (CALL_CANNOT_INLINE_P (e->call_stmt))
+ else if (CALL_STMT_CANNOT_INLINE_P (e->call_stmt))
e->inline_failed = N_("mismatched arguments");
else
e->inline_failed = N_("function not considered for inlining");
}
/* Look for initializers of constant variables and private statics. */
- for (step = cfun->unexpanded_var_list;
+ for (step = cfun->local_decls;
step;
step = TREE_CHAIN (step))
{
return 0;
}
-struct tree_opt_pass pass_build_cgraph_edges =
+struct gimple_opt_pass pass_build_cgraph_edges =
{
+ {
+ GIMPLE_PASS,
NULL, /* name */
NULL, /* gate */
build_cgraph_edges, /* execute */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- 0, /* todo_flags_finish */
- 0 /* letter */
+ 0 /* todo_flags_finish */
+ }
};
/* Record references to functions and other variables present in the
/* Rebuild cgraph edges for current function node. This needs to be run after
passes that don't update the cgraph. */
-static unsigned int
+unsigned int
rebuild_cgraph_edges (void)
{
basic_block bb;
return 0;
}
-struct tree_opt_pass pass_rebuild_cgraph_edges =
+struct gimple_opt_pass pass_rebuild_cgraph_edges =
{
+ {
+ GIMPLE_PASS,
NULL, /* name */
NULL, /* gate */
rebuild_cgraph_edges, /* execute */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* todo_flags_finish */
- 0 /* letter */
+ }
};