This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 */
  }
 };
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]