aboutsummaryrefslogtreecommitdiff
path: root/gcc/matrix-reorg.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2011-04-12 11:12:58 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2011-04-12 11:12:58 +0200
commitfe660d7bfe8ae31c03f500af99c1a614438d0198 (patch)
tree4f92a1e1c4927ceefc0819510aeb42d32a9ed51a /gcc/matrix-reorg.c
parent237526dd7d236748f0f9cfba83e538bd0a571201 (diff)
downloadgcc-fe660d7bfe8ae31c03f500af99c1a614438d0198.zip
gcc-fe660d7bfe8ae31c03f500af99c1a614438d0198.tar.gz
gcc-fe660d7bfe8ae31c03f500af99c1a614438d0198.tar.bz2
tree-inline.c (tree_function_versioning): Call cgraph_get_node instead of cgraph_node and assert it does not return NULL.
2011-04-12 Martin Jambor <mjambor@suse.cz> * tree-inline.c (tree_function_versioning): Call cgraph_get_node instead of cgraph_node and assert it does not return NULL. * lto-streamer-in.c (lto_read_body): Likewise. * omp-low.c (new_omp_context): Likewise. (create_task_copyfn): Likewise. * tree-emutls.c (lower_emutls_function_body): Likewise. * matrix-reorg.c (transform_allocation_sites): Likewise. From-SVN: r172306
Diffstat (limited to 'gcc/matrix-reorg.c')
-rw-r--r--gcc/matrix-reorg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index d2d4fa1..44daa27 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -2169,7 +2169,8 @@ transform_allocation_sites (void **slot, void *data ATTRIBUTE_UNUSED)
update_ssa (TODO_update_ssa);
/* Replace the malloc size argument in the malloc of level 0 to be
the size of all the dimensions. */
- c_node = cgraph_node (mi->allocation_function_decl);
+ c_node = cgraph_get_node (mi->allocation_function_decl);
+ gcc_checking_assert (c_node);
old_size_0 = gimple_call_arg (call_stmt_0, 0);
tmp = force_gimple_operand_gsi (&gsi, mi->dimension_size[0], true,
NULL, true, GSI_SAME_STMT);
@@ -2218,7 +2219,8 @@ transform_allocation_sites (void **slot, void *data ATTRIBUTE_UNUSED)
if (!mi->free_stmts[i].stmt)
continue;
- c_node = cgraph_node (mi->free_stmts[i].func);
+ c_node = cgraph_get_node (mi->free_stmts[i].func);
+ gcc_checking_assert (c_node);
gcc_assert (is_gimple_call (mi->free_stmts[i].stmt));
e = cgraph_edge (c_node, mi->free_stmts[i].stmt);
gcc_assert (e);