From 2505c5edcac3fbc0a39ad74c63bab1534ee6e491 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 18 Apr 2009 20:39:52 +0200 Subject: cgraph.c (cgraph_make_edge, [...]): Set nothrow flag. * cgraph.c (cgraph_make_edge, dump_cgraph_node, cgraph_set_call_stmt): Set nothrow flag. * cgraph.h (struct function): Reduce loop_nest to 30 bits; add can_throw_external flag. * ipa-reference.c (ipa_utils_reduced_inorder): Update call. * ipa-pure-const.c (ignore_edge): New function. (propagate): Compute order for NOTHROW computation; set NOTHROWs only over can_throw_external edges. (local_pure_const): Add nothrow flag. * ipa-utils.c (searchc): Add ignore_edge callback. (ipa_utils_reduced_inorder): Add ignore_edge callback. * ipa-utils.h (ipa_utils_reduced_inorder): Update prototype. (set_nothrow_function_flags): Update cgraph. * tree-cfg.c (verify_stmt): Relax nothrow checking when in IPA mode. From-SVN: r146322 --- gcc/tree-cfg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/tree-cfg.c') diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index d4aa935..9c70146 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4156,7 +4156,10 @@ verify_stmt (gimple_stmt_iterator *gsi) to match. */ if (lookup_stmt_eh_region (stmt) >= 0) { - if (!stmt_could_throw_p (stmt)) + /* During IPA passes, ipa-pure-const sets nothrow flags on calls + and they are updated on statements only after fixup_cfg + is executed at beggining of expansion stage. */ + if (!stmt_could_throw_p (stmt) && cgraph_state != CGRAPH_STATE_IPA_SSA) { error ("statement marked for throw, but doesn%'t"); goto fail; -- cgit v1.1