This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto][patch] Remove after_inlining flag
> In principle I wouldn't mind removing it, but I would like to
> understand why exactly.
With a inliner running in cc1 and one running lto1 it doesn't make
sense have a notion of "after_inline". The problem I was having was
with the verifier being confused about a node throwing an inner
exception in the middle of the block. This was caused by the use in
except.c.
The tests just finished. Beth C and C++ are OK. I have also updated
the comments.
> Jan, any insights?
>
>
> Thanks. Diego.
>
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..18058e7 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2510,13 +2510,9 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
/* Here we end our search, since no exceptions may propagate.
If we've touched down at some landing pad previous, then the
explicit function call we generated may be used. Otherwise
- the call is made by the runtime.
+ the call is made by the runtime. */
- Before inlining, do not perform this optimization. We may
- 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