flags.h (flag_really_no_inline): Remove.

* flags.h (flag_really_no_inline): Remove.
	* cgraph.c (cgraph_function_possibly_inlined_p): Simplify.
	* toplev.c (flag_really_no_inline): Remove.
	* c-cppbuiltin.c (c_cpp_builtins): Use flag_no_inline.
	* ipa-inline.c (cgraph_decide_inlining): Do not check flag_no_inline.
	(cgraph_decide_inlining_incrementally): Likewise.
	(compute_inline_parameters): Likewise.
	* opts.c (decode_options): Simplify.
	* c-opts.c (c_common_post_options): Do not set flag_no_inline.
	* common.opt (finline): Initialize to 1.
	* tree-inline.c (inlinable_function_p): Check flag_no_inline.

	* lang.c (java_post_options): Remove handling of flag_no_inline.

	* misc.c (gnat_post_options): Do not set flag_no_inline.

	* options.c (gfc_post_options): Do not set flag_no_inline.

From-SVN: r138238
This commit is contained in:
Jan Hubicka 2008-07-29 13:00:58 +02:00 committed by Jan Hubicka
parent bf08ebebc7
commit e90acd935a
18 changed files with 40 additions and 61 deletions

View file

@ -1,4 +1,18 @@
2008-07-29 Jan HUbicka <jh@suse.cz>
2008-07-29 Jan Hubicka <jh@suse.cz>
* flags.h (flag_really_no_inline): Remove.
* cgraph.c (cgraph_function_possibly_inlined_p): Simplify.
* toplev.c (flag_really_no_inline): Remove.
* c-cppbuiltin.c (c_cpp_builtins): Use flag_no_inline.
* ipa-inline.c (cgraph_decide_inlining): Do not check flag_no_inline.
(cgraph_decide_inlining_incrementally): Likewise.
(compute_inline_parameters): Likewise.
* opts.c (decode_options): Simplify.
* c-opts.c (c_common_post_options): Do not set flag_no_inline.
* common.opt (finline): Initialize to 1.
* tree-inline.c (inlinable_function_p): Check flag_no_inline.
2008-07-29 Jan Hubicka <jh@suse.cz>
* predict.c (always_optimize_for_size_p): New function.
(optimize_bb_for_size_p, optimize_bb_for_speed_p,

View file

@ -1,3 +1,7 @@
2008-07-28 Jan Hubicka <jh@suse.cz>
* misc.c (gnat_post_options): Do not set flag_no_inline.
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge from gimple-tuples-branch.

View file

@ -340,9 +340,6 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
/* ??? The warning machinery is outsmarted by Ada. */
warn_unused_parameter = 0;
if (!flag_no_inline)
flag_no_inline = 1;
/* Force eliminate_unused_debug_types to 0 unless an explicit positive
-f has been passed. This forces the default to 0 for Ada, which might
differ from the common default. */

View file

@ -636,7 +636,7 @@ c_cpp_builtins (cpp_reader *pfile)
if (fast_math_flags_set_p ())
cpp_define (pfile, "__FAST_MATH__");
if (flag_really_no_inline)
if (flag_no_inline)
cpp_define (pfile, "__NO_INLINE__");
if (flag_signaling_nans)
cpp_define (pfile, "__SUPPORT_SNAN__");

View file

@ -1018,10 +1018,6 @@ c_common_post_options (const char **pfilename)
C_COMMON_OVERRIDE_OPTIONS;
#endif
/* Use tree inlining. */
if (!flag_no_inline)
flag_no_inline = 1;
/* By default we use C99 inline semantics in GNU99 or C99 mode. C99
inline semantics are not supported in GNU89 or C89 mode. */
if (flag_gnu89_inline == -1)
@ -1075,13 +1071,6 @@ c_common_post_options (const char **pfilename)
if (warn_overlength_strings == -1 || c_dialect_cxx ())
warn_overlength_strings = 0;
/* Adjust various flags for C++ based on command-line settings. */
if (c_dialect_cxx ())
{
if (!flag_no_inline)
flag_no_inline = 1;
}
/* In C, -Wconversion enables -Wsign-conversion (unless disabled
through -Wno-sign-conversion). While in C++,
-Wsign-conversion needs to be requested explicitly. */

View file

@ -1149,7 +1149,7 @@ bool
cgraph_function_possibly_inlined_p (tree decl)
{
if (!cgraph_global_info_ready)
return !DECL_UNINLINABLE (decl) && !flag_really_no_inline;
return !DECL_UNINLINABLE (decl);
return DECL_POSSIBLY_INLINED (decl);
}

View file

@ -581,7 +581,7 @@ Perform indirect inlining
; only when actually used. Used in conjunction with -g. Also
; does the right thing with #pragma interface.
finline
Common Report Var(flag_no_inline,0) Init(2)
Common Report Var(flag_no_inline,0) Init(0)
Pay attention to the \"inline\" keyword
finline-small-functions

View file

@ -169,11 +169,6 @@ extern int flag_pcc_struct_return;
extern int flag_complex_method;
/* Nonzero means that we don't want inlining by virtue of -fno-inline,
not just because the tree inliner turned us off. */
extern int flag_really_no_inline;
/* Nonzero if we are only using compiler to check syntax errors. */
extern int rtl_dump_and_exit;

View file

@ -1,3 +1,7 @@
2008-07-29 Jan Hubicka <jh@suse.cz>
* options.c (gfc_post_options): Do not set flag_no_inline.
2008-07-29 Daniel Kraft <d@domob.eu>
PR fortran/36403

View file

@ -294,10 +294,6 @@ gfc_post_options (const char **pfilename)
gfc_warning_now ("'-fd-lines-as-code' has no effect in free form");
}
/* Use tree inlining. */
if (!flag_no_inline)
flag_no_inline = 1;
/* If -pedantic, warn about the use of GNU extensions. */
if (pedantic && (gfc_option.allow_std & GFC_STD_GNU) != 0)
gfc_option.warn_std |= GFC_STD_GNU;

