This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add dump file for RTL nothrow pass
- From: Adam Nemet <anemet at caviumnetworks dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 12 Apr 2009 19:46:38 -0700
- Subject: [PATCH] Add dump file for RTL nothrow pass
I was missing this when debugging the cleanup test regressions.
Bootstrapped and regtested on x86_64-linux.
OK to install?
Adam
* except.c (pass_set_nothrow_function_flags): Set name and add
TODO_dump_func.
(set_nothrow_function_flags): Mention in the dump file when
changing a function to nothrow.
Index: except.c
===================================================================
--- except.c (revision 145986)
+++ except.c (working copy)
@@ -2972,9 +2972,16 @@ set_nothrow_function_flags (void)
}
}
if (crtl->nothrow
- && (cgraph_function_body_availability (cgraph_node (current_function_decl))
+ && (cgraph_function_body_availability (cgraph_node
+ (current_function_decl))
>= AVAIL_AVAILABLE))
- TREE_NOTHROW (current_function_decl) = 1;
+ {
+ TREE_NOTHROW (current_function_decl) = 1;
+
+ if (dump_file)
+ fprintf (dump_file, "Marking function nothrow: %s\n\n",
+ current_function_name ());
+ }
return 0;
}
@@ -2982,7 +2989,7 @@ struct rtl_opt_pass pass_set_nothrow_fun
{
{
RTL_PASS,
- NULL, /* name */
+ "nothrow", /* name */
NULL, /* gate */
set_nothrow_function_flags, /* execute */
NULL, /* sub */
@@ -2993,7 +3000,7 @@ struct rtl_opt_pass pass_set_nothrow_fun
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- 0, /* todo_flags_finish */
+ TODO_dump_func, /* todo_flags_finish */
}
};