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]

[lto][patch] Remove after_inlining flag


This flag is causing me troubles trying to run the inliner is
cc1/cc1plus with -flto. I am testing the patch on trunk to get better
coverage. OK for the branch if the tests are OK?

2008-10-16 Rafael Espindola  <espindola@google.com>

	* except.c (reachable_next_level): Don't use cfun->after_inlining.
	* function.h (struct function): Remove after_inlining.
	* tree-inline.c (initialize_cfun): Don't copy cfun->after_inlining.
	(expand_call_inline): Ignore cfun->after_inlining.
	* tree-optimize.c (execute_fixup_cfg): Don't set cfun->after_inlining.
	* tree-ssa-live.c (remove_unused_scope_block_p): Ignore
	cfun->after_inlining.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
diff --git a/gcc/except.c b/gcc/except.c
index 77a3049..b3b92b8 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2516,7 +2516,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
 	 inline a subroutine that contains handlers, and that will
 	 change the value of saw_any_handlers.  */
 
-      if ((info && info->saw_any_handlers) || !cfun->after_inlining)
+      if (info && info->saw_any_handlers)
 	{
 	  add_reachable_handler (info, region, region);
 	  return RNL_CAUGHT;
diff --git a/gcc/function.h b/gcc/function.h
index 16f2324..8f17c59 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -577,8 +577,6 @@ struct function GTY(())
      not desire this behavior.  */
   unsigned int dont_save_pending_sizes_p : 1;
 
-  unsigned int after_inlining : 1;
-
   /* Fields below this point are not set for abstract functions; see
      allocate_struct_function.  */
 
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 69f0c80..2899f87 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1763,7 +1763,6 @@ initialize_cfun (tree new_fndecl, tree callee_fndecl, gcov_type count,
   cfun->has_nonlocal_label = src_cfun->has_nonlocal_label;
   cfun->stdarg = src_cfun->stdarg;
   cfun->dont_save_pending_sizes_p = src_cfun->dont_save_pending_sizes_p;
-  cfun->after_inlining = src_cfun->after_inlining;
   cfun->returns_struct = src_cfun->returns_struct;
   cfun->returns_pcc_struct = src_cfun->returns_pcc_struct;
   cfun->after_tree_profile = src_cfun->after_tree_profile;
@@ -3241,8 +3240,6 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
   id->src_cfun = DECL_STRUCT_FUNCTION (fn);
   id->gimple_call = stmt;
 
-  gcc_assert (!id->src_cfun->after_inlining);
-
   id->entry_bb = bb;
   if (lookup_attribute ("cold", DECL_ATTRIBUTES (fn)))
     {
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index ba3d0fc..f2e1e3a 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -292,8 +292,6 @@ execute_fixup_cfg (void)
   gimple_stmt_iterator gsi;
   int todo = gimple_in_ssa_p (cfun) ? TODO_verify_ssa : 0;
 
-  cfun->after_inlining = true;
-
   if (cfun->eh)
     FOR_EACH_BB (bb)
       {
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 4731518..927d737 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -508,11 +508,7 @@ remove_unused_scope_block_p (tree scope)
 	 only the used variables for cfgexpand's memory packing saving quite
 	 a lot of memory.  */
       else if (debug_info_level == DINFO_LEVEL_NORMAL
-	       || debug_info_level == DINFO_LEVEL_VERBOSE
-	       /* Removing declarations before inlining is going to affect
-		  DECL_UID that in turn is going to affect hashtables and
-		  code generation.  */
-	       || !cfun->after_inlining)
+	       || debug_info_level == DINFO_LEVEL_VERBOSE)
 	unused = false;
 
       else

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