This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[c++] Remove redundant inline check
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Mon, 18 Apr 2011 20:47:02 +0200
- Subject: [c++] Remove redundant inline check
Hi,
the test whether function contains computed goto is re-done by tree-inline (and re-done
after optimization, so it is bit more sensitive). There is also nothing language specific
in this.
Bootstrapped/regtested x86_64-linux, OK?
* cp/semantics.c (finish_goto_stmt): Do set UNINLINABLE flag on computed
gotos.
Index: cp/semantics.c
===================================================================
--- cp/semantics.c (revision 172657)
+++ cp/semantics.c (working copy)
@@ -569,11 +569,6 @@ finish_goto_stmt (tree destination)
if (error_operand_p (destination))
return NULL_TREE;
}
- /* We don't inline calls to functions with computed gotos.
- Those functions are typically up to some funny business,
- and may be depending on the labels being at particular
- addresses, or some such. */
- DECL_UNINLINABLE (current_function_decl) = 1;
}
check_goto (destination);