View file

@ -1159,16 +1159,14 @@ cgraph_decide_inlining (void)
overall_insns - old_insns);
}
if (!flag_really_no_inline)
cgraph_decide_inlining_of_small_functions ();
cgraph_decide_inlining_of_small_functions ();
/* After this point, any edge discovery performed by indirect inlining is no
good so let's give up. */
if (flag_indirect_inlining)
free_all_ipa_structures_after_iinln ();
if (!flag_really_no_inline
&& flag_inline_functions_called_once)
if (flag_inline_functions_called_once)
{
if (dump_file)
fprintf (dump_file, "\nDeciding on functions called once:\n");
@ -1407,9 +1405,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
}
/* Now do the automatic inlining. */
if (!flag_really_no_inline
&& mode != INLINE_ALL
&& mode != INLINE_ALWAYS_INLINE)
if (mode != INLINE_ALL && mode != INLINE_ALWAYS_INLINE)
for (e = node->callees; e; e = e->next_callee)
{
if (!e->callee->local.inlinable
@ -1596,8 +1592,6 @@ compute_inline_parameters (struct cgraph_node *node)
if (node->local.inlinable && !node->local.disregard_inline_limits)
node->local.disregard_inline_limits
= DECL_DISREGARD_INLINE_LIMITS (current_function_decl);
if (flag_really_no_inline && !node->local.disregard_inline_limits)
node->local.inlinable = 0;
/* Inlining characteristics are maintained by the cgraph_mark_inline. */
node->global.insns = inline_summary (node)->self_insns;
return 0;

View file

@ -1,3 +1,7 @@
2008-07-29 Jan Hubicka <jh@suse.cz>
* lang.c (java_post_options): Remove handling of flag_no_inline.
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge from gimple-tuples-branch.

View file

@ -532,10 +532,6 @@ java_post_options (const char **pfilename)
{
const char *filename = *pfilename;
/* Use tree inlining. */
if (!flag_no_inline)
flag_no_inline = 1;
/* An absolute requirement: if we're not using indirect dispatch, we
must always verify everything. */
if (! flag_indirect_dispatch)

View file

@ -1072,24 +1072,14 @@ decode_options (unsigned int argc, const char **argv)
flag_pic = flag_pie;
if (flag_pic && !flag_pie)
flag_shlib = 1;
if (flag_no_inline == 2)
flag_no_inline = 0;
else
flag_really_no_inline = flag_no_inline;
}
/* Set flag_no_inline before the post_options () hook. The C front
ends use it to determine tree inlining defaults. FIXME: such
code should be lang-independent when all front ends use tree
inlining, in which case it, and this condition, should be moved
to the top of process_options() instead. */
if (optimize == 0)
{
/* Inlining does not work if not optimizing,
so force it not to be done. */
flag_no_inline = 1;
warn_inline = 0;
flag_no_inline = 1;
/* The c_decode_option function and decode_option hook set
this to `2' if -Wall is used, so we can avoid giving out
@ -1099,9 +1089,6 @@ decode_options (unsigned int argc, const char **argv)
"-Wuninitialized is not supported without -O");
}
if (flag_really_no_inline == 2)
flag_really_no_inline = flag_no_inline;
/* The optimization to partition hot and cold basic blocks into separate
sections of the .o and executable files does not work (currently)
with exception handling. This is because there is no support for

View file

@ -1,3 +1,7 @@
2008-07-29 Jan Hubicka <jh@suse.cz>
* gcc.dg/20040206-1.c: Expect frontend warning now.
2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 34985

View file

@ -7,5 +7,5 @@
The warning about "no return statement in function
returning non-void" is PR 13000. */
static int foo (int a __attribute__((unused)) ) { } /* { dg-warning "control reaches end of non-void" } */
static int foo (int a __attribute__((unused)) ) { } /* { dg-warning "no return statement" } */
int main (void) { return foo (0); }

View file

@ -245,11 +245,6 @@ int flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN;
int flag_complex_method = 1;
/* Nonzero means that we don't want inlining by virtue of -fno-inline,
not just because the tree inliner turned us off. */
int flag_really_no_inline = 2;
/* Nonzero means we should be saving declaration info into a .X file. */
int flag_gen_aux_info = 0;

View file

@ -2554,7 +2554,7 @@ inlinable_function_p (tree fn)
always_inline = lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn));
if (flag_really_no_inline
if (flag_no_inline
&& always_inline == NULL)
{
if (do_warning)