gcc/gcc/cp
Mark Mitchell 46e8c075d0 Make-lang.in (CXX_SRCS): Add optimize.c.
1999-11-25  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (CXX_SRCS): Add optimize.c.
	* Makefile.in (CXX_OBJS): Add optimize.o.
	(CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
	(spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
	(class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
	(search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
	(xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
	(dump.o): Likewise.
	(optimize.o): New target.
	* class.c: Don't include splay-tree.h.
	* cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
	* cp-tree.h: Include splay-tree.h.
	(DECL_UNINLINABLE): New macro.
	(CTOR_BEGIN_P, CTOR_END_P): New macros.
	(flag_inline_trees): New variable.
	(local_variable_p): New function.
	(nonstatic_local_decl_p): Likewise.
	(optimize_function): Likewise.
	(cplus_unsave_expr_now): Remove.
	(copy_tree_r): Declare.
	(remap_save_expr): Likewise.
	* decl.c (local_variable_p): Don't
	make it static.
	(local_variable_p_walkfn): New function.
	(make_rtl_for_local_static): Remove code to try to avoid writing
	out static constants.
	(emit_local_var): Fix indentation.
	(nonstatic_local_decl_p): New function.
	(check_default_argument): Use local_variable_p_walkfn, not
	local_variable_p, when walking the tree.
	(start_function): Set the DECL_CONTEXT for automatically generated
	labels.
	(finish_constructor_body): Use CTOR_STMT to mark the end of a
	constructor.
	* decl2.c: Don't include splay-tree.h.
	(flag_inline_trees): Define.
	* dump.c: Don't include
	splay-tree.h.
	* except.c (expand_end_catch_block): Fix comment formatting.
	(expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
	(expand_throw): Tidy comment.
	* init.c (build_vec_delete_1): Use create_temporary_var.
	* lex.c (cplus_tree_code_type): Make it static.
	(cplus_tree_code_length): Likewise.
	(cplus_tree_code_name): Likewise.
	* optimize.c: New file.
	* semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
	with computed gotos.
	(setup_vtbl_ptr): Mark the beginnings of constructors with
	CTOR_STMT.
	(expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
	(expand_body): Call optimize_function.  Save bodies if we're doing
	inlining on trees.
	* tree.c: Don't include splay-tree.h.  Include insn-config.h and
	integrate.h.
	(copy_tree_r): Make it public.
	(statement_code_p): New function.
	(mark_local_for_remap_r): Likewise.
	(cp_usave_r): Likewise.
	(cp_unsave): Likewise.
	(build_cplus_new): Set DECL_CONTEXT for temporary variables.
	(walk_tree): Walk into `s' class nodes.  Walk statement chains.
	(copy_tree_r): Handle 's' class nodes.  Restore chains for
	statements.  Nullify scopes.  Don't copy types.
	(init_tree): Set lang_unsave to cp_unsave.
	(remap_save_expr): Define.
	* ir.texi: Document CTOR_STMT.

From-SVN: r30669
1999-11-25 20:32:04 +00:00
..
inc update copyrights 1998-11-22 22:12:41 -05:00
ChangeLog Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
ChangeLog.1 Fix spelling and formatting. 1999-04-13 22:45:50 +00:00
ChangeLog.egcs Merge from gcc-2.8 1997-12-06 17:31:01 -07:00
Make-lang.in Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
Makefile.in Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
NEWS method.c (PARM_CAN_BE_ARRAY_TYPE): Remove. 1999-10-19 17:40:48 +00:00
call.c cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. 1999-11-14 20:29:06 +00:00
class.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
config-lang.in Copyright fixes. 1999-01-06 13:57:36 -07:00
cp-tree.def Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
cp-tree.h Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
cvt.c cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. 1999-11-14 20:29:06 +00:00
decl.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
decl.h Get ready for garbage collection. 1999-09-06 02:43:09 +00:00
decl2.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
dump.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
errfn.c cp-tree.h (fndecl_as_string, [...]): Constify a char*. 1999-08-29 13:47:37 +00:00
error.c cp-tree.def (FUNCTION_NAME): New tree node. 1999-11-23 02:49:41 +00:00
except.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
exception.cc exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2. 1999-08-24 00:16:06 -04:00
expr.c cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. 1999-11-14 20:29:06 +00:00
friend.c friend.c (make_friend_class): Robustify. 1999-10-07 16:41:48 +00:00
g++.1 * g++.1 (-traditional): Remove duplicated documentation. 1998-07-11 18:25:49 -06:00
g++spec.c Makefile.in (gcc.o, [...]): Depend on gcc.h. 1999-09-13 03:57:40 +00:00
gxx.gperf gxx.gperf (hash, [...]): Add prototypes. 1999-09-02 03:13:16 +00:00
gxxint.texi gxxint.texi: G++ now implements namespaces. 1999-09-19 00:33:09 +00:00
hash.h gxx.gperf (hash, [...]): Add prototypes. 1999-09-02 03:13:16 +00:00
init.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
input.c try again 1999-07-27 06:10:49 -04:00
ir.texi Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
lang-options.h decl.c (define_case_label): Don't crash if we're not in a switch. 1999-09-22 15:16:37 -04:00
lang-specs.h lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node. 1999-09-23 17:04:10 -04:00
lex.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
lex.h cp-tree.def (DECL_STMT): Make it smaller. 1999-08-14 09:23:49 +00:00
method.c cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. 1999-11-14 20:29:06 +00:00
mpw-config.in 87th Cygnus<->FSF quick merge 1996-07-19 21:46:24 +00:00
mpw-make.sed 89th Cygnus<->FSF quick merge 1996-09-18 17:20:21 +00:00
new.cc update copyrights 1998-11-22 22:12:41 -05:00
new1.cc Copyright tweaks. 1999-09-28 21:40:50 -06:00
new2.cc Copyright tweaks. 1999-09-28 21:40:50 -06:00
optimize.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
parse.c cp-tree.h (build_enumerator): Change prototype. 1999-11-16 03:42:28 +00:00
parse.h Makefile.in (tree.o): Depend on ggc.h. 1999-09-07 16:07:42 +00:00
parse.y cp-tree.h (build_enumerator): Change prototype. 1999-11-16 03:42:28 +00:00
pt.c pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs. 1999-11-25 01:56:13 +00:00
ptree.c cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro. 1999-09-23 22:20:08 +00:00
repo.c cp-tree.h (scratch_tree_cons): Remove. 1999-09-09 06:17:13 +00:00
rtti.c cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro. 1999-11-14 20:29:06 +00:00
search.c search.c (note_debug_info_needed): Do perform this optimization for dwarf2. 1999-11-24 21:33:31 -05:00
semantics.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
spew.c call.c (implicit_conversion): Robustify. 1999-09-13 00:35:00 +00:00
tinfo.cc Reimplement dynamic cast and catch matching. 1999-09-21 14:40:13 +00:00
tinfo.h Reimplement dynamic cast and catch matching. 1999-09-21 14:40:13 +00:00
tinfo2.cc Reimplement dynamic cast and catch matching. 1999-09-21 14:40:13 +00:00
tree.c Make-lang.in (CXX_SRCS): Add optimize.c. 1999-11-25 20:32:04 +00:00
typeck.c decl.c (pushdecl, [...]): Don't call a variadic function with a non-literal format string. 1999-11-23 16:17:52 +00:00
typeck2.c Makefile.in (typeck2.o): Depend on output.h. 1999-11-05 09:21:53 +00:00
xref.c lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero. 1999-09-16 22:33:10 +00:00