Commit 9c96f3f8 by Andreas Jaeger

optimize.c: Include toplev.h for note_deferral_of_defined_inline_function prototype.

	* optimize.c: Include toplev.h for
	note_deferral_of_defined_inline_function prototype.

From-SVN: r39981
parent b3bae5e2
2001-02-22 Andreas Jaeger <aj@suse.de>
* optimize.c: Include toplev.h for
note_deferral_of_defined_inline_function prototype.
2001-02-22 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (struct lang_decl_inlined_fns): New.
......@@ -56,7 +61,7 @@
appropriate.
(start_function): Set current_vtt_parm.
(lang_mark_tree): Don't mark vtt_parm.
* decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
* decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
* class.c (build_clone): Maybe remove the VTT parm.
* optimize.c (maybe_clone_body): Set up the VTT parm.
......@@ -111,7 +116,7 @@
* decl2.c (build_artificial_parm): Set TREE_READONLY.
* decl.c (bad_specifiers): Allow throw specs on things with
* decl.c (bad_specifiers): Allow throw specs on things with
pointer-to-function or -member-function type.
* init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
a pmf.
......@@ -220,7 +225,7 @@
non-virtual destructor.
* init.c (build_delete): Explicitly call `operator delete' when
deleting an object with a non-virtual destructor.
2001-02-13 Jason Merrill <jason@redhat.com>
* lang-specs.h: Add more __EXCEPTIONS.
......@@ -251,7 +256,7 @@
* decl2.c (flag_vtable_thunks): Always set it to 1.
(flag_new_abi): Likewise.
* lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
* Makefile.in (g++spec.o): Fix typo.
2001-02-09 Jason Merrill <jason@redhat.com>
......@@ -275,7 +280,7 @@
* typeck2.c (friendly_abort): Don't say anything if we have
earlier errors or sorries.
* decl.c (check_tag_decl): Notice attempts to redefine bool and
* decl.c (check_tag_decl): Notice attempts to redefine bool and
wchar_t. Ignore if in_system_header.
* decl.c (maybe_push_cleanup_level): New fn...
......@@ -285,7 +290,7 @@
2001-02-07 Mark Mitchell <mark@codesourcery.com>
* lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
* lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
spec.
2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
......@@ -405,7 +410,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
(typeinfo_in_lib_p): New function.
(synthesize_tinfo_var): Use it.
(create_real_tinfo_var): Likewise.
2001-02-03 Jakub Jelinek <jakub@redhat.com>
* decl.c (push_class_binding): Use context_for_name_lookup instead
......@@ -622,7 +627,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* cvt.c (ocp_convert): Handle vector type conversion
* typeck2.c (digest_init): Handle vector type initializations
2001-01-16 Phil Edwards <pme@sources.redhat.com>
* g++spec.c: Don't add libraries needlessly if -fsyntax-only
......@@ -791,7 +796,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
DECL_INITIALIZED_IN_CLASS_P.
(instantiate_class_template): Likewise.
(instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
* class.c (finish_struct): Constify saved_filename.
2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
......@@ -809,14 +814,14 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Don't set TREE_VALUE on the class_shadowed list.
2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* decl2.c (acceptable_java_type): Allow references too.
* decl2.c (acceptable_java_type): Allow references too.
* init.c (build_java_class_ref): When using the new ABI, search
`class$' and have it mangled with `mangle_decl.'
* mangle.c (write_java_integer_type_codes): New function.
(write_builtin_type): Detect and mangle Java integer and real
types.
2001-01-07 Mark Mitchell <mark@codesourcery.com>
* decl2.c (grokfield): Don't accept `asm' specifiers for
......@@ -873,7 +878,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
(implicitly_declare_fn): Generate the exception spec too.
* search.c (check_final_overrider): Check artificial functions
too.
* typeck2.c (merge_exception_specifiers): New function.
* typeck2.c (merge_exception_specifiers): New function.
2001-01-03 Jason Merrill <jason@redhat.com>
......@@ -913,7 +918,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
(tsubst_template_parms): Use size_int, not build_int_2.
(tsubst): Likewise.
* rtti.c (get_vmi_pseudo_type_info): Likewise.
2001-01-02 Richard Henderson <rth@redhat.com>
* parse.y (asm): Set ASM_INPUT_P.
......@@ -931,7 +936,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* typeck.c (build_unary_op): Restore old &a.f diagnostic code.
* cvt.c (convert_to_void): Use type_unknown_p.
* typeck.c (strip_all_pointer_quals): Also strip quals from
* typeck.c (strip_all_pointer_quals): Also strip quals from
pointer-to-member types.
* Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
......
......@@ -13,7 +13,7 @@ GNU CC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
......@@ -27,6 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "insn-config.h"
#include "input.h"
#include "integrate.h"
#include "toplev.h"
#include "varray.h"
#include "ggc.h"
......@@ -38,7 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
function-local static constants just like global static
constants; the back-end already knows not to output them if they
are not needed.
o Provide heuristics to clamp inlining of recursive template
calls? */
......@@ -104,9 +105,9 @@ remap_decl (decl, id)
if (!n)
{
tree t;
/* Make a copy of the variable or label. */
t = copy_decl_for_inlining (decl, fn,
t = copy_decl_for_inlining (decl, fn,
VARRAY_TREE (id->fns, 0));
/* The decl T could be a dynamic array or other variable size type,
......@@ -118,7 +119,7 @@ remap_decl (decl, id)
&& TYPE_DOMAIN (TREE_TYPE (t)))
{
TREE_TYPE (t) = copy_node (TREE_TYPE (t));
TYPE_DOMAIN (TREE_TYPE (t))
TYPE_DOMAIN (TREE_TYPE (t))
= copy_node (TYPE_DOMAIN (TREE_TYPE (t)));
walk_tree (&TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))),
copy_body_r, id, NULL);
......@@ -126,11 +127,11 @@ remap_decl (decl, id)
/* Remember it, so that if we encounter this local entity
again we can reuse this copy. */
n = splay_tree_insert (id->decl_map,
(splay_tree_key) decl,
n = splay_tree_insert (id->decl_map,
(splay_tree_key) decl,
(splay_tree_value) t);
}
return (tree) n->value;
}
......@@ -174,8 +175,8 @@ remap_block (scope_stmt, decls, id)
SCOPE_STMT_BLOCK (scope_stmt) = new_block;
/* Remap its variables. */
for (old_var = decls ? decls : BLOCK_VARS (old_block);
old_var;
for (old_var = decls ? decls : BLOCK_VARS (old_block);
old_var;
old_var = TREE_CHAIN (old_var))
{
tree new_var;
......@@ -227,7 +228,7 @@ remap_block (scope_stmt, decls, id)
splay_tree_node n;
/* Find this block in the table of remapped things. */
n = splay_tree_lookup (id->decl_map,
n = splay_tree_lookup (id->decl_map,
(splay_tree_key) SCOPE_STMT_BLOCK (scope_stmt));
my_friendly_assert (n != NULL, 19991203);
SCOPE_STMT_BLOCK (scope_stmt) = (tree) n->value;
......@@ -293,11 +294,11 @@ copy_body_r (tp, walk_subtrees, data)
TREE_CHAIN (goto_stmt) = TREE_CHAIN (return_stmt);
/* If we're returning something, just turn that into an
assignment into the equivalent of the original
assignment into the equivalent of the original
RESULT_DECL. */
if (RETURN_EXPR (return_stmt))
{
*tp = build_stmt (EXPR_STMT,
*tp = build_stmt (EXPR_STMT,
RETURN_EXPR (return_stmt));
STMT_IS_FULL_EXPR_P (*tp) = 1;
/* And then jump to the end of the function. */
......@@ -322,11 +323,11 @@ copy_body_r (tp, walk_subtrees, data)
STRIP_TYPE_NOPS (new_decl);
*tp = new_decl;
}
else if (nonstatic_local_decl_p (*tp)
else if (nonstatic_local_decl_p (*tp)
&& DECL_CONTEXT (*tp) != VARRAY_TREE (id->fns, 0))
my_friendly_abort (0);
else if (TREE_CODE (*tp) == SAVE_EXPR)
remap_save_expr (tp, id->decl_map, VARRAY_TREE (id->fns, 0),
remap_save_expr (tp, id->decl_map, VARRAY_TREE (id->fns, 0),
walk_subtrees);
else if (TREE_CODE (*tp) == UNSAVE_EXPR)
/* UNSAVE_EXPRs should not be generated until expansion time. */
......@@ -416,19 +417,19 @@ initialize_inlined_parameters (id, args, fn)
tree init_stmt;
tree var;
tree value;
/* Find the initializer. */
value = TREE_VALUE (a);
/* If the parameter is never assigned to, we may not need to
create a new variable here at all. Instead, we may be able
to just use the argument value. */
if (TREE_READONLY (p)
if (TREE_READONLY (p)
&& !TREE_ADDRESSABLE (p)
&& !TREE_SIDE_EFFECTS (value))
{
/* Simplify the value, if possible. */
value = fold (decl_constant_value (value));
/* We can't risk substituting complex expressions. They
might contain variables that will be assigned to later.
Theoretically, we could check the expression to see if
......@@ -448,13 +449,13 @@ initialize_inlined_parameters (id, args, fn)
continue;
}
}
/* Make an equivalent VAR_DECL. */
var = copy_decl_for_inlining (p, fn, VARRAY_TREE (id->fns, 0));
/* Register the VAR_DECL as the equivalent for the PARM_DECL;
that way, when the PARM_DECL is encountered, it will be
automatically replaced by the VAR_DECL. */
splay_tree_insert (id->decl_map,
splay_tree_insert (id->decl_map,
(splay_tree_key) p,
(splay_tree_value) var);
......@@ -526,8 +527,8 @@ declare_return_variable (id, use_stmt)
my_friendly_assert (VARRAY_ACTIVE_SIZE (id->target_exprs) != 0,
20000430);
var = TREE_OPERAND (VARRAY_TOP_TREE (id->target_exprs), 0);
my_friendly_assert
(same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (var),
my_friendly_assert
(same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (var),
TREE_TYPE (result)),
20000430);
}
......@@ -538,7 +539,7 @@ declare_return_variable (id, use_stmt)
/* Register the VAR_DECL as the equivalent for the RESULT_DECL; that
way, when the RESULT_DECL is encountered, it will be
automatically replaced by the VAR_DECL. */
splay_tree_insert (id->decl_map,
splay_tree_insert (id->decl_map,
(splay_tree_key) result,
(splay_tree_value) var);
......@@ -594,8 +595,8 @@ inlinable_function_p (fn, id)
/* We can inline a template instantiation only if it's fully
instantiated. */
if (inlinable
&& DECL_TEMPLATE_INFO (fn)
if (inlinable
&& DECL_TEMPLATE_INFO (fn)
&& TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn)))
{
fn = instantiate_decl (fn, /*defer_ok=*/0);
......@@ -652,7 +653,7 @@ expand_call_inline (tp, walk_subtrees, data)
/* See what we've got. */
id = (inline_data *) data;
t = *tp;
t = *tp;
/* Recurse, but letting recursive invocations know that we are
inside the body of a TARGET_EXPR. */
......@@ -775,9 +776,9 @@ expand_call_inline (tp, walk_subtrees, data)
/* Declare the return variable for the function. */
STMT_EXPR_STMT (expr)
= chainon (STMT_EXPR_STMT (expr),
= chainon (STMT_EXPR_STMT (expr),
declare_return_variable (id, &use_stmt));
/* After we've initialized the parameters, we insert the body of the
function itself. */
inlined_body = &STMT_EXPR_STMT (expr);
......@@ -788,7 +789,7 @@ expand_call_inline (tp, walk_subtrees, data)
/* Close the block for the parameters. */
scope_stmt = build_stmt (SCOPE_STMT, DECL_INITIAL (fn));
SCOPE_NO_CLEANUPS_P (scope_stmt) = 1;
my_friendly_assert (DECL_INITIAL (fn)
my_friendly_assert (DECL_INITIAL (fn)
&& TREE_CODE (DECL_INITIAL (fn)) == BLOCK,
19991203);
remap_block (scope_stmt, NULL_TREE, id);
......@@ -799,7 +800,7 @@ expand_call_inline (tp, walk_subtrees, data)
before we evaluate the returned value below, because that evalulation
may cause RTL to be generated. */
STMT_EXPR_STMT (expr)
= chainon (STMT_EXPR_STMT (expr),
= chainon (STMT_EXPR_STMT (expr),
build_stmt (LABEL_STMT, id->ret_label));
/* Finally, mention the returned value so that the value of the
......@@ -952,8 +953,8 @@ int
calls_setjmp_p (fn)
tree fn;
{
return walk_tree_without_duplicates (&DECL_SAVED_TREE (fn),
calls_setjmp_r,
return walk_tree_without_duplicates (&DECL_SAVED_TREE (fn),
calls_setjmp_r,
NULL) != NULL_TREE;
}
......@@ -1080,7 +1081,7 @@ maybe_clone_body (fn)
expand_body (clone);
pop_from_top_level ();
}
/* We don't need to process the original function any further. */
return 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment