Commit be0436d7 by Richard Guenther Committed by Richard Biener

re PR rtl-optimization/29323 (set_nothrow_function_flags does invalid analysis on weak functions)

2006-10-10  Richard Guenther  <rguenther@suse.de>

	PR rtl-optimization/29323
	* except.c (set_nothrow_function_flags): For functions
	that do not bind local bail out early.

	* decl.c (finish_function): Set TREE_NOTHROW only for
	functions that bind local.

From-SVN: r117598
parent bdcee471
2006-10-10 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/29323
* except.c (set_nothrow_function_flags): For functions
that do not bind local bail out early.
2006-10-10 Ben Elliston <bje@au.ibm.com> 2006-10-10 Ben Elliston <bje@au.ibm.com>
* doc/invoke.texi (RS/6000 and PowerPC Options): Add -m to the * doc/invoke.texi (RS/6000 and PowerPC Options): Add -m to the
......
2006-10-10 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/29323
* decl.c (finish_function): Set TREE_NOTHROW only for
functions that bind local.
2006-10-09 Richard Henderson <rth@redhat.com> 2006-10-09 Richard Henderson <rth@redhat.com>
Revert emutls patch. Revert emutls patch.
......
...@@ -11096,7 +11096,8 @@ finish_function (int flags) ...@@ -11096,7 +11096,8 @@ finish_function (int flags)
/* If this function can't throw any exceptions, remember that. */ /* If this function can't throw any exceptions, remember that. */
if (!processing_template_decl if (!processing_template_decl
&& !cp_function_chain->can_throw && !cp_function_chain->can_throw
&& !flag_non_call_exceptions) && !flag_non_call_exceptions
&& targetm.binds_local_p (fndecl))
TREE_NOTHROW (fndecl) = 1; TREE_NOTHROW (fndecl) = 1;
/* This must come after expand_function_end because cleanups might /* This must come after expand_function_end because cleanups might
......
...@@ -2787,6 +2787,9 @@ set_nothrow_function_flags (void) ...@@ -2787,6 +2787,9 @@ set_nothrow_function_flags (void)
{ {
rtx insn; rtx insn;
if (!targetm.binds_local_p (current_function_decl))
return 0;
TREE_NOTHROW (current_function_decl) = 1; TREE_NOTHROW (current_function_decl) = 1;
/* Assume cfun->all_throwers_are_sibcalls until we encounter /* Assume cfun->all_throwers_are_sibcalls until we encounter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment