aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-04-19 15:27:28 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2009-04-19 13:27:28 +0000
commitb6fa5b01018ac42682f8d69fff9e48f50b87c910 (patch)
tree3de074636f11edaf0156c7129cfe2c981b79b950 /gcc/cgraph.c
parent9b074dc6c18b76ce0afb1abea30de3547d020daa (diff)
downloadgcc-b6fa5b01018ac42682f8d69fff9e48f50b87c910.zip
gcc-b6fa5b01018ac42682f8d69fff9e48f50b87c910.tar.gz
gcc-b6fa5b01018ac42682f8d69fff9e48f50b87c910.tar.bz2
cgraph.c (cgraph_create_edge, [...]): Set proper cfun.
* cgraph.c (cgraph_create_edge, cgraph_set_call_stmt): Set proper cfun. (dump_cgraph_node): Dump can throw external flag. * ipa-pure-const.c (propagate): Fix propagation of nothrow flags. From-SVN: r146349
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index f7189b9..ce696e2 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -640,7 +640,9 @@ cgraph_set_call_stmt (struct cgraph_edge *e, gimple new_stmt)
htab_hash_pointer (e->call_stmt));
}
e->call_stmt = new_stmt;
+ push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
e->can_throw_external = stmt_can_throw_external (new_stmt);
+ pop_cfun ();
if (e->caller->call_site_hash)
{
void **slot;
@@ -705,7 +707,9 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
edge->caller = caller;
edge->callee = callee;
edge->call_stmt = call_stmt;
+ push_cfun (DECL_STRUCT_FUNCTION (caller->decl));
edge->can_throw_external = stmt_can_throw_external (call_stmt);
+ pop_cfun ();
edge->prev_caller = NULL;
edge->next_caller = callee->callers;
if (callee->callers)
@@ -1238,6 +1242,8 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
edge->frequency / (double)CGRAPH_FREQ_BASE);
if (edge->loop_nest)
fprintf (f, "(nested in %i loops) ", edge->loop_nest);
+ if (edge->can_throw_external)
+ fprintf(f, "(can throw external) ");
}
fprintf (f, "\n");
}