1169689Skan2004-05-11  Diego Novillo  <dnovillo@redhat.com>
2169689Skan
3169689Skan	* tree-cfg.c (delete_tree_cfg): Update call to
4169689Skan	free_basic_block_vars.
5169689Skan
6169689Skan2004-05-10  Diego Novillo  <dnovillo@redhat.com>
7169689Skan
8169689Skan	* tree-ssa-live.h: Fix typo in #include guard.
9169689Skan
10169689Skan2004-05-08  Jeff Sturm  <jsturm@one-point.com>
11169689Skan
12169689Skan	* tree-eh.c (lower_catch): Lower catch body in context of
13169689Skan	catch_region.
14169689Skan
15169689Skan2004-05-07  Richard Henderson  <rth@redhat.com>
16169689Skan
17169689Skan	* tree-eh.c (tree_could_trap_p): Use get_base_address on references.
18169689Skan	
19169689Skan2004-05-07  Diego Novillo  <dnovillo@redhat.com>
20169689Skan
21169689Skan	* doc/invoke.texi: Remove documentation for -ftree-copyprop.
22169689Skan	Update documentation for -ftree-pre.
23169689Skan
24169689Skan2004-05-06  Richard Henderson  <rth@redhat.com>
25169689Skan
26169689Skan	* stmt.c (parse_output_constraint): Don't warn for read-write
27169689Skan	memory operand.
28169689Skan	* gimplify.c (gimplify_asm_expr): Force in-out memory operands
29169689Skan	to minimal lvalues, then expand to non-matching constraints.
30169689Skan
31169689Skan2004-05-06  Zack Weinberg  <zack@codesourcery.com>
32169689Skan
33169689Skan	* c-decl.c (finish_function): When !targetm.have_ctors_dtors,
34169689Skan	record static constructors and destructors here...
35169689Skan	(c_expand_body_1): ... not here.
36169689Skan	* c-objc-common.c (start_cdtor, finish_cdtor): Collapse
37169689Skan	together into
38169689Skan	(build_cdtor): ...here.  Update to construct a complete tree
39169689Skan	for the function.  No need to call push_scope, pop_scope, or
40169689Skan	clear_last_expr, or set current_function_cannot_inline.
41169689Skan	(c_objc_common_finish_file): Just call build_cdtor for static
42169689Skan	ctors/dtors, then clear the variables.  Do this before calling
43169689Skan	cgraph_finalize_compilation_unit and cgraph_optimize.
44169689Skan
45169689Skan2004-05-06  Richard Henderson  <rth@redhat.com>
46169689Skan
47169689Skan	* fold-const.c (fold): Don't build COND_EXPR from comparisons for
48169689Skan	boolean and integer result types.  Handle X ^ X for TRUTH_XOR_EXPR.
49169689Skan
50169689Skan2004-05-05  Richard Henderson  <rth@redhat.com>
51169689Skan
52169689Skan	* tree-nested.c (create_tmp_var_for): Disallow variable sized types.
53169689Skan	(convert_nonlocal_reference): Set val_only false for the base of a
54169689Skan	component or array reference.
55169689Skan	(convert_local_reference): Likewise.
56169689Skan
57169689Skan2004-05-05  Richard Henderson  <rth@redhat.com>
58169689Skan
59169689Skan	* gimplify.c (create_tmp_var): Disallow variable sized objects.
60169689Skan	(gimplify_modify_expr): Don't memcpy for VA_ARG_EXPR.
61169689Skan
62169689Skan2004-05-05  Richard Henderson  <rth@redhat.com>
63169689Skan
64169689Skan	* fold-const.c (operand_equal_p): Replace only_const argument with
65169689Skan	flags.  Allow pure functions if OEP_PURE_SAME.
66169689Skan	(fold, nondestructive_fold_binary_to_constant): Use OEP_ONLY_CONST.
67169689Skan	* tree-cfg.c (phi_alternatives_equal): Fix operand_equal_p flag type.
68169689Skan	* tree-ssa-dom.c (avail_expr_eq): Use OEP_PURE_SAME.
69169689Skan	* tree.h (enum operand_equal_flag): New.
70169689Skan	(operand_equal_p): Update argument list.
71169689Skan
72169689Skan2004-05-05  Richard Henderson  <rth@redhat.com>
73169689Skan
74169689Skan	* tree-ssa-operands.c (get_call_flags): Remove.
75169689Skan	(get_expr_operands): Use call_expr_flags.
76169689Skan	* tree-alias-common.c (call_may_clobber): Likewise.
77169689Skan	(call_may_return): Likewise.
78169689Skan
79169689Skan2004-04-05  Andrew Pinski  <pinskia@physics.uc.edu>
80169689Skan
81169689Skan	PR c/15062
82169689Skan	* c-typeck.c (build_asm_expr): Mark the output operands
83169689Skan	to an asm addressable, if necessary.
84169689Skan
85169689Skan2004-05-05  Steven Bosscher  <stevenb@suse.de>
86169689Skan
87169689Skan	* Makefile.in (GTFILES): Remove duplicate basic-block.h.
88169689Skan
89169689Skan2004-05-04  Richard Henderson  <rth@redhat.com>
90169689Skan
91169689Skan	* gimplify.c (build_addr_expr_with_type): Set TREE_ADDRESSABLE.
92169689Skan	(gimplify_modify_expr): Turn variable-width assignment into memcpy.
93169689Skan	* tree-nested.c (convert_local_reference): Set val_only after default.
94169689Skan
95169689Skan2004-05-04  Diego Novillo  <dnovillo@redhat.com>
96169689Skan
97169689Skan	* tree-cfg.c (tree_cfg2vcg): Rename from tree_cfg2dot.  Update all
98169689Skan	users.
99169689Skan	Emit flowgraph using VCG syntax.
100169689Skan	* tree-dump.c (dump_files): Rename -fdump-tree-dot to
101169689Skan	-fdump-tree-vcg.
102169689Skan	* tree.h (enum tree_dump_index): Rename TDI_dot to TDI_vcg.
103169689Skan	* doc/invoke.texi: Update documentation to describe
104169689Skan	-fdump-tree-vcg.
105169689Skan
106169689Skan2004-05-03  Andrew Pinski  <pinskia@physics.uc.edu>
107169689Skan
108169689Skan	* objc/objc-act.c (build_objc_string_object):
109169689Skan	Add the fields to the purpose of the list for
110169689Skan	the constructor.
111169689Skan
112169689Skan2004-05-03  Richard Henderson  <rth@redhat.com>
113169689Skan
114169689Skan	* c-simplify.c (gimplify_if_stmt): Loop for else-if.
115169689Skan
116169689Skan2004-05-03  Andrew Pinski  <pinskia@physics.uc.edu>
117169689Skan
118169689Skan	PR optimization/15245
119169689Skan	* tree-ssa-phiopt.c (conditional_replacement): Use fold_convert
120169689Skan	instead of convert.
121169689Skan
122169689Skan2004-05-03  Diego Novillo  <dnovillo@redhat.com>
123169689Skan
124169689Skan	* gimplify.c (gimplify_compound_lval): Gimplify non-constant
125169689Skan	array indices into a temporary variable.
126169689Skan
127169689Skan2004-04-30  Richard Henderson  <rth@redhat.com>
128169689Skan
129169689Skan	* builtins.c (validate_arglist): Don't reject side effects.
130169689Skan	(simplify_builtin_strcpy): Do reject side effects in length.
131169689Skan
132169689Skan2004-04-30  Jeff Law  <law@redhat.com>
133169689Skan
134169689Skan	* tree-outof-ssa.c (eliminate_build): Move code which verifies
135169689Skan	that all of a PHI's arguments do not have a partition if the
136169689Skan	result does not have a partition from here to...
137169689Skan	(rewrite_trees): Here.
138169689Skan
139169689Skan2004-04-24  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
140169689Skan
141169689Skan	* tree-cfg.c (factored_computed_goto_label,
142169689Skan	factored_computed_goto): Removed.
143169689Skan	(disband_implicit_edges): Unfactor computed gotos without
144169689Skan	using them.
145169689Skan
146169689Skan2004-04-23  Per Bothner  <per@bothner.com>
147169689Skan
148169689Skan	* expr.c (expr_wfl_stack):  Remove unused global.
149169689Skan
150169689Skan	Pre-patches for future source_location / location_t merge.
151169689Skan	* tree.h (EXPR_LOCATION, EXPR_HAS_LOCATION):  New macros.
152169689Skan	* expr.c (expand_expr_real, expand_expr_real_1):  Use new macros.
153169689Skan	* gimple-low.c (lower_stmt):  Likewise.
154169689Skan	* gimplify.c (annotate_all_with_locus):  Likewise.
155169689Skan	* print-tree.c (print_node):  Likewise.
156169689Skan	* tree-inline.c (expand_call_inline):  Likewise.
157169689Skan	* tree-pretty-print.c (tree-pretty-print.c):  Likewise.
158169689Skan	* tree-sra.c (scalarize_structure_assignment, emit_scalar_copies,
159169689Skan	scalarize_call_expr):  Likewise.
160169689Skan	* tree-ssa-pre.c (code_motion):  Likewise.
161169689Skan	
162169689Skan2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
163169689Skan
164169689Skan	* c-simplify.c (gimplify_decl_stmt) [TYPE_DECL]:
165169689Skan	Do not check the type.
166169689Skan
167169689Skan2004-04-22  Jeff Law  <law@redhat.com>
168169689Skan
169169689Skan	* tree-into-ssa.c (rewrite_initialize_block_local_data): Mark all
170169689Skan	arguments as potentially unused.  Do not bother to VARRAY_CLEAR
171169689Skan	the block_defs.  Instead abort if we are presented with a block
172169689Skan	which has a nonempty block_defs.  Wrap entire thing inside
173169689Skan	#ifdef ENABLE_CHECKING.
174169689Skan	* tree-ssa-dom.c (dom_opt_initialize_block_local_data): Similarly
175169689Skan
176169689Skan	* tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Do not mark
177169689Skan	arguments to bypassed PHIs as needing to be rewritten.
178169689Skan
179169689Skan2004-04-21  Richard Henderson  <rth@redhat.com>
180169689Skan
181169689Skan	PR middle-end/14978
182169689Skan	* tree-nested.c (convert_nonlocal_reference): Set val_only when
183169689Skan	processing any otherwise unhandled expression.
184169689Skan
185169689Skan2004-04-21  Jeff Law  <law@redhat.com>
186169689Skan
187169689Skan	* tree-ssa-copy.c (cprop_operand): Break out of cprop_into_stmt.
188169689Skan	(cprop_into_stmt): Use cprop_operand.  Rearrange slightly to avoid
189169689Skan	switch statement inside a loop.
190169689Skan
191169689Skan	* tree-flow.h (var_ann_d): Add "current_def" field.
192169689Skan	(register_new_def): Lose last argument (currdefs table).
193169689Skan	* tree-into-ssa.c (currdefs): Remove.
194169689Skan	(rewrite_into_ssa): Initialize current_def field on each variable's
195169689Skan	annotation.  Remove initialization/clearing of currdefs.
196169689Skan	(set_value_for, get_value_for): Kill.
197169689Skan	(rewrite_initialize_block): Update call to register_new_def.
198169689Skan	(rewrite_stmt): Similarly.
199169689Skan	(rewrite_finalize_block): Get/set a _DECL node's current
200169689Skan	definition from its annotation.
201169689Skan	(get_reaching_def): Similarly.
202169689Skan	(register_new_def): Similarly.  Lose last argument.
203169689Skan	* tree-ssa-dom.c (currdefs): Remove.
204169689Skan	(get_value_for, set_value_for): Simplify.
205169689Skan	(tree_ssa_dominator_optimize): Initialize current_def on each
206169689Skan	variable's annotation.  Remove initialization/clearing of currdefs.
207169689Skan	(thread_across_edge): Lose unnecessary argument to register_new_def.
208169689Skan	(record_equivalences_from_phis): Likewise.
209169689Skan	(register_definitions_for_stmt): Likewise.
210169689Skan	(restore_currdefs_to_original_value): Get/set a _DECL node's current
211169689Skan	definition from its annotation.  Lose unnecessary "table" argument.
212169689Skan	(dom_opt_finalize_block): Corresponding changes.
213169689Skan
214169689Skan	* tree-dfa.c (free_df_for_stmt): Release memory back to the GC
215169689Skan	system immediately.
216169689Skan
217169689Skan2004-04-21  Ben Elliston  <bje@au.ibm.com>
218169689Skan
219169689Skan	PR middle-end/14730
220169689Skan	* expr.c (expand_expr_real_1) <SWITCH_EXPR>: Discard out of bounds
221169689Skan	case label values and ranges.  Saturate case range values that
222169689Skan	exceed the minimum or maximum permitted value for the controlling
223169689Skan	expression type to TYPE_MIN_VALUE or TYPE_MAX_VALUE.
224169689Skan
225169689Skan2004-04-20  Jeff Law  <law@redhat.com>
226169689Skan
227169689Skan	* tree-into-ssa.c (register_new_def): Avoid pushing useless
228169689Skan	information onto the block local definition stack.
229169689Skan
230169689Skan	* tree-into-ssa.c (register_new_def): If there is no current
231169689Skan	reaching definition for SSA_NAME_VAR (DEF), then just push
232169689Skan	SSA_NAME_VAR (DEF) onto the stack.
233169689Skan	(rewrite_finalize_block): If we pop a _DECL node from the stack,
234169689Skan	then the _DECL node has no current reaching definition.
235169689Skan	* tree-ssa-dom.c (restore_currdefs_to_original_value): Similarly.
236169689Skan
237169689Skan2004-04-19  Jeff Law  <law@redhat.com>
238169689Skan
239169689Skan	* tree-ssa-dom.c: Reinstate all changes from 2004-04-12.
240169689Skan	(lookup_avail_expr): Do not access a hash table object after
241169689Skan	it has been freed.
242169689Skan
243169689Skan2004-04-19  Daniel Berlin  <dberlin@dberlin.org>
244169689Skan
245169689Skan	* doc/passes.texi: Add blurb about PRE.
246169689Skan
247169689Skan2004-04-19  Andrew Pinski  <pinskia@physics.uc.edu>
248169689Skan
249169689Skan	* tree-ssa-phiopt.c (conditional_replacement):
250169689Skan	Catch some more non-gimple.
251169689Skan
252169689Skan2004-04-19  Jan Hubicka  <jh@suse.cz>
253169689Skan
254169689Skan	* predict.c (combine_predictions_for_bb): Fix pasto.
255169689Skan
256169689Skan2004-04-18  Jan Hubicka  <jh@suse.cz>
257169689Skan
258169689Skan	* tree-inline.c (estimate_num_insn_1): Deal properly with
259169689Skan	builtin_constant_p and builtin_expect.
260169689Skan
261169689Skan2004-04-17  Andrew MacLeod  <amacleod@redhat.com>
262169689Skan
263169689Skan	* doc/invoke.texi (tree-ter, tree-lrs): Document options.
264169689Skan
265169689Skan2004-04-17  Paul Brook  <paul@codesourcery.com>
266169689Skan
267169689Skan	* Makefile.in: Set GMPLIBS and GMPINC.
268169689Skan	* configure.ac: Add GMPLIBS and GMPINC.
269169689Skan	* configure: Regenerate.
270169689Skan
271169689Skan2004-04-16  Andrew MacLeod  <amacleod@redhat.com>
272169689Skan
273169689Skan	* common.opt (ftree-lrs): New common option.
274169689Skan	* flags.h (flag_tree_live_range_split): New flag.
275169689Skan	* opts.c (decode_options): Turn on LRS by default.
276169689Skan	(common_handle_option): Set LRS flag to specified value.
277169689Skan	* toplev.c (flag_tree_live_range_split): Initialize.
278169689Skan	(lang_independent_options f_): Add tree-lrs.
279169689Skan	* tree-outof-ssa.c (rewrite_out_of_ssa): Use LRS flag.
280169689Skan	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't coalesce
281169689Skan	variables if one is a hardware register.  Coalesce inlined user vars.
282169689Skan	(rename_ssa_copies): Scan blocks first, then PHI nodes.
283169689Skan
284169689Skan2004-04-15  Andrew Pinski  <pinskia@physics.uc.edu>
285169689Skan
286169689Skan	* builtins.c (fold_builtin_isascii): Do not return non-gimple
287169689Skan	code when we are in gimple form.
288169689Skan	(fold_builtin_isdigit): Do not return non-gimple
289169689Skan	code when we are in gimple form.
290169689Skan
291169689Skan	* c-simplify.c (gimplify_decl_stmt): Handle TYPE_DECL.
292169689Skan
293169689Skan2004-04-14  Paul Brook  <paul@codesourcery.com>
294169689Skan
295169689Skan	* Makefile.in (GMPLIBS, GMPINC): Don't set.
296169689Skan	* configure.ac: Remove checks for GMP.
297169689Skan	* configure: Regenerate.
298169689Skan
299169689Skan2004-04-13  Diego Novillo  <dnovillo@redhat.com>
300169689Skan
301169689Skan	* fold-const.c, tree-ssa-ccp.c, tree-ssa-dom.c,
302169689Skan	tree-ssa.c, tree.c: Replace all uses of TREE_UNSIGNED with
303169689Skan	TYPE_UNSIGNED or DECL_UNSIGNED.
304169689Skan
305169689Skan	* c-semantics.c (build_stmt): Don't check type nodes for
306169689Skan	side effects.
307169689Skan
308169689Skan2004-04-13  Jeff Law  <law@redhat.com>
309169689Skan
310169689Skan	* tree-ssa-dom.c: Revert all changes from 2004-04-12.
311169689Skan
312169689Skan2004-04-12  Jeff Law  <law@redhat.com>
313169689Skan
314169689Skan	* tree-ssa-dom.c (struct expr_hash_elt): Add new field for hash value.
315169689Skan	(initialize_hash_element): New LHS argument.  Callers changed.
316169689Skan	Initialize the hash value field.
317169689Skan	(remove_local_expressions_from_table): Use htab_remove_elt_with_hash.
318169689Skan	(update_rhs_and_lookup_avail_expr): Similary.
319169689Skan	(lookup_avail_expr): Use htab_find_slot_with_hash.  Simplify slightly
320169689Skan	and pass LHS to initialize_hash_element.
321169689Skan	(record_cond): Also use htab_find_slot_with_hash.  Initialize the
322169689Skan	hash table entry with initialize_hash_element.
323169689Skan	(avail_expr_eq): Use the saved hash value rather than calling into
324169689Skan	the hash functions again.
325169689Skan
326169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Slightly rearrange
327169689Skan	code to clear tables before each iteration to be clearer.
328169689Skan
329169689Skan	* tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Use
330169689Skan	DEF_OPS and VDEF_OPS instead of STMT_DEF_OPS and STMT_VDEF_OPS.
331169689Skan
332169689Skan2004-04-12  Diego Novillo  <dnovillo@redhat.com>
333169689Skan
334169689Skan	* flags.h (flag_tree_loop): Remove.  Update all users.
335169689Skan	* opts.c (common_handle_option) <OPT_ftree_loop_optimize>: Remove.
336169689Skan	* toplev.c (f_options): Remove -ftree-loop-optimize.
337169689Skan	* tree-optimize.c (init_tree_optimization_passes): Don't
338169689Skan	schedule pass_loop.
339169689Skan	* tree-ssa-loop.c (tree_ssa_loop_opt): Remove.
340169689Skan	(gate_loop): Remove.
341169689Skan	* doc/invoke.texi: Remove documentation for -ftree-loop-optimize.
342169689Skan
343169689Skan2004-04-12  Diego Novillo  <dnovillo@redhat.com>
344169689Skan
345169689Skan	* c-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
346169689Skan	* c-semantics.c (expand_stmt_toplev): Remove.
347169689Skan	* langhooks-def.h (LANG_HOOKS_RTL_EXPAND_INITIALIZER): Remove.
348169689Skan	(LANG_HOOKS_RTL_EXPAND_START): Remove.
349169689Skan	(LANG_HOOKS_RTL_EXPAND_STMT): Remove.
350169689Skan	(LANG_HOOKS_RTL_EXPAND_END): Remove.
351169689Skan	* langhooks.h (struct lang_hooks_for_rtl_expansion): Remove.
352169689Skan	(struct lang_hooks): Update.
353169689Skan	* tree-optimize.c (tree_rest_of_compilation): Don't call
354169689Skan	lang_hooks.rtl_expand.start nor lang_hooks.rtl_expand.end.
355169689Skan	Call expand_expr_stmt_value instead of
356169689Skan	lang_hooks.rtl_expand.stmt.
357169689Skan	* objc/objc-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
358169689Skan
359169689Skan
360169689Skan2004-04-12  Richard Henderson  <rth@redhat.com>
361169689Skan
362169689Skan	* c-common.c (c_do_switch_warnings): Use EXPR_LOCUS instead
363169689Skan	of STMT_LINENO.
364169689Skan	(c_walk_subtrees): Likewise.
365169689Skan	(c_estimate_num_insns_1): Remove FILE_STMT.
366169689Skan	* c-common.def (FILE_STMT): Remove.
367169689Skan	* c-common.h (FILE_STMT_FILENAME_NODE): Remove.
368169689Skan	(FILE_STMT_FILENAME, STMT_LINENO, STMT_LINENO_FOR_FN_P): Remove.
369169689Skan	(c_common_stmt_codes): Remove FILE_STMT.
370169689Skan	* c-dump.c (dump_stmt): Use EXPR_LOCUS instead of STMT_LINENO.
371169689Skan	* c-parse.in (lineno_stmt, lineno_label): Likewise.
372169689Skan	* c-pretty-print.c (pp_c_statement): Remove FILE_STMT.
373169689Skan	* c-semantics.c (add_stmt): Don't emit FILE_STMT.  Do set
374169689Skan	EXPR_LOCUS if not yet set.
375169689Skan	(finish_stmt_tree): Don't set line for end of function.
376169689Skan	(build_stmt): Set EXPR_LOCUS instead of STMT_LINENO.
377169689Skan	(prep_stmt): Use EXPR_LOCUS instead of STMT_LINENO.
378169689Skan	* c-simplify.c (c_gimplify_stmt): Remove FILE_STMT.
379169689Skan	(gimplify_block): Save and restore entire locus.
380169689Skan	(stmt_expr_last_stmt): Use EXPR_LOCUS instead of STMT_LINENO.
381169689Skan	* doc/c-tree.texi (FILE_STMT, FILE_STMT_FILENAME, STMT_LINENO): Remove.
382169689Skan
383169689Skan2004-04-12  Jeff Law  <law@redhat.com>
384169689Skan
385169689Skan	* tree-ssa-dom.c (true_exprs, false_exprs): Kill.
386169689Skan	(struct expr_hash_elt): New structure for the expression hash table.
387169689Skan	(struct dom_walk_block_data): Kill block local true_exprs and
388169689Skan	false_exprs.
389169689Skan	(get_eq_expr_value): One less local varray argument.  Fix prototype.
390169689Skan	Use record_cond rather than record_cond_is_{true,false}.
391169689Skan	(true_false_expr_hash, true_false_expr_eq): Kill.
392169689Skan	(record_cond_is_true, record_cond_is_false): Collapse into ...
393169689Skan	(record_cond): New function.
394169689Skan	(tree_ssa_dominator_optimize): Kill references to true_exprs and
395169689Skan	false_exprs.  Use "free" as the free function for the avail_exprs
396169689Skan	hash table.
397169689Skan	(dom_opt_initialize_block_local_data): No longer initialize
398169689Skan	block local true/false expressions.
399169689Skan	(initialize_hash_element): New function.
400169689Skan	(remove_local_expressions_from_table): Use initialize_hash_element.
401169689Skan	(update_rhs_and_lookup_avail_expr): Similarly.
402169689Skan	(dom_opt_finalize_block): Record true/false expressions into the
403169689Skan	main avail_expr hash table.  Unwind main hash table appropriately.
404169689Skan	Use record_cond rather than record_cond_is_{true,false}.
405169689Skan	(record_equivalences_from_incoming_edge): Pass block local avail_exprs
406169689Skan	varray instead of block local true/false varrays to get_eq_expr_value.
407169689Skan	(dump_dominator_optimization_stats): Update to reflect that the
408169689Skan	true/false expression hash tables are gone.
409169689Skan	(lookup_avail_expr): Simplify slightly now that we only have one
410169689Skan	expression hash table.
411169689Skan	(avail_expr_hash, avail_expr_eq): Generalize slightly to handle new
412169689Skan	hash table entry structure and having true/false expression information
413169689Skan	in the available expression hash table.
414169689Skan
415169689Skan2004-04-09  Jeff Law  <law@redhat.com>
416169689Skan
417169689Skan	* tree-ssa_dom.c (register_definitions_for_stmt): Accept a statement
418169689Skan	annotation rather than the statement itself.  Callers changed.
419169689Skan	Use [V]DEF_OPS rather than STMT_[V]DEF_OPS.
420169689Skan	* tree-ssa-operands.c (get_stmt_operands): Slightly reorganize to
421169689Skan	avoid unnecessary calls to stmt_ann.
422169689Skan	* tree-ssa-pre.c (expr_phi_insertion): Get the statement's annotation
423169689Skan	and use [V]USE_OPS rather than STMT_[V]USE_OPS.
424169689Skan	(same_e_version_phi_result): Similarly
425169689Skan	(process_left_occs_and_kills): Similarly for [V]DEF_OPS and
426169689Skan	STMT_[V]DEF_OPS.
427169689Skan	* tree-ssa.c (replace_immediate_uses): Similarly.
428169689Skan	(verify_ssa): Similarly.  Also verify that VDEF_OPs uses are dominated
429169689Skan	by their sets.
430169689Skan
431169689Skan	* tree-into-ssa.c (insert_phi_nodes_for): Use passed in worklist
432169689Skan	varray instead of allocated one for every variable we rewrite into
433169689Skan	SSA form.
434169689Skan	(insert_phi_nodes_1): Pass worklist varray from caller to
435169689Skan	insert_phi_nodes_for.
436169689Skan	(insert_phi_nodes): Allocate a worklist for insert_phi_nodes_for
437169689Skan	and pass it to insert_phi_nodes_1.
438169689Skan
439169689Skan2004-04-08  Jeff Law  <law@redhat.com>
440169689Skan
441169689Skan	* tree-ssa-dom.c (nonzero_vars): Turn it into a bitmap.
442169689Skan	(tree_ssa_dominator_optimize): Update initialization, clearing and
443169689Skan	freeing of nonzero_vars.
444169689Skan	(restore_nonzero_vars_to_original_value): New function.
445169689Skan	(dom_opt_finalize_block): Use it.
446169689Skan	(record_var_is_nonzero): Only record the variable into the block
447169689Skan	local nonzero vars array if it did not already have a nonzero property.
448169689Skan	(lookup_avail_expr): Lookup the nonzero property of an SSA_NAME with
449169689Skan	a bitmap test.
450169689Skan
451169689Skan	* fold-const.c (fold): Remove attempt to share code which
452169689Skan	simplifies tests against the highest/lowest value of a
453169689Skan	range between the main folder and the nondestructive folder.
454169689Skan
455169689Skan2004-04-08  Brian Booth  <bbooth@redhat.com>
456169689Skan	    Diego Novillo  <dnovillo@redhat.com>
457169689Skan
458169689Skan	* tree-into-ssa.c (invalidate_name_tags): New function.
459169689Skan	Mark aliases of invalidated name tags for renaming.
460169689Skan	(rewrite_into_ssa): Call invalidate_name_tags.
461169689Skan
462169689Skan2004-04-07  Diego Novillo  <dnovillo@redhat.com>
463169689Skan
464169689Skan	* gimplify.c (gimplify_call_expr): Remove argument POST_P.
465169689Skan	Update all callers.
466169689Skan	Don't use POST_P when gimplifying the call expression.
467169689Skan
468169689Skan2004-04-07  Diego Novillo  <dnovillo@redhat.com>
469169689Skan
470169689Skan	* doc/tree-ssa.texi: Add documentation for the dominator
471169689Skan	walker.
472169689Skan
473169689Skan2004-04-07  Andrew MacLeod  <amacleod@redhat.com>
474169689Skan
475169689Skan	* tree-outof-ssa.c: Update comments and reformat for legibility.
476169689Skan	* tree-ssa-copyrename.c: Update comments and reformat for legibility.
477169689Skan	* tree-ssa-live.c: Update comments and reformat for legibility.
478169689Skan	* tree-ssa-live.h: Update comments and reformat for legibility.
479169689Skan
480169689Skan2004-04-07  Diego Novillo  <dnovillo@redhat.com>
481169689Skan
482169689Skan	* gimplify.c (gimplify_call_expr): Don't use POST_P when
483169689Skan	gimplifying CALL_EXPR arguments.
484169689Skan
485169689Skan2004-04-06  Diego Novillo  <dnovillo@redhat.com>
486169689Skan
487169689Skan	* tree-dfa.c: Update comments and reformat for legibility.
488169689Skan	(find_vars_r): Remove special casing of MODIFY_EXPR and
489169689Skan	simplify logic.
490169689Skan	(compute_reached_uses, compute_reaching_defs, remove_decl,
491169689Skan	find_decl_location): Remove.
492169689Skan	(discover_nonconstat_array_refs_r,
493169689Skan	discover_nonconstant_array_refs): Move ...
494169689Skan	* tree-outof-ssa.c: ... here.
495169689Skan
496169689Skan2004-04-05  Richard Henderson  <rth@redhat.com>
497169689Skan
498169689Skan	* tree-simple.c (is_gimple_min_invariant): Disallow &a+i.
499169689Skan	* tree-ssa-ccp.c (maybe_fold_stmt_addition): Rename from
500169689Skan	maybe_fold_stmt_plus.  Handle MINUS_EXPR.
501169689Skan	(fold_stmt_r): Pass MINUS_EXPR to it.
502169689Skan
503169689Skan2004-04-05  Ben Elliston  <bje@au.ibm.com>
504169689Skan
505169689Skan	* Makefile.in (OBJS-common): Remove tree-browser.o.
506169689Skan	(cc1): Depend on @TREEBROWSER@ and include in list of objects.
507169689Skan	* configure.ac: Add --enable-tree-browser option.
508169689Skan	* configure: Rebuild.
509169689Skan
510169689Skan2004-04-05  Andrew Pinski  <pinskia@physics.uc.edu>
511169689Skan
512169689Skan	* tree-ssa-ccp.c (fold_stmt_r): Fix whitespace formatting.
513169689Skan	(set_rhs): Likewise.
514169689Skan
515169689Skan2004-04-03  Paolo Bonzini  <bonzini@gnu.org>
516169689Skan	    Diego Novillo  <dnovillo@redhat.com>
517169689Skan
518169689Skan	* tree-alias-common.c (find_func_aliases): Support
519169689Skan	assigning to BIT_FIELD_REFs.
520169689Skan	* tree-cfg.c (verify_expr): Don't allow assign to
521169689Skan	a register with BIT_FIELD_REF.
522169689Skan	* tree-dfa.c (get_virtual_var): Add consistency check on
523169689Skan	the shape of expected VARs.
524169689Skan	(discover_nonconstant_array_refs_r): Go through BIT_FIELD_REFs.
525169689Skan	* tree-simple.c: Document that BIT_FIELD_REFs are valid lvalues.
526169689Skan	* tree-ssa.c (set_is_used): Go through BIT_FIELD_REFs.
527169689Skan	* tree-ssa-operands.c (get_expr_operands): Mark VA_ARG_EXPR
528169689Skan	nodes as making volatile references.
529169689Skan
530169689Skan2004-04-02  Fariborz Jahanian <fjahanian@apple.com>
531169689Skan
532169689Skan	* c-convert.c (convert): Make convert work when converting
533169689Skan	to compatible types across translation unit.
534169689Skan
535169689Skan2004-04-02  Andrew Pinski  <pinskia@physics.uc.edu>
536169689Skan
537169689Skan	* Makefile.in (stage2_build): Remove support for
538169689Skan	rebuilding libbanshee.
539169689Skan	* configure.ac: Remove support for rebuilding
540169689Skan	libbanshee.
541169689Skan	* config.gcc (powerpc-*-darwin*): Do not rebuild
542169689Skan	libbanshee.
543169689Skan
544169689Skan2004-04-01  Kazu Hirata  <kazu@cs.umass.edu>
545169689Skan
546169689Skan	* tree-ssa-forwprop.c: Add a comment about forward propagation
547169689Skan	of TRUTH_NOT_EXPR.
548169689Skan
549169689Skan2004-04-01  Diego Novillo  <dnovillo@redhat.com>
550169689Skan
551169689Skan	* tree-optimize.c (tree_rest_of_compilation): Fix typo in
552169689Skan	setting of in_gimple_form.
553169689Skan
554169689Skan2004-04-01  Jeff Law  <law@redhat.com>
555169689Skan
556169689Skan	* fold-const.c (fold_relational_hi_lo): Do not return non-gimple
557169689Skan	code when we are in gimple form.
558169689Skan	* tree-optimize.c (tree_rest_of_compilation): Note when we are in
559169689Skan	gimple form.
560169689Skan	* tree-ssa-ccp.c (ccp_fold): Tighten tests on return value from
561169689Skan	nondestructive_fold_{unary,binary}_to_constant.
562169689Skan	* tree.h (in_gimple_form): Declare.
563169689Skan
564169689Skan	* tree-ssa.c (ssa_remove_edge): Correct looping structure.
565169689Skan	(ssa_redirect_edge): Similarly
566169689Skan
567169689Skan2004-03-30  Brian Booth  <bbooth@redhat.com>
568169689Skan
569169689Skan	* tree-pretty-print.c (dump_vops): Add flags argument and
570169689Skan	propagate it to dump_generic_node calls.
571169689Skan	(dump_generic_node): Update dump_vops call.
572169689Skan
573169689Skan2004-03-29  Diego Novillo  <dnovillo@redhat.com>
574169689Skan
575169689Skan	* configure.ac: Emit confirmation messages for libbanshee.
576169689Skan	* configure: Regenerate.
577169689Skan
578169689Skan2004-03-29  Jan Hubicka  <jh@suse.cz>
579169689Skan
580169689Skan	PR 14756
581169689Skan	* cgraphunit.c (cgraph_decide_inlining): Rewrite handling of
582169689Skan	always_inline functions.
583169689Skan
584169689Skan2004-03-28  Jan Hubicka  <jh@suse.cz>
585169689Skan
586169689Skan	* tree-inline.c (expand_call_inline):  Remove fixme introduced by
587169689Skan	nested function patch.
588169689Skan
589169689Skan2004-03-26  Diego Novillo  <dnovillo@redhat.com>
590169689Skan
591169689Skan	* tree-ssa-operands.c (get_stmt_operands): Remove always-true
592169689Skan	predicate.
593169689Skan
594169689Skan	* tree-ssa-alias.c (maybe_create_global_var): Create
595169689Skan	.GLOBAL_VAR if there are no call-clobbered variables.
596169689Skan	* tree-ssa-operands.c (get_stmt_operands): Add call-clobbering
597169689Skan	VDEFs for asm ("":::"memory") if there are call-clobbered
598169689Skan	variables or if .GLOBAL_VAR has been created.
599169689Skan
600169689Skan
601169689Skan2004-03-26  Diego Novillo  <dnovillo@redhat.com>
602169689Skan
603169689Skan	* passes.c (rest_of_compilation): Re-enable .01.rtl
604169689Skan	dumps.
605169689Skan
606169689Skan2004-03-25  Diego Novillo  <dnovillo@redhat.com>
607169689Skan
608169689Skan	* tree-pretty-print.c (dump_generic_node) <WITH_RECORD_EXPR>: Remove.
609169689Skan	* tree-inline.c (estimate_num_insns_1) <WITH_RECORD_EXPR>: Remove.
610169689Skan	* fold-const.c (fold_relational_hi_lo): Change type of argument
611169689Skan	'type_p' to const tree and rename it to 'type'.  Update
612169689Skan	all callers.
613169689Skan
614169689Skan2004-03-25  Diego Novillo  <dnovillo@redhat.com>
615169689Skan
616169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Remove c-call-graph.o
617169689Skan	(c-call-graph.o): Remove.
618169689Skan	* c-call-graph.c: Remove.
619169689Skan	* c-tree.h (print_call_graph): Remove.
620169689Skan	(debug_call_graph): Remove.
621169689Skan	* tree-cfg.c: Update/add comments everywhere.
622169689Skan	(pre_insert_on_edge): Rename from bsi_insert_on_edge_immediate.
623169689Skan	* tree-flow.h (build_tree_cfg): Make static.
624169689Skan	(tree_cfg2dot): Likewise.
625169689Skan	(verify_stmt): Likewise.
626169689Skan	* tree-ssa-pre.c (insert_one_operand): Call pre_insert_on_edge.
627169689Skan
628169689Skan2004-03-25  Diego Novillo  <dnovillo@redhat.com>
629169689Skan
630169689Skan	* tree-ssa-alias.c (struct alias_info): Change type of field
631169689Skan	'num_references' to varray_type.  Update all users.
632169689Skan
633169689Skan2004-03-24  Jeff Law  <law@redhat.com>
634169689Skan
635169689Skan	* c-mudflap (mflang_flush_calls): Use push_scope/pop_scope instead
636169689Skan	of pushlevel and poplevel.
637169689Skan
638169689Skan2004-03-23  Richard Henderson  <rth@redhat.com>
639169689Skan
640169689Skan	PR middle-end/14694
641169689Skan	* c-common.c (handle_alias_attribute): Mark aliased variables
642169689Skan	to be TREE_STATIC.
643169689Skan
644169689Skan2004-03-23  Jeff Law  <law@redhat.com>
645169689Skan
646169689Skan	* tree-into-ssa.c (register_new_def): Lose unnecessary VAR argument,
647169689Skan	instead derive VAR from DEF argument.
648169689Skan	(rewrite_initialize_block, rewrite_stmt, rewrite_operand): Corresponding
649169689Skan	changes.
650169689Skan	* tree-ssa-dom.c (register_definitions_for_stmt): Corresponding changes.
651169689Skan	(record_equivalences_from_phis): Likewise.
652169689Skan	(restore_currdefs_to_original_value): New, extracted from ...
653169689Skan	(dom_opt_finalize_block): Use restore_currdefs_to_original_value.
654169689Skan	Restore currdefs after threading across a true edge.
655169689Skan	(thread_across_edge): Register new defintions when we walk through
656169689Skan	a PHI node or real statement.
657169689Skan	* tree-flow.h (register_new_def): Updated.
658169689Skan
659169689Skan2004-03-23  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
660169689Skan
661169689Skan	* tree-ssa-dce.c (find_obviously_necessary_stmts,
662169689Skan	perform_tree_ssa_dce): Do not remove loops.
663169689Skan
664169689Skan2004-03-19  Diego Novillo  <dnovillo@redhat.com>
665169689Skan
666169689Skan	PR optimization/14643
667169689Skan	* tree-ssa-alias.c (group_aliases_into): Don't add a variable
668169689Skan	to its own may-alias set.
669169689Skan	(create_alias_map_for): New.
670169689Skan	(setup_pointers_and_addressables): Call it.
671169689Skan	Fix allocation of AI->ADDRESSABLE_VARS and AI->POINTERS.
672169689Skan	If there are no addressable variables and more than one
673169689Skan	dereferenced pointers, add type tags to the ADDRESSABLE_VARS
674169689Skan	array.
675169689Skan	(get_tmt_for): Add comment about using alias set equality when
676169689Skan	checking for existing tags.
677169689Skan
678169689Skan2004-03-19  Kazu Hirata  <kazu@cs.umass.edu>
679169689Skan
680169689Skan	* fold-const.c (fold_relational_const): Remove dead code.
681169689Skan
682169689Skan2004-03-19  Dale Johannesen  <dalej@apple.com>
683169689Skan
684169689Skan	* tree-ssa-dse.c (dse_optimize_stmt):  Redirect uses feeding into
685169689Skan	a deleted store correctly.
686169689Skan
687169689Skan2004-03-19  Jeff Law  <law@redhat.com>
688169689Skan
689169689Skan	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Fix typo.
690169689Skan	Eliminate unnecessary test of VAL.
691169689Skan
692169689Skan	* tree-dfa.c (find_hidden_use_vars): Also look inside the
693169689Skan	PENDING_SIZES list for hidden uses.
694169689Skan	* tree-optimize.c (tree_rest_of_compilation): Expand used variables
695169689Skan	before setting up parameters.
696169689Skan	* tree-ssa-copyrename.c (rename_ssa_copies): Do nothing for copies
697169689Skan	where the LHS has a hidden use.
698169689Skan
699169689Skan2004-03-18  Diego Novillo  <dnovillo@redhat.com>
700169689Skan
701169689Skan	* Makefile.in (TREE_FLOW_H): Reformat.
702169689Skan	(OBJS-common): Add tree-into-ssa.o and tree-outof-ssa.o.
703169689Skan	(tree-ssa.o): Remove dependency on domwalk.h and tree-ssa-live.h
704169689Skan	(tree-into-ssa.o): New.
705169689Skan	(tree-outof-ssa.o): New.
706169689Skan	(GTFILES): Remove tree-ssa.c.
707169689Skan	(gt-tree-ssa.h): Remove.
708169689Skan	* tree-into-ssa.c: New file.
709169689Skan	Move all the functions used to rename into SSA from tree-ssa.c.
710169689Skan	Update/add comments.
711169689Skan	Remove unused variables and structures.
712169689Skan	Don't use GGC for memory allocation.
713169689Skan	* tree-outof-ssa.c: New file.
714169689Skan	Move all the functions used to rename out of SSA from
715169689Skan	tree-ssa.c.
716169689Skan	Update/add comments.
717169689Skan	* tree-ssa-alias.c (compute_points_to_and_addr_escape): Add
718169689Skan	bibliographic reference.
719169689Skan
720169689Skan2004-03-18  Jeff Law  <law@redhat.com>
721169689Skan
722169689Skan	* Makefile.in (tree-tailcall.o): Depend on langhooks.h.
723169689Skan	* tree-tailcall.c: Include langhooks.h.
724169689Skan	(find_tail_calls): Use types_compatible_p langhook instead of
725169689Skan	equality test of TYPE_MAIN_VARIANT.
726169689Skan
727169689Skan	* tree-nested.c (get_chain_decl): Mark the chain decl with
728169689Skan	TREE_NO_WARNING.
729169689Skan
730169689Skan2004-03-18  Devang Patel  <dpatel@apple.com>
731169689Skan
732169689Skan	* tree-ssa-live.c (new_tree_live_info): Set num_blocks to
733169689Skan	last_basic_block instead of n_basic_blocks.
734169689Skan	(calculate_live_on_entry): Use last_basic_block instead of
735169689Skan	n_basic_blocks.
736169689Skan	(calculate_live_on_exit): Same.
737169689Skan
738169689Skan2004-03-17  Jeff Law  <law@redhat.com>
739169689Skan
740169689Skan	* tree-tailcall.c (find_tail_calls): Tighten test for tail recursion.
741169689Skan
742169689Skan2004-03-17  Diego Novillo  <dnovillo@redhat.com>
743169689Skan
744169689Skan	PR optimization/14511
745169689Skan	* tree-ssa-alias.c (compute_flow_insensitive_aliasing): Do not
746169689Skan	ignore read-only variables.
747169689Skan	(may_alias_p): Fix pointer-to-var calculation when 'var' is an
748169689Skan	array.
749169689Skan
750169689Skan2004-03-17  Jan Hubicka  <jh@suse.cz>
751169689Skan
752169689Skan	* tree-ssa.c (rewrite_into_ssa, compute_global_livein): Fix.
753169689Skan
754169689Skan2004-03-17  Paolo Bonzini  <bonzini@gnu.org>
755169689Skan
756169689Skan	* builtins.c (expand_builtin_constant_p,
757169689Skan	purge_builtin_constant_p): Remove.
758169689Skan	(expand_builtin): Expand __builtin_constant_p to zero.
759169689Skan	* function.c (struct function): Remove calls_constant_p.
760169689Skan	(current_function_calls_constant_p): Remove.
761169689Skan	* passes.c (rest_of_handle_gcse): Do not run
762169689Skan	purge_builtin_constant_p.
763169689Skan	* rtl.def (CONSTANT_P_RTX): Die die die.
764169689Skan
765169689Skan	* cse.c (fold_rtx): Do not handle CONSTANT_P_RTX.
766169689Skan	* expr.c (emit_move_insn): Likewise.
767169689Skan	* gcse.c (want_to_gcse_p, gcse_constant_p): Likewise.
768169689Skan	* genrecog.c (validate_pattern): Likewise.
769169689Skan	* recog.c (immediate_operand): Likewise.
770169689Skan	* rtl.h (CONSTANT_P): Likewise.
771169689Skan	* simplify-rtx.c (simplify_rtx): Likewise.
772169689Skan	* config/alpha/alpha.c (input_operand): Likewise.
773169689Skan	* config/arm/arm.c (THUMB_LEGITIMATE_CONSTANT_P): Likewise.
774169689Skan	* config/c4x/c4x.c (const_operand): Likewise.
775169689Skan	* config/cris/cris.c (cris_gotless_symbol,
776169689Skan	cris_got_symbol): Likewise.
777169689Skan	* config/frv/frv.h (LEGITIMATE_PIC_OPERAND_P): Likewise.
778169689Skan	* config/ia64/ia64.c (gr_reg_or_5bit_operand,
779169689Skan	gr_reg_or_6bit_operand, gr_reg_or_8bit_operand,
780169689Skan	gr_reg_or_8bit_adjusted_operand,
781169689Skan	gr_reg_or_8bit_and_adjusted_operand,
782169689Skan	gr_reg_or_14bit_operand, gr_reg_or_22bit_operand,
783169689Skan	shift_count_operand, shift_32bit_count_operand): Likewise.
784169689Skan	* config/m32r/m32r.c (move_src_operand): Likewise.
785169689Skan	* config/mips/mips.c (mips_const_insns): Likewise.
786169689Skan	* config/mmix/mmix.c (mmix_constant_address_p): Likewise.
787169689Skan	* config/pa/pa.c (move_src_operand): Likewise.
788169689Skan	* config/rs6000/rs6000.c (input_operand): Likewise.
789169689Skan	* config/sparc/sparc.c (input_operand): Likewise.
790169689Skan	* config/v850/v850.c (movsi_source_operand): Likewise.
791169689Skan	* config/xtensa/xtensa.c (move_operand,
792169689Skan	xtensa_emit_move_sequence): Likewise.
793169689Skan	* config/ia64/ia64.h (PREDICATE_CODES): Do not mention CONSTANT_P_RTX.
794169689Skan	* config/pa/pa.h (PREDICATE_CODES): Likewise.
795169689Skan
796169689Skan2004-03-16  Diego Novillo  <dnovillo@redhat.com>
797169689Skan
798169689Skan	* tree-dump.c (struct dump_option_value_info): Add TDF_UID.
799169689Skan	* tree.h (TDF_UID): Define.
800169689Skan	* doc/invoke.texi: Document -ftree-dump-...-uid.
801169689Skan	* tree-pretty-print.c (debug_generic_expr): Add TDF_UID.
802169689Skan	(debug_generic_stmt): Likewise.
803169689Skan	(dump_decl_name): New function.
804169689Skan	(dump_generic_node): Call it.
805169689Skan	(print_declaration): Add new argument 'flags'.  Update all users.
806169689Skan	(print_struct_decl): Likewise.
807169689Skan	* tree-alias-ander.c, tree-cfg.c, tree-dfa.c, tree-mudflap.c,
808169689Skan	tree-nrv.c, tree-sra.c, tree-ssa-alias.c, tree-ssa-ccp.c,
809169689Skan	tree-ssa-copy.c, tree-ssa-dom.c, tree-ssa-dse.c,
810169689Skan	tree-ssa-forwprop.c, tree-ssa-operands.c, tree-ssa-pre.c,
811169689Skan	tree-ssa.c, tree-tail-call.c: Call print_generic_* with
812169689Skan	'dump_flags'.
813169689Skan
814169689Skan2004-03-16  Dale Johannesen  <dalej@apple.com>
815169689Skan
816169689Skan	* Makefile.in (tree-ssa-phiopt.o): add langhooks.h dependency.
817169689Skan	(tree-nrv.o): Ditto.
818169689Skan	(tree-ssa-copy.o): Ditto.
819169689Skan	(tree-ssa-dom.o): Ditto.
820169689Skan	(tree-ssa-ccp.o): Ditto.
821169689Skan	* c-common.c: Add #include hashtab.h.
822169689Skan	(c_type_hash): New.
823169689Skan	(c_common_get_alias_set): Handle multiple type nodes referring
824169689Skan	to "the same" type, currently for C90 only.
825169689Skan	* c-decl.c (current_file_decl): Move to toplev.c.
826169689Skan	* c-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to
827169689Skan	c_types_compatible_p.
828169689Skan	(c_types_compatible_p): New.
829169689Skan	* c-tree.h (c_types_compatible_p): New declaration.
830169689Skan	* c-typeck.c (tagged_types_tu_compatible_p): Allow for
831169689Skan	compiler-generated TYPE_DECLs without a DECL_ORIGINAL_TYPE.
832169689Skan	* gimplify.c (canonicalize_addr_expr): Use types_compatible_p langhook.
833169689Skan	(cpt_same_type): Ditto.
834169689Skan	* langhooks-def.h (lhd_types_compatible_p): New declaration.
835169689Skan	LANG_HOOKS_TYPES_COMPATIBLE_P: New.
836169689Skan	* langhooks.c (lhd_types_compatible_p): New.
837169689Skan	* langhooks.h (struct lang_hooks): Add types_compatible_p.
838169689Skan	* stmt.c (tail_recursion_args): Use types_compatible_p langhook.
839169689Skan	* toplev.c (current_file_decl): New, moved from c-decl.c.
840169689Skan	* tree-nrv.c: Include langhooks.h.
841169689Skan	(tree_nrv): Use types_compatible_p langhook.
842169689Skan	* tree-ssa-ccp.c: Include langhooks.h.
843169689Skan	(maybe_fold_offset_to_array_ref): Use types_compatible_p langhook.
844169689Skan	(maybe_fold_offset_to_component_ref): Ditto (2 places).
845169689Skan	(fold_stmt_r): Make sure rhs of COMPONENT_REF is in lhs type.
846169689Skan	* tree-ssa-copy.c: Include langhooks.h.
847169689Skan	(cprop_into_stmt): Use types_compatible_p langhook.
848169689Skan	* tree-ssa-dom.c: Include langhooks.h.
849169689Skan	(avail_expr_p): Use types_compatible_p langhook.
850169689Skan	* tree-ssa-phiopt.c: Include langhooks.h.
851169689Skan	(conditional_replacement): Use types_compatible_p langhook.
852169689Skan	* tree-ssa.c (tree_ssa_useless_type_conversion_1): Use
853169689Skan	types_compatible_p langhook.
854169689Skan	* tree.h (current_file_decl): New declaration.
855169689Skan
856169689Skan2004-03-16  Dale Johannesen  <dalej@apple.com>
857169689Skan
858169689Skan	PR optimization/14498
859169689Skan	* gimplify.c (copy_if_shared_r): Mark VA_ARGS_EXPRs as volatile.
860169689Skan	(mark_decls_volatile_r): Moved higher in file (unchanged).
861169689Skan
862169689Skan2004-03-16  Daniel Berlin  <dberlin@dberlin.org>
863169689Skan
864169689Skan	PR optimization/14562
865169689Skan	* tree-ssa-pre.c (generate_expr_as_of_bb): Don't use names_match_p.
866169689Skan	(generate_vops_as_of_bb): Ditto.
867169689Skan
868169689Skan2004-03-12  Diego Novillo  <dnovillo@redhat.com>
869169689Skan
870169689Skan	PR optimization/14553
871169689Skan	* tree-ssa.c (replace_immediate_uses): Call propagate_value to
872169689Skan	update operands.
873169689Skan
874169689Skan2004-03-12  Diego Novillo  <dnovillo@redhat.com>
875169689Skan
876169689Skan	* tree-alias-common.c (create_alias_vars): Add #if
877169689Skan	HAVE_BANSHEE around test for PTA_ANDERSEN.
878169689Skan
879169689Skan2004-03-11  Diego Novillo  <dnovillo@redhat.com>
880169689Skan
881169689Skan	* tree-dfa.c (struct walk_state): Remove fields 'is_store' and
882169689Skan	'is_indirect_ref'.  Update all users.
883169689Skan	* tree-flow.h (struct var_ann_d): Remove fields 'is_stored',
884169689Skan	'is_dereferenced_store' and 'is_dereferenced_load'.  Update
885169689Skan	all users.
886169689Skan	* tree-simple.c (get_base_address): Handle BIT_FIELD_REF.
887169689Skan	* tree-ssa-alias.c (struct alias_info): Add fields
888169689Skan	'written_vars', 'dereferenced_ptrs_store' and
889169689Skan	'dereferenced_ptrs_load'.
890169689Skan	(init_alias_info): Initialize them.
891169689Skan	(delete_alias_info): Free them.
892169689Skan	(find_ptr_dereference): New.
893169689Skan	(ptr_is_dereferenced_by): Call it.
894169689Skan	Add new argument 'is_store'.  Set to true if the
895169689Skan	expression is an indirect store operation.
896169689Skan	(compute_points_to_and_addr_escape): If the statement
897169689Skan	makes a store, load or write operation, update the
898169689Skan	corresponding bitmap.
899169689Skan	(compute_flow_insensitive_aliasing): Test the
900169689Skan	'written_vars' bitmap to determine if alias sets should
901169689Skan	be computed.
902169689Skan	(setup_pointers_and_addressables): Always assume that
903169689Skan	volatile pointers and hidden pointers have been used in a
904169689Skan	memory store operation.
905169689Skan	* tree-ssa-operands.c (add_stmt_operand): Do add an
906169689Skan	operand for may-aliased variables before computing
907169689Skan	aliases.
908169689Skan
909169689Skan2004-03-11  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
910169689Skan
911169689Skan	* tree-optimize.c (init_tree_optimization_passes): Move
912169689Skan	pass_tail_recursion and pass_ch after pass_may_alias.
913169689Skan	* tree-ssa-loop.c (mark_defs_for_rewrite): Mark type tags
914169689Skan	for rewriting.
915169689Skan	* tree-ssa.c (mark_def_sites): Process the operand of a
916169689Skan	VDEF before the result.
917169689Skan
918169689Skan2004-03-11  Richard Henderson  <rth@redhat.com>
919169689Skan
920169689Skan	PR 14204
921169689Skan	* tree-ssa.c (warn_uninit): Don't warn for hard register variables.
922169689Skan
923169689Skan2004-03-10  Richard Henderson  <rth@redhat.com>
924169689Skan
925169689Skan	* tree-simple.c (get_base_var, get_base_decl): Remove.
926169689Skan	* tree-simple.h: Likewise.
927169689Skan	* tree-dfa.c (discover_nonconstant_array_refs_r): Use get_base_address.
928169689Skan	* tree-ssa-alias.c (ptr_is_dereferenced_by): Likewise.
929169689Skan	(add_pointed_to_var, is_escape_site): Likewise.
930169689Skan	* tree-ssa-ccp.c (get_default_value): Expect only SSA_NAME and DECLs.
931169689Skan	* tree-ssa-operands.c (add_stmt_operand): Likewise.
932169689Skan	(note_addressable): Use get_base_address.
933169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Expect only SSA_NAME.
934169689Skan	* tree-ssa.c (set_is_used): Inline get_base_decl.
935169689Skan
936169689Skan2004-03-10  Richard Henderson  <rth@redhat.com>
937169689Skan
938169689Skan	* tree-nested.c (convert_nonlocal_reference): Clear TREE_INVARIANT
939169689Skan	on modified ADDR_EXPRs.
940169689Skan
941169689Skan2004-03-10  Andrew Pinski  <apinski@apple.com
942169689Skan
943169689Skan	PR c/14475
944169689Skan	* c-decl.c (check_bitfield_type_and_width): Check for null
945169689Skan	lang_type_specific when check the precision of an enum.
946169689Skan
947169689Skan2004-03-09  Andrew Pinski  <apinski@apple.com>
948169689Skan
949169689Skan	* Makefile.in (tree-ssa-forwprop.o): Fix the dependences.
950169689Skan
951169689Skan2004-03-09  Jeff Law  <law@redhat.com>
952169689Skan
953169689Skan	* tree-flow-inline.h (may_propagate_copy): Do not allow propagation of
954169689Skan	a constant for a virtual operand.
955169689Skan
956169689Skan2004-03-08  Richard Henderson <rth@redhat.com>
957169689Skan
958169689Skan	* calls.c (initialize_argument_information): Add
959169689Skan	parameter may_tail_call.  Set to false for invisible
960169689Skan	pass-by-reference arguments that require stack
961169689Skan	allocation.
962169689Skan	Update all users.
963169689Skan
964169689Skan2004-03-07  Jeff Law  <law@redhat.com>
965169689Skan
966169689Skan	* tree-ssa-dom.c: (get_eq_expr_value): Fix typo when comparing a
967169689Skan	boolean against a constant.
968169689Skan	* tree-ssa-forwprop.c (record_single_argument_cond_exprs): Do not
969169689Skan	record the same SSA_NAME more than once.  Only record the SSA_NAME
970169689Skan	tested, not the COND_EXPR.
971169689Skan	(substitute_single_use_vars): Substitute booleans which are
972169689Skan	set from a TRUTH_NOT_EXPR even if they have more than one use site.
973169689Skan
974169689Skan2004-03-05  Jeff Law  <law@redhat.com>
975169689Skan
976169689Skan	* tree-ssa-dce.c (remove_dead_stmt): Clear PENDING_STMT after
977169689Skan	redirect_edge_and_branch call.
978169689Skan
979169689Skan	* tree-ssa-forwprop.c (record_single_argument_cond_exprs): Also
980169689Skan	record COND_EXPRs with single use vars defined by SSA_NAME + CONST
981169689Skan	expressions.
982169689Skan	(substitute_single_use_vars): Corresponding changes to rewrite
983169689Skan	COND_EXPRs using single use vars defined by SSA_NAME + CONST
984169689Skan	expressions.
985169689Skan
986169689Skan2004-03-05  Ulrich Weigand  <uweigand@de.ibm.com>
987169689Skan
988169689Skan	* config/s390/s390.c (s390_expand_movstr): Do not use
989169689Skan	expand_exit_loop_top_cond, manually copy loop header.
990169689Skan	(s390_expand_clrstr): Likewise.
991169689Skan	(s390_expand_cmpmem): Likewise.
992169689Skan
993169689Skan2004-03-04  Diego Novillo  <dnovillo@redhat.com>
994169689Skan
995169689Skan	* tree-ssa-alias.c (compute_flow_sensitive_aliasing): If
996169689Skan	a name tag has been marked call-clobbered, also mark the
997169689Skan	corresponding type tag.
998169689Skan
999169689Skan2004-03-04  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1000169689Skan
1001169689Skan	* tree-ssa-loop-live.c (coalesce_tpa_members): Update the root
1002169689Skan	variable of the partition.
1003169689Skan
1004169689Skan2004-03-04  Jeff Law  <law@redhat.com>
1005169689Skan
1006169689Skan	* tree-ssa-dce.c (remove_dead_stmt): Redirect an existing edge
1007169689Skan	rather than deleting the old ones and creating a new one when
1008169689Skan	removing a dead conditional.
1009169689Skan
1010169689Skan	* fold-const.c (fold): When rebuilding the expression after a
1011169689Skan	call to fold_relational_hi_lo, make sure to convert the type of
1012169689Skan	the second argument to the type of the first.
1013169689Skan
1014169689Skan2004-03-04  Diego Novillo  <dnovillo@redhat.com>
1015169689Skan
1016169689Skan	* cgraphunit.c (cgraph_optimize): Do not do memory release
1017169689Skan	check if there have been errors.
1018169689Skan
1019169689Skan2004-03-03  Jeff Law  <law@redhat.com>
1020169689Skan
1021169689Skan	* tree-ssa-phiopt.c (conditional_replacement): Clear EDGE_TRUE_VALUE
1022169689Skan	and EDGE_FALSE_VALUE on the remaining edge after eliminating a PHI.
1023169689Skan
1024169689Skan2004-03-03  Andrew MacLeod  <amacleod@redhat.com>
1025169689Skan
1026169689Skan	* tree-ssa-copyrename.c (gate_copyrename): Really check it in.
1027169689Skan	* tree-ssa.c (create_temp): Use DECL_ARTIFICIAL from original decl.
1028169689Skan
1029169689Skan2004-03-02  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1030169689Skan
1031169689Skan	* tree-tailcall.c (struct tailcall): Remove return_block and return_bsi
1032169689Skan	fields, add m and a fields.
1033169689Skan	(m_acc, a_acc): New.
1034169689Skan	(find_tail_calls): Find tail calls on whose results simple operations
1035169689Skan	are performed.
1036169689Skan	(independent_on_stmt_p, process_assignment,
1037169689Skan	propagate_through_phis, adjust_accumulator_values,
1038169689Skan	adjust_return_value): New.
1039169689Skan	(eliminate_tail_call): Update the accumulators if needed.
1040169689Skan	(optimize_tail_call): Do not create phis.
1041169689Skan	(tree_optimize_tail_calls): Create phis and accumulators as needed.
1042169689Skan	Adjust return values.
1043169689Skan
1044169689Skan2004-03-02  Diego Novillo  <dnovillo@redhat.com>
1045169689Skan
1046169689Skan	* tree-ssa-operands.c (get_expr_operands): Mark CALL_EXPRs
1047169689Skan	with has_volatile_ops if aliases haven't been computed yet.
1048169689Skan	(add_stmt_operand): Use 'true' instead of '1'.
1049169689Skan
1050169689Skan2004-03-02  Diego Novillo  <dnovillo@redhat.com>
1051169689Skan
1052169689Skan	PR optimization/14266
1053169689Skan	* tree-ssa-alias.c (create_global_var): Mark GLOBAL_VAR for
1054169689Skan	renaming.
1055169689Skan
1056169689Skan2004-03-01  Richard Henderson  <rth@redhat.com>
1057169689Skan
1058169689Skan	* tree.c (associative_tree_code): Remove MINUS_EXPR, LSHIFT_EXPR,
1059169689Skan	RSHIFT_EXPR.
1060169689Skan	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Use
1061169689Skan	is_gimple_min_invariant and is_gimple_var.  Handle minus_expr
1062169689Skan	specially.
1063169689Skan
1064169689Skan2004-03-01  Richard Henderson  <rth@redhat.com>
1065169689Skan
1066169689Skan	* cfgbuild.c (rtl_make_eh_edge): Rename from make_eh_edge.
1067169689Skan	* basic-block.h, except.c: Update decl and uses.
1068169689Skan
1069169689Skan2004-03-01  Frank Ch. Eigler  <fche@redhat.com>
1070169689Skan
1071169689Skan	* doc/passes.texi: Add information about mudflap.
1072169689Skan
1073169689Skan2004-03-01  Andrew Pinski  <pinskia@physics.uc.edu>
1074169689Skan
1075169689Skan	PR middle-end/13066
1076169689Skan	* fold-const (fold): Call fold_convert when building
1077169689Skan	a TRUTH_*_EXPR tree.
1078169689Skan
1079169689Skan2004-03-01  Andrew MacLeod  <amacleod@redhat.com>
1080169689Skan
1081169689Skan	* common.opt : Add tree-copyrename option. Remove duplicate tree-sra.
1082169689Skan	* flags.h (flag_tree_copyrename): Declare.
1083169689Skan	* opts.c (decode_options): Turn copyrename on by default at -O.
1084169689Skan	(common_handle_option): Handle -ftree-copyrename.
1085169689Skan	* toplev.c (flag_tree_copyrename): Declare.
1086169689Skan	* tree-ssa-copyrename.c (gate_copyrename): New.  Check flag.
1087169689Skan	(pass_rename_ssa_copies): Initialize with gated routine.
1088169689Skan	(lang_independent_options f_): Add tree-copyrename.
1089169689Skan	* doc/invoke.texi: Add -fdump-tree-copyrename and  -ftree-copyrename.
1090169689Skan	* doc/passes.texi: Add blurb for copy renaming.
1091169689Skan
1092169689Skan2004-03-01  Jeff Law  <law@redhat.com>
1093169689Skan
1094169689Skan	* tree-ssa-dom.c (true_false_expr_hash): Update comments slightly.
1095169689Skan	(true_false_expr_eq): Update comments slightly.  Avoid using
1096169689Skan	operand_equal_p, instead check the code and operands directly.
1097169689Skan
1098169689Skan2004-03-01  Andrew MacLeod  <amacleod@redhat.com>
1099169689Skan
1100169689Skan	* Makefile.in (tree-ssa-copyrename.o): New object.
1101169689Skan	* timevar.def (TV_TREE_COPY_RENAME): New time variable.
1102169689Skan	* tree-optimize.c (init_tree_optimization_passes): Add copy rename
1103169689Skan	pass.
1104169689Skan	* tree-pass.h (pass_rename_ssa_copies): New pass structure.
1105169689Skan	* tree-sra.c (lookup_scalar): Copy DECL_ARITIFICIAL flag from base.
1106169689Skan	* tree-ssa-copyrename.c : New file.
1107169689Skan	(copy_rename_partition_coalesce): Coalesce partitions for renaming.
1108169689Skan	(rename_ssa_copies): Find renamable copies.
1109169689Skan	(pass_rename_ssa_copies): Initialize.
1110169689Skan	* tree-ssa-live.c (register_ssa_partition): Move to tree-ssa-live.h.
1111169689Skan	* tree-ssa-live.h (register_ssa_partition): Moved from tree-ssa-live.c.
1112169689Skan
1113169689Skan2004-02-29  David Edelsohn  <edelsohn@gnu.org>
1114169689Skan
1115169689Skan	* doloop.c (doloop_optimize): Increment n_iterations if loop->top
1116169689Skan	present.
1117169689Skan
1118169689Skan2004-02-29  Diego Novillo  <dnovillo@redhat.com>
1119169689Skan
1120169689Skan	* gimple-low.c (pass_remove_useless_vars): Add TODO_dump_func.
1121169689Skan
1122169689Skan2004-02-27  Richard Henderson  <rth@redhat.com>
1123169689Skan
1124169689Skan	PR middle-end/14310
1125169689Skan	* explow.c (emit_stack_save): Remove savearea mode check.
1126169689Skan
1127169689Skan2004-02-27  Richard Henderson  <rth@redhat.com>
1128169689Skan
1129169689Skan	* builtins.c (simplify_builtin_strcmp): Don't export.  Remove
1130169689Skan	length parameters.  Remove conversion to memcmp.
1131169689Skan	(simplify_builtin_strncmp): Likewise.
1132169689Skan	* expr.h: Don't declare them.
1133169689Skan	* tree-ssa-ccp.c (ccp_fold_builtin): Don't call them.
1134169689Skan
1135169689Skan2004-02-27  Dale Johannesen  <dalej@apple.com>
1136169689Skan
1137169689Skan	* tree-cfg.c (cleanup_control_expr_graph): Prevent edge
1138169689Skan	probability from overflowing due to roundoff errors.
1139169689Skan
1140169689Skan2004-02-27  Jeff Law  <law@redhat.com>
1141169689Skan
1142169689Skan	* tree-cfg.c (verify_expr): Do not walk down into types.
1143169689Skan	Expand checking to verify that unary/binary operators have
1144169689Skan	gimple operands.
1145169689Skan	* tree-ssa-ccp.c (ccp_fold_builtin, case BUILT_IN_STRLEN): Do not
1146169689Skan	create non-gimple code.  Similarly for BUILTIN_IN_STRCPY and
1147169689Skan	BUILT_IN_STRNCPY.
1148169689Skan	* tree-ssa-phiopt.c (conditional_replacement): Do not create
1149169689Skan	non-gimple code.
1150169689Skan	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
1151169689Skan
1152169689Skan	* tree-simple.c (is_gimple_min_invariant): Subtraction of a
1153169689Skan	constant from a constant pointer is a gimple invariant as well.
1154169689Skan	* tree-ssa-operands.c (get_expr_operands): Handle subtraction
1155169689Skan	of a constant from a constant pointer too.
1156169689Skan
1157169689Skan	* fold-const.c (fold): Tighten test for optimizing an equality
1158169689Skan	comparison of the address of two variables.
1159169689Skan
1160169689Skan	* tree-inline.c (setup_one_parameter): Improve test for when we
1161169689Skan	need to gimplify the initialization statements.
1162169689Skan
1163169689Skan2004-02-27  Diego Novillo  <dnovillo@redhat.com>
1164169689Skan
1165169689Skan	PR optimization/14312
1166169689Skan	* tree-pretty-print.c (dump_generic_node): Mark tail calls.
1167169689Skan	* tree-ssa-alias.c (compute_may_aliases): Restore call to
1168169689Skan	dump_referenced_vars.
1169169689Skan	(compute_points_to_and_addr_escape): If the address of a
1170169689Skan	variable V is stored into a non-pointer variable, mark V as
1171169689Skan	call-clobbered.
1172169689Skan	* tree-tailcall.c (suitable_for_tail_opt_p): Check for
1173169689Skan	call-clobbered instead of TREE_ADDRESSABLE.
1174169689Skan	Ignore memory tags.
1175169689Skan	(optimize_tail_call): Add newline to dump output.
1176169689Skan
1177169689Skan2004-02-27  Diego Novillo  <dnovillo@redhat.com>
1178169689Skan
1179169689Skan	PR optimization/13347
1180169689Skan	* tree-sra.c (scalarize_structure_assignment): Use STRIP_NOPS
1181169689Skan	instead of STRIP_USELESS_TYPE_CONVERSION to remove type casts
1182169689Skan	from RHS of the assignment.
1183169689Skan
1184169689Skan	* tree-ssa.c (tree_ssa_useless_type_conversion_1): Reformat
1185169689Skan	and rephrase comments.
1186169689Skan	* tree.h (STRIP_USELESS_TYPE_CONVERSION): Reformat comment.
1187169689Skan
1188169689Skan2004-02-26  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1189169689Skan
1190169689Skan	* tree-cfg.c (tree_redirect_edge_and_branch_1): Allow to redirect
1191169689Skan	RETURN_EXPR branches.
1192169689Skan
1193169689Skan2004-02-26  Jeff Law  <law@redhat.com>
1194169689Skan
1195169689Skan	* tree-nrv.c (tree_nrv): Only perform NRV optimization when the
1196169689Skan	return value lives in memory.
1197169689Skan
1198169689Skan	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): If an
1199169689Skan	operand is unsigned, then we can eliminate more ABS expressions
1200169689Skan	and turned div/mod expression into shift/and expressions.
1201169689Skan
1202169689Skan	* fold-const.c (fold): An equality comparison of the address of
1203169689Skan	two non-weak variables has known compile-time result.
1204169689Skan
1205169689Skan2004-02-26  Andrew Pinski  <pinskia@physics.uc.edu>
1206169689Skan
1207169689Skan	* tree-ssa-phiopt.c (conditional_replacement):
1208169689Skan	s/tree_dump_flags/dump_flags/.
1209169689Skan
1210169689Skan	* tree-ssa-phiopt.c (tree_ssa_phiopt): Split into ...
1211169689Skan	(conditional_replacement): Here.
1212169689Skan
1213169689Skan2004-02-26  Andrew MacLeod  <amacleod@redhat.com>
1214169689Skan
1215169689Skan	* tree-ssa.c (find_replaceable_in_bb): Don't repalce expressions in
1216169689Skan	volatile statements.
1217169689Skan
1218169689Skan2004-02-25  Richard Henderson  <rth@redhat.com>
1219169689Skan
1220169689Skan	PR opt/14288
1221169689Skan	* gimplify.c (gimple_push_cleanup): Add VAR argument.  Set
1222169689Skan	TREE_NO_WARNING if in a conditional context.
1223169689Skan	(gimplify_target_expr): Pass new argument.
1224169689Skan	* tree-sra.c (lookup_scalar): Copy TREE_NO_WARNING to replacement.
1225169689Skan
1226169689Skan2004-02-24  Kazu Hirata  <kazu@cs.umass.edu>
1227169689Skan
1228169689Skan	* doc/invoke.texi: Replace -fdump-tree-all-ssa with
1229169689Skan	-fdump-tree-all.
1230169689Skan
1231169689Skan2004-02-24  Kazu Hirata  <kazu@cs.umass.edu>
1232169689Skan
1233169689Skan	PR target/14285
1234169689Skan	* config/arm/arm.c (arm_compute_func_type): Replace
1235169689Skan	"current_function_needs_context" with "cfun->static_chain_decl
1236169689Skan	!= NULL".
1237169689Skan	(arm_compute_initial_elimination_offset): Likewise.
1238169689Skan	* config/h8300/h8300.c (h8300_emit_stack_adjustment):
1239169689Skan	Likewise.
1240169689Skan	* config/sh/sh.c (output_stack_adjust): Likewise.
1241169689Skan	(sh5_schedule_saves): Likewise.
1242169689Skan	* config/xtensa/xtensa.c (compute_frame_size): Likewise.
1243169689Skan
1244169689Skan2004-02-24  Richard Henderson  <rth@redhat.com>
1245169689Skan
1246169689Skan	* c-simplify.c (c_genericize): s/dump_flags/local_dump_flags/.
1247169689Skan	* predict.c, tree-alias-ander.c, tree-cfg.c, tree-nrv.c,
1248169689Skan	tree-optimize.c, tree-pass.h, tree-sra.c, tree-ssa-alias.c,
1249169689Skan	tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
1250169689Skan	tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-loop.c,
1251169689Skan	tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa.c, tree-tailcall.c:
1252169689Skan	s/tree_dump_flags/dump_flags/.
1253169689Skan
1254169689Skan2004-02-24  Richard Henderson  <rth@redhat.com>
1255169689Skan
1256169689Skan	* predict.c, tree-alias-ander.c, tree-cfg.c, tree-mudflap.c,
1257169689Skan	tree-nrv.c, tree-optimize.c, tree-pass.h, tree-profile.c, tree-sra.c,
1258169689Skan	tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-dce.c,
1259169689Skan	tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-loop.c,
1260169689Skan	tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa.c,
1261169689Skan	tree-tailcall.c: s/tree_dump_file/dump_file/g.
1262169689Skan
1263169689Skan2004-02-24  Diego Novillo  <dnovillo@redhat.com>
1264169689Skan
1265169689Skan	* doc/tree-ssa.texi: Fix formatting mark ups.
1266169689Skan
1267169689Skan2004-02-24  Jeff Law  <law@redhat.com>
1268169689Skan
1269169689Skan	* gimple-low.c (remove_useless_vars): Now static.
1270169689Skan	(pass_remove_useless_vars): New.
1271169689Skan	* tree-flow.h (remove_useless_vars): Remove prototype.
1272169689Skan	* tree-nrv.c (struct nrv_data): Remove visited hashtable.
1273169689Skan	(finalize_nrv_r): Do not descend into types. No need to update
1274169689Skan	the visited hashtable.
1275169689Skan	(tree_nrv): No need to allocate/free the visited hashtable.
1276169689Skan	Clear the used flag on the variable's annotation.
1277169689Skan	* tree-optimize.c (init_tree_optimizatio_passes): Link in
1278169689Skan	pass_remove_useless_vars.
1279169689Skan	* tree-pass.h (pass_remove_useless_vars): Declare.
1280169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Do not remove useless vars here.
1281169689Skan
1282169689Skan	* Makefile.in (OBJS-common): Add tree-nrv.o.
1283169689Skan	(tree-nrv.o): Add dependencies.
1284169689Skan	* timevar.def (TV_TREE_NRV): New timevar.
1285169689Skan	* tree-nrv.c: New file implementing NRV on generic trees.
1286169689Skan	* tree-optimize.c (init_tree_optimization_passes): Link in
1287169689Skan	tree_nrv optimization pass.
1288169689Skan	* tree-pass.h (tree_nrv): Declare.
1289169689Skan	* doc/invoke.texi: Add -fdump-tree-nrv documentation.
1290169689Skan
1291169689Skan2004-02-24  Sebastian Pop  <sebastian.pop@cri.ensmp.fr>
1292169689Skan
1293169689Skan	* tree-flow.h (walk_use_def_chains_fn): Return a boolean.
1294169689Skan	True for stopping the use-def walk, false otherwise.
1295169689Skan	* tree-ssa-alias.c (collect_points_to_info_r): Same.
1296169689Skan	Always return false, and never stopping the def-use walk as before.
1297169689Skan	* tree-ssa.c (walk_use_def_chains_1): Stop when the result of the
1298169689Skan	callback function is true.
1299169689Skan	* doc/tree-ssa.texi: Document the behavior of the callback
1300169689Skan	function for walk_use_def_chains.
1301169689Skan
1302169689Skan2004-02-24  Richard Henderson  <rth@redhat.com>
1303169689Skan
1304169689Skan	* doc/passes.texi: Rewrite.
1305169689Skan
1306169689Skan2004-02-23  Diego Novillo  <dnovillo@redhat.com>
1307169689Skan
1308169689Skan	* Makefile.in (TEXI_GCCINT_FILES): Add cfg.texi and tree-ssa.texi
1309169689Skan	* tree-ssa-alias.c (compute_may_aliases): Update documentation.
1310169689Skan	* doc/gccint.texi: Add node for Tree SSA documentation.
1311169689Skan	Include tree-ssa.texi.
1312169689Skan	* doc/tree-ssa.texi: New file.
1313169689Skan
1314169689Skan2004-02-23  Dale Johannesen <dalej@apple.com>
1315169689Skan
1316169689Skan	* config/rs6000/rs6000.md:  Roll in changes from mainline:
1317169689Skan	(movdf_softfloat64):  Add POWER form of nop.
1318169689Skan	(movsf_hardfloat): Ditto, and accept CTR-to-CTR copy.
1319169689Skan	(movdf_hardfloat64):  Ditto.
1320169689Skan
1321169689Skan2004-02-23  Jeff Law  <law@redhat.com>
1322169689Skan
1323169689Skan	* ggc-page.c (struct page_entry): New field PREV.
1324169689Skan	(ggc_alloc): Update PREV field appropriately.
1325169689Skan	(sweep_pages): Likewise.
1326169689Skan	(ggc_free): Likewise.  Use PREV field rather than loop to
1327169689Skan	improve ggc_free performance.
1328169689Skan
1329169689Skan	* Makefile.in (OBJC-common): Add tree-ssa-copy.o.
1330169689Skan	(tree-ssa-copy.o): Add dependencies.
1331169689Skan	* tree-flow.h (propagate_value, replace_exp): Prototype.
1332169689Skan	(cprop_into_stmt, cprop_into_successor_phis): Likewise.
1333169689Skan	* tree-ssa-copy.c: New file, most functions copied from tree-ssa-dom.c
1334169689Skan	(cprop_into_stmt): Handle pointer & reference types better.
1335169689Skan	* tree-ssa-dom.c (opt_stats_d): Kill uninteresting stats.
1336169689Skan	(dump_dominator_optimization_stats): Corresponding changes.
1337169689Skan	(cprop_into_stmt): Moved into tree-ssa-copy.c.
1338169689Skan	(propagate_value): Likewise.
1339169689Skan	(cprop_into_phis): Simplify using code fromi tree-ssa-copy.c.
1340169689Skan	(optimize_stmt): Pass additional argument to cprop_into_stmt.
1341169689Skan	* tree-ssa-pre.c (generate_expr_as_of_bb): Use replace_exp.
1342169689Skan	(generate_vops_as_of_bb): Similarly.
1343169689Skan
1344169689Skan2004-02-21  Jan Hubicka  <jh@suse.cz>
1345169689Skan
1346169689Skan	* cgraphunit.c (decide_is_function_needed): Nested functions of extern
1347169689Skan	inline functions don't need to be output.
1348169689Skan	(expand_function): Re-enable sanity check.
1349169689Skan
1350169689Skan2004-02-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1351169689Skan
1352169689Skan	* tree-ssa-loop.c (do_while_loop_p): New function.
1353169689Skan	(copy_loop_headers): Do not peel do-while loops.
1354169689Skan
1355169689Skan2004-02-21  Jan Hubicka  <jh@suse.cz>
1356169689Skan
1357169689Skan	* tree-cfg.c (cleanup_control_expr_graph): Update profile.
1358169689Skan
1359169689Skan	* tree-cfg.c (disband_implicit_edges): Set fallthru edges correctly.
1360169689Skan
1361169689Skan	* cfg.c (dump_flow_info): Work on trees too.
1362169689Skan
1363169689Skan	* tree-pretty-print.c (dump_generic_bb_stuff):  Do not touch bb
1364169689Skan	annotations when not allocated.
1365169689Skan
1366169689Skan2004-02-21  Jeff Law  <law@redhat.com>
1367169689Skan
1368169689Skan	* tree-ssa-dom.c (cprop_into_stmt): Look at the type's main variant
1369169689Skan	to determine if the two operands of a copy have equivalent types.
1370169689Skan
1371169689Skan2004-02-20  Jeff Law  <law@redhat.com>
1372169689Skan
1373169689Skan	* tree-flow-inline.h (may_propagate_copy): Do not perform ABNORMAL_PHI
1374169689Skan	and DECL_HARD_REGISTER tests on virtual operands.
1375169689Skan	* tree-flow.h (propagate_copy): Kill prototype.
1376169689Skan	(propagate_value): New prototype.
1377169689Skan	* tree-ssa-dom.c (propagate_copy): Now static.
1378169689Skan	(propagate_value): No longer static.
1379169689Skan
1380169689Skan2004-02-20  Richard Henderson  <rth@redhat.com>
1381169689Skan
1382169689Skan	PR middle-end/14218
1383169689Skan	* c-simplify.c (mark_labels_r): Move to ...
1384169689Skan	* gimplify.c (force_labels_r): ... here, and rename.
1385169689Skan	(gimplify_init_constructor): Invoke it.
1386169689Skan	* tree-simple.h (force_labels_r): Declare.
1387169689Skan
1388169689Skan2004-02-20  Richard Henderson  <rth@redhat.com>
1389169689Skan
1390169689Skan	PR opt/14194
1391169689Skan	* tree-ssa-ccp.c (substitute_and_fold): Also mark new vars
1392169689Skan	if fold_stmt was successful.
1393169689Skan
1394169689Skan2004-02-20  Diego Novillo  <dnovillo@redhat.com>
1395169689Skan
1396169689Skan	* doc/invoke.texi: Add documentation for parameters
1397169689Skan	global-var-threshold and max-aliased-vops.
1398169689Skan	* params.def (PARAM_GLOBAL_VAR_THRESHOLD): Reformat help message.
1399169689Skan	(PARAM_MAX_ALIASED_VOPS): Rename from PARAM_MAX_ALIAS_SET_SIZE.
1400169689Skan	* params.h (MAX_ALIASED_VOPS): Rename from MAX_ALIAS_SET_SIZE.
1401169689Skan	Update all users.
1402169689Skan	* tree-ssa-alias.c (struct alias_map_d): Document fields.
1403169689Skan	Add fields total_alias_vops, grouped_p and may_aliases.
1404169689Skan	(struct alias_info): Change fields addressable_vars and
1405169689Skan	pointers to malloc'd arrays.  Update all users.
1406169689Skan	Add fields num_references and total_alias_vops.
1407169689Skan	(compute_may_aliases): Add more comments.
1408169689Skan	(init_alias_info): Initialize new fields in struct alias_info.
1409169689Skan	(delete_alias_info): Corresponding changes.
1410169689Skan	(compute_points_to_and_addr_escape): Count references to
1411169689Skan	potentially aliased variables and pointer dereferences.
1412169689Skan	(compute_flow_insensitive_aliasing): Remove old grouping
1413169689Skan	heuristic.
1414169689Skan	Count the number of virtual operands induced by all the alias
1415169689Skan	sets created and call group_aliases if the number exceeds the
1416169689Skan	threshold set by --param max-aliased-vops.
1417169689Skan	(total_alias_vops_cmp): New.
1418169689Skan	(group_aliases_into): New.
1419169689Skan	(group_aliases): New.
1420169689Skan	* tree-ssa-operands.c (get_expr_operands): Change dump file
1421169689Skan	message when no flow-sensitive alias information is available.
1422169689Skan	(add_stmt_operand): Reformat comment.
1423169689Skan	* tree-ssa.c (init_tree_ssa): Don't call bitmap_clear.
1424169689Skan
1425169689Skan	* tree-simple.c (get_base_decl): Fix typo in comment.
1426169689Skan
1427169689Skan	* tree-pretty-print.c (print_call_name): Handle matrices of
1428169689Skan	function pointers.
1429169689Skan
1430169689Skan2004-02-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
1431169689Skan
1432169689Skan	* Makefile.in (tree-ssa-loop.o): Add tree-inline.h dependency.
1433169689Skan	* basic-block.h (struct reorder_block_def): Moved from cfglayout.h.
1434169689Skan	(alloc_rbi_pool, initialize_bb_rbi, free_rbi_pool): New.
1435169689Skan	* bb-reorder.c (copy_bb): Use cfghooks for bb duplication.
1436169689Skan	* cfg.c (rbi_pool): New variable.
1437169689Skan	(alloc_rbi_pool, free_rbi_pool, initialize_bb_rbi): New functions.
1438169689Skan	* cfghooks.c (can_duplicate_block_p, duplicate_block): New functions.
1439169689Skan	* cfghooks.h (struct cfg_hooks): Add can_duplicate_block_p and
1440169689Skan	duplicate_block hooks.
1441169689Skan	(can_duplicate_block_p, duplicate_block): Declare.
1442169689Skan	* cfglayout.c (cfg_layout_pool, cfg_layout_initialize_rbi): Removed.
1443169689Skan	(fixup_reorder_chain): Use initialize_bb_rbi.
1444169689Skan	(cfg_layout_can_duplicate_bb_p, cfg_layout_duplicate_bb): Hookized.
1445169689Skan	(cfg_layout_initialize): Use cfg.c rbi pool manipulation functions.
1446169689Skan	(can_copy_bbs_p, copy_bbs): Use cfghooks for bb duplication.
1447169689Skan	* cfglayout.h (typedef struct reorder_block_def): Moved to
1448169689Skan	basic_block.h.
1449169689Skan	(cfg_layout_can_duplicate_bb_p, cfg_layout_duplicate_bb): Declaration
1450169689Skan	removed.
1451169689Skan	* cfgrtl.c (cfg_layout_create_basic_block): Use initialize_bb_rbi.
1452169689Skan	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hook): Fill in can_duplicate_block_p
1453169689Skan	and duplicate_block fields.
1454169689Skan	* common.opt (ftree-ch): Add.
1455169689Skan	* flags.h (flag_tree_ch): Declare.
1456169689Skan	* jump.c (next_nonnote_insn_in_loop, duplicate_loop_exit_test,
1457169689Skan	copy_loop_headers): Removed.
1458169689Skan	* loop-unswitch.c (unswitch_loop): Use cfghooks for bb duplication.
1459169689Skan	* opts.c (decode_options): Enable flag_tree_ch at -O1.
1460169689Skan	(common_handle_option): Handle -ftree_ch.
1461169689Skan	* rtl.h (copy_loop_headers): Declaration removed.
1462169689Skan	* timevar.def (TV_TREE_CH): New.
1463169689Skan	* toplev.c (flag_tree_ch): New.
1464169689Skan	(rest_of_compilation): Do not call copy_loop_headers.
1465169689Skan	* tracer.c (tail_duplicate): Use cfghooks for bb duplication.
1466169689Skan	* tree-cfg.c (build_tree_cfg): Call alloc_rbi_pool.
1467169689Skan	(create_bb): Call initialize_bb_rbi.
1468169689Skan	(delete_tree_cfg): Call free_rbi_pool.
1469169689Skan	(tree_duplicate_bb): Hookize.
1470169689Skan	(tree_can_duplicate_bb_p): New.
1471169689Skan	(tree_cfg_hooks): Fill in can_duplicate_block_p and duplicate_block
1472169689Skan	fields.
1473169689Skan	* tree-flow.h (tree_duplicate_bb): Declaration removed.
1474169689Skan	* tree-optimize.c (init_tree_optimization_passes): Add pass_ch.
1475169689Skan	* tree-pass.h (pass_ch): Declare.
1476169689Skan	* tree-ssa-loop.c: Include tree-inline.h.
1477169689Skan	(call_expr_p, should_duplicate_loop_header_p, mark_defs_for_rewrite,
1478169689Skan	duplicate_blocks, copy_loop_headers, gate_ch): New functions.
1479169689Skan	(pass_ch): New.
1480169689Skan	* doc/invoke.texi (-fdump-tree-ch, -ftree-ch): Document.
1481169689Skan
1482169689Skan2004-02-19  David Edelsohn  <edelsohn@gnu.org>
1483169689Skan
1484169689Skan	* config/rs6000/aix.h (MFWRAP_SPEC): Define.
1485169689Skan	(MFLIB_SPEC): Define.
1486169689Skan
1487169689Skan2004-02-19  Jeff Law  <law@redhat.com>
1488169689Skan
1489169689Skan	* tree-ssa-phiopt.c (tree_ssa_phiopt): TRUTH_NOT_EXPR is valid
1490169689Skan	gimple code.
1491169689Skan
1492169689Skan2004-02-19  Steven Bosscher  <stevenb@suse.de>
1493169689Skan
1494169689Skan	* tree-cfg.c (cleanup_dead_labels): New function to remove
1495169689Skan	redundant labels.
1496169689Skan
1497169689Skan	Remove the RTL inliner.
1498169689Skan	* calls.c (try_to_integrate): Remove.
1499169689Skan	(expand_call): Do not try to expand calls inline.
1500169689Skan	* dbxout.c (dbxout_symbol_location): Don't mention integrate.c
1501169689Skan	in comments.
1502169689Skan	* expmed.c (extract_fixed_bit_field): Always propagate the
1503169689Skan	target for the shift if it is a REG.
1504169689Skan	* expr.c (emit_move_insn_1): Don't generate inline warnings.
1505169689Skan	(expand_expr_real_1): Don't look at inline_function_decl.
1506169689Skan	Don't output inlined functions here.
1507169689Skan	* expr.h (expand_inline_function): Remove prototype.
1508169689Skan	* emit-rtl.c (copy_most_rtx): Don't copy the integrated flag.
1509169689Skan	Copy the new return_val flag.
1510169689Skan	* final.c (final): Don't look at RTX_INTEGRATED_P.
1511169689Skan	* cfgrtl.c (create_basic_block_structure): Likewise.
1512169689Skan	* haifa-sched.c (priority): Likewise.
1513169689Skan	(restore_line_notes): Likewise.
1514169689Skan	* function.c (inline_function_decl): Remove.
1515169689Skan	(put_var_into_stack): Don't use it.
1516169689Skan	(fix_lexical_addr): Likewise.
1517169689Skan	* function.c (inline_function_decl): Remove extern declaration.
1518169689Skan	* genattrtab.c (ATTR_PERMANENT_P): Use the return_val flag
1519169689Skan	instead of the integrated flag.
1520169689Skan	* integrate.c (INTEGRATE_THRESHOLD): Remove.
1521169689Skan	(setup_initial_hard_reg_value_integration): Likewise.
1522169689Skan	(initialize_for_inline): Likewise.
1523169689Skan	(note_modified_parmregs): Likewise.
1524169689Skan	(integrate_parm_decls): Likewise.
1525169689Skan	(process_reg_param): Likewise.
1526169689Skan	(save_parm_insns): Likewise.
1527169689Skan	(copy_insn_list): Likewise.
1528169689Skan	(copy_insn_notes): Likewise.
1529169689Skan	(compare_blocks): Likewise.
1530169689Skan	(find_block): Likewise.
1531169689Skan	(inlining): Likewise.
1532169689Skan	(function_cannot_inline_p): Likewise.
1533169689Skan	(parmdecl_map): Likewise.
1534169689Skan	(in_nonparam_insns): Likewise.
1535169689Skan	(save_for_inline): Likewise.
1536169689Skan	(FIXED_BASE_PLUS): Likewise.
1537169689Skan	(expand_inline_function): Likewise.
1538169689Skan	(copy_rtx_and_substitute): Don't look at map->integrating,
1539169689Skan	map->inline_target, and inlining, since we are never copying
1540169689Skan	for integrating.
1541169689Skan	Don't abort on RTX_INTEGRATED_P.
1542169689Skan	(old_fun): Remove.
1543169689Skan	(output_inline_function): Remove.
1544169689Skan	* integrate.h (struct inline_map): Remove fields integrating,
1545169689Skan	block_map, leaf_reg_map, inline_target, and local_return_label.
1546169689Skan	* print-rtl.c (print_rtx): Don't print the integrated flag.
1547169689Skan	Print the return_val flag.
1548169689Skan	* rtl.h (struct rtx_def): Replace the integrated flag with the
1549169689Skan	return_val flag.
1550169689Skan	(RTX_INTEGRATED_P): Remove.
1551169689Skan	(notice_rtl_inlining_of_deferred_constant): Remove prototype.
1552169689Skan	* stmt.c (force_label_rtx): Don't look at inline_function_decl.
1553169689Skan	* toplev.c (rest_of_handle_inlining): Remove.
1554169689Skan	(rest_of_compilation): Don't call it, and never jump to exit.
1555169689Skan	Call convert_from_eh_region_ranges.
1556169689Skan	(wrapup_global_declarations): Don't output nested inlined functions.
1557169689Skan	* tree.h (function_cannot_inline_p): Remove prototype.
1558169689Skan	(save_for_inline): Ditto.
1559169689Skan	(output_inline_function): Ditto.
1560169689Skan	* unroll.c (unroll_loop): Don't clear map->inline_target.
1561169689Skan	* varasm.c (notice_rtl_inlining_of_deferred_constant): Remove.
1562169689Skan
1563169689Skan	* system.h: Poison INTEGRATE_THRESHOLD.
1564169689Skan	* config/avr/avr.h: Remove define.
1565169689Skan	* config/ip2k/ip2k.h: Likewise.
1566169689Skan
1567169689Skan	* unwind-sjlj.c (uw_install_context): Make a proper static inline
1568169689Skan	function.
1569169689Skan
1570169689Skan	* doc/rtl.texi: Remove references to the integrated flag.
1571169689Skan	* doc/tm.texi: Remove documentation of INTEGRATE_THRESHOLD.
1572169689Skan
1573169689Skan2004-02-17  Andrew Macleod  <amacleod@redhat.com>
1574169689Skan
1575169689Skan	* tree-ssa-live.c (coalesce_tpa_members): Don't coalesce partitions
1576169689Skan	which are not in the same TPA group.
1577169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Coalesce via list first.
1578169689Skan
1579169689Skan2004-02-17  Brian Booth  <bbooth@redhat.com>
1580169689Skan
1581169689Skan	* tree-ssa-ccp.c (substitute_and_fold): Update stmt after
1582169689Skan	calling fold_stmt.
1583169689Skan
1584169689Skan2004-02-16  Andrew Pinski  <pinskia@physics.uc.edu>
1585169689Skan
1586169689Skan	* config/rs6000/rs6000.c (output_function_profiler): Check
1587169689Skan	cfun->static_chain_decl instead of current_function_needs_context.
1588169689Skan
1589169689Skan2004-02-16  Jeff Law  <law@redhat.com>
1590169689Skan
1591169689Skan	* tree-ssa.dse.c (dse_optimize_stmt): Dump info when we delete
1592169689Skan	stores.
1593169689Skan
1594169689Skan	* tree-ssa-dse.c: Update comments.
1595169689Skan
1596169689Skan	* Makefile.in (OBJS-common): Add tree-ssa-dse.o
1597169689Skan	(tree-ssa-dse.o): Add dependencies.
1598169689Skan	* common.opt (ftree-dse): New option.
1599169689Skan	* flags.h (flag_tree_dse): New.
1600169689Skan	(flag_tree_dom): Fix comments.
1601169689Skan	* opts.c (decode_options): Turn on flag_tree_dse.
1602169689Skan	(common_handle_option): Handle  OPT_ftree_dse.
1603169689Skan	* timevar.def (TV_TREE_PHIOPT): Update text.
1604169689Skan	(TV_TREE_DSE): New timevar.
1605169689Skan	* toplev.c (flag_tree_dse): New.
1606169689Skan	(flag_tree_dom): Fix comments.
1607169689Skan	(lang_independent_options): Add -ftree-dse.
1608169689Skan	* tree-dfa.c (redirect_immediate_use): New function.
1609169689Skan	(redirect_immediate_uses): New function.
1610169689Skan	* tree-flow.h (stmt_ann_d): Add UID field.
1611169689Skan	(redirect_immediate_uses): Declare.
1612169689Skan	* tree-optimize.c (init_tree_optimization_passes): Link in DSE pass.
1613169689Skan	* tree-pass.h (pass_dse): Declare.
1614169689Skan	* tree-ssa-dse.c: New file implementing DSE.
1615169689Skan	* doc/invoke.texi: Document new option.
1616169689Skan
1617169689Skan2004-02-16  Richard Henderson  <rth@redhat.com>
1618169689Skan
1619169689Skan	* tree-nested.c: New file.
1620169689Skan	* Makefile.in (OBJS-common, GTFILES, tree-nested.o): Add it.
1621169689Skan	* builtin-types.def (BT_FN_VOID_PTR_PTR, BT_FN_VOID_PTR_PTR_PTR): New.
1622169689Skan	* builtins.c (expand_builtin_nonlocal_goto): New.
1623169689Skan	(expand_builtin_apply): Fix prepare_call_address args.
1624169689Skan	(round_trampoline_addr): Move from function.c.
1625169689Skan	(expand_builtin_init_trampoline): New.
1626169689Skan	(expand_builtin_adjust_trampoline): New.
1627169689Skan	(expand_builtin): Invoke them.
1628169689Skan	(build_function_call_expr): Add CALL_EXPR chain operand.
1629169689Skan	* builtins.def (BUILT_IN_INIT_TRAMPOLINE,
1630169689Skan	BUILT_IN_ADJUST_TRAMPOLINE, BUILT_IN_NONLOCAL_GOTO): New.
1631169689Skan	* c-decl.c (finish_function): Call lower_nested_functions.
1632169689Skan	(c_expand_decl): Don't declare_nonlocal_label.
1633169689Skan	* calls.c (prepare_call_address): Replace fndecl arg with a
1634169689Skan	precomputed static chain value.
1635169689Skan	(expand_call): Precompute the static chain value.  Use
1636169689Skan	update_nonlocal_goto_save_area.
1637169689Skan	* cgraph.c (cgraph_mark_reachable_node): Don't force nested
1638169689Skan	functions to be reachable.
1639169689Skan	(cgraph_clone_node): Don't abort cloning functions containing
1640169689Skan	nested functions.
1641169689Skan	* cgraphunit.c (cgraph_assemble_pending_functions): Don't do
1642169689Skan	anything special for nested functions.
1643169689Skan	(cgraph_mark_functions_to_output): Likewise.
1644169689Skan	(cgraph_estimate_growth, cgraph_clone_inlined_nodes): Likewise.
1645169689Skan	(cgraph_optimize): Likewise.
1646169689Skan	(cgraph_finalize_function): Don't zap DECL_SAVED_INSNS.
1647169689Skan	(cgraph_expand_function): Allow functions to not be emitted.
1648169689Skan	* defaults.h (TRAMPOLINE_ALIGNMENT): Move from function.c.
1649169689Skan	* dwarf2out.c (gen_subprogram_die): Generate DW_AT_static_link.
1650169689Skan	* emit-rtl.c (maybe_set_first_label_num): New.
1651169689Skan	* explow.c (update_nonlocal_goto_save_area): New.
1652169689Skan	(allocate_dynamic_stack_space): Use it.
1653169689Skan	* expr.c (expand_expr_real_1) <LABEL_DECL>: Don't force_label_rtx.
1654169689Skan	<COND_EXPR>: Ignore the possibility of non-local labels.
1655169689Skan	<ADDR_EXPR>: Don't do trampoline_address.
1656169689Skan	* expr.h (lookup_static_chain): Remove.
1657169689Skan	(prepare_call_address): Update 2nd arg.
1658169689Skan	(update_nonlocal_goto_save_area): Declare.
1659169689Skan	* final.c (profile_function): Update static chain test.
1660169689Skan	* function.c (TRAMPOLINE_ALIGNMENT): Move to defaults.h.
1661169689Skan	(trampolines_created): Move to varasm.c.
1662169689Skan	(free_after_compilation): Update for removed fields.
1663169689Skan	(allocate_struct_function): Likewise.
1664169689Skan	(delete_handlers, lookup_static_chain): Remove.
1665169689Skan	(fix_lexical_addr): Don't consider non-local variable refs.
1666169689Skan	(trampoline_address): Remove.
1667169689Skan	(round_trampoline_addr): Move to builtins.c.
1668169689Skan	(adjust_trampoline_addr): Remove.
1669169689Skan	(expand_function_start): Update for changes to static chain
1670169689Skan	and nonlocal goto handling.
1671169689Skan	(initial_trampoline): Move to varasm.c.
1672169689Skan	(expand_function_end): Don't build trampolines or kill
1673169689Skan	unreferenced nonlocal goto labels.
1674169689Skan	* function.h (struct function): Remove x_nonlocal_labels,
1675169689Skan	x_nonlocal_goto_handler_slots, x_nonlocal_goto_stack_level,
1676169689Skan	x_context_display, x_trampoline_list, needs_context.
1677169689Skan	Add static_chain_decl, nonlocal_goto_save_area.
1678169689Skan	* gimple-low.c (record_vars): Don't record functions.
1679169689Skan	* gimplify.c (declare_tmp_vars): Export.
1680169689Skan	(create_artificial_label): Set type.
1681169689Skan	(gimplify_expr): Don't consider nonlocal gotos.
1682169689Skan	* integrate.c (expand_inline_function): Kill lookup_static_chain ref.
1683169689Skan	* jump.c (any_uncondjump_p): Reject nonlocal goto.
1684169689Skan	* rtl.h (maybe_set_first_label_num): Declare.
1685169689Skan	* stmt.c (label_rtx): Set LABEL_PRESERVE_P appropriately.
1686169689Skan	(expand_label): Handle DECL_NONLOCAL and FORCED_LABEL.
1687169689Skan	(declare_nonlocal_label): Remove.
1688169689Skan	(expand_goto): Don't handle nonlocal gotos.
1689169689Skan	(expand_nl_handler_label): Remove.
1690169689Skan	(expand_nl_goto_receivers): Remove.
1691169689Skan	(expand_end_bindings): Don't expand_nl_goto_receivers.  Use
1692169689Skan	update_nonlocal_goto_save_area.
1693169689Skan	* tree-cfg.c (make_edges): Handle abnormal edges out of block
1694169689Skan	falling through to EXIT.
1695169689Skan	(make_ctrl_stmt_edges): Don't check GOTO_EXPR for nonlocal goto.
1696169689Skan	Handle computed goto with no destinations.
1697169689Skan	(tree_can_merge_blocks_p): Don't merge blocks with nonlocal labels.
1698169689Skan	(remove_useless_stmts_label, stmt_starts_bb_p): Likewise.
1699169689Skan	(tree_forwarder_block_p): Likewise.
1700169689Skan	(nonlocal_goto_p): Remove.
1701169689Skan	(tree_verify_flow_info): Update to match.
1702169689Skan	* tree-dump.c (dump_files): Add tree-nested.
1703169689Skan	* tree-flow.h (nonlocal_goto_p): Remove.
1704169689Skan	* tree-inline.c (setup_one_parameter): Split out from ...
1705169689Skan	(initialize_inlined_parameters): ... here.  Handle static chain.
1706169689Skan	(inline_forbidden_p_1): Update nonlocal goto check.
1707169689Skan	(expand_call_inline): Disable mysterious cgraph abort.
1708169689Skan	* tree-optimize.c (tree_rest_of_compilation): Save DECL_SAVED_INSNS.
1709169689Skan	* tree-pretty-print.c (dump_generic_node): Print static chain
1710169689Skan	and nonlocal label.
1711169689Skan	* tree-simple.h (declare_tmp_vars): Declare.
1712169689Skan	(lower_nested_functions): Declare.
1713169689Skan	* tree-ssa-dom.c (propagate_value): Avoid sharing problems.
1714169689Skan	* tree-ssa-operands.c (get_expr_operands): Walk static chain
1715169689Skan	field of call_expr.
1716169689Skan	* tree.def (CALL_EXPR): Add static chain operand.
1717169689Skan	* tree.h (NONLOCAL_LABEL): Remove.
1718169689Skan	(TDI_nested): New.
1719169689Skan	* varasm.c (TRAMPOLINE_ALIGNMENT): Remove.
1720169689Skan	(initial_trampoline): Move from function.c.
1721169689Skan	(assemble_trampoline_template): Set and return it.
1722169689Skan	(trampolines_created): Move from function.c.
1723169689Skan
1724169689Skan2004-02-16  Steven Bosscher  <stevenb@suse.de>
1725169689Skan
1726169689Skan	* tree-flow.h (cleanup_control_expr_graph): Don't declare here.
1727169689Skan	* tree-cfg.c (cleanup_control_expr_graph): Make static.
1728169689Skan	(find_edge_taken_cond_expr): Return an edge if the true and false
1729169689Skan	edges of a branch lead to the same basic block.
1730169689Skan
1731169689Skan2004-02-13  Diego Novillo  <dnovillo@redhat.com>
1732169689Skan
1733169689Skan	* tree-phinodes.c (resize_phi_node): Do not use ggc_realloc to
1734169689Skan	allocate a new PHI node.
1735169689Skan
1736169689Skan2004-02-12  Diego Novillo  <dnovillo@redhat.com>
1737169689Skan
1738169689Skan	* tree-flow.h (kill_redundant_phi_nodes): Remove declaration.
1739169689Skan	* tree-optimize.c (init_tree_optimization_passes): Add
1740169689Skan	pass_redundant_phi after DOM and CCP.
1741169689Skan	(execute_todo): Do not call kill_redundant_phi_nodes.
1742169689Skan	* tree-pass.h (TODO_redundant_phi): Remove.
1743169689Skan	Update all users.
1744169689Skan	Adjust values for all the other TODO_* entries.
1745169689Skan	(pass_redundant_phi): Declare.
1746169689Skan	* tree-ssa.c (replace_immediate_uses): Call mark_new_vars_to_rename
1747169689Skan	if a pointer was replaced.
1748169689Skan	(kill_redundant_phi_nodes): Make static.
1749169689Skan	(pass_redundant_phi): Define.
1750169689Skan
1751169689Skan2004-02-12  Dale Johannesen  <dalej@apple.com>
1752169689Skan
1753169689Skan	* Makefile.in (OBJS-common): Add rtl-profile.o, tree-profile.o.
1754169689Skan	(profile.o): Add tree-flow.h dependency.
1755169689Skan	(rtl-profile.o): New rule.
1756169689Skan	(tree-profile.o): New rule.
1757169689Skan	(GTFILES): Add tree-profile.c, rtl-profile.c.
1758169689Skan	* basic-block.h (flow_call_edges_add): Remove.
1759169689Skan	* cfganal.c (need_fake_edge_p): Move to cfgrtl.c.
1760169689Skan	(flow_call_edges_add): Move to cfgrtl.c.
1761169689Skan	* cfghooks.c: (block_ends_with_call_p): New.
1762169689Skan	(block_ends_with_condjump_p): New.
1763169689Skan	(flow_call_edges_add): New.
1764169689Skan	* cfghooks.h: (struct cfg_hooks): add block_ends_with_call_p,
1765169689Skan	block_ends_with_condjump_p, flow_call_edges_add.
1766169689Skan	(block_ends_with_call_p): New declaration.
1767169689Skan	(block_ends_with_condjump_p): New declaration.
1768169689Skan	(flow_call_edges_add): New declaration.
1769169689Skan	* cfgrtl.c (rtl_block_ends_with_call_p): New.
1770169689Skan	(rtl_block_ends_with_condjump_p): New.
1771169689Skan	(need_fake_edge_p): Moved from cfganal.c.
1772169689Skan	(rtl_flow_call_edges_add): Moved from cfganal.c (flow_call_edges_add).
1773169689Skan	(rtl_cfg_hooks): Add rtl_block_ends_with_call_p,
1774169689Skan	rtl_block_ends_with_condjump_p, rtl_flow_call_edges_add.
1775169689Skan	(cfg_layout_rtl_cfg_hooks): Ditto.
1776169689Skan	* common.opt (ftree-based-profiling): New.
1777169689Skan	* coverage.c (tree_ctr_tables): New.
1778169689Skan	(coverage_counter_alloc): Use it.
1779169689Skan	(build_ctr_info_value): Ditto.
1780169689Skan	(coverage_counter_ref): Ditto.  Rename to rtl_coverage_counter_ref.
1781169689Skan	(tree_coverage_counter_ref): New.
1782169689Skan	* coverage.h (coverage_counter_ref): Remove declaration.
1783169689Skan	(rtl_coverage_counter_ref): New declaration.
1784169689Skan	(tree_coverage_counter_ref): New declaration.
1785169689Skan	* opts.c (OPT_ftree_based_profiling): New.
1786169689Skan	* profile.c: Include cfghooks.h, tree-flow.h.
1787169689Skan	(profile_hooks): New.
1788169689Skan	(profile_dump_file): New.
1789169689Skan	(instrument_edges): Use hooks instead of RTL-specific code.
1790169689Skan	(instrument_values): Ditto.
1791169689Skan	(get_exec_counts): Ditto.
1792169689Skan	(compute_branch_probabilities): Ditto.
1793169689Skan	(compute_value_histograms): Ditto.
1794169689Skan	(branch_prob): Ditto.
1795169689Skan	(find_spanning_tree): Ditto.
1796169689Skan	(end_branch_prob): Ditto.
1797169689Skan	(gen_edge_profiler): Move to rtl-profile.c (rtl_gen_edge_profiler).
1798169689Skan	(gen_interval_profiler): Ditto (rtl_gen_interval_profiler).
1799169689Skan	(gen_pow2_profiler): Ditto (rtl_gen_pow2_profiler).
1800169689Skan	(gen_one_value_profiler): Ditto (rtl_gen_one_value_profiler).
1801169689Skan	(tree_register_profile_hooks): New.
1802169689Skan	(rtl_register_profile_hooks): New.
1803169689Skan	* rtl-profile.c: New file.
1804169689Skan	* rtl.h (init_branch_prob): Move declaration to value-prof.h.
1805169689Skan	(end_branch_prob): Ditto.
1806169689Skan	(branch_prob): Ditto.
1807169689Skan	* toplev.c (flag_tree_based_profiling): New.
1808169689Skan	(f_options): Add -ftree-based-profiling.
1809169689Skan	(compile_file): Register rtl-based CFG and profiling hooks.
1810169689Skan	(rest_of_compilation): Do rtl-based profiling only when
1811169689Skan	!flag_tree_based_profiling.  Register rtl-based profiling hooks.
1812169689Skan	(process_options): Sorry for -ftree-based-profiling plus
1813169689Skan	-ftest-coverage or -fprofile-values.
1814169689Skan	* toplev.h (flag_tree_based_profiling): New.
1815169689Skan	* tree-cfg.c (tree_block_ends_with_call_p): New.
1816169689Skan	(tree_block_ends_with_condjump_p): New.
1817169689Skan	(need_fake_edge_p): New.
1818169689Skan	(tree_flow_call_edges_add): New (largely from flow_call_edges_add
1819169689Skan	in cfganal.c).
1820169689Skan	(tree_cfg_hooks): Add tree_block_ends_with_call_p,
1821169689Skan	tree_block_ends_with_condjump_p, tree_flow_call_edges_add.
1822169689Skan	* tree-optimize.c (init_tree_optimization_passes):
1823169689Skan	Add pass_tree_profile.
1824169689Skan	* tree-pass.h: Ditto.
1825169689Skan	* tree-profile.c: New file.
1826169689Skan	* value-prof.c (value_prof_hooks): New.
1827169689Skan	(find_values_to_profile): Rename to rtl_find_values_to_profile.
1828169689Skan	Move rtl-specific bits in from branch_prob.
1829169689Skan	(value_profile_transformations): Rename to
1830169689Skan	rtl_value_profile_transformations.
1831169689Skan	(struct value_prof_hooks): New.
1832169689Skan	(rtl_value_prof_hooks): New.
1833169689Skan	(rtl_register_value_prof_hooks): New.
1834169689Skan	(tree_find_values_to_profile): New stub.
1835169689Skan	(tree_value_profile_transformations): New stub.
1836169689Skan	(tree_value_prof_hooks): New stub.
1837169689Skan	(tree_register_value_prof_hooks): New stub.
1838169689Skan	(find_values_to_profile): New.
1839169689Skan	(value_profile_transformations): New.
1840169689Skan	* value-prof.h: Add multiple inclusion guard.
1841169689Skan	(struct histogram_value): Change rtx fields to void *.
1842169689Skan	(rtl_register_value_prof_hooks): New declaration.
1843169689Skan	(tree_register_value_prof_hooks): New declaration.
1844169689Skan	(find_values_to_profile): New declaration.
1845169689Skan	(free_profiled_values): New declaration.
1846169689Skan	(value_profile_transformations): New declaration.
1847169689Skan	(struct profile_hooks): New declaration.
1848169689Skan	(init_branch_prob): Declaration moved from rtl.h.
1849169689Skan	(branch_prob): Declaration moved from rtl.h.
1850169689Skan	(end_branch_prob): Declaration mooved from rtl.h.
1851169689Skan	(tree_register_profile_hooks): New declaration.
1852169689Skan	(rtl_register_profile_hooks): New declaration.
1853169689Skan	(tree_profile_hooks): New declaration.
1854169689Skan	(rtl_profile_hooks): New declaration.
1855169689Skan	* doc/invoke.texi: Document -ftree-based-profiling.
1856169689Skan
1857169689Skan2004-02-12  Jeff Law  <law@redhat.com>
1858169689Skan
1859169689Skan	* domwalk.c (walk_dominator_tree): Move statement walking from
1860169689Skan	clients into here.  Walk statements in forward or backward order
1861169689Skan	as requested by the client.  Walk either the dominator tree or
1862169689Skan	the post-dominator tree as requested by the client.
1863169689Skan	* domwalk.h (dom_walk_data): Add two fields to control direction of
1864169689Skan	statement walk and dominator vs post-dominator tree walk.  Add
1865169689Skan	BSI argument to the per-statement callbacks.
1866169689Skan	* tree-ssa-dom.c (optimize_stmt): Update prototype so that it can
1867169689Skan	be directly used as a callback for the dominator tree walker.
1868169689Skan	Update stmts_to_rescan here.
1869169689Skan	(tree_ssa_dominator_optimize): Initialize new fields in the dominator
1870169689Skan	walker structure.  Use optimize_stmt instead of dom_opt_walk_stmts
1871169689Skan	for statement callback.
1872169689Skan	(dom_opt_walk_stmts): Kill.  No longer used.
1873169689Skan	* tree-ssa.c (mark_def_sites): Update prototype so that it can be
1874169689Skan	called as the per-statement callback.  No longer walk statements here.
1875169689Skan	(mark_def_sites_initialize_block): New.
1876169689Skan	(rewrite_stmt): Update prototype so that it can be called as the
1877169689Skan	per-statement callback.
1878169689Skan	(rewrite_walk_stmts): Kill.  No longer used.
1879169689Skan	(rewrite_into_ssa): Initialize new fields in the dominator walker
1880169689Skan	structure.  Use rewrite_stmt instead of rewrite_walk_stmts.  Add
1881169689Skan	mark_def_sites_initialize_block callback.
1882169689Skan
1883169689Skan2004-02-12  Steven Bosscher  <stevenb@suse.de>
1884169689Skan
1885169689Skan	* doc/cfg.texi: New file.
1886169689Skan	* doc/ggcint.texi: Include it.  Add a new chapter.
1887169689Skan
1888169689Skan2004-02-11  Jeff Law  <law@redhat.com>
1889169689Skan
1890169689Skan	* Makefile.in (OBJS-common): Add tree-ssa-forwprop.o
1891169689Skan	(tree-ssa-forwprop.o): Add dependencies.
1892169689Skan	* timevar.def (TV_TREE_FORWPROP): New timevar.
1893169689Skan	* tree-optimize.c (init_tree_optimization_passes): Link in
1894169689Skan	the forward propagation pass.
1895169689Skan	* tree-pass.h (pass_forwprop): Declare.
1896169689Skan	* tree-ssa-forwprop.c: New file with forward propagation pass.
1897169689Skan	* doc/invoke.texi: Document dump for forward propagation pass.
1898169689Skan
1899169689Skan2004-02-11  Andrew MacLeod  <amacleod@redhat.com>
1900169689Skan
1901169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Don't use coalesce list until new
1902169689Skan	bug resolved.
1903169689Skan
1904169689Skan2004-02-11  Andrew MacLeod  <amacleod@redhat.com>
1905169689Skan
1906169689Skan	* tree-ssa-live.c (compare_pairs): New.  Coalesce list cost function.
1907169689Skan	(sort_coalesce_list): Use qsort() to sort list by cost.
1908169689Skan	(coalesce_tpa_members): Use correct partition representatives.  Add more
1909169689Skan	debug information.  Allow coalesce by list, root_var, or both.
1910169689Skan	(tpa_dump): Show partition index.
1911169689Skan	* tree-ssa-live.h (SSANORM_COALESCE_PARTITIONS): New flag.
1912169689Skan	(SSANORM_USE_COALESCE_LIST): New flag.
1913169689Skan	* tree-ssa.c (create_temp): Don't mark as used when created.
1914169689Skan	(coalesce_ssa_name): Create coalesce list if requested.  Add more
1915169689Skan	debug output.
1916169689Skan	(assign_vars): Add additional debug info.
1917169689Skan	(remove_ssa_form): Perform TER after assign_vars().
1918169689Skan	(rewrite_vars_out_of_ssa): Pass coalesce partitions flag to
1919169689Skan	remove_ssa_form.
1920169689Skan	(rewrite_out_of_ssa): Add coalesce list flag to remove_ssa_form call.
1921169689Skan
1922169689Skan2004-02-10  Jeff Law  <law@redhat.com>
1923169689Skan
1924169689Skan	* Makefile.in (OBJS-common): Add tree-ssa-phiopt.o
1925169689Skan	(tree-ssa-phiopt.o): Add dependencies.
1926169689Skan	* timevar.def (TV_TREE_PHIOPT): New timevar.
1927169689Skan	* tree-cfg.c (extract_true_false_edges_from_block): Moved here from
1928169689Skan	tree-ssa-dom.c.
1929169689Skan	(tree_verify_flow_info): Use extract_true_false_edges_from_block.
1930169689Skan	* tree-flow.h (extract_true_false_edges_from_block): Declare.
1931169689Skan	* tree-ssa-dom.c (extract_true_false_edges_from_block): Moved into
1932169689Skan	tree-cfg.c.
1933169689Skan	(get_eq_expr_value): Improve type check.
1934169689Skan	* tree-optimize.c (init_tree_optimization_passes): Link in
1935169689Skan	phiopt pass.
1936169689Skan	* tree-pass.h (pass_phiopt): Declare.
1937169689Skan	* tree-ssa-phiopt.c: New file with PHI node optimization pass.
1938169689Skan	* doc/invoke.texi: Document dump for PHI node optimization.
1939169689Skan
1940169689Skan2004-02-10  Richard Henderson  <rth@redhat.com>
1941169689Skan
1942169689Skan	* tree-sra.c (lookup_scalar): Handle unnamed fields.
1943169689Skan
1944169689Skan2004-02-10  Diego Novillo  <dnovillo@redhat.com>
1945169689Skan
1946169689Skan	* Makefile.in (OBJS-common): Add tree-ssa-alias.o.
1947169689Skan	(tree-ssa-alias.o): New rule.
1948169689Skan	(tree-ssa-operands.o): Add dependency on $(TIMEVAR_H) and tree-pass.h
1949169689Skan	(gt-tree-dfa.h): Remove.
1950169689Skan	* timevar.def (TV_TREE_OPS): Rename from unused entry TV_TREE_DFA.
1951169689Skan	* tree-ssa-alias.c: New file.
1952169689Skan	* tree-dfa.c (struct alias_stats_d, alias_stats, dump_alias_stats,
1953169689Skan	may_alias_p, add_may_alias, global_var, aliases_computed_p,
1954169689Skan	compute_may_aliases): Move to tree-ssa-alias.c.
1955169689Skan	(struct walk_state): Remove fields 'is_asm_expr' and 'num_calls'.
1956169689Skan	Update all users.
1957169689Skan	(compute_alias_sets, create_memory_tags, may_access_global_mem_p,
1958169689Skan	get_memory_tag_for, promote_call_clobbered_vars,
1959169689Skan	find_addressable_vars): Remove.
1960169689Skan	(call_clobbered_vars): Move to tree-ssa-alias.c and convert to
1961169689Skan	bitmap.
1962169689Skan	(find_referenced_vars): Move logic to create .GLOBAL_VAR to
1963169689Skan	tree-ssa-alias.c.
1964169689Skan	(create_ssa_name_ann): New.
1965169689Skan	(dump_variable): Rearrange.
1966169689Skan	(dump_dfa_stats): Do not show the number of call clobbered
1967169689Skan	variables.
1968169689Skan	(find_vars_r): Do not try to determine if an assignment my access
1969169689Skan	global memory.
1970169689Skan	(add_referenced_var): Remove hacks to establish global memory
1971169689Skan	dependencies.
1972169689Skan	If the variable needs to live in memory mark it call-clobbered.
1973169689Skan	* tree-flow-inline.h (ssa_name_ann): New.
1974169689Skan	(get_ssa_name_ann): New.
1975169689Skan	(set_may_alias_global_mem): Remove.
1976169689Skan	(may_alias_global_mem_p): Remove.
1977169689Skan	(set_may_point_to_global_mem): Remove.
1978169689Skan	(may_point_to_global_mem_p): Remove.
1979169689Skan	(is_call_clobbered): New
1980169689Skan	(mark_call_clobbered): New
1981169689Skan	(mark_non_addressable): New
1982169689Skan	* tree-flow.h (enum tree_ann_type): Add SSA_NAME_ANN.
1983169689Skan	(enum mem_tag_kind): Declare.
1984169689Skan	(struct var_ann_d): Remove fields 'is_call_clobbered',
1985169689Skan	'may_alias_global_mem' and 'may_point_to_global_mem'.
1986169689Skan	Replace bitfield 'mem_tag' with enum bitfield 'mem_tag_kind'.
1987169689Skan	Rename field 'mem_tag' to 'type_mem_tag'.
1988169689Skan	(struct stmt_ann_d): Change type of field 'addresses_taken' to a
1989169689Skan	bitmap.  Update all users.
1990169689Skan	(struct ssa_name_ann_d): Declare.
1991169689Skan	(union tree_ann_d): Add field 'ssa_name'.
1992169689Skan	(ssa_name_ann_t): New type.
1993169689Skan	(struct bb_ann_d): Add field 'has_escape_site'.
1994169689Skan	(num_call_clobbered_vars): Remove.
1995169689Skan	(call_clobbered_var): Remove.
1996169689Skan	(call_clobbered_vars): Change to bitmap.
1997169689Skan	(dump_points_to_info): Declare.
1998169689Skan	(debug_points_to_info): Declare.
1999169689Skan	(walk_use_def_chains_fn): New type.
2000169689Skan	(walk_use_def_chains): Declare.
2001169689Skan	(is_call_clobbered): Declare.
2002169689Skan	(mark_call_clobbered): Declare.
2003169689Skan	* tree-simple.c (needs_to_live_in_memory): Move to tree.c.
2004169689Skan	(is_gimple_non_addressable): Update comment.
2005169689Skan	(is_gimple_call_clobbered): Remove.
2006169689Skan	(get_call_expr_in): New.
2007169689Skan	(get_base_var): Rename from get_base_symbol.  Update all callers.
2008169689Skan	Don't strip SSA_NAME wrappers.
2009169689Skan	(get_base_decl): New.
2010169689Skan	(get_base_address): New.
2011169689Skan	* tree-simple.h (is_gimple_call_clobbered): Remove.
2012169689Skan	(needs_to_live_in_memory): Remove.
2013169689Skan	(get_base_decl): Declare.
2014169689Skan	(get_base_var): Declare.
2015169689Skan	(get_base_address): Declare.
2016169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Reduce to calling
2017169689Skan	needs_to_live_in_memory.
2018169689Skan	* tree-ssa-operands.c: Include tree-pass.h and timevar.h
2019169689Skan	(get_stmt_operands): Push/pop TV_TREE_OPS time var.
2020169689Skan	Call mark_call_clobbered for asms that store to memory.
2021169689Skan	(get_expr_operands): When adding operands for INDIRECT_REF
2022169689Skan	expressions, use flow-sensitive aliasing, if available.
2023169689Skan	Assume that malloc-like function calls won't clobber.
2024169689Skan	(add_call_clobber_ops):
2025169689Skan	(add_call_read_ops):
2026169689Skan	* tree-ssa.c (rewrite_into_ssa): If any variable in vars_to_rename
2027169689Skan	is a pointer, invalidate all name memory tags.
2028169689Skan	(create_temp): Call is_call_clobbered and mark_call_clobbered.
2029169689Skan	(walk_use_def_chains_1): New.
2030169689Skan	(walk_use_def_chains): New.
2031169689Skan
2032169689Skan	* tree.c (needs_to_live_in_memory): New.
2033169689Skan	* tree.h (DECL_NEEDS_TO_LIVE_IN_MEMORY_INTERNAL): Define.
2034169689Skan	(struct tree_decl): Add bitfield 'needs_to_live_in_memory'.
2035169689Skan	Update unused bits comment.
2036169689Skan	(needs_to_live_in_memory): Declare.
2037169689Skan
2038169689Skan	* tree-simple.h (get_call_expr_in): Declare.
2039169689Skan	* tree-sra.c (scalarize_stmt): Call get_call_expr_in when handling
2040169689Skan	function calls.
2041169689Skan	* tree-ssa-ccp.c (likely_value): Likewise.
2042169689Skan
2043169689Skan	* params.def (PARAM_MAX_CLOBBERED_VARS_GLOBAL_VAR): Remove.
2044169689Skan	(PARAM_MAX_CALLS_GLOBAL_VAR): Remove.
2045169689Skan	(PARAM_GLOBAL_VAR_THRESHOLD): Define.
2046169689Skan	(PARAM_MAX_ALIAS_SET_SIZE): Define.
2047169689Skan	Update all users.
2048169689Skan	* params.h (MAX_CALLS_FOR_GLOBAL_VAR): Remove.
2049169689Skan	(MAX_CLOBBERED_VARS_FOR_GLOBAL_VAR): Remove.
2050169689Skan	(GLOBAL_VAR_THRESHOLD): Define.
2051169689Skan	(MAX_ALIAS_SET_SIZE): Define.
2052169689Skan
2053169689Skan2004-02-09  Richard Henderson  <rth@redhat.com>
2054169689Skan
2055169689Skan	* langhooks.h (lang_hooks_for_functions): Add missing_noreturn_ok_p.
2056169689Skan	* langhooks-def.h, c-lang.c, objc/objc-lang.c
2057169689Skan	(LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): New.
2058169689Skan	* c-objc-common.c (c_missing_noreturn_ok_p): Return bool.
2059169689Skan	(c_objc_common_init): Don't set lang_missing_noreturn_ok_p.
2060169689Skan	* c-tree.h (c_missing_noreturn_ok_p): Update decl.
2061169689Skan	* flow.c (lang_missing_noreturn_ok_p): Remove.
2062169689Skan
2063169689Skan	* flow.c (check_function_return_warnings): Move to tree-cfg.c.
2064169689Skan	* toplev.c (rest_of_compilation): Don't call it.
2065169689Skan	* tree-cfg.c (execute_warn_function_return): Move from flow.c,
2066169689Skan	rename, update for tree vs rtl.
2067169689Skan	(pass_warn_function_return): New.
2068169689Skan	* tree-pass.h (pass_warn_function_return): Declare it.
2069169689Skan	* tree-optimize.c (init_tree_optimization_passes): Run it.
2070169689Skan
2071169689Skan	* function.h (struct function): Remove x_clobber_return_insn.
2072169689Skan	* function.c (free_after_compilation): Don't set it.
2073169689Skan	(expand_function_end): Likewise.
2074169689Skan
2075169689Skan2004-02-09  Richard Henderson  <rth@redhat.com>
2076169689Skan
2077169689Skan	Revert:
2078169689Skan	2004-02-06  Richard Henderson  <rth@redhat.com>
2079169689Skan	* tree-ssa-dom.c (record_equivalences_from_phis): Use
2080169689Skan	record_const_or_copy.
2081169689Skan	(record_equivalences_from_stmt): Likewise.  Replace
2082169689Skan	block_avail_exprs_p and block_nonzero_vars_p args with bd.
2083169689Skan
2084169689Skan2004-02-09  Jeff Law  <law@redhat.com>
2085169689Skan
2086169689Skan	* tree-ssa-dom.c (get_eq_expr_value): Improve handling of boolean
2087169689Skan	conditions.
2088169689Skan
2089169689Skan	* domwalk.c (walk_dominator_tree): Completely lose PARENT argument.
2090169689Skan	Callers updated.  No longer pass PARENT to callbacks.
2091169689Skan	* domwalk.h (struct dom_walk_data): Corresponding changes.
2092169689Skan	* tree-ssa-dom.c: Likewise.
2093169689Skan	* tree-ssa.c: Likewise.
2094169689Skan
2095169689Skan	* domwalk.c (walk_dominator_tree): Change last argument to be the
2096169689Skan	parent block in the dominator tree rather than the last statement
2097169689Skan	in the parent block in the dominator tree.  Similarly in all the
2098169689Skan	callbacks.
2099169689Skan	* domwalk.h (struct dom_walk_data): Update callback prototypes.
2100169689Skan	* tree-ssa-dom.c: Corresponding changes.
2101169689Skan	* tree-ssa.c: Likewise.
2102169689Skan
2103169689Skan	* tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Break out
2104169689Skan	of tree_ssa_dominator_optimize.  If the out-of-ssa pass creates
2105169689Skan	new variables, then invalidate some requested jump threads.
2106169689Skan
2107169689Skan2004-02-08  Richard Henderson  <rth@redhat.com>
2108169689Skan
2109169689Skan	* flow.c (regno_uninitialized): Remove.
2110169689Skan	* output.h (regno_uninitialized): Remove.
2111169689Skan	* function.c (setjmp_vars_warning): Rename from
2112169689Skan	uninitialized_vars_warning, remove uninitialized vars warning.
2113169689Skan	* toplev.c (rest_of_handle_life): Update to match.
2114169689Skan	* tree.h (setjmp_vars_warning): Likewise.
2115169689Skan
2116169689Skan	* tree-sra.c (lookup_scalar): Set DECL_NAME to something descriptive.
2117169689Skan
2118169689Skan	* tree-ssa.c (warn_uninit): New.
2119169689Skan	(warn_uninitialized_var, warn_uninitialized_phi): New.
2120169689Skan	(execute_early_warn_uninitialized): New.
2121169689Skan	(execute_late_warn_uninitialized): New.
2122169689Skan	(gate_warn_uninitialized): New.
2123169689Skan	(pass_early_warn_uninitialized): New.
2124169689Skan	(pass_late_warn_uninitialized): New.
2125169689Skan	* tree-pass.h (pass_early_warn_uninitialized): New.
2126169689Skan	(pass_late_warn_uninitialized): New.
2127169689Skan	* tree-optimize.c (init_tree_optimization_passes): Add them.
2128169689Skan
2129169689Skan2004-02-08  Richard Henderson  <rth@redhat.com>
2130169689Skan
2131169689Skan	* cppexp.c (append_digit): Rearrange unsignedp/overflow setting.
2132169689Skan	(eval_token, num_binary_op, num_part_mul, num_div_op): Likewise.
2133169689Skan	* ra-rewrite.c (rewrite_program2): Zero info.
2134169689Skan	* reload.c (decompose): Zero val.
2135169689Skan	* tree-ssa-ccp.c (visit_phi_node): Zero phi_val.const_val.
2136169689Skan
2137169689Skan2004-02-07  Jan Hubicka  <jh@suse.cz>
2138169689Skan
2139169689Skan	* tree-inline.c (save_body): Clone the parm decl correctly.
2140169689Skan
2141169689Skan	* cgraph.c: Add introductionary comment.
2142169689Skan	(cgraph_remove_node): Release DECL_SAVED_INSNS too.
2143169689Skan	* cgraphunit.c: Likewise.
2144169689Skan	(cgraph_finalize_function): Release DECL_SAVED_INSNS of external function.
2145169689Skan	(decl_expand_function): Release DECL_SAVED_INSNS/body/tree.
2146169689Skan	(cgraph_remove_unreachable_nodes): Likewise; guard cgraph verification.
2147169689Skan
2148169689Skan2004-02-06  Richard Henderson  <rth@redhat.com>
2149169689Skan
2150169689Skan	* common.opt (fdisable-tree-ssa): Remove.
2151169689Skan	* flags.h (flag_disable_tree_ssa): Remove.
2152169689Skan	* toplev.c (flag_disable_tree_ssa): Remove.
2153169689Skan	(f_options): Don't set it.
2154169689Skan	* opts.c (common_handle_option): Likewise.
2155169689Skan	* doc/invoke.texi (fdisable-tree-ssa): Remove.
2156169689Skan
2157169689Skan2004-02-06  Richard Henderson  <rth@redhat.com>
2158169689Skan
2159169689Skan	* tree-ssa-dom.c (record_equivalences_from_phis): Use
2160169689Skan	record_const_or_copy.
2161169689Skan	(record_equivalences_from_stmt): Likewise.  Replace
2162169689Skan	block_avail_exprs_p and block_nonzero_vars_p args with bd.
2163169689Skan
2164169689Skan2004-02-06  Andrew Pinski  <pinskia@physics.uc.edu>
2165169689Skan
2166169689Skan	PR middle-end/13127
2167169689Skan	* tree-inline.c (declare_return_variable): Set the no warning bit
2168169689Skan	on the variable created for the return value.
2169169689Skan
2170169689Skan2004-02-06  Richard Henderson  <rth@redhat.com>
2171169689Skan
2172169689Skan	* tree-pretty-print.c (dump_generic_node): Render NON_LVALUE_EXPR.
2173169689Skan
2174169689Skan	* tree-ssa-dom.c (local_fold): New.
2175169689Skan	(thread_across_edge, simplify_rhs_and_lookup_avail_expr,
2176169689Skan	find_equivalent_equality_comparison): Use it.
2177169689Skan
2178169689Skan2004-02-06  Andrew Pinski  <pinskia@physics.uc.edu>
2179169689Skan
2180169689Skan	PR c/13863
2181169689Skan	* c-common.c (c_decl_uninit_1): Remove.
2182169689Skan	(c_decl_uninit): Remove.
2183169689Skan	* c-common.h (c_decl_uninit): Remove prototype.
2184169689Skan	* c-lang.c (LANG_HOOKS_DECL_UNINIT): Delete.
2185169689Skan	* objc/objc-lang.c (LANG_HOOKS_DECL_UNINIT): Delete.
2186169689Skan	* c-simplify.c (gimplify_decl_stmt): Set TREE_NO_WARNING
2187169689Skan	on the decl where the initial is itself.
2188169689Skan	* function.c (uninitialized_vars_warning): Remove old comment
2189169689Skan	and check for DECL_INITIAL, replace with a check of TREE_NO_WARNING
2190169689Skan	and do not call the langhook.
2191169689Skan	* langhooks-def.h (LANG_HOOKS_DECL_UNINIT): Remove.
2192169689Skan	(LANG_HOOKS_INITIALIZER): Remove usage of LANG_HOOKS_DECL_UNINIT.
2193169689Skan	* langhooks.c (lhd_decl_uninit): Remove.
2194169689Skan	* langhooks.h (lhd_decl_uninit): Remove prototype.
2195169689Skan
2196169689Skan2004-02-05  Richard Henderson  <rth@redhat.com>
2197169689Skan
2198169689Skan	* tree-ssa-dom.c (record_const_or_copy_1): New.
2199169689Skan	(record_const_or_copy): New.
2200169689Skan	(thread_across_edge): Use it.
2201169689Skan	(dom_opt_finalize_block): Likewise.  Tidy.
2202169689Skan	(record_equality): Split out from ...
2203169689Skan	(record_equivalences_from_incoming_edge): ... here.
2204169689Skan
2205169689Skan2004-02-05  Richard Henderson  <rth@redhat.com>
2206169689Skan
2207169689Skan	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Allow
2208169689Skan	mixing PLUS and MINUS when folding operations.
2209169689Skan
2210169689Skan2004-02-05  Andrew Macleod  <amacleod@redhat.com>
2211169689Skan
2212169689Skan	* tree-pretty-print.c (dump_bb_header):  Allow TDF_SLIM printing.
2213169689Skan	(dump_bb_end):  Allow TDF_SLIM printing.
2214169689Skan	(dump_generic_bb_buff):  Add flags parameter to dump_bb_end.
2215169689Skan
2216169689Skan2004-02-05  Jan Hubicka  <jh@suse.cz>
2217169689Skan
2218169689Skan	* alias.c (find_base_term, get_addr):  Do not dereference NULL
2219169689Skan	pointer when all VALUE's locations has been invalidated.
2220169689Skan	(rtx_equal_for_memref_p): Simplify checking of VALUEs.
2221169689Skan
2222169689Skan2004-02-04  Daniel Berlin  <dberlin@dberlin.org>
2223169689Skan
2224169689Skan	* tree-alias-ander.c (andersen_init): Reorder/Redo code so that we
2225169689Skan	actually free the memory in intraprocedural mode.
2226169689Skan	(andersen_cleanup): Ditto.
2227169689Skan
2228169689Skan2004-02-04  Richard Henderson  <rth@redhat.com>
2229169689Skan
2230169689Skan	* tree-ssa-ccp.c (get_value, visit_phi_node,
2231169689Skan	visit_assignment, dump_lattice_value): Tidy.
2232169689Skan	(evaluate_stmt): Don't do debug dump here.
2233169689Skan	(def_to_undefined): Merge into set_lattice_value.
2234169689Skan	(def_to_varying): Likewise, but retain as a wrapper.
2235169689Skan	(set_lattice_value): Tidy.  Emit correct debug info.
2236169689Skan	(replace_uses_in): Remove strlen hacks.
2237169689Skan	(execute_fold_all_builtins): Fix DECL_BUILT_IN comparison.
2238169689Skan	Force folding of BUILT_IN_CONSTANT_P.
2239169689Skan
2240169689Skan2004-02-04  Richard Henderson  <rth@redhat.com>
2241169689Skan
2242169689Skan	* builtins.c (fold_builtin_expect): New.
2243169689Skan	(fold_builtin_1): Call it.
2244169689Skan
2245169689Skan2004-02-04  Jeff Law  <law@redhat.com>
2246169689Skan
2247169689Skan	* jump.c (duplicate_loop_exit_test): Allow copying of the loop
2248169689Skan	exit test even if we do not find the LOOP_END note.
2249169689Skan
2250169689Skan	* domwalk.c: Update comments.
2251169689Skan
2252169689Skan2004-02-04  Brian Booth  <bbooth@redhat.com>
2253169689Skan
2254169689Skan	PR opt/13755
2255169689Skan	* tree-dfa.c (compute_alias_sets): set rename flag for variables
2256169689Skan	aliased by GLOBAL_VAR.
2257169689Skan
2258169689Skan2004-02-04  Richard Henderson  <rth@redhat.com>
2259169689Skan
2260169689Skan	* tree-ssa-dom.c (simplify_switch_and_lookup_avail_expr): New.
2261169689Skan	(eliminate_redundant_computations): Call it.
2262169689Skan
2263169689Skan2004-02-03  Richard Henderson  <rth@redhat.com>
2264169689Skan
2265169689Skan	PR opt/13869
2266169689Skan	* tree-cfg.c (cfg_remove_useless_stmts_bb): Correct handling of
2267169689Skan	boolean variables in COND_EXPR_COND.
2268169689Skan
2269169689Skan2004-02-03  Richard Henderson  <rth@redhat.com>
2270169689Skan
2271169689Skan	PR middle-end/13325
2272169689Skan	* builtins.c (fold_builtin_1): Rename from fold_builtin.
2273169689Skan	(fold_builtin): New.
2274169689Skan	* c-simplify.c (gimplify_expr_stmt): Check TREE_NO_WARNING.
2275169689Skan	* stmt.c (expand_expr_stmt_value): Likewise.
2276169689Skan	* tree.h (struct tree_common): Add nowarning_flag.
2277169689Skan	(TREE_NO_WARNING): New.
2278169689Skan	(TREE_NO_UNUSED_WARNING): Remove.
2279169689Skan	* c-typeck.c (build_unary_op): Use TREE_NO_WARNING instead.
2280169689Skan	* stmt.c (warn_if_unused_value): Likewise.
2281169689Skan
2282169689Skan2004-02-03  Steven Bosscher  <stevenb@suse.de>
2283169689Skan
2284169689Skan	* tree-ssa-dce.c: Partial rewrite.  The old DCE is now called
2285169689Skan	`conservative'.  The more aggressive algorithm uses control
2286169689Skan	dependence and is called `aggressive' or cd-dce.
2287169689Skan	* timevar.def (TV_TREE_DCE): Rename.
2288169689Skan	(TV_TREE_CD_DCE, TV_CONTROL_DEPENDENCES): New timevars.
2289169689Skan	* tree-pass.h: Declare extern pass_cd_dce.
2290169689Skan	* tree-optimize.c (init_tree_optimization_passes): Replace
2291169689Skan	the final DCE pass with a CD-DCE pass.
2292169689Skan
2293169689Skan2004-02-01  Jan Hubicka  <jh@suse.cz>
2294169689Skan
2295169689Skan	* cgraphunit.c (cgraph_mark_inline_edge): Fix insertion to
2296169689Skan	cgraph_inline_hash.
2297169689Skan
2298169689Skan2004-01-30  Frank Ch. Eigler  <fche@redhat.com>
2299169689Skan
2300169689Skan	* common.opt: Add support for -fmudflapth, -fmudflapir.
2301169689Skan	* invoke.texi: Document them.
2302169689Skan	* opts.c: Ditto.
2303169689Skan	* flags.h: Add new flags flag_mudflap_threads, _ignore_reads.
2304169689Skan	* toplev.c: Initialize new flags.  Remove redundant code from
2305169689Skan	lang_independent_options[].
2306169689Skan	* tree-mudflap.c (*): Support new flag_mudflap_threads encoding.
2307169689Skan	(mf_xform_derefs_1): Support flag_mudflap_ignore_reads option.
2308169689Skan	* c-mudflap.c (mflang_flush_calls): Mark static ctor TREE_USED.
2309169689Skan
2310169689Skan2004-01-30  Ian Lance Taylor  <ian@wasabisystems.com>
2311169689Skan
2312169689Skan	* gengtype-yacc.y (bitfieldlen): Add empty action.
2313169689Skan
2314169689Skan2004-01-30  Diego Novillo  <dnovillo@redhat.com>
2315169689Skan
2316169689Skan	* configure.ac: Move configuration for libbanshee and
2317169689Skan	libgmp from configure.in.
2318169689Skan
2319169689Skan2004-01-30  Richard Henderson  <rth@redhat.com>
2320169689Skan
2321169689Skan	PR opt/13524
2322169689Skan	* gengtype-yacc.y (struct_fields): Accept unnamed bitfields.
2323169689Skan	(bitfieldlen): Split from ...
2324169689Skan	(bitfieldopt): ... here.
2325169689Skan	* gimplify.c (mark_not_gimple): Remove.
2326169689Skan	(gimplify_call_expr): Don't ignore BUILT_IN_MD.
2327169689Skan	* tree-dfa.c (struct walk_state): Remove is_not_gimple.
2328169689Skan	(find_referenced_vars): Don't look for TREE_NOT_GIMPLE.
2329169689Skan	(find_vars_r, add_referenced_var): Likewise.
2330169689Skan	* tree-ssa-operands.c (get_stmt_operands, get_expr_operands): Likewise.
2331169689Skan	* tree-simple.h (mark_not_gimple): Remove.
2332169689Skan	* tree.h (struct tree_common): Remove not_gimple_flag.
2333169689Skan	(TREE_NOT_GIMPLE): Remove.
2334169689Skan
2335169689Skan2004-01-29  Jason Merrill  <jason@redhat.com>
2336169689Skan
2337169689Skan	PR c++/13865
2338169689Skan	* c-simplify.c (gimplify_for_stmt): Reorganize to fix cleanups.
2339169689Skan
2340169689Skan2004-01-29  Richard Henderson  <rth@redhat.com>
2341169689Skan
2342169689Skan	PR c++/13543
2343169689Skan	* tree-inline.c (initialize_inlined_parameters): Register the
2344169689Skan	substitute reference also.
2345169689Skan
2346169689Skan2004-01-29  Richard Henderson  <rth@redhat.com>
2347169689Skan
2348169689Skan	* tree-inline.c (gimple_expand_calls_inline): Look inside
2349169689Skan	RETURN_EXPR.
2350169689Skan
2351169689Skan	* tree-pretty-print.c (dump_generic_node): If TDF_DETAILS, dump
2352169689Skan	both name and uid.
2353169689Skan
2354169689Skan2004-01-29  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2355169689Skan
2356169689Skan	* cfg.c (unlink_block): Reset prev_bb and next_bb.
2357169689Skan
2358169689Skan2004-01-29  Jeff Law <law@redhat.com>
2359169689Skan	    Andrew MacLeod <amacleod@redhat.com>
2360169689Skan
2361169689Skan	* tree-ssa-live.h (tpa_next_partition): Correctly handle compressed
2362169689Skan	elements.
2363169689Skan	* tree-ssa.c (coalesce_ssa_name): New argument, flags.  Callers
2364169689Skan	updated.  Test SSANORM_COMBINE_TEMPS in flags rather than
2365169689Skan	flag_tree_combine_temps.
2366169689Skan	(coalesce_vars): Either operand of a copy might not have a
2367169689Skan	partition when rewriting a subset of the variables out of SSA form.
2368169689Skan	(rewrite_vars_out_of_ssa): Honor -ftree-combine-temps by passing
2369169689Skan	in SSANORM_COMBINE_TEMPS in flags argument to remove_sas_form..
2370169689Skan
2371169689Skan2004-01-29  Dale Johannesen  <dalej@apple.com>
2372169689Skan
2373169689Skan	* Makefile.in (OBJS-common):  Move tree-nomudflap.o...
2374169689Skan	(OBJS-archive): ...to here, and remove duplicate tree-optimize.o.
2375169689Skan
2376169689Skan2004-01-28  Richard Henderson  <rth@redhat.com>
2377169689Skan
2378169689Skan	PR middle-end/13898
2379169689Skan	* gimplify.c (gimplify_init_constructor): Invoke
2380169689Skan	lhd_set_decl_assembler_name on the now-static variable.
2381169689Skan
2382169689Skan2004-01-28  Richard Henderson  <rth@redhat.com>
2383169689Skan
2384169689Skan	PR opt/13798
2385169689Skan	* expr.c (is_zeros_p): Remove.  Change all callers to use
2386169689Skan	initializer_zerop.
2387169689Skan	(categorize_ctor_elements_1, categorize_ctor_elements): New.
2388169689Skan	(count_type_elements): New.
2389169689Skan	(mostly_zeros_p): Use them.
2390169689Skan	* gimplify.c (tmp_var_id_num): Split out from create_tmp_var_raw.
2391169689Skan	(create_tmp_var_name): Likewise.
2392169689Skan	(gimplify_init_constructor): Drop constructors to readonly memory
2393169689Skan	as indicated by categorize_ctor_elements and can_move_by_pieces.
2394169689Skan	* tree.c (initializer_zerop): Handle VECTOR_CST.  Don't check
2395169689Skan	AGGREGATE_TYPE_P for CONSTRUCTOR.
2396169689Skan	* tree.h (categorize_ctor_elements): Declare.
2397169689Skan	(count_type_elements): Declare.
2398169689Skan	* Makefile.in (gimplify.o): Update dependencies.
2399169689Skan	(GTFILES): Add gimplify.c.
2400169689Skan
2401169689Skan2004-01-27  Frank Ch. Eigler  <fche@redhat.com>
2402169689Skan
2403169689Skan	* tree-mudflap.c (mx_register_decls): Support VLAs.
2404169689Skan	(mf_xform_derefs_1): Disable checking shortcut for VLAs.
2405169689Skan	* c-simplify.c (gimplify_decl_stmt): Add mudflap xref comment.
2406169689Skan	* gimplify.c (gimplify_bind_expr): Ditto.
2407169689Skan
2408169689Skan2004-01-27  Daniel Berlin  <dberlin@dberlin.org>
2409169689Skan
2410169689Skan	* tree-ssa-pre.c:  Add more comments describing SSAPRE and
2411169689Skan	the various functions.
2412169689Skan	(generate_expr_as_of_bb): Use PRED, a basic block argument, instead of
2413169689Skan	j, the index of that bb.
2414169689Skan	(generate_vops_as_of_bb): Ditto.
2415169689Skan	(insert_occ_in_preorder_dt_order): Rename to
2416169689Skan	create_and_insert_occ_in_preorder_dt_order.
2417169689Skan
2418169689Skan2004-01-27  Daniel Berlin  <dberlin@dberlin.org>
2419169689Skan
2420169689Skan	* tree-ssa-pre.c (rename_1): Add some more comments.
2421169689Skan
2422169689Skan2004-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
2423169689Skan
2424169689Skan	PR c/13748
2425169689Skan	* c-decl.c (finish_function): Do not pass
2426169689Skan	the function on to optimizers if there was an error.
2427169689Skan
2428169689Skan2004-01-23  Richard Henderson  <rth@redhat.com>
2429169689Skan
2430169689Skan	PR opt/12941
2431169689Skan	* combine.c (SHIFT_COUNT_TRUNCATED): Provide default value.
2432169689Skan	(simplify_comparison): Don't simplify (eq (zero_extract c 1 r) 0)
2433169689Skan	if SHIFT_COUNT_TRUNCATED is set.
2434169689Skan
2435169689Skan2004-01-21  Richard Henderson  <rth@redhat.com>
2436169689Skan
2437169689Skan	PR c/11267
2438169689Skan	* c-decl.c (c_finalize): New.
2439169689Skan	(finish_function): Use it.  Genericize and finalize only non-nested
2440169689Skan	functions.  Register nested functions with cgraph.
2441169689Skan	* c-simplify.c: Include cgraph.h.
2442169689Skan	(c_genericize): Genericize nested functions.
2443169689Skan	* gimplify.c (gimplify_expr): Use DECL_SAVED_INSNS to access
2444169689Skan	the struct function for the context.
2445169689Skan	* Makefile.in (c-simplify.o): Update dependencies.
2446169689Skan
2447169689Skan2004-01-21  Steven Bosscher  <stevenb@suse.de>
2448169689Skan
2449169689Skan	PR opt/13767
2450169689Skan	* tree-cfg.c (simple_goto_p): Remove NONLOCAL_LABEL check.
2451169689Skan
2452169689Skan2004-01-21  Dale Johannesen  <dalej@apple.com>
2453169689Skan
2454169689Skan	* tree-dfa.c: Fix comment.
2455169689Skan
2456169689Skan2004-01-21  Richard Henderson  <rth@redhat.com>
2457169689Skan
2458169689Skan	PR opt/13681
2459169689Skan	* tree-ssa-operands.c (get_expr_operands): Handle (&x + c).
2460169689Skan
2461169689Skan	* tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Handle
2462169689Skan	flexible array members and lookalikes.
2463169689Skan
2464169689Skan2004-01-21  Dale Johannesen  <dalej@apple.com>
2465169689Skan
2466169689Skan	* tree-ssa-dom.c (cprop_into_stmt):  Add convert call
2467169689Skan	to prevent type mismatches.
2468169689Skan
2469169689Skan2004-01-21  Daniel Berlin  <dberlin@dberlin.org>
2470169689Skan
2471169689Skan	* tree-ssa-pre.c (load_modified_phi_result): PARM_DECL is okay
2472169689Skan	to not have a defbb.
2473169689Skan	(rename_1): Add a comment.
2474169689Skan
2475169689Skan2004-01-21  Jeff Law  <law@redhat.com>
2476169689Skan
2477169689Skan	* tree-ssa-dom.c (find_equivalent_equality_comparison): Treat
2478169689Skan	CONVERT_EXPRs just like NOP_EXPRs.
2479169689Skan	(record_equivalences_from_stmt): Similarly.
2480169689Skan	(thread_across_edge): Fix formatting goof.
2481169689Skan
2482169689Skan	* tree-ssa-dom.c (thread_across_edge): Remove bogus restriction
2483169689Skan	which prevents threading around to the top of a loop.
2484169689Skan
2485169689Skan	* tree-ssa-dom.c (thread_across_edge): Handle SWITCH_EXPRs in the
2486169689Skan	target block in addition to COND_EXPRs.
2487169689Skan
2488169689Skan	* tree-ssa-dom.c (thread_across_edge): Create equivalences for
2489169689Skan	PHIs before looking at the statements in the destination
2490169689Skan	block.
2491169689Skan
2492169689Skan2004-01-20  Roger Sayle  <roger@eyesopen.com>
2493169689Skan
2494169689Skan	* fold-const.c (fold_convert): Rename to fold_convert_const.
2495169689Skan	(fold_convert_const): Change arguments to take a tree_code,
2496169689Skan	a type and the operand/expression to be converted.  Return
2497169689Skan	NULL_TREE if no simplification is possible.  Add support for
2498169689Skan	FIX_CEIL_EXPR and FIX_FLOOR_EXPR in addition to FIX_TRUNC_EXPR.
2499169689Skan	(fold): Handle FIX_CEIL_EXPR and FIX_FLOOR_EXPR.
2500169689Skan	Adjust call to fold_convert to match new fold_convert_const.
2501169689Skan	Avoid modifying the tree passed to fold in-place.
2502169689Skan	(nondestructive_fold_unary_to_constant): Likewise, simplify
2503169689Skan	call to fold_convert to match new fold_convert_const.
2504169689Skan
2505169689Skan2004-01-20  Daniel Berlin  <dberlin@dberlin.org>
2506169689Skan
2507169689Skan	* tree-alias-ander.c (andersen_op_assign): Update
2508169689Skan	prototype. Make this handle &x in the operands using
2509169689Skan	the addrargs parameter.
2510169689Skan	(andersen_init): Turn off ip_partial until variables
2511169689Skan	aliasing variables in other functions is resolved.
2512169689Skan	(andersen_add_var): Use newly renamed alias_var_new_with_aterm.
2513169689Skan	Fix comment.
2514169689Skan	(andersen_add_var_same): Ditto.
2515169689Skan	(andersen_function_call): Use ip_partial, not flag_unit_at_a_time.
2516169689Skan	* tree-alias-common.c (get_values_from_constructor): Add bitmap
2517169689Skan	and int * arguments. Used to mark operands that we are taking
2518169689Skan	address of.
2519169689Skan	(get_alias_var_decl): We should never see FIELD_DECL's right now.
2520169689Skan	(intra_function_call): Reverse ordering for slightly faster
2521169689Skan	projection merging.
2522169689Skan	(find_op_of_decl): New function.
2523169689Skan	(find_func_aliases): Use it.
2524169689Skan	Comment x = foo.y case.
2525169689Skan	Move get_alias_var_decl of arguments so we only call it if
2526169689Skan	necessary.
2527169689Skan	Handle address of arguments in operations.
2528169689Skan	(create_fun_alias_var): tvar->var.
2529169689Skan	Set context of fakeargs.
2530169689Skan	Set context of fakedecls.
2531169689Skan	Set DECL_PTA_ALIASVAR of RETURN_DECL's.
2532169689Skan	(create_fun_alias_var_ptf): tvar->var.
2533169689Skan	Set context of fakedecls.
2534169689Skan	(create_alias_vars): Only create alias vars for globals
2535169689Skan	with DECL_INITIAL's.
2536169689Skan	* tree-alias-common.h (struct tree_alias_ops):
2537169689Skan	Update op_assign arguments.
2538169689Skan	(may_alias): Fix comment.
2539169689Skan	(same_points_to_set): Ditto.
2540169689Skan	(empty_points_to_set): Ditto.
2541169689Skan	* tree-alias-type.h: Rename alias_tvar_new_with_aterm
2542169689Skan	-> alias_var_new_with_aterm.
2543169689Skan	* tree-alias-type.c: Ditto.
2544169689Skan
2545169689Skan2004-01-20  Richard Henderson  <rth@redhat.com>
2546169689Skan
2547169689Skan	* tree-sra.c (get_scalar_for_field): Validate field.
2548169689Skan	(create_scalar_copies): Iterate over rhs fields too.
2549169689Skan
2550169689Skan2004-01-19  Dale Johannesen  <dalej@apple.com>
2551169689Skan
2552169689Skan	* params.def:  Add PARAM_MAX_CALLS_GLOBAL_VAR and
2553169689Skan	PARAM_MAX_CLOBBERED_VARS_GLOBAL_VAR.
2554169689Skan	params.h:  Ditto.
2555169689Skan	tree-dfa.c:  Use them.
2556169689Skan	doc/invoke.texi:  Document them.
2557169689Skan
2558169689Skan2004-01-19  Jeff Law  <law@redhat.com>
2559169689Skan
2560169689Skan	* tree-ssa.c (insert_phi_nodes_for): Always use fully pruned
2561169689Skan	SSA form.
2562169689Skan
2563169689Skan	* tree-flow.h: Update copyright dates.
2564169689Skan	(register_new_def): Declare.
2565169689Skan	* tree-ssa-dom.c: Update copyright dates.
2566169689Skan	Add tracking of current definition of each program variable just
2567169689Skan	like we do when rewriting into SSA form.
2568169689Skan	(get_value_for, set_value_for): Handle either an SSA_NAME or
2569169689Skan	regular variable.
2570169689Skan	(tree_ssa_dominator_optimize): Initialize and update CURRDEFS.
2571169689Skan	If we thread through a block with real statements, the destination
2572169689Skan	of those statements must be rewritten too.
2573169689Skan	(thread_across_edge): Skip nop statements at the start of a
2574169689Skan	block.
2575169689Skan	(dom_opt_initialize_block_local_data): Clear block_defs
2576169689Skan	appropriately.
2577169689Skan	(record_equivalences_from_phis): Accept walk_data structure.
2578169689Skan	Call register_new_def appropriately.
2579169689Skan	(optimize_stmt): Call register_new_defs_for_stmt.
2580169689Skan	(dom_opt_finalize_block): Restore CURRDEFS appropriately.
2581169689Skan	(register_new_definitions_for_stmt): New.
2582169689Skan	* tree-ssa.c: Update copyright dates.
2583169689Skan	(register_new_def): No longer static.  Accept additional argument
2584169689Skan	for the table to hold the new definition.  Callers updated.
2585169689Skan
2586169689Skan	* gimplify.c: Update copyright dates.
2587169689Skan	* tree-cfg.c: Likewise.
2588169689Skan	* tree.h: Likewise.
2589169689Skan
2590169689Skan	* tree-iterator.c, tree-iterator.c: Use GCC rather than GNU CC.
2591169689Skan	* tree-ssa-pre.c, tree-ssa-live.h: Likewise.
2592169689Skan
2593169689Skan2004-01-19  Daniel Berlin  <dberlin@dberlin.org>
2594169689Skan
2595169689Skan	* timevar.def (TV_TREE_SPLIT_EDGES): New timevar.
2596169689Skan	* tree-ssa-pre.c (split_critical_edges): Move from here
2597169689Skan	(pass_pre): Add PROP_no_crit_edges as required.
2598169689Skan	* tree-cfg.c (split_critical_edges): to here.
2599169689Skan	(pass_split_crit_edges): New pass.
2600169689Skan	* tree-optimize.c (tree_optimization_passes): Add NEXT_PASS
2601169689Skan	(split_crit_edges).
2602169689Skan	* tree-pass.h: Add PROP_no_crit_edges.
2603169689Skan	(pass_split_crit_edges): Declared.
2604169689Skan
2605169689Skan2004-01-19  Frank Ch. Eigler  <fche@redhat.com>
2606169689Skan
2607169689Skan	* tree-mudflap.c (mf_build_check_statement_for): Tolerate
2608169689Skan	incoming locus NULL pointer.
2609169689Skan
2610169689Skan2004-01-18  Richard Henderson  <rth@redhat.com>
2611169689Skan
2612169689Skan	* builtins.c (simplify_builtin_strcpy): Export.  Take strlen argument.
2613169689Skan	(simplify_builtin_strncpy, simplify_builtin_strcmp): Similarly.
2614169689Skan	(simplify_builtin_strncmp): Similarly.
2615169689Skan	(simplify_builtin): Update to match.
2616169689Skan	* expr.h (simplify_builtin_strcmp, simplify_builtin_strncmp,
2617169689Skan	simplify_builtin_strcpy, simplify_builtin_strncpy): Declare.
2618169689Skan	* tree-pass.h (pass_fold_builtins): New.
2619169689Skan	* tree-optimize.c (init_tree_optimization_passes): Add it.
2620169689Skan	* tree-ssa-ccp.c (ccp_fold_builtin): Handle BUILT_IN_STRCPY,
2621169689Skan	BUILT_IN_STRNCPY, BUILT_IN_STRCMP, BUILT_IN_STRNCMP.
2622169689Skan	(get_strlen): Don't cast to size_t.
2623169689Skan	(execute_fold_all_builtins, pass_fold_builtins): New.
2624169689Skan
2625169689Skan2004-01-19  Jan Hubicka  <jh@suse.cz>
2626169689Skan
2627169689Skan	PR opt/13729
2628169689Skan	* cgraphunit.c (cgraph_finalize_compilation_unit): Fix memory leak.
2629169689Skan	(cgraph_remove_unreachable_nodes):  Do not mix analyzed and
2630169689Skan	DECL_SAVED_TREE flags.
2631169689Skan
2632169689Skan2004-01-18  Richard Henderson  <rth@redhat.com>
2633169689Skan
2634169689Skan	* tree-sra.c (REALPART_INDEX, IMAGPART_INDEX): Remove.
2635169689Skan	(sra_candidates, needs_copy_in): Use a bitmap.  Update all users.
2636169689Skan	(struct sra_elt, sra_elt_hash, sra_elt_eq): New.
2637169689Skan	(sra_map_size): Remove.
2638169689Skan	(sra_map): Use a htab_t.
2639169689Skan	(lookup_scalar): Update to match.
2640169689Skan	(get_scalar_for_field, get_scalar_for_complex_part): Likewise.
2641169689Skan	(scalarize_structure_assignment): Use annotate_all_with_locus.
2642169689Skan	(csc_build_component_ref): Remove index argument.
2643169689Skan	(csc_build_complex_part): Take tree_code, not index.
2644169689Skan	(create_scalar_copies): Don't collect indicies.
2645169689Skan	(emit_scalar_copies): New.
2646169689Skan	(scalarize_modify_expr, scalarize_tree_list): Use it.
2647169689Skan	(scalarize_return_expr): Likewise.
2648169689Skan	(scalarize_structures): Simplify needs_copy_in iteration.
2649169689Skan	(scalarize_call_expr): Use annotate_all_with_locus.
2650169689Skan	(dump_sra_map_trav): Split from ...
2651169689Skan	(dump_sra_map): ... here.  Update for hash table.
2652169689Skan	(tree_sra): Update for new datastructures.
2653169689Skan
2654169689Skan2004-01-18  Richard Henderson  <rth@redhat.com>
2655169689Skan
2656169689Skan	* tree-cfg.c (dump_function_to_file): Move ";; Function" header ...
2657169689Skan	* tree-optimize.c (execute_one_pass): ... here.
2658169689Skan
2659169689Skan2004-01-17  Daniel Berlin  <dberlin@dberlin.org>
2660169689Skan
2661169689Skan	* tree-alias-common.c: s@_typevar@_var@g, s@_TVAR@_VAR@g,
2662169689Skan	s@_TYPEVAR@_VAR@g
2663169689Skan	* tree-alias-common.h: Ditto
2664169689Skan	* tree.h: Ditto
2665169689Skan	* tree-alias-ander.c: Ditto
2666169689Skan	* tree-alias-type.c: Ditto
2667169689Skan	* tree-alias-type.h: Ditto
2668169689Skan
2669169689Skan2004-01-17  Richard Henderson  <rth@redhat.com>
2670169689Skan
2671169689Skan	* tree-complex.c (gimplify_val): Copy TREE_BLOCK.
2672169689Skan
2673169689Skan	* tree-complex.c (gimplify_val): New.
2674169689Skan	(extract_component, do_binop, do_unop): Use it.
2675169689Skan
2676169689Skan2004-01-17  Richard Henderson  <rth@redhat.com>
2677169689Skan
2678169689Skan	* tree-complex.c (expand_complex_operations_1): Fix RETURN_EXPR
2679169689Skan	thinko in last change.
2680169689Skan
2681169689Skan2004-01-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2682169689Skan
2683169689Skan	* cfghooks.c (split_block): Don't redirect edges.
2684169689Skan	* cfgrtl.c (rtl_split_block): Do it here.
2685169689Skan	* tree-cfg.c (tree_split_block): Ditto.
2686169689Skan
2687169689Skan2004-01-17  Richard Henderson  <rth@redhat.com>
2688169689Skan
2689169689Skan	* tree-cfg.c (verify_expr): Tidy.  Check COND_EXPR for boolean
2690169689Skan	condition.
2691169689Skan
2692169689Skan2004-01-17  Jan Hubicka  <jh@suse.cz>
2693169689Skan
2694169689Skan	PR optimization/11761
2695169689Skan	* Makefile.in: Remove tree-simple.c from GTYized files.
2696169689Skan	* tree-dfa.c (find_addressable_vars): Parse nontrivial ADDR_EXPRs.
2697169689Skan	(discover_nonconstant_array_refs_r): New static function.
2698169689Skan	(discover_nonconstant_array_refs): New global function.
2699169689Skan	* tree-flow.h (discover_nonconstant_array_refs): Declare.
2700169689Skan	* tree-simple.c (types_checked, types_in_memory): Kill.
2701169689Skan	(struct_needs_to_live_in_memory): Kill.
2702169689Skan	(needs_to_live_in_memory): aggregates are safe.
2703169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Call the new function.
2704169689Skan
2705169689Skan2004-01-17  Richard Henderson  <rth@redhat.com>
2706169689Skan
2707169689Skan	PR opt/13718
2708169689Skan	* tree-complex.c (expand_complex_comparison): Handle COND_EXPR.
2709169689Skan	(expand_complex_operations_1): Likewise.
2710169689Skan
2711169689Skan2004-01-17  Richard Henderson  <rth@redhat.com>
2712169689Skan
2713169689Skan	* tree-sra.c (scalarize_tree_list): Take bitmap argument to
2714169689Skan	avoid emitting duplicates.  Update all callers.
2715169689Skan
2716169689Skan2004-01-17  Richard Henderson  <rth@redhat.com>
2717169689Skan
2718169689Skan	PR opt/13718
2719169689Skan	* tree-complex.c (expand_complex_comparison): New.
2720169689Skan	(expand_complex_operations_1): Handle EQ_EXPR and NE_EXPR.
2721169689Skan
2722169689Skan2004-01-16  Daniel Berlin  <dberlin@dberlin.org>
2723169689Skan
2724169689Skan	* tree-alias-common.c (get_alias_var): Handle BIT_FIELD_REF.
2725169689Skan	(find_func_aliases): Ditto.
2726169689Skan	Update for fact that basic component_refs are no longer
2727169689Skan	is_gimple_variable.
2728169689Skan	(create_fun_alias_var): Set DECL_CONTEXT on our faked declarations.
2729169689Skan	(pass_del_pta): PTA dumps info on delete, so it needs a name.
2730169689Skan
2731169689Skan2004-01-16  Steven Bosscher  <stevenb@suse.de>
2732169689Skan
2733169689Skan	* tree-optimize.c (init_tree_optimization_passes): Run DCE
2734169689Skan	before the first dominator optimization pass.
2735169689Skan
2736169689Skan2004-01-15  Brian Booth <bbooth@redhat.com>
2737169689Skan	    Richard Henderson  <rth@redhat.com>
2738169689Skan
2739169689Skan	* tree-sra.c (REALPART_INDEX, IMAGPART_INDEX): New.
2740169689Skan	(sra_map_size): New.
2741169689Skan	(make_temp): New.
2742169689Skan	(mark_all_vdefs): New.
2743169689Skan	(is_sra_candidate_decl): New.
2744169689Skan	(is_sra_candidate_ref): New.
2745169689Skan	(lookup_scalar): Use sra_map_size, make_temp.
2746169689Skan	(get_scalar_for_field): Rename from get_scalar_for.
2747169689Skan	(get_scalar_for_complex_part): New.
2748169689Skan	(can_be_scalarized_p): Handle COMPLEX_TYPE.
2749169689Skan	(scalarize_component_ref): Handle REAL/IMAGPART_EXPR.
2750169689Skan	(scalarize_structure_assignment): Tidy.
2751169689Skan	(find_candidates_for_sra): Handle COMPLEX_TYPE, return bool.
2752169689Skan	(csc_assign, csc_build_component_ref): Split out from ...
2753169689Skan	(create_scalar_copies): ... here.  Handle COMPLEX_TYPE.
2754169689Skan	(csc_build_complex_part): New.
2755169689Skan	(scalarize_modify_expr): Use is_sra_candidate_foo.
2756169689Skan	(scalarize_tree_list): Likewise.
2757169689Skan	(scalarize_return_expr): Likewise.
2758169689Skan	(dump_sra_map): Split out from ...
2759169689Skan	(tree_sra): ... here.  Tidy.
2760169689Skan
2761169689Skan2004-01-15  Frank Ch. Eigler  <fche@redhat.com>
2762169689Skan
2763169689Skan	* tree-mudflap.c (mf_xform_derefs): Accept void return statements.
2764169689Skan
2765169689Skan2004-01-15  Andrew MacLeod  <amacleod@redhat.com>
2766169689Skan	    Jeff Law  <law@redhat.com>
2767169689Skan
2768169689Skan	* tree-ssa-dom.c (remove_local_expressions_from_table): New function
2769169689Skan	extracted from dom_opt_finalize_block.
2770169689Skan	(restore_vars_to_originalvalue): Likewise.
2771169689Skan	(extract_true_false_edges_from_block): Likewise.
2772169689Skan	(thread_across_edge): Handle if (cond) too.
2773169689Skan	(dom_opt_finalize_block): Use new functions.  Handle if (cond).
2774169689Skan
2775169689Skan	* tree-ssa-dom.c (thread_across_edge): Accept dom_walk argument.
2776169689Skan	Record temporary equivalences created by PHIs and temporarily
2777169689Skan	const/copy propagate into conditionals.
2778169689Skan	(dom_opt_finalize_block): Thread across an edge to a dominated block
2779169689Skan	if the dominated block has PHIs.  Remove temporary equivalenecs
2780169689Skan	created by PHIs in thread_across_edge.  Update code to restore the
2781169689Skan	various hash tables to use the actual varray rather than a local
2782169689Skan	copy of the varray.
2783169689Skan	(simplify_rhs_and_lookup_avail_expr): Set the condition's code
2784169689Skan	before settings its operands.
2785169689Skan
2786169689Skan	* tree-ssa.c (create_temp): Use add_referenced_var rather than
2787169689Skan	an incomplete inline of its behavior.  Also make sure to
2788169689Skan	set is_dereferenced_{load,store}, is_call_clobbered and is_stored.
2789169689Skan
2790169689Skan	* tree-ssa-live.c (build_tree_conflict_graph): Correctly handle
2791169689Skan	case where the result of a PHI is unused.
2792169689Skan
2793169689Skan2004-01-15  Diego Novillo  <dnovillo@redhat.com>
2794169689Skan
2795169689Skan	* cfghooks.c (predicted_by_p): Add missing return.
2796169689Skan
2797169689Skan2004-01-15  Richard Henderson  <rth@redhat.com>
2798169689Skan
2799169689Skan	* tree-ssa-dom.c (optimize_stmt): Dump new statement if
2800169689Skan	folding succeeded.
2801169689Skan
2802169689Skan2004-01-15  Kazu Hirata  <kazu@cs.umass.edu>
2803169689Skan
2804169689Skan	* tree-cfg.c: Fix comment typos.
2805169689Skan	* tree-eh.c: Likewise.
2806169689Skan	* tree-inline.c: Likewise.
2807169689Skan	* tree-optimize.c: Likewise.
2808169689Skan	* tree-ssa.c: Likewise.
2809169689Skan	* tree-ssa-dom.c: Likewise.
2810169689Skan	* tree-ssa-operands.c: Likewise.
2811169689Skan	* tree-ssa-pre.c: Likewise.
2812169689Skan	* tree-tailcall.c: Likewise.
2813169689Skan
2814169689Skan2004-01-14  Jan Hubicka  <jh@suse.cz>
2815169689Skan
2816169689Skan	* basic-block.h: Include predict.h
2817169689Skan	(tree_predicted_by_p, rtl_predicted_by_p,  rtl_predict_edge,
2818169689Skan	predict_edge_def): Declare.
2819169689Skan	* cfghooks.h (cfg_hooks): add predict_edge and predicted_by_p
2820169689Skan	(predict_edge, predicted_by_p): Declare.
2821169689Skan	* cfghooks.c (predict_edge, predicted_by_p): Declare.
2822169689Skan	* cfgrtl (rtl_cfg_hooks, cfg_layout_rtl_cfg_hook): Add new hooks.
2823169689Skan	* cse.c (struct cse_basic_block_data): Rename enum values to not
2824169689Skan	conflict with profile.h; update all uses.
2825169689Skan	* predict.c:  Include tree-flow.h, ggc.h, tree-dump.h
2826169689Skan	(predicted_by_p): Rename to ...
2827169689Skan	(rtl_predicted_by_p): .. this one; make global
2828169689Skan	(tree_predicted_by_p): New.
2829169689Skan	(dump_prediction): Add FILE argument.
2830169689Skan	(predict_edge): Rename to ...
2831169689Skan	(rtl_predict_edge): .. this one.
2832169689Skan	(tree_predict_edge): New.
2833169689Skan	(combine_predictions_for_insn): Update calls of predict_edge.
2834169689Skan	(predict_loops): Break out from ...
2835169689Skan	(estimate_probability): ... here; update comments; move updating
2836169689Skan	of unknown probabilities from ...
2837169689Skan	(estimate_bb_frequencies): ... here.
2838169689Skan	(combine_predictions_for_bb): New.
2839169689Skan	(tree_predict_by_opcode): New.
2840169689Skan	(tree_estimate_probability): New.
2841169689Skan	* predict.def (PRED_TREE_POINTER, PRED_TREE_OPCODE_POSITIVE,
2842169689Skan	PRED_TREE_OPCODE_NONEQUAL, PRED_TREE_FPOPCODE): New predictors.
2843169689Skan	* predict.h: Add include guard.
2844169689Skan	(predict_edge, predict_edge_def): Move prototypes to basic_block.h
2845169689Skan	* tree-cfg.c (tree_cfg_hooks): Add prediction hooks.
2846169689Skan	* tree-dump.c (dump_files): Add profile.
2847169689Skan	* tree-flow.h (struct edge_prediction): New structure.
2848169689Skan	(struct bb_ann_d): Add field predictions.
2849169689Skan	(tree_estimate_probability): Declare.
2850169689Skan	* tree-optimize.c (optimize_function_tree): Call tree_estimate_probability.
2851169689Skan	* tree.h (tree_dump_index): Add TDI_profile.
2852169689Skan	* tree-pass.h (pass_profile): Declare.
2853169689Skan
2854169689Skan2004-01-14  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2855169689Skan
2856169689Skan	* basic-block.h (find_basic_blocks, cleanup_cfg,
2857169689Skan	delete_unreachable_blocks, merge_seq_blocks): Declare.
2858169689Skan	* cfgcleanup.c (merge_seq_blocks): New.
2859169689Skan	* output.h (find_basic_blocks, cleanup_cfg, delete_unreachable_blocks):
2860169689Skan	Declarations moved to basic-block.h.
2861169689Skan	* tree-cfg.c (tree_merge_blocks, tree_can_merge_blocks_p): New.
2862169689Skan	(cleanup_tree_cfg): Call merge_seq_blocks.
2863169689Skan	(tree_cfg_hooks): Add tree_can_merge_blocks_p and tree_merge_blocks.
2864169689Skan
2865169689Skan2004-01-14  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2866169689Skan
2867169689Skan	* tree-cfg.c (tree_make_forwarder_block): Fix.
2868169689Skan
2869169689Skan2004-01-14  Richard Henderson  <rth@redhat.com>
2870169689Skan
2871169689Skan	* tree-complex.c: New file.
2872169689Skan	* Makefile.in (OBJS-common): Add it.
2873169689Skan	* tree-pass.h (pass_lower_complex): New.
2874169689Skan	* tree-optimize.c (init_tree_optimization_passes): Add it.
2875169689Skan
2876169689Skan2004-01-14  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2877169689Skan
2878169689Skan	* Makefile.in (tree-ssa-loop.o): Add cfgloop.h dependency.
2879169689Skan	(cfghooks.o): Add TIMEVAR_H and toplev.h dependency.
2880169689Skan	* basic-block.h (struct edge_def): Use ir_type instead testing of
2881169689Skan	cfg_hooks directly.
2882169689Skan	(tidy_fallthru_edge, tidy_fallthru_edges, dump_bb, verify_flow_info):
2883169689Skan	Declaration removed.
2884169689Skan	* cfg.c (verify_flow_info, dump_bb): Moved to cfghooks.c.
2885169689Skan	* cfgcleanup.c (try_simplify_condjump): Changed due to change of
2886169689Skan	tidy_fallthru_edge.
2887169689Skan	* cfghooks.c: Include timevar.h and toplev.h.
2888169689Skan	(cfg_hooks): Made static.
2889169689Skan	(tree_register_cfg_hooks, ir_type): New.
2890169689Skan	(verify_flow_info, dump_bb): Moved from cfg.c.
2891169689Skan	(redirect_edge_and_branch, redirect_edge_and_branch_force,
2892169689Skan	split_block, split_block_after_labels, move_block_after,
2893169689Skan	delete_basic_block, split_edge, create_basic_block,
2894169689Skan	create_empty_bb, can_merge_blocks_p, merge_blocks,
2895169689Skan	make_forwarder_block, tidy_fallthru_edge, tidy_fallthru_edges): New.
2896169689Skan	* cfghooks.h (struct cfg_hooks): Modified.
2897169689Skan	(redirect_edge_and_branch, redirect_edge_and_branch_force, split_block,
2898169689Skan	delete_basic_block, split_edge, create_basic_block, can_merge_blocks_p,
2899169689Skan	merge_blocks, make_forwarder_block): Changed into functions.
2900169689Skan	(loop_optimizer_init, loop_optimizer_finalize): Removed.
2901169689Skan	(HEADER_BLOCK, LATCH_EDGE): Moved into cfgloop.c.
2902169689Skan	(tidy_fallthru_edge, tidy_fallthru_edges, create_empty_bb,
2903169689Skan	verify_flow_info, dump_bb, ir_type): Declare.
2904169689Skan	(cfg_layout_rtl_cfg_hooks): Declare.
2905169689Skan	* cfglayout.c (copy_bbs): Don't call add_to_dominance_info.
2906169689Skan	* cfgloop.c (HEADER_BLOCK, LATCH_EDGE): Moved from cfghooks.h.
2907169689Skan	(update_latch_info, mfb_keep_just, mfb_keep_nonlatch): New functions.
2908169689Skan	(canonicalize_loop_headers): Use new semantics of make_forwarder_block.
2909169689Skan	* cfgloop.h (rtl_loop_optimizer_init, rtl_loop_optimizer_finalize):
2910169689Skan	Removed.
2911169689Skan	(loop_optimizer_init, loop_optimizer_finalize): Declare.
2912169689Skan	* cfgloopmanip.c (split_loop_bb): Don't update dominators.
2913169689Skan	(remove_bbs): Don't call remove_bbs.
2914169689Skan	(create_preheader): Use make_forwarder_block.
2915169689Skan	(mfb_keep_just, mfb_update_loops): New static functions.
2916169689Skan	* cfgrtl.c (cfg_layout_split_block, rtl_split_block,
2917169689Skan	rtl_make_forwarder_block, rtl_create_basic_block,
2918169689Skan	rtl_delete_block, rtl_split_block, rtl_merge_blocks,
2919169689Skan	tidy_fallthru_edge, rtl_split_edge, cfg_layout_merge_blocks,
2920169689Skan	cfg_layout_split_edge): Parts not specific to rtl moved to cfghooks.c
2921169689Skan	(tidy_fallthru_edges): Moved to cfghooks.c.
2922169689Skan	(rtl_move_block_after): New.
2923169689Skan	(redirect_edge_with_latch_update, update_cfg_after_block_merging):
2924169689Skan	Removed.
2925169689Skan	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Modified.
2926169689Skan	* ifcvt.c (merge_if_block, find_cond_trap, find_if_case_1,
2927169689Skan	find_if_case_2): Don't update dominators.
2928169689Skan	* loop-init.c (rtl_loop_optimizer_init, rtl_loop_optimizer_finalize):
2929169689Skan	Replaced by rtl_loop_optimizer_init and rtl_loop_optimizer_finalize.
2930169689Skan	* loop-unswitch.c (unswitch_loop): Don't call add_to_dominance_info.
2931169689Skan	* toplev.c (rest_of_handle_loop2): Enter cfglayout mode here.
2932169689Skan	* tree-cfg.c (create_bb): Modified to suit create_basic_block hook.
2933169689Skan	(tree_redirect_edge_and_branch_1): Merged into
2934169689Skan	tree_redirect_edge_and_branch.
2935169689Skan	(create_blocks_annotations): Removed.
2936169689Skan	(tree_loop_optimizer_init, tree_loop_optimizer_finalize): Removed.
2937169689Skan	(tree_make_forwarder_block, remove_bb, tree_split_edge,
2938169689Skan	tree_redirect_edge_and_branch, tree_split_block,
2939169689Skan	tree_move_block_after): Partially moved to cfghooks.c.
2940169689Skan	(tree_duplicate_bb): New.
2941169689Skan	(PENDING_STMT): Moved to tree-flow.h.
2942169689Skan	(tree_register_cfg_hooks): Moved to cfghooks.c.
2943169689Skan	(build_tree_cfg): Don't call create_blocks_annotations.
2944169689Skan	(factor_computed_gotos, make_blocks): Use create_empty_bb.
2945169689Skan	(cleanup_tree_cfg): Use delete_unreachable_blocks.
2946169689Skan	(remove_unreachable_blocks, insert_bb_before): Removed.
2947169689Skan	(remove_phi_nodes_and_edges_for_unreachable_block): Modified.
2948169689Skan	(tree_find_edge_insert_loc, thread_jumps): Use cfg hooks.
2949169689Skan	(bsi_commit_edge_inserts): Update_annotations argument removed.
2950169689Skan	(tree_cfg_hooks): Modified.
2951169689Skan	* tree-flow.h (PENDING_STMT): Moved from tree-cfg.c.
2952169689Skan	(insert_bb_before, remove_unreachable_blocks,
2953169689Skan	remove_phi_nodes_and_edges_for_unreachable_block, tree_split_edge):
2954169689Skan	Declaration removed.
2955169689Skan	(bsi_commit_edge_inserts): Declaration changed.
2956169689Skan	(tree_duplicate_bb): Declare.
2957169689Skan	* tree-sra.c (scalarize_structures): Changed due to
2958169689Skan	bsi_commit_edge_inserts change.
2959169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Use
2960169689Skan	delete_unreachable_blocks.
2961169689Skan	* tree-ssa-loop.c: Include cfgloop.h.
2962169689Skan	* tree-ssa-pre.c (split_critical_edges, tree_perform_ssapre): Use cfg
2963169689Skan	hooks.
2964169689Skan	* tree-ssa.c (rewrite_trees, rewrite_vars_out_of_ssa): Changed due to
2965169689Skan	bsi_commit_edge_inserts change.
2966169689Skan	(ssa_redirect_edge): Record the phi arguments on the redirected edge.
2967169689Skan	* tree-tailcall.c (eliminate_tail_call): Clean stored phi arguments.
2968169689Skan
2969169689Skan2004-01-13  Richard Henderson  <rth@redhat.com>
2970169689Skan
2971169689Skan	* gimplify.c (gimplify_lhs_complex_part_expr): Remove.
2972169689Skan	(gimplify_modify_expr): Don't call it.
2973169689Skan
2974169689Skan	* tree-alias-common.c (HAVE_BANSHEE): Make sure it's defined.
2975169689Skan	(pass_build_pta): Set name.
2976169689Skan
2977169689Skan2004-01-13  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2978169689Skan
2979169689Skan	* tree-tailcall.c (eliminate_tail_call): Add phi nodes for the call
2980169689Skan	vdefs.
2981169689Skan	(find_tail_calls): Ignore returns with virtual operands.
2982169689Skan
2983169689Skan2004-01-12  Richard Henderson  <rth@redhat.com>
2984169689Skan
2985169689Skan	* tree-pass.h: New file.
2986169689Skan	* gimple-low.c: Include tree-pass.h.
2987169689Skan	(lower_function_body): Make static, take no arguments.  Set
2988169689Skan	dont_emit_block_notes and call reset_block_changes here.
2989169689Skan	(pass_lower_cf): New.
2990169689Skan	* toplev.c (general_init): Call init_tree_optimization_passes.
2991169689Skan	* toplev.h (init_tree_optimization_passes): Declare.
2992169689Skan	* tree-alias-ander.c: Include tree-pass.h.
2993169689Skan	(tree_dump_file, tree_dump_flags): Remove.
2994169689Skan	(andersen_init): Don't dump_begin.
2995169689Skan	(andersen_cleanup): Don't dump_end.
2996169689Skan	* tree-alias-common.c: Include tree-pass.h, timevar.h.
2997169689Skan	(currptadecl): Remove.
2998169689Skan	(create_alias_vars): Make static, take no args.  Tidy ifdefs.
2999169689Skan	(delete_alias_vars): Likewise.  Protect vs PTA_ANDERSEN.
3000169689Skan	(pass_build_pta, pass_del_pta): New.
3001169689Skan	* tree-alias-common.h (create_alias_vars): Delete decl.
3002169689Skan	(delete_alias_vars): Likewise.
3003169689Skan	* tree-cfg.c: Include tree-pass.h.
3004169689Skan	(tree_dump_file, tree_dump_flags): Remove.
3005169689Skan	(build_tree_cfg): Don't timevar, do init_flow.  Ensure one bb.
3006169689Skan	Don't dump the function here.
3007169689Skan	(execute_build_cfg, pass_build_cfg): New.
3008169689Skan	(remove_useless_stmts): Make static, take no arguments.
3009169689Skan	(pass_remove_useless_stmts): New.
3010169689Skan	(remove_bb): Don't open the dump file.
3011169689Skan	* tree-dfa.c: Include tree-pass.h.
3012169689Skan	(tree_dump_file, tree_dump_flags): Remove.
3013169689Skan	(find_referenced_vars): Make static, take no args.  Do init_tree_ssa.
3014169689Skan	(compute_may_aliases): Similarly.  Don't timevar or open dump file.
3015169689Skan	Don't delete_alias_vars here.
3016169689Skan	(pass_referenced_vars, pass_may_alias): New.
3017169689Skan	* tree-dump.c (dump_files): Remove optimization dumps.
3018169689Skan	(extra_dump_files, extra_dump_files_in_use): New.
3019169689Skan	(extra_dump_files_alloced): New.
3020169689Skan	(dump_register): New.
3021169689Skan	(get_dump_file_info): New.
3022169689Skan	(dump_begin, dump_enabled_p, dump_flag_name): Use it.
3023169689Skan	(dump_enable_all): Handle extra_dump_files.
3024169689Skan	(dump_switch_p_1): Split out from dump_switch_p.
3025169689Skan	(dump_switch_p): Handle extra_dump_files.
3026169689Skan	* tree-dump.h (dump_register): Declare.
3027169689Skan	* tree-eh.c: Include tree-pass.h
3028169689Skan	(lower_eh_constructs): Make static, take no args.  Don't timevar,
3029169689Skan	don't dump function.
3030169689Skan	(pass_lower_eh): New.
3031169689Skan	* tree-flow.h (remove_useless_stmts, find_referenced_vars,
3032169689Skan	compute_may_aliases, lower_function_body, rewrite_out_of_ssa,
3033169689Skan	tree_ssa_ccp, tree_ssa_dominator_optimize, tree_ssa_dce,
3034169689Skan	tree_ssa_loop_opt, lower_eh_constructs, tree_sra): Remove.
3035169689Skan	(rewrite_into_ssa): Update decl.
3036169689Skan	* tree-mudflap.c: Include tree-pass.h.
3037169689Skan	(mudflap_function_decls): Make static, take no args, don't process
3038169689Skan	functions with mf_marked_p.
3039169689Skan	(mudflap_function_ops): Likewise.
3040169689Skan	(gate_mudflap, pass_mudflap_1, pass_mudflap_2): New.
3041169689Skan	(mudflap_enqueue_decl): Don't open dump file.
3042169689Skan	(mudflap_enqueue_constant): Likewise.
3043169689Skan	* tree-nomudflap.c: Include tree-pass.h.
3044169689Skan	(mudflap_c_function_decls, mudflap_c_function_ops): Remove.
3045169689Skan	(pass_mudflap_1, pass_mudflap_2): New.
3046169689Skan	* tree-optimize.c: Include tree-pass.h.
3047169689Skan	(optimize_function_tree): Remove.
3048169689Skan	(tree_dump_file, tree_dump_flags, vars_to_rename): New.
3049169689Skan	(all_passes): New.
3050169689Skan	(execute_gimple, pass_gimple): New.
3051169689Skan	(execute_rebuild_bind, pass_rebuild_bind): New.
3052169689Skan	(gate_all_optimizations, pass_all_optimizations): New.
3053169689Skan	(execute_del_cfg, pass_del_cfg): New.
3054169689Skan	(register_one_dump_file, register_dump_files): New.
3055169689Skan	(dup_pass_1, init_tree_optimization_passes): New.
3056169689Skan	(current_properties, last_verified): New.
3057169689Skan	(execute_todo, execute_one_pass, execute_pass_list): New.
3058169689Skan	(tree_rest_of_compilation): Remove -O0 passes.
3059169689Skan	* tree-sra.c: Include tree-pass.h, flags.h.
3060169689Skan	(tree_dump_file, tree_dump_flags, vars_to_rename): Remove.
3061169689Skan	(tree_sra): Make static, take no args.  Don't timevar or dump file.
3062169689Skan	(gate_sra, pass_sra): New.
3063169689Skan	* tree-ssa-ccp.c: Include tree-pass.h, flags.h.
3064169689Skan	(tree_dump_file, tree_dump_flags): New.
3065169689Skan	(tree_ssa_ccp): Make static, take no args.  Don't timevar or dump file.
3066169689Skan	(gate_ccp, pass_ccp): New.
3067169689Skan	(substitute_and_fold): Take no args.
3068169689Skan	* tree-ssa-dce.c: Include tree-pass.h, flags.h.
3069169689Skan	(tree_dump_file, tree_dump_flags): New.
3070169689Skan	(tree_ssa_dce): Make static, take no args.  Don't open dump file.
3071169689Skan	(gate_dce, pass_dce): New.
3072169689Skan	* tree-ssa-dom.c: Include tree-pass.h, flags.h.
3073169689Skan	(tree_dump_file, tree_dump_flags, vars_to_rename): Remove.
3074169689Skan	(tree_ssa_dominator_optimize): Make static, take no args, don't
3075169689Skan	timevar, don't dump file.
3076169689Skan	(gate_dominator, pass_dominator): New.
3077169689Skan	* tree-ssa-loop.c: Include tree-pass.h, flags.h.
3078169689Skan	(tree_dump_file, tree_dump_flags): Remove.
3079169689Skan	(tree_ssa_loop_opt): Make static, take no args, don't open dump file.
3080169689Skan	(gate_loop, pass_loop): New.
3081169689Skan	* tree-ssa-pre.c: Include tree-pass.h, flags.h.
3082169689Skan	(tree_dump_file, tree_dump_flags): Remove.
3083169689Skan	(execute_pre): Rename from tree_perform_ssapre, make static,
3084169689Skan	take no args, don't timevar, don't open dump file, don't allocate
3085169689Skan	vars_to_rename.
3086169689Skan	(gate_pre, pass_pre): New.
3087169689Skan	* tree-ssa.c: Include tree-pass.h.
3088169689Skan	(tree_dump_file, tree_dump_flags, vars_to_rename): Remove.
3089169689Skan	(rewrite_into_ssa): Take no arguments, don't open dump file.
3090169689Skan	(rewrite_out_of_ssa): Make static, take no args, don't timevar,
3091169689Skan	don't open dump file.  Disable TER if mudflap.
3092169689Skan	(pass_build_ssa, pass_del_ssa): New.
3093169689Skan	* tree-tailcall.c: Include tree-pass.h, flags.h.
3094169689Skan	(tree_dump_file, tree_dump_flags): Remove.
3095169689Skan	(tree_optimize_tail_calls_1): Rename from tree_optimize_tail_calls.
3096169689Skan	Make static, take only opt_tailcalls, don't dump file.
3097169689Skan	(execute_tail_recursion, gate_tail_calls, execute_tail_calls): New.
3098169689Skan	(pass_tail_recursion, pass_tail_calls): New.
3099169689Skan	* tree.h (enum tree_dump_index): Remove optimization dumps.
3100169689Skan	* Makefile.in (tree-alias-ander.o, tree-alias-common.o, tree-ssa.o,
3101169689Skan	tree-ssa-dom.o, tree-ssa-pre.o, tree-cfg.o, tree-tailcall.o,
3102169689Skan	tree-dfa.o, tree-eh.o, tree-ssa-loop.o, tree-optimize.o, gimple-low.o,
3103169689Skan	tree-mudflap.o, tree-ssa-dce.o, tree-ssa-ccp.o, tree-sra.o: Update
3104169689Skan	dependencies.
3105169689Skan
3106169689Skan2004-01-12  Frank Ch. Eigler  <fche@redhat.com>
3107169689Skan
3108169689Skan	* tree-mudflap.c (mf_xform_derefs): Restore instrumentation of
3109169689Skan	RETURN_EXPRs.
3110169689Skan
3111169689Skan2004-01-11  Jan Hubicka  <jh@suse.cz>
3112169689Skan
3113169689Skan	* tree-cfg.c (remove_usless_stmts_cond):  Fold statement.
3114169689Skan	(remove_useless_stmts_1):  Fold trees we know how to fold.
3115169689Skan
3116169689Skan2004-01-09  Richard Henderson  <rth@redhat.com>
3117169689Skan
3118169689Skan	* gimplify.c (gimplify_constructor): Merge into ...
3119169689Skan	(gimplify_init_constructor): ... here.  Handle COMPLEX_TYPE and
3120169689Skan	VECTOR_TYPE.
3121169689Skan	(gimplify_lhs_complex_part_expr): New.
3122169689Skan	(gimplify_modify_expr): Call it.
3123169689Skan	* tree-simple.c (is_gimple_rhs): Accept COMPLEX_EXPR.
3124169689Skan	* c-pretty-print.c (pp_c_initializer): Accept any type CONSTRUCTOR.
3125169689Skan	(pp_c_initializer_list): Fix code expectations for VECTOR_TYPE and
3126169689Skan	COMPLEX_TYPE.
3127169689Skan
3128169689Skan2004-01-09  Steven Bosscher  <stevenb@suse.de>
3129169689Skan
3130169689Skan	PR optimization/13599
3131169689Skan	* tree-cfg.c (remove_useless_stmts_cond): Clear last-goto
3132169689Skan	before returning.
3133169689Skan
3134169689Skan2004-01-09  Richard Henderson  <rth@redhat.com>
3135169689Skan
3136169689Skan	* gimplify.c (gimplify_asm_expr): Fix ordering of ASM_INPUTS.
3137169689Skan
3138169689Skan2004-01-09  Jan Hubicka  <jh@suse.cz>
3139169689Skan
3140169689Skan	* cgraph.h (cgraph_clone_inlined_nodes): Declare.
3141169689Skan	* cgraphunit.c (cgrpah_clone_inlined_nodes): Make global.
3142169689Skan	(cgraph_mark_inline_edge): Sanity check that size is positive.
3143169689Skan	(cgraph_decide_inlining): Fix typo.
3144169689Skan	* tree-optimize.c (tree_rest_of_compilation): Fix node duplication
3145169689Skan	code.
3146169689Skan
3147169689Skan2004-01-09  Jan Hubicka  <jh@suse.cz>
3148169689Skan
3149169689Skan	* tree-inline.c (estimate_num_insns_1): Fix.
3150169689Skan
3151169689Skan2004-01-09  Richard Henderson  <rth@redhat.com>
3152169689Skan
3153169689Skan	* tree-alias-ander.c, tree-cfg.c, tree-dfa.c, tree-mudflap.c,
3154169689Skan	tree-sra.c, tree-ssa-ccp.c, tree-ssa-dce.c, tree-ssa-dom.c,
3155169689Skan	tree-ssa-loop.c, tree-ssa-pre.c, tree-ssa.c, tree-tailcall.c: Rename
3156169689Skan	dump_file and dump_flags to tree_dump_file/flags.
3157169689Skan
3158169689Skan2004-01-08  Frank Ch. Eigler  <fche@redhat.com>
3159169689Skan
3160169689Skan	* tree-mudflap.c (mf_build_string): Properly mf_mark string.
3161169689Skan	(mf_varname_tree): Remove redundant marking.
3162169689Skan	* tree-optimize.c (tree_rest_of_compilation): Skip mudflap processing
3163169689Skan	of mf_marked functions.
3164169689Skan	* c-mudflap.c (mflang_flush_calls): mf_mark synthetic function.
3165169689Skan
3166169689Skan2004-01-07  Diego Novillo  <dnovillo@redhat.com>
3167169689Skan
3168169689Skan	* Makefile.in (OBJS-common): Remove tree-must-alias.o
3169169689Skan	(tree-must-alias.o): Remove.
3170169689Skan	* common.opt (ftree-must-alias): Remove.
3171169689Skan	* flags.h (flag_tree_must_alias): Remove.  Update all users.
3172169689Skan	* timevar.def (TV_TREE_MUST_ALIAS): Remove.
3173169689Skan	* toplev.c (f_options): Remove entry for -ftree-must-alias.
3174169689Skan	* tree-alias-common.c (local_alias_vars): Add GTY marker.
3175169689Skan	(local_alias_varnums): Likewise.
3176169689Skan	* tree-dfa.c (aliases_computed_p): Declare.
3177169689Skan	(dump_variable): Show variable UID and dereferenced bits.
3178169689Skan	(compute_may_aliases): Add arguments 'vars_to_rename' and 'phase'.
3179169689Skan	Do not call create_alias_vars.
3180169689Skan	Call promote_call_clobbered_vars
3181169689Skan	Do debugging dumps.
3182169689Skan	Set 'aliases_computed_p' to true before returning.
3183169689Skan	(create_memory_tags): Call may_be_aliased.
3184169689Skan	Mark new memory tags for renaming.
3185169689Skan	(compute_alias_sets): Don't do debugging dumps.
3186169689Skan	(find_variable_in): Move from tree-must-alias.c
3187169689Skan	(remove_element_from): Likewise.
3188169689Skan	(find_addressable_vars): Likewise
3189169689Skan	(promote_call_clobbered_vars): New.
3190169689Skan	(get_memory_tag_for): Mark the tag volatile if the pointed-to type
3191169689Skan	is volatile.
3192169689Skan	* tree-dump.c (dump_files): Remove entry for tree-mustalias.
3193169689Skan	Add entries for tree-ssa7, tree-dom3 and tree-dce3.
3194169689Skan	* tree-flow-inline.h (may_be_aliased): New.
3195169689Skan	* tree-flow.h (may_be_aliased): Declare.
3196169689Skan	(aliases_computed_p): Declare.
3197169689Skan	(tree_compute_must_alias): Remove.
3198169689Skan	* tree-must-alias.c: Remove.
3199169689Skan	* tree-optimize.c: Include tree-alias-common.h.
3200169689Skan	(optimize_function_tree): Call create_alias_vars before going into
3201169689Skan	SSA form.
3202169689Skan	Do not compute aliases until after the first DOM and DCE passes.
3203169689Skan	Run DOM and DCE once more after computing may-aliases.
3204169689Skan	* tree-ssa-dom.c (propagate_copy): Merge the dereferenced bit flags
3205169689Skan	when copy propagating pointers.
3206169689Skan	* tree-ssa-operands.c (get_stmt_operands): Assume that the
3207169689Skan	statement has no volatile operands.
3208169689Skan	(get_expr_operands): When processing an INDIRECT_REF expressions,
3209169689Skan	mark the statement as having volatile operands if aliases have not
3210169689Skan	been computed.
3211169689Skan	(add_stmt_operand): If the variable may be aliased and aliasing has
3212169689Skan	not been computed yet, mark the statement as having volatile
3213169689Skan	operands.
3214169689Skan	* tree-ssa.c (init_tree_ssa): Set aliases_computed_p to false.
3215169689Skan	(delete_tree_ssa): Likewise.
3216169689Skan	* tree.h (tree_dump_index): Remove TDI_mustalias.
3217169689Skan	Add TDI_dom_3, TDI_ssa_7 and TDI_dce_3.
3218169689Skan	* doc/invoke.texi: Remove must-alias documentation.
3219169689Skan
3220169689Skan2004-01-07  Jeff Law  <law@redhat.com>
3221169689Skan
3222169689Skan	* tree-ssa-dce.c (find_useful_stmts): Do not consider PHIs for
3223169689Skan	virtual operands inherently necessary.
3224169689Skan
3225169689Skan2004-01-07  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
3226169689Skan
3227169689Skan	* tree-dfa.c (free_df_for_stmt, free_df): New functions.
3228169689Skan	(compute_immediate_uses_for_stmt): Record uses in VDEFs.
3229169689Skan	* tree-flow.h (free_df, kill_redundant_phi_nodes): Declare.
3230169689Skan	* tree-optimize.c (optimize_function_tree): Call
3231169689Skan	kill_redundant_phi_nodes.
3232169689Skan	* tree-ssa-ccp.c (finalize): Call free_df.
3233169689Skan	* tree-ssa.c (replace_immediate_uses, raise_value,
3234169689Skan	kill_redundant_phi_nodes): New functions.
3235169689Skan
3236169689Skan2004-01-06  Jeff Law  <law@redhat.com>
3237169689Skan
3238169689Skan	* tree.h (FUNCTION_RECEIVES_NONLOCAL_GOTO): Kill.
3239169689Skan	* tree-cfg.c (make_exit_edges, is_ctrl_altering_stmt):  Use
3240169689Skan	current_function_has_nonlocal_label instead of
3241169689Skan	FUNCTION_RECEIVES_NONLOCAL_GOTO.
3242169689Skan	* gimplify.c (gimplify_expr): Set has_nonlocal_label in the
3243169689Skan	appropriate function's struct function rather than setting
3244169689Skan	a bit in the FUNCTION_DECL.
3245169689Skan
3246169689Skan2004-01-06  Jan Hubicka  <jh@suse.cz>
3247169689Skan
3248169689Skan	* expr.c (string_constant): Recognize array_ref.
3249169689Skan
3250169689Skan2004-01-06  Richard Henderson  <rth@redhat.com>
3251169689Skan
3252169689Skan	* builtins.c (builtin_save_expr): New.
3253169689Skan	(expand_builtin_mathfn, expand_builtin_mathfn_2,
3254169689Skan	expand_builtin_strcmp, expand_builtin_strncmp,
3255169689Skan	expand_builtin_strcat, fold_builtin_cabs): Use it.
3256169689Skan
3257169689Skan2004-01-06  Jan Hubicka  <jh@suse.cz>
3258169689Skan
3259169689Skan	* fold-const.c (fold): Do not rebuild comparison when nothing
3260169689Skan	changed.
3261169689Skan
3262169689Skan2004-01-05  Jan Hubicka  <jh@suse.cz>
3263169689Skan
3264169689Skan	* tree-ssa-ccp.c (ccp_fold_builtin): Return early for builtins
3265169689Skan	taking no arugment.
3266169689Skan
3267169689Skan2004-01-05  Steven Bosscher  <steven@gcc.gnu.org>
3268169689Skan
3269169689Skan	* tree-ssa-dce.c: Clean up whitespace.
3270169689Skan
3271169689Skan	* tree-cfg.c (tree_verify_flow_info): Fix complaint about
3272169689Skan	missing or wrong labels in the targets of a conditional branch.
3273169689Skan
3274169689Skan2004-01-05  Richard Henderson  <rth@redhat.com>
3275169689Skan
3276169689Skan	* tree-ssa-dom.c (record_equivalences_from_incoming_edge): Check
3277169689Skan	for signed zeros before recording value.
3278169689Skan	* Makefile.in (tree-ssa-dom.o): Depend on real.h.
3279169689Skan
3280169689Skan2004-01-05  Jeff Law  <law@redhat.com>
3281169689Skan
3282169689Skan	* tree-ssa-dom.c (cprop_into_stmt): Remove hack which prevented
3283169689Skan	copy propagation into statements with virtual operands, but no
3284169689Skan	real operands.
3285169689Skan
3286169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Correctly handle
3287169689Skan	the case where an edge we wish to redirect is split by the out of SSA
3288169689Skan	code.
3289169689Skan
3290169689Skan2004-01-05  Richard Henderson  <rth@redhat.com>
3291169689Skan
3292169689Skan	* c-tree.h (struct lang_type): Add enum_min, enum_max.
3293169689Skan	* c-decl.c (finish_enum): Set them.  Set TYPE_MIN/MAX_VALUE to
3294169689Skan	the limits of the compatible type, not to the enumerators.
3295169689Skan	(check_bitfield_type_and_width): Use them.
3296169689Skan	(finish_struct): Clear allocated struct lang_type.
3297169689Skan	* gimplify.c (gimplify_switch_expr): Remove special handling of
3298169689Skan	outer cast in a switch.
3299169689Skan	* tree-ssa-dom.c (record_equivalences_from_incoming_edge): Likewise.
3300169689Skan
3301169689Skan2004-01-05  Daniel Berlin  <dberlin@dberlin.org>
3302169689Skan
3303169689Skan	* tree-ssa-pre.c (added_phis): Removed.
3304169689Skan	Remove gt-tree-ssa-pre.h.
3305169689Skan	(process_left_occs_and_kills): ASM_EXPR's block load pre.
3306169689Skan
3307169689Skan	* Makefile.in (GTFILES): Don't process tree-ssa-pre.c.
3308169689Skan	gt-tree-ssa-pre.h isn't a gtfile anymore.
3309169689Skan
3310169689Skan2004-01-05  Andrew Pinski  <pinskia@physics.uc.edu>
3311169689Skan
3312169689Skan	* config.gcc (powerpc-*-darwin*): Make libbanshee rebuild
3313169689Skan	on PPC darwin.
3314169689Skan
3315169689Skan2004-01-05  Richard Henderson  <rth@redhat.com>
3316169689Skan
3317169689Skan	* gimplify.c (gimplify_expr): Move check for error_mark inside
3318169689Skan	the main loop.
3319169689Skan
3320169689Skan2004-01-04  Jan Hubicka  <jh@suse.cz>
3321169689Skan
3322169689Skan	* Makefile.in (cgraph.o, cgraphunit.o): Add intl.h dependency.
3323169689Skan	* cgraph.c (create_edge, dump_cgraph): Update to use inline_failed
3324169689Skan	* cgraph.h (cgraph_edge): Replace inline_call by inline_failed
3325169689Skan	(cgraph_inline_p): Add extra argument reason.
3326169689Skan	* cgraphunit.c: Minor formating fixes.
3327169689Skan	cgraph_first_inlined_callee): New functions.
3328169689Skan	(record_call_1): Record builtins too.
3329169689Skan	(cgraph_analyze_function): Update inline_failed messages.
3330169689Skan	(cgraph_mark_functions_to_output, cgraph_expand_function, cgraph_inlined_into,
3331169689Skan	cgraph_inlined_callees, cgraph_estimate_growth): Update to use inline_failed.
3332169689Skan	(cgraph_check_inline_limits): Likewise; Add argument reason.
3333169689Skan	(cgraph_set_inline_failed): New static function.
3334169689Skan	(cgraph_decide_inlining_of_small_function, cgraph_decide_inlining): Set
3335169689Skan	reasons.
3336169689Skan	(cgraph_inline_p): Add new argument reason.
3337169689Skan	* tree-inline.c (expand_call_inline):  Update warning.
3338169689Skan
3339169689Skan2004-01-04  Andreas Jaeger  <aj@suse.de>
3340169689Skan
3341169689Skan	* common.opt: Re-order some options in ASCII collating orders.
3342169689Skan
3343169689Skan2004-01-03  Richard Henderson  <rth@redhat.com>
3344169689Skan
3345169689Skan	* toplev.c (rest_of_compilation): Fixup merge error wrt
3346169689Skan	check_function_return_warnings.
3347169689Skan
3348169689Skan	* tree.h (FUNCTION_RECEIVES_NONLOCAL_GOTO): Use unsigned_flag.
3349169689Skan
3350169689Skan2004-01-02  Jan Hubicka  <jh@suse.cz>
3351169689Skan
3352169689Skan	* c-decl.c (duplicate_decls):  Output DIE of extern inline function
3353169689Skan	only when it can be inlined.
3354169689Skan	* c-objc-common.c (c_disregard_inline_limits):  When not inlining
3355169689Skan	extern inline functions do not disregard.
3356169689Skan	* cgraphunit.c (cgraph_analyze_function): When not inlining do not set
3357169689Skan	inline.
3358169689Skan	(cgraph_decide_inlining): Limit work done when not inlining.
3359169689Skan	(cgrpah_decide_inlining_incrementally): Likewise.
3360169689Skan	* tree-optimize.c (tree_rest_of_compilation): Do not call
3361169689Skan	optimize_inline_calls
3362169689Skan	when there is nothing to inline.
3363169689Skan
3364169689Skan2004-01-01  Richard Henderson  <rth@redhat.com>
3365169689Skan
3366169689Skan	* c-common.c (c_expand_expr): Don't handle STMT_EXPR.
3367169689Skan	* c-objc-common.c (c_objc_common_finish_file): Use expand_expr.
3368169689Skan	* c-semantics.c (lang_expand_stmt, lang_expand_decl_stmt,
3369169689Skan	expand_cond, genrtl_do_pushlevel, genrtl_goto_stmt, genrtl_expr_stmt,
3370169689Skan	genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt,
3371169689Skan	genrtl_while_stmt, genrtl_do_stmt_1, genrtl_do_stmt,
3372169689Skan	genrtl_return_stmt, genrtl_for_stmt, genrtl_break_stmt,
3373169689Skan	genrtl_continue_stmt, genrtl_scope_stmt, genrtl_switch_stmt,
3374169689Skan	genrtl_case_label, genrtl_compound_stmt, genrtl_asm_stmt,
3375169689Skan	genrtl_cleanup_stmt, expand_stmt, find_reachable_label,
3376169689Skan	find_reachable_label_1, expand_unreachable_if_stmt,
3377169689Skan	expand_unreachable_stmt): Remove.
3378169689Skan	* c-common.h: Update.
3379169689Skan
3380169689Skan2003-12-31  Richard Henderson  <rth@redhat.com>
3381169689Skan
3382169689Skan	* c-mudflap.c (mflang_register_call): Remove.
3383169689Skan	(mflang_flush_calls): Use start_function/finish_function.
3384169689Skan	* tree-mudflap.c (mf_init_extern_trees): Tidy.
3385169689Skan	(mf_decl_cache_locals): Fix chaining for empty body.
3386169689Skan	(deferred_static_decl_labels): Remove.
3387169689Skan	(deferred_static_decls_init): Remove.
3388169689Skan	(mudflap_register_call): New.
3389169689Skan	(mudflap_enqueue_decl): Use it.  Remove label argument.
3390169689Skan	(mudflap_enqueue_constant): Likewise.
3391169689Skan	(mudflap_finish_file): Update to match.
3392169689Skan	* tree-mudflap.h (mudflap_enqueue_decl): Remove label argument.
3393169689Skan	(mudflap_enqueue_constant): Likewise.
3394169689Skan	(mflang_register_call): Remove.
3395169689Skan	* tree-nomudflap.c (mudflap_enqueue_decl): Remove label argument.
3396169689Skan	(mudflap_enqueue_constant): Likewise.
3397169689Skan	* tree-optimize.c (tree_ssa_finish): Don't create NULL bodies.
3398169689Skan	* varasm.c (make_decl_rtl): Update mudflap_enqueue_decl call.
3399169689Skan	(output_constant_def_contents): Similarly for mudflap_enqueue_constant.
3400169689Skan
3401169689Skan2003-12-26  Sebastian Pop  <s.pop@laposte.net>
3402169689Skan
3403169689Skan	* tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs,
3404169689Skan	debug_loop_ir, print_loop_ir): New.
3405169689Skan	* tree-flow.h (debug_loop_ir, print_loop_ir): Declare.
3406169689Skan
3407169689Skan2003-12-23  Jeff Law  <law@redhat.com>
3408169689Skan
3409169689Skan	* tree-cfg.c (tree_find_edge_insert_loc): Do not use the target
3410169689Skan	block as an insertion location if the target block has PHI nodes.
3411169689Skan
3412169689Skan2003-12-23  Jan Hubicka  <jh@suse.cz>
3413169689Skan
3414169689Skan	* cgraphunit.c (cgraph_mark_inline): Accept argument edge; return
3415169689Skan	next edge not redirected.
3416169689Skan	(cgraph_recursive_inlining_p): Simplify.
3417169689Skan	(cgraph_decide_inlining*): Update calls of cgraph_mark_inline.
3418169689Skan
3419169689Skan2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
3420169689Skan
3421169689Skan	* tree-alias-common.c (find_func_aliases): Do not call
3422169689Skan	intra_function_call for languages assuring no aliasing between
3423169689Skan	arguments (by themselves) and global memory.
3424169689Skan
3425169689Skan2003-12-21  Jan Hubicka  <jh@suse.cz>
3426169689Skan
3427169689Skan	* tree-ssa-ccp.c (fold_stmt): Return when there is no RHS
3428169689Skan	(get_rhs): Return for RETURN_EXPR with no operand.
3429169689Skan
3430169689Skan2003-12-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
3431169689Skan
3432169689Skan	* tree-cfg.c (tree_make_forwarder_block): Use split_block.
3433169689Skan	(tree_split_block): New.
3434169689Skan	(tree_cfg_hooks): Add tree_split_block.
3435169689Skan	(tree_loop_optimizer_init):  Enable force_single_succ_latches.
3436169689Skan	* cfgloopmanip.c (loop_split_edge_with): Don't update dominators.
3437169689Skan	* cfgrtl.c (rtl_split_edge, cfg_layout_split_edge): Update dominators.
3438169689Skan
3439169689Skan2003-12-19  Daniel Berlin  <dberlin@dberlin.org>
3440169689Skan
3441169689Skan	* tree-dfa.c (alias_stats_d): New structure.
3442169689Skan	(alias_stats): New variable.
3443169689Skan	(create_memory_tags): Zero out alias_stats.
3444169689Skan	(dump_alias_stats): New function.
3445169689Skan	(compute_alias_sets): Call it if TDF_STATS is set.
3446169689Skan	(may_alias_p): Collect the various statistics.
3447169689Skan
3448169689Skan2003-12-19  Diego Novillo  <dnovillo@redhat.com>
3449169689Skan
3450169689Skan	* gimple-low.c (expand_var_p): Always expand volatiles.
3451169689Skan	* tree-dfa.c (find_referenced_vars): Move up in the file.
3452169689Skan	(create_memory_tags): New local function.
3453169689Skan	(compute_may_aliases): Call it.
3454169689Skan	(add_referenced_var): Move code to create memory tags and create
3455169689Skan	aliasing arrays to create_memory_tags.
3456169689Skan	(get_memory_tag_for): Don't mark memory tags volatile.  Mark them
3457169689Skan	addressable.
3458169689Skan	* tree-flow.h (var_ann_d): Add bitfields is_dereferenced_store and
3459169689Skan	is_dereferenced_load.
3460169689Skan	(add_call_clobbered_var): Remove.
3461169689Skan	* tree-ssa-operands.c (check_optype_freelist): Mark arguments
3462169689Skan	unused.
3463169689Skan	(add_optype_freelist): Likewise.
3464169689Skan	(add_stmt_operand): Don't add operands for volatile variables.
3465169689Skan
3466169689Skan2003-12-19  Kazu Hirata  <kazu@cs.umass.edu>
3467169689Skan
3468169689Skan	* dominance.c: Fix comment typos.
3469169689Skan	* et-forest.c: Likewise.
3470169689Skan	* et-forest.h: Likewise.
3471169689Skan	* tree-cfg.c: Likewise.
3472169689Skan	* tree-eh.c: Likewise.
3473169689Skan	* tree-mudflap.c: Likewise.
3474169689Skan	* tree-optimize.c: Likewise.
3475169689Skan	* tree-pretty-print.c: Likewise.
3476169689Skan	* tree-ssa-ccp.c: Likewise.
3477169689Skan	* tree-ssa-dom.c: Likewise.
3478169689Skan	* tree-ssa.c: Likewise.
3479169689Skan	* tree-tailcall.c: Likewise.
3480169689Skan	* tree.def: Likewise.
3481169689Skan	* tree.h: Likewise.
3482169689Skan
3483169689Skan2003-12-18  Jason Merrill  <jason@redhat.com>
3484169689Skan
3485169689Skan	PR c++/12453
3486169689Skan	* c-simplify.c (stmt_expr_last_stmt): Split out from...
3487169689Skan	(gimplify_stmt_expr): Here.
3488169689Skan	* c-common.h: Declare it.
3489169689Skan
3490169689Skan2003-12-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
3491169689Skan
3492169689Skan	* et-forest.h (et_forest_create, et_forest_delete,
3493169689Skan	et_forest_add_node, et_forest_add_edge, et_forest_remove_node,
3494169689Skan	et_forest_remove_edge, et_forest_parent,
3495169689Skan	et_forest_common_ancestor, et_forest_node_value,
3496169689Skan	et_forest_enumerate_sons): Declarations removed.
3497169689Skan	(struct et_node): New.
3498169689Skan	(et_new_tree, et_free_tree, et_set_father, et_split, et_nca,
3499169689Skan	et_below): Declare.
3500169689Skan	* et-forest.c (struct et_forest_occurrence, struct et_forest,
3501169689Skan	struct et_forest_node): Removed.
3502169689Skan	(et_forest_create, et_forest_delete,
3503169689Skan	et_forest_add_node, et_forest_add_edge, et_forest_remove_node,
3504169689Skan	et_forest_remove_edge, et_forest_parent,
3505169689Skan	et_forest_common_ancestor, et_forest_node_value,
3506169689Skan	et_forest_enumerate_sons, splay, remove_all_occurrences,
3507169689Skan	find_leftmost_node, find_rightmost_node, calculate_value): Removed.
3508169689Skan	(struct et_occ): New.
3509169689Skan	(et_nodes, et_occurences): New.
3510169689Skan	(set_depth, set_depth_add, set_prev, set_next, et_recomp_min,
3511169689Skan	et_check_occ_sanity, et_check_sanity, et_check_tree_sanity,
3512169689Skan	record_path_before_1, record_path_before, check_path_after_1,
3513169689Skan	check_path_after, et_splay, et_new_occ, et_new_tree,
3514169689Skan	et_free_tree, et_set_father, et_split, et_nca, et_below): New.
3515169689Skan	* basic-block.h (struct basic_block_def): New field dom.
3516169689Skan	(struct dominance_info): Type removed.
3517169689Skan	(calculate_dominance_info, free_dominance_info,
3518169689Skan	nearest_common_dominator, set_immediate_dominator,
3519169689Skan	get_immediate_dominator, dominated_by_p, get_dominated_by,
3520169689Skan	add_to_dominance_info, delete_from_dominance_info,
3521169689Skan	recount_dominator, redirect_immediate_dominators,
3522169689Skan	iterate_fix_dominators, verify_dominators): Declarations
3523169689Skan	changed.
3524169689Skan	(enum dom_state): New.
3525169689Skan	(dom_computed): New variable.
3526169689Skan	(first_dom_son, next_dom_son): Declare.
3527169689Skan	* dominance.c (struct dominance_info): Removed.
3528169689Skan	(BB_NODE, SET_BB_NODE): Removed.
3529169689Skan	(calculate_dominance_info, free_dominance_info,
3530169689Skan	nearest_common_dominator, set_immediate_dominator,
3531169689Skan	get_immediate_dominator, dominated_by_p, get_dominated_by,
3532169689Skan	add_to_dominance_info, delete_from_dominance_info,
3533169689Skan	recount_dominator, redirect_immediate_dominators,
3534169689Skan	iterate_fix_dominators, verify_dominators,
3535169689Skan	debug_dominance_info): Work over new datastructure.  Access
3536169689Skan	dominance datastructures through CFG.
3537169689Skan	(assign_dfs_numbers, compute_dom_fast_query, first_dom_son,
3538169689Skan	next_dom_son): New.
3539169689Skan	* tree-cfg.c (pdom_info): Variable removed.
3540169689Skan	(create_bb): Add the block to the dominance information.
3541169689Skan	(cleanup_tree_cfg): Let updating of the dominance on the
3542169689Skan	individual passes.
3543169689Skan	(remove_bb): Don't handle pdom.
3544169689Skan	(cleanup_control_expr_graph, tree_make_forwarder_block,
3545169689Skan	thread_jumps): Invalidate the dominators.
3546169689Skan	(tree_split_edge): Update the dominators.
3547169689Skan	(compute_dominance_frontiers_1, compute_dominance_frontiers,
3548169689Skan	tree_verify_flow_info, tree_loop_optimizer_init): Use the new
3549169689Skan	interface to dominators.
3550169689Skan	* domwalk.c (walk_dominator_tree): Do not use dom_children.
3551169689Skan	* tree-flow-inline.h (add_dom_child, remove_dom_child,
3552169689Skan	clear_dom_children, dom_children): Removed.
3553169689Skan	* tree-flow.h (struct bb_ann_d): Dom_children field removed.
3554169689Skan	(add_dom_child, dom_children, build_dominator_tree): Declaration
3555169689Skan	removed.
3556169689Skan	(compute_dominance_frontiers): Declaration changed.
3557169689Skan	* tree-optimize.c (optimize_function_tree): Free dominance
3558169689Skan	information in the end.
3559169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize,
3560169689Skan	dom_opt_finalize_block): Do not use dom_children.
3561169689Skan	* tree-ssa-pre.c (fast_a_dominates_b, build_dfs_id_array_1,
3562169689Skan	build_dfs_id_array): Removed.
3563169689Skan	(pre_idom, dfs_id, dfs_id_last): Variables removed.
3564169689Skan	(build_dfn_array): Do not use dom_children.
3565169689Skan	(eref_compare, load_modified_phi_result, rename_1, reaching_def,
3566169689Skan	finalize_1, collect_expressions, tree_perform_ssapre): Use the
3567169689Skan	new interface to the dominance information.
3568169689Skan	* tree-ssa.c (struct mark_def_sites_global_data): Idom field
3569169689Skan	removed.
3570169689Skan	(set_livein_block, verify_use, verify_phi_args,
3571169689Skan	rewrite_into_ssa, mark_def_sites, verify_ssa): Use the new
3572169689Skan	interface to the dominance information.
3573169689Skan	(build_dominator_tree): Removed.
3574169689Skan	* tree-tailcall.c (tree_optimize_tail_calls): Invalidate
3575169689Skan	dominance information.
3576169689Skan	* bt-load.c (dom): Variable removed.
3577169689Skan	(augment_live_range, combine_btr_defs, migrate_btr_def,
3578169689Skan	migrate_btr_defs, branch_target_load_optimize): Updated for the
3579169689Skan	new interface for dominance information.
3580169689Skan	* cfglayout.c (copy_bbs): Removed loops argument. Updated for
3581169689Skan	the new interface for dominance information.
3582169689Skan	* cfglayout.h (copy_bbs): Declaration changed.
3583169689Skan	* cfgloop.c (flow_loop_pre_header_find, flow_loops_cfg_dump,
3584169689Skan	flow_loop_scan, canonicalize_loop_headers, flow_loops_find): Updated
3585169689Skan	for the new interface for dominance information.
3586169689Skan	(flow_loop_scan): Loops argument removed.
3587169689Skan	(flow_loops_free): Don't release dominators.
3588169689Skan	* cfgloop.h (struct cfg): Dom field removed.
3589169689Skan	(flow_loop_scan, loop_split_edge_with, simple_loop_p,
3590169689Skan	just_once_each_iteration_p, split_loop_bb): Declaration changed.
3591169689Skan	* cfgloopanal.c (simple_loop_exit_p, simple_increment,
3592169689Skan	just_once_each_iteration_p, simple_loop_p): Remove loops argument.
3593169689Skan	Updated for the new interface for dominance information.
3594169689Skan	* cfgloopmanip.c (remove_bbs, find_path, create_preheader,
3595169689Skan	split_loop_bb, loopify, duplicate_loop_to_header_edge,
3596169689Skan	force_single_succ_latches, loop_split_edge_with): Ditto.
3597169689Skan	(create_loop_notes): Free the dominators.
3598169689Skan	* gcse.c (dominators): Variable removed.
3599169689Skan	(free_code_hoist_mem, compute_code_hoist_data, hoist_code):
3600169689Skan	Updated for the new interface for dominance information.
3601169689Skan	* ifcvt.c (post_dominators): Variable removed.
3602169689Skan	(mark_loop_exit_edges, merge_if_block, find_if_header,
3603169689Skan	find_cond_trap, find_if_case_1, find_if_case_2, if_convert):
3604169689Skan	Updated for the new interface for dominance information.
3605169689Skan	* loop-init.c (rtl_loop_optimizer_init,
3606169689Skan	rtl_loop_optimizer_finalize): Ditto.
3607169689Skan	* loop-unroll.c (decide_peel_simple, decide_peel_once_rolling,
3608169689Skan	decide_peel_completely, decide_unroll_stupid,
3609169689Skan	decide_unroll_constant_iterations,
3610169689Skan	decide_unroll_runtime_iterations): Loops argument removed.
3611169689Skan	Updated for the new interface for dominance information.
3612169689Skan	(unroll_and_peel_loops, peel_loops_completely,
3613169689Skan	unroll_loop_runtime_iterations): Updated for the new interface for
3614169689Skan	dominance information.
3615169689Skan	* loop-unswitch.c (may_unswitch_on_p, unswitch_loops,
3616169689Skan	unswitch_single_loop, unswitch_loop): Updated for the new
3617169689Skan	interface for dominance information.
3618169689Skan	* predict.c (process_note_predictions, process_note_prediction,
3619169689Skan	estimate_probability, note_prediction_to_br_prob): Ditto.
3620169689Skan	* sched-rgn.c (find_rgns, init_regions): Ditto.
3621169689Skan	* toplev.c (rest_of_handle_branch_prob): Free the dominators.
3622169689Skan
3623169689Skan2003-12-18  Jeff Law  <law@redhat.com>
3624169689Skan
3625169689Skan	* tree-ssa-dom.c (edges_to_redirect, redirection_targets): Merged
3626169689Skan	into a single varray "redirection_edges".
3627169689Skan	(tree_ssa_dominator_optimize): Twiddle initialization, finalization
3628169689Skan	and accessors to redirection information based on combining varrays.
3629169689Skan	Get the threading destination from the saved edge rather than from a
3630169689Skan	saved block.  Mark variables appearing in PHIs at the jump thread
3631169689Skan	destination to be taken out of SSA form.
3632169689Skan	(thread_across_edge): Save the edge into the destination block
3633169689Skan	rather than the destination block itself.  Twiddle based on
3634169689Skan	combining varrays of jump threading information.
3635169689Skan	* tree-flow.h (tree_block_forwards_to): Returns an edge rather than
3636169689Skan	a block.
3637169689Skan	* tree-cfg.c (tree_block_forwards_to): Return the edge leading to
3638169689Skan	the target block rather than the target block itself.
3639169689Skan
3640169689Skan2003-12-18  Daniel Berlin  <dberlin@dberlin.org>
3641169689Skan
3642169689Skan	* tree-dfa.c (get_memory_tag_for): Don't put things with different
3643169689Skan	points-to sets in the same memory tag.
3644169689Skan
3645169689Skan2003-12-18  Jan Hubicka  <jh@suse.cz>
3646169689Skan
3647169689Skan	* c-common.c (handle_nonnull_attribute, check_function_nonnull):
3648169689Skan	Initialize arg_num.
3649169689Skan	* c-format.c (handle_format_attribute): Initialize format_num.
3650169689Skan	* rtlanal.c (get_related_value): Initialize get_jump_table_offset
3651169689Skan
3652169689Skan2003-12-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
3653169689Skan
3654169689Skan	* stmt.c (expand_start_loop, expand_loop_continue_here,
3655169689Skan	expand_end_loop): Don't create loop notes.
3656169689Skan
3657169689Skan2003-12-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
3658169689Skan	    Jeff Law  <law@redhat.com>
3659169689Skan
3660169689Skan	* tree-cfg.c (tree_node_shared_p): Explicitly allow sharing of
3661169689Skan	CST nodes.
3662169689Skan	* tree-simple.c (is_gimple_rhs): Allow CST nodes.
3663169689Skan	(is_gimple_min_invariant): Reject constants with TREE_OVERFLOW set.
3664169689Skan	* tree-ssa-ccp (visit_assignment): Test is_gimple_min_invariant
3665169689Skan	after munging bitfields.
3666169689Skan	* tree-ssa-dom.c (record_equivalences_from_stmt): Similarly.
3667169689Skan
3668169689Skan2003-12-17  Jan Hubicka  <jh@suse.cz>
3669169689Skan
3670169689Skan	Based on patch by Dale Johannesen
3671169689Skan	* expr.c (MOVE_RATIO, CLEAR_RATIO): Move to ...
3672169689Skan	* expr.h (MOVE_RATIO, CLEAR_RATIO): ... here
3673169689Skan
3674169689Skan2003-12-17  Jan Hubicka  <jh@suse.cz>
3675169689Skan
3676169689Skan	* Makefile.in (sibcall.o): Kill.
3677169689Skan	(tree-tailcall.o): Add except.h dependency
3678169689Skan	* sibcall.c: Kill.
3679169689Skan	(purge_reg_equiv_notes, purge_mem_unchanging_flag): Move to ...
3680169689Skan	* calls.c (purge_reg_equiv_notes, purge_mem_unchanging_flag) ... here.
3681169689Skan	(expand_call): Do not produce placeholders; do not deal with tail
3682169689Skan	recursion; set tail_call_emit.
3683169689Skan	(fixup_tail_calls): New.
3684169689Skan	* expr.h (fixup_tail_calls): Declare.
3685169689Skan	* toplev.c (rest_of_handle_sibling_calls): Kill.
3686169689Skan	(rest_of_compialtion): Do not use rest_of_handle_sibling_calls;
3687169689Skan	call fixup_tail_calls.
3688169689Skan	* tree-dump.c (dump_files): Add tail2
3689169689Skan	* tree-flow.h (tree_optimize_tail_calls): Update prototype.
3690169689Skan	* tree-optimize.c (optimize_function_tree): Do tail optimization twice.
3691169689Skan	* tree-tailcall.c: Inlucde except.h
3692169689Skan	(suitable_for_tail_call_opt_p): New.
3693169689Skan	(optimize_tail_call): Add opt_tailcalls argument; optimize tailcalls.
3694169689Skan	(tree_optimize_tail_calls): Add opt_tailcalls/pass arguments.
3695169689Skan	* tree.h (CALL_EXPR_TAILCALL): New.
3696169689Skan	(tree_dump_index): Add tail2
3697169689Skan	* function.h (struct function): Add tail_call_emit field.
3698169689Skan
3699169689Skan2003-12-17  Jan Hubicka  <jh@suse.cz>
3700169689Skan
3701169689Skan	* tree-inline.c (estimate_num_insns_1):  Check that all nodes are
3702169689Skan	known; add missing nodes; fix MODIFY_EXPR
3703169689Skan
3704169689Skan2003-12-16  Jason Merrill  <jason@redhat.com>
3705169689Skan
3706169689Skan	PR middle-end/12920
3707169689Skan	* stor-layout.c (layout_type): Just return if type is
3708169689Skan	error_mark_node.
3709169689Skan	* c-decl.c (grokdeclarator): Immediately layout an
3710169689Skan	ARRAY_TYPE used in a pointer-to-array declarator.
3711169689Skan
3712169689Skan2003-12-16  Diego Novillo  <dnovillo@redhat.com>
3713169689Skan
3714169689Skan	* tree-dfa.c (may_alias_p): If VAR and PTR are pointers with the
3715169689Skan	same alias set, return false.
3716169689Skan	(get_memory_tag_for): Group based on alias set classes, not on
3717169689Skan	conflicting alias sets.
3718169689Skan	* tree-must-alias.c (promote_var): Don't bring aliases over when
3719169689Skan	all the may-aliases of a non-promotable variable are promoted.
3720169689Skan
3721169689Skan2003-12-16  Andrew MacLeod  <amacleod@redhat.com>
3722169689Skan
3723169689Skan	* tree-flow-inline.h (free_vuse, free_vdefs): Moved to
3724169689Skan	tree-ssa-operands.c
3725169689Skan	(get_def_ops, get_use_ops, get_vdef_ops, get_vuse_ops): Use the new
3726169689Skan	more direct structure pointer.
3727169689Skan	(get_use_op_ptr, get_def_op_ptr): Cast is no longer necessary.
3728169689Skan	* tree-flow.h (struct stmt_ann_d): Replace operands and voperands
3729169689Skan	pointers with pointers directly to the operand types.
3730169689Skan	* tree-ssa-dom.c (cprop_into_stmt): Use new stmt based interface to
3731169689Skan	free virtual operands.  Check virtual bases of both VUSE and VDEF.
3732169689Skan	* tree-ssa-operands.c (struct voperands_d): Declare here, used only
3733169689Skan	for previous_vops during stmt operand construction.
3734169689Skan	(struct vecmanage_d, vecmanage_add_segmen, vecmanage_add_special,
3735169689Skan	vecmanage_init, vecmanage_tree_ptr_init, vecmanage_fini, check_free,
3736169689Skan	vecmanage_new_vector, vecmanage_new_tree_ptr_vector,
3737169689Skan	vecmanage_free_vector): Remove.
3738169689Skan	(allocate_ssa_op_vec, free_ssa_op_vec, allocate_ssa_virtual_op_vec,
3739169689Skan	allocate_operands_t, allocate_voperands_t): Remove.
3740169689Skan	(finalize_new_ssa_operands, inalize_new_ssa_virtual_operand): Remove.
3741169689Skan	(struct freelist_d): New. List of free operand structures.
3742169689Skan	(check_optype_freelist): New. Choose memory from freelist, if available.
3743169689Skan	(add_optype_freelist): New. Add structure to freelist, if appropriate.
3744169689Skan	(allocate_def_optype): New. Allocate a def operand list from GC.
3745169689Skan	(allocate_use_optype): New. Allocate a useoperand list from GC.
3746169689Skan	(allocate_vdef_optype): New. Allocate a vdef operand list from GC.
3747169689Skan	(allocate_vuse_optype): New. Allocate a vuse operand list from GC.
3748169689Skan	(free_uses, free_defs, free_vuses, free_vdefs): Use GC and the freelist.
3749169689Skan	(remove_vuses, remove_vdefs): New.  External interface to remove virtual
3750169689Skan	operands.
3751169689Skan	(init_ssa_operands, fini_ssa_operands): Ensure the free list is empty.
3752169689Skan	(finalize_ssa_defs, finalize_ssa_use, finalize_ssa_vdefs,
3753169689Skan	finalize_ssa_vuses): Use new direct pointers from the stmt annotation.
3754169689Skan	(append_vdef, append_vuse): No need to hack prev_vops pointer now.
3755169689Skan	(get_stmt_operands): use new freeing interface, keep previous vops in
3756169689Skan	their own local structure for now, passing its address around.
3757169689Skan	* tree-ssa-operands.h (struct def_optype_d, struct use_optype_d,
3758169689Skan	struct vdef_optype_d, struct vuse_optype_d): Implement as a single
3759169689Skan	dynamically allocated structure.
3760169689Skan	(struct operands_d, struct operands_d): Remove.
3761169689Skan	* tree-ssa-pre.c (subst_phis): Remove virtual operands using new funcs.
3762169689Skan
3763169689Skan2003-12-16  Jan Hubicka  <jh@suse.cz>
3764169689Skan
3765169689Skan	* tree-cfg.c (verify_addr_expr): Rename to ....
3766169689Skan	(verify_expr):  ... this one; check that no SSA names are on
3767169689Skan	freelist.
3768169689Skan	(verify_stmt, verify_stmts): Update calls of verify_addr_expr.
3769169689Skan
3770169689Skan	Revert until initializers are made language independent:
3771169689Skan	* cgraphunit.c (record_call_1): Do not call analyze_expr hook
3772169689Skan	* langhooks-def.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Kill.
3773169689Skan	(LANG_HOOKS_CALLGRAPH_INITIALIZER): Update.
3774169689Skan	* longhooks.h (lang_hooks_for_callgraph): Kill analyze_expr.
3775169689Skan
3776169689Skan2003-12-16  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
3777169689Skan
3778169689Skan	* tree-pretty-print.c (dump_bb_header): Show block number when
3779169689Skan	there is no label.
3780169689Skan	(pp_cfg_jump): Show labels in addition to block numbers.
3781169689Skan	(dump_generic_bb_buff): Always call dump_bb_header.
3782169689Skan
3783169689Skan2003-12-16  Jan Hubicka  <jh@suse.cz>
3784169689Skan
3785169689Skan	* cgraphunit.c (cgraph_remove_unreachable_nodes): Fix typo;
3786169689Skan	improve comments; cleanup linked list mantenance.
3787169689Skan
3788169689Skan2003-12-15  Diego Novillo  <dnovillo@redhat.com>
3789169689Skan
3790169689Skan	* tree-sra.c (can_be_scalarized_p): Reject volatile variables.
3791169689Skan
3792169689Skan	* sibcall.c (skip_copy_to_return_value): Initialize 'hardret' and
3793169689Skan	'softret'.
3794169689Skan
3795169689Skan2003-12-16  Jan Hubicka  <jh@suse.cz>
3796169689Skan
3797169689Skan	* cgraph.c (cgraph_remove_node): Ignore DECL_EXTERNAL clones.
3798169689Skan	* cgraphunit.c (verify_cgraph_node): Do not insist on unemmited extern
3799169689Skan	inline functions to be valid.
3800169689Skan	(cgraph_finalize_compilation_unit):  Fix ordering.
3801169689Skan	(cgraph_mark_functions_to_output): Do not insist on DECL_EXTERNAL
3802169689Skan	nodes to be reclaimed.
3803169689Skan	(cgraph_remove_unreachable_nodes): New function.
3804169689Skan	(cgraph_decide_inlining): use it.
3805169689Skan
3806169689Skan2003-12-15  Andrew MacLeod  <amacleod@redhat.com>
3807169689Skan
3808169689Skan	* Makefile.in (TREE_FLOW_H): Add dependence on tree-ssa-operands.h
3809169689Skan	(OBJS-common): Add tree-ssa-operands.o
3810169689Skan	(tree-ssa-operands.o): Add dependencies.
3811169689Skan	(GTFILES): Add tree-ssa-operands.[ch].
3812169689Skan	* tree-dfa.c (get_stmt_operands, get_expr_operands, add_stmt_operand,
3813169689Skan	note_addressable, add_def, add_use, add_vde, add_vuse,
3814169689Skan	add_call_clobber_ops, add_call_read_ops): Moved to tree-ssa-operands.c.
3815169689Skan	(compute_immediate_uses_for_stmt): Use new optypes interface.
3816169689Skan	(cleanup_operand_arrays): Delete.
3817169689Skan	(collect_dfa_stats_r): Use new optypes interface.
3818169689Skan	(get_call_flags): Moved to tree-ssa-operands.c.
3819169689Skan	(vdefs_disappeared_p, mark_new_vars_to_rename): Use optypes interface.
3820169689Skan	* tree-flow-inline.h (def_ops, use_ops, vdef_ops, vuse_ops): Use new
3821169689Skan	optypes.
3822169689Skan	(free_vuses): New. Clear and release vuses.
3823169689Skan	(free_vdefs): New. Clear and release vdefs.
3824169689Skan	(get_use_ops_ptr): New. Get address of a use op.
3825169689Skan	(get_def_ops_ptr): New. Get address of a use op.
3826169689Skan	(get_vdef_result_ptr): New. Get address of a use op.
3827169689Skan	(get_vdef_op_ptr): New. Get address of a use op.
3828169689Skan	(get_vuse_op_ptr): New. Get address of a use op.
3829169689Skan	(start_ssa_stmt_operands): New. Entry point to start processing stmt
3830169689Skan	operands.
3831169689Skan	* tree-flow.h (struct operands_d, struct voperands_d): Move to
3832169689Skan	tree-ssa-operands.h
3833169689Skan	(struct stmt_ann_d): Add GTY markers to operands.
3834169689Skan	* tree-pretty-print.c (dump_vops): Use optypes interface.
3835169689Skan	* tree-sra.c (create_scalar_copies): Use optypes interface.
3836169689Skan	(scalarize_structures, scalarize_modify_exp): Use optypes interface.
3837169689Skan	* tree-ssa-ccp.c (visit_stmt, ccp_fold, initialize, replace_uses_in,
3838169689Skan	likely_value, set_rhs): Use optypes interface.
3839169689Skan	* tree-ssa-dce.c (find_useful_stmts, stmt_useful_p, process_worklist):
3840169689Skan	Use optypes interface.
3841169689Skan	* tree-ssa-dom.c (thread_across_edge, thread_jumps_walk_stmts): Use
3842169689Skan	optypes interface.
3843169689Skan	(cprop_into_stmt): Rewrite using new interface.
3844169689Skan	(eliminate_redundant_computations, record_equivalences_from_stmt,
3845169689Skan	optimize_stmt, avail_expr_hash, avail_expr_eq): Use optypes interface.
3846169689Skan	* tree-ssa-live.c (create_ssa_var_map, calculate_live_on_entry,
3847169689Skan	build_tree_conflict_graph,register_ssa_partitions_for_vars): Use
3848169689Skan	optypes interface.
3849169689Skan	* tree-ssa-pre.c (names_match_p, maybe_find_rhs_use_for_var,
3850169689Skan	expr_phi_insertion, same_e_version_real_occ_real_occ, opnum_of_phi,
3851169689Skan	generate_expr_as_of_bb, generate_vops_as_of_bb, subst_phis,
3852169689Skan	load_modified_real_occ_real_occ, same_e_version_phi_result, can_insert,
3853169689Skan	get_default_def, reaching_def, process_left_occs_and_kills,
3854169689Skan	collect_expressions): Use optypes interface.
3855169689Skan	* tree-ssa.c (mark_def_sites, check_replaceable, find_replaceable_in_bb,
3856169689Skan	dump_replaceable_exprs, rewrite_trees, verify_ssa, rewrite_stmt): Use
3857169689Skan	optypes interface.
3858169689Skan	(init_tree_ssa): Initialize new operand data structures.
3859169689Skan	(delete_tree_ssa): Free new operand structures.
3860169689Skan	* tree.h (VDEF_RESULT, VDEF_OP, NUM_VDEFS): Move to tree-ssa-operands.h.
3861169689Skan
3862169689Skan	* tree-ssa-operands.h: New file.
3863169689Skan	(struct def_optype_d): New. Structure for stmt defs.
3864169689Skan	(struct use_optype_d): New. Structure for stmt uses.
3865169689Skan	(struct vdef_optype_d): New. Structure for stmt vdefs.
3866169689Skan	(struct vuse_optype_d): New. Structure for stmt vuses.
3867169689Skan	(USE_OPS, STMT_USE_OPS, NUM_USES, USE_OP_PTR, USE_OP): Macros to
3868169689Skan	access stmt uses.
3869169689Skan	(DEF_OPS, STMT_DEF_OPS, NUM_DEFS, DEF_OP_PTR, DEF_OP): Macros to
3870169689Skan	access stmt defs.
3871169689Skan	(VDEF_OPS, STMT_VDEF_OPS, NUM_VDEFS, VDEF_RESULT_PTR, VDEF_RESULT,
3872169689Skan	VDEF_OP_PTR, VDEF_OP): Macros to access stmt vdefs.
3873169689Skan	(VUSE_OPS, STMT_VUSE_OPS, NUM_VUSES, VUSE_OP_PTR, VUSE_OP): Macros to
3874169689Skan	access stmt vuses.
3875169689Skan	(struct operands_d, struct voperands_d): moved from tree-dfa.c.
3876169689Skan	* tree-ssa-operands.c: New file.
3877169689Skan	(build_defs, build_uses, build_vdefs, build_vuses): New static varrays.
3878169689Skan	(struct vecmanage_d): New. Struct to manage non-GC vectors.
3879169689Skan	(vecmanage_add_segment): New. Add a new segment to a vector manager.
3880169689Skan	(vecmanage_add_special): New. Add a large vector to the special list.
3881169689Skan	(vecmanage_init): Initialize a vector manager.
3882169689Skan	(vecmanage_tree_ptr_init): New. Initialize a vector manager for tree *.
3883169689Skan	(vecmanage_fini): New. Release vector manager memory.
3884169689Skan	(check_free): New. Look for free memory in the vector maanger.
3885169689Skan	(vecmanage_new_vector): New. Allocate a vector.
3886169689Skan	(vecmanage_new_tree_ptr_vector): New. Allocate a vector of 'tree *'.
3887169689Skan	(vecmanage_free_vector): New. Free a vector.
3888169689Skan	(free_ssa_op_vec): New. Free an ssa operand's memory.
3889169689Skan	(allocate_ssa_op_vec): New. Allocate a vector for use/defs.
3890169689Skan	(allocate_ssa_virtual_op_vec): New. Allocate a vector for vuse/vdefs.
3891169689Skan	(allocate_operands_t): New. Allocate an operand structure.
3892169689Skan	(allocate_voperands_t): New. Allocate a virtual operand structure.
3893169689Skan	(free_uses): New. Clear and release uses.
3894169689Skan	(free_defs): New. Clear and release defs.
3895169689Skan	(init_ssa_operands): New. Initialize ssa operand management.
3896169689Skan	(fini_ssa_operands): New. Cleanup ssa operand management.
3897169689Skan	(finalize_new_ssa_operands): New. Commit current operands.
3898169689Skan	(finalize_new_ssa_virtual_operands): New. Commit current virtual ops.
3899169689Skan	(finalize_ssa_defs): New. Commit and verify stmt definitions.
3900169689Skan	(finalize_ssa_uses): New. Commit and verify stmt uses.
3901169689Skan	(finalize_ssa_vdefs): New. Commit and verify stmt virtual definitions.
3902169689Skan	(finalize_ssa_vuses): New. Commit and verify stmt virtual uses.
3903169689Skan	(finalize_ssa_stmt_operands): New. Commit all stmt operands.
3904169689Skan	(verify_start_operands): New. Verify build mechanism is ready for a new
3905169689Skan	stmt.
3906169689Skan	(append_def): Renamed from add_def, and moved from tree-dfa.c.
3907169689Skan	(append_use): Renamed from add_def, and moved from tree-dfa.c.
3908169689Skan	(append_vdef): Renamed from add_def, and moved from tree-dfa.c.
3909169689Skan	(append_vuse): Renamed from add_def, and moved from tree-dfa.c.
3910169689Skan	(add_vuse): New. Entry point to add a vuse to a stmt.
3911169689Skan	(get_call_flags): Moved from tree-dfa.c
3912169689Skan	(get_stmt_operands, get_expr_operands, add_stmt_operand): Moved from
3913169689Skan	tree-dfa.c, and use new optype interface.
3914169689Skan	(note_addressabe, add_call_clobber_ops, add_call_read_ops): Moved from
3915169689Skan	tree-dfa.c
3916169689Skan
3917169689Skan2003-12-15  Diego Novillo  <dnovillo@redhat.com>
3918169689Skan
3919169689Skan	* tree-optimize.c (optimize_function_tree): Call BITMAP_XFREE.
3920169689Skan
3921169689Skan2003-12-15  Diego Novillo  <dnovillo@redhat.com>
3922169689Skan
3923169689Skan	PR optimization/12747
3924169689Skan
3925169689Skan	* tree-cfg.c (verify_addr_expr): Simplify predicates.
3926169689Skan	* tree-must-alias.c (addresses_needed): Declare as file local.
3927169689Skan	(can_be_promoted): New.
3928169689Skan	(tree_compute_must_alias): Call it.
3929169689Skan	Remove promoted variables from call_clobbered_vars.
3930169689Skan	(find_addressable_vars): Update comment.
3931169689Skan	Remove argument.  Update callers.
3932169689Skan	(promote_var): Always clear TREE_ADDRESSABLE.
3933169689Skan	Don't remove promoted variables from call_clobbered_vars.
3934169689Skan	If the promoted variable is in the may-alias set of a
3935169689Skan	non-promotable variable, copy its alias set into the alias set of
3936169689Skan	the non-promotable variable.
3937169689Skan	(find_variable_in): Update comment.
3938169689Skan	* tree-sra.c (can_be_scalarized_p): Reject structures with
3939169689Skan	__complex__ fields in them.
3940169689Skan
3941169689Skan2003-12-15  Diego Novillo  <dnovillo@redhat.com>
3942169689Skan	    Jason Merrill <jason@redhat.com>
3943169689Skan
3944169689Skan	PR optimization/12747
3945169689Skan
3946169689Skan	* Makefile.in (tree-simple.o): Add dependency on bitmap.h and
3947169689Skan	$(GGC_H).
3948169689Skan	(GTFILES): Add tree-simple.c.
3949169689Skan	* tree-simple.c: Include ggc.h and bitmap.h.
3950169689Skan	(is_gimple_non_addressable_1): Remove.  Update all callers.
3951169689Skan	(types_checked): New local variable.
3952169689Skan	(types_in_memory): New local variable.
3953169689Skan	(struct_needs_to_live_in_memory): New.
3954169689Skan	(needs_to_live_in_memory): New.
3955169689Skan	(is_gimple_reg): Call it.
3956169689Skan	(is_gimple_non_addressable): Call it.
3957169689Skan	(is_gimple_call_clobbered): Call it.
3958169689Skan	* tree-simple.h (needs_to_live_in_memory): Declare.
3959169689Skan
3960169689Skan2003-12-14  Andreas Jaeger  <aj@suse.de>
3961169689Skan
3962169689Skan	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Handle
3963169689Skan	GNU F95.
3964169689Skan
3965169689Skan2003-12-14  Jan Hubicka  <jh@suse.cz>
3966169689Skan
3967169689Skan	* cgraphunit.c (cgraph_expand_function):  Release function body when no
3968169689Skan	longer needed.
3969169689Skan	(lookup_recursive_calls): New function.
3970169689Skan	(cgraph_decide_recursive_inlining): Likewise.
3971169689Skan	(cgraph_decide_inlining_of_small_functions): Do recursive inlining.
3972169689Skan	* tree-inline.c: Include function.h
3973169689Skan	(copy_body): Choose saved body for recursive inlining.
3974169689Skan	(initialize_inlined_parameters): Likewise.
3975169689Skan	(expand_call_inline): Do not verify nodes when recursivly inlining,
3976169689Skan	insert ret_label into decl map.
3977169689Skan	* params.def (PARAM_MAX_INLINE_INSNS_RECURSIVE,
3978169689Skan	PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO,
3979169689Skan	PARAM_MAX_INLINE_RECURSIVE_DEPTH,
3980169689Skan	PARAM_MAX_INLINE_RECURSIVE_DEPTH_AUTO): New argument.
3981169689Skan	* invoke.texi (max-inline-insns-recursive, max-inline-recursive-depth):
3982169689Skan	Document.
3983169689Skan	* Makefile.in (tree-inline.o): Include function.h.
3984169689Skan
3985169689Skan2003-12-14  Jan Hubicka  <jh@suse.cz>
3986169689Skan
3987169689Skan	* cgraphunit.c (record_call_1): Do not call analyze_expr hook
3988169689Skan	* langhooks-def.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Kill.
3989169689Skan	(LANG_HOOKS_CALLGRAPH_INITIALIZER): Update.
3990169689Skan	* longhooks.h (lang_hooks_for_callgraph): Kill analyze_expr.
3991169689Skan
3992169689Skan2003-12-13  Jan Hubicka  <jh@suse.cz>
3993169689Skan
3994169689Skan	* timevar.def (TV_TREE_STMT_VERIFY, TV_CFG_VERIFY, TV_CGRAPH_VERIFY):
3995169689Skan	New timers.
3996169689Skan	* tree-cfg.c (verify_stmts):  Push/pop timevar.
3997169689Skan	* cfg.c: Include timevar.h
3998169689Skan	(verify_flow_info): Push/pop timevar.
3999169689Skan	* Makefile.in (cfg.o): Add dependnecy on TIMEVARS
4000169689Skan
4001169689Skan	* cgraph.c (cgraph_create_edge): Sanity check for duplicates;
4002169689Skan	initialize aux.
4003169689Skan	(cgraph_remove_node): Decrease cgraph_n_nodes; do not clear
4004169689Skan	DECL_SAVED_TREE when dumping.
4005169689Skan	(cgraph_dump_node): Break out from ...; print more information.
4006169689Skan	(cgraph_dump): ... here.
4007169689Skan	* cgraph.h (cgraph_node): Add aux field.
4008169689Skan	(dump_cgraph_node, verify_cgraph, verify_cgraph_node): Declare.
4009169689Skan	(cgraph_mark_inline_edge): Declare
4010169689Skan	* cgraphunit.c (error_found): New static variable.
4011169689Skan	(verify_cgraph_node_1): New static function.
4012169689Skan	(verify_cgraph_node, verify_cgraph): New global function.
4013169689Skan	(cgraph_expand_function): More sanity checks.
4014169689Skan	(cgraph_clone_inline_nodes): Destructivly clone DECL_EXTERNAL nodes.
4015169689Skan	(cgraph_mark_inline_edge): Make global.
4016169689Skan	(cgraph_decide_inlining): Remove extern inline functions never inlined.
4017169689Skan	(cgraph_decide_inlining_incrementally): Verify that function body is
4018169689Skan	still present.
4019169689Skan	(expand_all_functions): Verify that all nodes are reachable.
4020169689Skan	(cgraph_optimize): Verify cgraph and memory management.
4021169689Skan	* tree-inline.c (copy_body_r): All edges must be present.
4022169689Skan	(expand_call_inline): Sanity check newly created edges and nodes
4023169689Skan	being inlined.
4024169689Skan	(optimize_inline_calls): Sanity check that we've inlined everything.
4025169689Skan	* tree-optimize.c (tree_rest_of_compilation): Clone functions inlined
4026169689Skan	into cloned node.
4027169689Skan
4028169689Skan2003-12-13  Jan Hubicka  <jh@suse.cz>
4029169689Skan
4030169689Skan	* tree-flow.h (tree_ssa_useless_type_conversion_1): Declare.
4031169689Skan	* tree-flow.c (tree_ssa_useless_type_conversion_1): Break out from
4032169689Skan	from...; allow complex types whose subtypes match.
4033169689Skan	(tree_ssa_useless_type_conversion): ... here.
4034169689Skan
4035169689Skan2003-12-12  Jeff Law  <law@redhat.com>
4036169689Skan
4037169689Skan	* tree-ssa-dom.c (optimize_stmt): Don't call cleanup_control_expr
4038169689Skan	here.  Instead just note that we need to cleanup the cfg (which
4039169689Skan	will DTRT).
4040169689Skan
4041169689Skan	* timevar.def (TV_TREE_SSA_THREAD_JUMPS): Kill.
4042169689Skan	* tree-dump.c (dump_files): Kill .thread dump.
4043169689Skan	* tree.h (TDI_thread_jumps): Kill.
4044169689Skan	* tree-flow.h (tree_ssa_dominator_thread_jumps): Kill prototype.
4045169689Skan	* tree-optimize.c (optimize_function_tree): Kill call to
4046169689Skan	tree_ssa_dominator_thread_jumps.
4047169689Skan	* tree-ssa-dom.c (thread_through_phis): Kill.  We no longer need
4048169689Skan	to restrict threading through PHIs.
4049169689Skan	(tree_ssa_dominator_thread_jumps): Kill.
4050169689Skan	(tree_ssa_domiantor_optimize_1): Fold back into
4051169689Skan	tree_ssa_dominator_optimize.
4052169689Skan	(tree_ssa_dominator_optimize): Mark back edges in the flow graph.
4053169689Skan	Kill code which conditionalized the walk_tree callbacks based
4054169689Skan	on thread_through_phis.  When threading jumps, reorganize code
4055169689Skan	so that we can take the affected variables out of SSA form.
4056169689Skan	Mark new variables created by out-of-ssa code as needing to be
4057169689Skan	rewritten.
4058169689Skan	(thread_across_edge): Always allow threading through phis.
4059169689Skan	(thread_jumps_walk_stmts): Kill.
4060169689Skan
4061169689Skan	* tree-ssa.c (create_temp): When we create a new temporary, make
4062169689Skan	sure to put it into referenced_vars, give it an ID number and
4063169689Skan	a suitable mem_tag.
4064169689Skan	(eliminate_build): If we encounter a PHI argument which is an
4065169689Skan	SSA_VAR we are not rewriting out of SSA form, then just treat
4066169689Skan	it like a constant.
4067169689Skan	(rewrite_vars_out_of_ssa): New function.
4068169689Skan	* tree-flow.h (rewrite_vars_out_of_ssa): Prototype.
4069169689Skan	* tree-ssa-live.c (register_ssa_partitions_for_vars): New function.
4070169689Skan	* tree-ssa-live.h (register_ssa_partitions_for_vars): Prototype.
4071169689Skan
4072169689Skan2003-12-12  Jan Hubicka  <jh@suse.cz>
4073169689Skan
4074169689Skan	* tree-inline.c (remap_decl): Avoid invalid sharing.
4075169689Skan	* cp-tree.h (optimize_function): Kill.
4076169689Skan	* optimize.c (optimize_function): Kill.
4077169689Skan	* semantics.c (expand_body): Do not call optimize_function.
4078169689Skan
4079169689Skan2003-12-12  Jan Hubicka  <jh@suse.cz>
4080169689Skan
4081169689Skan	* cgraphunit.c (cgraph_optimize):  Do not decide inlining when not
4082169689Skan	inlining
4083169689Skan
4084169689Skan2003-12-11  Jan Hubicka  <jh@suse.cz>
4085169689Skan
4086169689Skan	* tree-inline.c (initialize_inlined_parameters): Disable
4087169689Skan	constant propagation for non-gimple-min-invariant when
4088169689Skan	preserving gimple form.
4089169689Skan
4090169689Skan2003-12-11  Jeff Law  <law@redhat.com>
4091169689Skan
4092169689Skan	* tree-ssa-ccp.c (widen_bitfield): Clear out unwanted high bits
4093169689Skan	even if the field's type is unsigned.
4094169689Skan	* tree-ssa-dom.c (record_equivalences_from_stmt): When creating
4095169689Skan	equivalences from stores, be more careful about non-constant
4096169689Skan	stores to bitfields.
4097169689Skan
4098169689Skan2003-12-11  Diego Novillo  <dnovillo@redhat.com>
4099169689Skan
4100169689Skan	* opts.c (decode_options): Do not enable the tree loop optimizer by
4101169689Skan	default.
4102169689Skan	* tree-ssa-loop.c (tree_ssa_loop_opt): Remove ENABLE_CHECKING
4103169689Skan	guards.
4104169689Skan
4105169689Skan2003-12-10  Richard Henderson  <rth@redhat.com>
4106169689Skan
4107169689Skan	* builtins.c (expand_builtin_profile_func): New.
4108169689Skan	(expand_builtin): Use it.
4109169689Skan	* builtins.def (BUILT_IN_PROFILE_FUNC_ENTER): New.
4110169689Skan	(BUILT_IN_PROFILE_FUNC_EXIT): New.
4111169689Skan	* function.c (expand_function_start, expand_function_end): Don't
4112169689Skan	do function instrumentation here.
4113169689Skan	* gimplify.c (gimplify_function_tree): Do it here.
4114169689Skan
4115169689Skan	* c-opts.c (c_common_post_options): Don't ever use rtl inlining.
4116169689Skan
4117169689Skan2003-12-10  Diego Novillo  <dnovillo@redhat.com>
4118169689Skan
4119169689Skan	* ifcvt.c (dead_or_predicable): Initialize local variable
4120169689Skan	'earliest'.
4121169689Skan	* tree-cfg.c (verify_stmt): Fix typo.
4122169689Skan	* tree-ssa-dom.c (propagate_value): New local function.
4123169689Skan	(cprop_into_stmt): Call it.
4124169689Skan	(cprop_into_phis): Call it.
4125169689Skan	(eliminate_redundant_computations): Call it.
4126169689Skan
4127169689Skan2003-12-10  Dale Johannesen  <dalej@apple.com>
4128169689Skan
4129169689Skan	* tree-dfa.c (compute_alias_sets):  Don't try to make
4130169689Skan	GLOBAL_VAR alias itself.
4131169689Skan
4132169689Skan2003-12-08  Steven Bosscher  <stevenb@suse.de>
4133169689Skan
4134169689Skan	* tree-must-alias.c (tree_compute_must_alias): Use
4135169689Skan	num_call_clobbered_vars and call_clobbered_var() instead of
4136169689Skan	poking in the call_clobbered_vars varray directly.
4137169689Skan
4138169689Skan2003-12-11  Jan Hubicka  <jh@suse.cz>
4139169689Skan
4140169689Skan	* cgraph.c (cgraph_function_possibly_inlined_p): Fix syntax error on
4141169689Skan	gcc-2.95.
4142169689Skan
4143169689Skan2003-12-10  Diego Novillo  <dnovillo@redhat.com>
4144169689Skan
4145169689Skan	Revert
4146169689Skan
4147169689Skan	2003-12-07  Richard Henderson  <rth@redhat.com>
4148169689Skan
4149169689Skan		* c-common.c (c_address_looks_like_offsetof): New.
4150169689Skan		* c-common.h (c_address_looks_like_offsetof): Declare.
4151169689Skan		* c-typeck.c (build_unary_op) <ADDR_EXPR>: Use it.  Don't lower
4152169689Skan		address references not destined for offsetof.
4153169689Skan		(c_expand_return): Only look inside ARRAY_REF and COMPONENT_REF
4154169689Skan		when looking for returning address of local variable.
4155169689Skan		* expr.c (expand_expr_1): Don't dereference size
4156169689Skan		of unbounded arrays.
4157169689Skan		* gimplify.c (gimplify_addr_expr): Only fold
4158169689Skan		address of variable size array elements.
4159169689Skan		* tree-simple.c (is_gimple_min_invariant): Also check
4160169689Skan		is_gimple_variable before disallowing offset address for type.
4161169689Skan		* tree-ssa-ccp.c (maybe_fold_offset_to_aggregate_ref): New.
4162169689Skan		(maybe_fold_offset_to_component_ref): Use it.
4163169689Skan		(maybe_fold_stmt_indirect, maybe_fold_stmt_plus): Likewise.
4164169689Skan		(maybe_fold_offset_to_array_ref): Likewise.
4165169689Skan		Don't fail for division remainder non-zero.
4166169689Skan		* varasm.c (initializer_constant_valid_p) <ADDR_EXPR>: Use
4167169689Skan		handled_component_p and look inside references.
4168169689Skan		<MINUS_EXPR>: Always look past widening casts.
4169169689Skan
4170169689Skan2003-12-09  Jan Hubicka  <jh@suse.cz>
4171169689Skan
4172169689Skan	* cgraph.c (cgraph_inline_hash): New global variable.
4173169689Skan	(cgraph_create_node): Break out of ....
4174169689Skan	(cgraph_node): ... this one.
4175169689Skan	(cgraph_redirect_edge_callee):  New function.
4176169689Skan	(cgraph_remove_node): Aggressively elliminate dead nodes;
4177169689Skan	remove node out of clone list.
4178169689Skan	(dump_cgraph): Dump inlined_to field; dump uid numbers.
4179169689Skan	(cgraph_clone_edge): Return edge created.
4180169689Skan	(cgraph_clone_node): New.
4181169689Skan	(cgraph_function_possibly_inlined_p): Re-implement using hashtable.
4182169689Skan	* cgraph.h: Include hashtab.h
4183169689Skan	(struct cgraph_global_info): Kill inline_once, will be output and
4184169689Skan	cloned_times fields.  Add inlined_to field.
4185169689Skan	(cgraph_node): Add next_clone.
4186169689Skan	(cgraph_inline_hash): Declare.
4187169689Skan	(cgraph_clone_edge): Update prototype.
4188169689Skan	(cgraph_clone_node, cgraph_redirect_callee): Declare.
4189169689Skan	* cgraphunit.c (cgraph_optimize_function): Kill.
4190169689Skan	(cgraph_assemble_function): Kill next_needed to avoid GGC corruption.
4191169689Skan	(cgraph_analyze_function): Do not intialize cloned_times and
4192169689Skan	will_be_output.
4193169689Skan	(cgraph_finalize_compilation_unit):  Clear next_needed.
4194169689Skan	(cgraph_optimize_function): Kill.
4195169689Skan	(cgraph_expand_function): Do not use cgraph_optimize_function.
4196169689Skan	(cgraph_estimate_growth, cgraph_mark_inline,
4197169689Skan	cgraph_check_inline_limits, cgraph_recursive_inlining_p,
4198169689Skan	cgraph_preserve_function_body_p): Update for explicit clones.
4199169689Skan	(INLINED_TIMES, SET_INLINED_TIMES, cgraph_inlined_into,
4200169689Skan	cgraph_inlined_callees, struct cgraph_inline_context,
4201169689Skan	cgraph_create_inline_context, cgraph_free_inline_context,
4202169689Skan	cgraph_inline_context_set_caller, cgraph_inline_context_clear_caller,
4203169689Skan	cgraph_inline_context_set_callee, cgraph_inline_context_clear_callee,
4204169689Skan	update_callee_keys): Kill.
4205169689Skan	(cgraph_clone_inlined_nodes, cgraph_mark_inline_edge): New.
4206169689Skan	(cgraph_decide_inlining_of_small_functions, (cgraph_decide_inlining,
4207169689Skan	cgraph_decide_inlining_incrementally): Simplify.
4208169689Skan	* tree-inline.c (typedef struct_inline_data): New field saving_p.
4209169689Skan	(copy_body_r): Update all clones.
4210169689Skan	(expand_call_inline): Remove inlined cgraph node.
4211169689Skan	(save_body): Inicialize id.node and id.saving_p.
4212169689Skan	* tree-optimize.c (tree_rest_of_compilation): Maintain clone up-to-date
4213169689Skan	in no-unit-at-a-time mode.
4214169689Skan
4215169689Skan2003-12-08  Steven Bosscher  <stevenb@suse.de>
4216169689Skan
4217169689Skan	* tree-optimize.c (optimize_function_tree): Move verify_ssa calls
4218169689Skan	into conditionals.
4219169689Skan
4220169689Skan2003-12-08  Daniel Berlin  <dberlin@dberlin.org>
4221169689Skan
4222169689Skan	* tree-alias-ander.c (andersen_same_points_to_set): Fix memory leak.
4223169689Skan
4224169689Skan2003-12-08  Jeff Law  <law@redhat.com>
4225169689Skan
4226169689Skan	* tree-ssa-live.c (register_ssa_partition): Kill legacy code which
4227169689Skan	recursively called register_ssa_partition on PHI arguments when
4228169689Skan	SSA_VAR was defined by a PHI_NODE.
4229169689Skan
4230169689Skan2003-12-08  Jan Hubicka  <jh@suse.cz>
4231169689Skan
4232169689Skan	* tree-dump.c (dump_files): Fix ordering of tail call pass.
4233169689Skan	* tree.h (tree_dump_index): Likewise.
4234169689Skan
4235169689Skan2003-12-08  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4236169689Skan
4237169689Skan	* Makefile.in (tree-cfg.o): Add gt-tree-cfg.h dependency.
4238169689Skan	(GTFILES): Add tree-cfg.c.
4239169689Skan	* tree-cfg.c: Include gt-tree-cfg.h.
4240169689Skan	(factored_computed_goto_label, factored_computed_goto):
4241169689Skan	Mark gc roots.
4242169689Skan
4243169689Skan2003-12-08  Steven Bosscher  <stevenb@suse.de>
4244169689Skan	    Jan Hubicka  <jh@suse.de>
4245169689Skan
4246169689Skan	* gengtype-lex.l (IWOrD): Add HOST_WIDEST_INT
4247169689Skan	* Makefile.in (function.o, reg-stack.o): Add missing dependency on
4248169689Skan	basic-block.h.
4249169689Skan	(GTFILES): Add basic-block.h and hwint.h.
4250169689Skan	* basic-block.h (struct edge_def): Add GTY markers, make garbage
4251169689Skan	collectable.  Make `insns' field GC safe depending on the setting
4252169689Skan	of cfg_hooks.
4253169689Skan	(struct basic_block_def): Add GTY markers, make garbage collectable.
4254169689Skan	(tree_bb_root, tree_phi_root): Kill extern decls.
4255169689Skan	(ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR): Change from macro to variable
4256169689Skan	(entry_exit_blocks): Kill.
4257169689Skan	* cfg.c: Include ggc.h
4258169689Skan	(bb_pool, edge_pool, entry_exit_blocks): Kill.
4259169689Skan	(ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR): Define.
4260169689Skan	(init_flow): Do not create ppols; allocate entry/exit block.
4261169689Skan	(free_edge, alloc_block, expunge_block, unchecked_make_edge): Use GGC.
4262169689Skan	(compact_blocks): Don't update tree_bb_root and tree_phi_root.
4263169689Skan	* cfgrtl.c (rtl_merge_blocks): Clear head pointer.
4264169689Skan	* regs.h: Protect against multiple inclusion.
4265169689Skan	* tree-cfg.c (obstack_tree_ann_obstack, first_block_tree_and_obj,
4266169689Skan	tree_bb_root): Kill.
4267169689Skan	(build_tree_cfg, create_bb, remove_bb, delete_tree_cfg): Don't
4268169689Skan	touch tree_bb_root and tree_phi_root.
4269169689Skan	(create_block_annotations): Do not initialize obstack.
4270169689Skan	(free_block_annotations): Do not free obstack.
4271169689Skan	(create_block_annotation): Use GGC.
4272169689Skan	* tree-dfa.c (tree_phi_root): Kill.
4273169689Skan	* tree-flow.h (bb_ann, bb_ann_d): Declare.  Add `phi_nodes' field.
4274169689Skan	* tree-phinodes.c (create_phi_node, add_phi_arg, remove_phi_node,
4275169689Skan	remove_all_phi_nodes_for): Use `phi_nodes' field in the bb
4276169689Skan	annotation instead of tree_phi_root.
4277169689Skan	* tree-flow-inline.h (phi_nodes, set_phi_nodes): Likewise.
4278169689Skan	(add_dom_child, clear_dom_children): Use GGC.
4279169689Skan	* tree-ssa-pre.c (code_motion): Use `phi_nodes' field in the bb
4280169689Skan	annotation instead of tree_phi_root.
4281169689Skan	* varray.h (union varray_data): Make basic_block_def and edge_def
4282169689Skan	varrays garbage collectable.
4283169689Skan
4284169689Skan2003-12-07  Richard Henderson  <rth@redhat.com>
4285169689Skan
4286169689Skan	* c-common.c (c_address_looks_like_offsetof): New.
4287169689Skan	* c-common.h (c_address_looks_like_offsetof): Declare.
4288169689Skan	* c-typeck.c (build_unary_op) <ADDR_EXPR>: Use it.  Don't lower
4289169689Skan	address references not destined for offsetof.
4290169689Skan	(c_expand_return): Only look inside ARRAY_REF and COMPONENT_REF
4291169689Skan	when looking for returning address of local variable.
4292169689Skan	* expr.c (expand_expr_1): Don't dereference size of unbounded arrays.
4293169689Skan	* gimplify.c (gimplify_addr_expr): Only fold address of variable size
4294169689Skan	array elements.
4295169689Skan	* tree-simple.c (is_gimple_min_invariant): Also check
4296169689Skan	is_gimple_variable before disallowing offset address for type.
4297169689Skan	* tree-ssa-ccp.c (maybe_fold_offset_to_aggregate_ref): New.
4298169689Skan	(maybe_fold_offset_to_component_ref): Use it.
4299169689Skan	(maybe_fold_stmt_indirect, maybe_fold_stmt_plus): Likewise.
4300169689Skan	(maybe_fold_offset_to_array_ref): Likewise.  Don't fail for division
4301169689Skan	remainder non-zero.
4302169689Skan	* varasm.c (initializer_constant_valid_p) <ADDR_EXPR>: Use
4303169689Skan	handled_component_p and look inside references.
4304169689Skan	<MINUS_EXPR>: Always look past widening casts.
4305169689Skan
4306169689Skan2003-12-07  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4307169689Skan
4308169689Skan	* tree-cfg.c (compute_dominance_frontiers): Don't assume that
4309169689Skan	the first block has index 0.
4310169689Skan
4311169689Skan2003-12-07  Jan Hubicka  <jh@suse.cz>
4312169689Skan
4313169689Skan	* cgraph.c (create_edge): Rename to ...
4314169689Skan	(cgraph_create_edge): ... this one; accept call_expr as operand.
4315169689Skan	(cgraph_edge): New function
4316169689Skan	(cgraph_remove_edge): Use edge as argument
4317169689Skan	(cgraph_record_call, cgraph_remove_call): Kill.
4318169689Skan	(clone_cgraphedge): New function.
4319169689Skan	* cgraph.h (cgraph_edge): Add call_expr argument; add chain_next.
4320169689Skan	(cgraph_record_call, cgraph_remove_call): Kill prototype.
4321169689Skan	(cgraph_remove_call, cgraph_inline_p): Update prototype.
4322169689Skan	(cgraph_clone_edge): Declare.
4323169689Skan	* cgraphunit.c (cgraph_finalize_function): Update use of
4324169689Skan	cgraph_remove_edge
4325169689Skan	(record_call_1): Use cgraph_create_edge; record builtins too.
4326169689Skan	(cgraph_create_edges): Accept node instead of decl.
4327169689Skan	(cgraph_analyze_function): Update use cgraph_create_edges.
4328169689Skan	(cgraph_inline_p): Accept edge.
4329169689Skan	* tree-inline.c (inline_data): Replace decl and current_decl
4330169689Skan	by node and current_node.
4331169689Skan	(copy_body_r): Clone edges.
4332169689Skan	(expand_call_inline): Do not create inlined edges.
4333169689Skan	(optimize_inline_call): Set id->current_node, id->node.
4334169689Skan	* tree-optimize.c (tree_rest_of_compilation): Update cgraph edges after
4335169689Skan	compiling.
4336169689Skan
4337169689Skan2003-12-07  Diego Novillo  <dnovillo@redhat.com>
4338169689Skan
4339169689Skan	* tree-ssa-loop.c (dump_file, dump_flags): Only declare with
4340169689Skan	checking enabled.
4341169689Skan	(tree_ssa_loop_opt): Mark arguments with ATTRIBUTE_UNUSED.
4342169689Skan
4343169689Skan2003-12-07  Richard Henderson  <rth@redhat.com>
4344169689Skan
4345169689Skan	* function.h (struct function): Add last_label_uid.
4346169689Skan	* tree-cfg.c (set_bb_for_stmt): Use it.
4347169689Skan	(delete_tree_cfg): Clear label_to_block_map.
4348169689Skan
4349169689Skan	* gimple-low.c (lower_stmt_body): Export.
4350169689Skan	(lower_stmt): Allow data to be null.
4351169689Skan	* gimplify.c (declare_tmp_vars): Make static.
4352169689Skan	(push_gimplify_context): Export.
4353169689Skan	(pop_gimplify_context): Export.  Put the temps somewhere.
4354169689Skan	(gimplify_body): Don't declare_tmp_vars here.
4355169689Skan	* tree-flow.h, tree-simple.h: Update for new decls.
4356169689Skan
4357169689Skan	* tree-mudflap.c (mf_build_string): New.
4358169689Skan	(mudflap_c_function_decls): Push and pop gimplify context, don't
4359169689Skan	gimplify here.  Dump pass 1.
4360169689Skan	(mudflap_c_function_ops): Similarly.
4361169689Skan	(mf_decl_cache_locals): Gimplify eveything as we go along.
4362169689Skan	(mf_build_check_statement_for): Likewise.
4363169689Skan	(mf_mostly_copy_tree_r): Remove.
4364169689Skan	(mf_varname_tree): Use mf_build_string.
4365169689Skan	(mf_file_function_line_tree): Rewrite.
4366169689Skan	(mf_offset_expr_of_array_ref): Remove.
4367169689Skan	(mx_xfn_indirect_ref): Remove.
4368169689Skan	(mf_xform_derefs_1): New.
4369169689Skan	(mf_xform_derefs): Rewrite to expect gimple.
4370169689Skan	(mx_register_decls): Use build_function_call_expr.
4371169689Skan	(mudflap_enqueue_constant): Use mf_build_string.
4372169689Skan	* tree-optimize.c (tree_rest_of_compilation): Reorder mudflap bits.
4373169689Skan	* tree-dump.c (dump_files): Split mudflap to parts 1 and 2.
4374169689Skan	* tree.h (enum tree_dump_index): Likewise.
4375169689Skan
4376169689Skan2003-12-06  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4377169689Skan
4378169689Skan	* tree-ssa-loop.c: New.
4379169689Skan	* Makefile.in (tree-ssa-loop.o): New.
4380169689Skan	* common.opt (ftree-loop-optimize): Add.
4381169689Skan	* flags.h (flag_tree_loop): Declare.
4382169689Skan	* opts.c (decode_options): Enable flag_tree_loop at -O1.
4383169689Skan	(common_handle_option): Handle OPT_ftree_loop_optimize.
4384169689Skan	* timevar.def (TV_TREE_LOOP): New.
4385169689Skan	* toplev.c (flag_tree_loop): New.
4386169689Skan	(f_options): Add -ftree-loop-optimize.
4387169689Skan	* tree-cfg.c (build_tree_cfg): Remove disabled loop optimizer
4388169689Skan	initialization.
4389169689Skan	(tree_make_forwarder_block): Update phi nodes.
4390169689Skan	(tree_loop_optimizer_init): Don't call force_single_succ_latches.
4391169689Skan	(tree_try_redirect_by_replacing_jump): Comment fix.
4392169689Skan	* tree-dump.c (dump_files): Add .loop dump.
4393169689Skan	* tree-flow.h (tree_ssa_loop_opt, set_phi_nodes): Declare.
4394169689Skan	* tree-optimize.c (optimize_function_tree): Call tree_ssa_loop_opt.
4395169689Skan	* tree.h (enum tree_dump_index): Add TDI_loop.
4396169689Skan	* tree-flow-inline.h (set_phi_nodes): New.
4397169689Skan	* doc/invoke.texi (-fdump-tree-loop, -ftree-loop-optimize): Document.
4398169689Skan
4399169689Skan2003-12-05  Jeff Law  <law@redhat.com>
4400169689Skan
4401169689Skan	* tree-dfa.c (mark_new_vars_to_rename): Change VARS_TO_RENAME to be
4402169689Skan	a "bitmap" instead of an "sbitmap".  Callers updated.
4403169689Skan	* tree-must-alias.c (promote_var): Likewise.
4404169689Skan	(tree_compute_must_alias): Likewise.
4405169689Skan	* tree-phinodes.c (remove_all_phi_nodes_for): Likewise.
4406169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_thread_jumps): Likewise.
4407169689Skan	(tree_ssa_dominator_optimize): Likewise.
4408169689Skan	(tree_ssa_dominator_optimize_1): Likewise.
4409169689Skan	* tree-ssa-pre.c (pre_expression): Likewise.
4410169689Skan	(tree_perform_ssapre): Likewise.
4411169689Skan	* tree-ssa.c (rewrite_into_ssa): Likewise.
4412169689Skan	(insert_phi_nodes): If VARS_TO_RENAME is zero, then examine
4413169689Skan	each node to determine if we need to insert a PHI.
4414169689Skan	(prepare_operand_for_rename): If VARS_TO_RENAME is zero, then
4415169689Skan	assume the operand needs renaming.
4416169689Skan	* tree-ssa-ccp.c (substitute_and_fold): Change VARS_TO_RENAME to
4417169689Skan	be a "bitmap" instead of an "sbitmap".  Callers updated.
4418169689Skan	(tree_ssa_ccp): Likewise.  Also make sure timevar_pop encloses
4419169689Skan	entire function.
4420169689Skan	(scalarize_modify_expr): Likewise.
4421169689Skan	* tree-sra.c (create_scalar_copies): Change VARS_TO_RENAME to
4422169689Skan	be a "bitmap" instead of an "sbitmap".  Callers updated.
4423169689Skan	(tree_sra): Likewise.
4424169689Skan	* tree-optimize.c (optimize_function_tree): Make VARS_TO_RENAME
4425169689Skan	be a "bitmap" instead of an "sbitmap".
4426169689Skan	* tree-flow.h: Update various prototypes.
4427169689Skan
4428169689Skan2003-12-05  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4429169689Skan
4430169689Skan	* tree-cfg.c (remove_useless_stmts_goto, remove_useless_stmts): Move
4431169689Skan	handling of factored_computed_goto ...
4432169689Skan	(disband_implicit_edges): ... here.
4433169689Skan
4434169689Skan2003-12-05  Jan Hubicka  <jh@suse.cz>
4435169689Skan
4436169689Skan	* tree-eh.c (tree_could_trap_p): Fix warning.
4437169689Skan	* expr.c (expand_expr): Fix warning on uninitialized last.
4438169689Skan
4439169689Skan2003-12-04  Jeff Law  <law@redhat.com>
4440169689Skan
4441169689Skan	* tree-ssa.c (rewrite_trees): Do not unconditionally overwrite
4442169689Skan	variables set by statements.  Let replace_variable do any
4443169689Skan	required rewriting.
4444169689Skan
4445169689Skan2003-12-04  Richard Henderson  <rth@redhat.com>
4446169689Skan
4447169689Skan	* c-parse.in (primary): Use annotate_with_locus instead of
4448169689Skan	STMT_LINENO for STMT_EXPR.
4449169689Skan	* c-simplify.c (gimplify_stmt_expr): Likewise.
4450169689Skan
4451169689Skan2003-12-04  Jan Hubicka  <jh@suse.cz>
4452169689Skan
4453169689Skan	* tree-dump.c (dump_files): Reorder tailcall and mustalias
4454169689Skan	* tree.h (tree_dump_index): Likewise.
4455169689Skan	* tree-optimize.c (optimize_function_tree): Do tail call after mustalias.
4456169689Skan
4457169689Skan2003-12-04  Diego Novillo  <dnovillo@redhat.com>
4458169689Skan
4459169689Skan	* tree-dfa.c (opf_none, opf_is_def, opf_no_vops): Change to #define.
4460169689Skan
4461169689Skan2003-12-04  Canqun Yang  <canqun@nudt.edu.cn>
4462169689Skan
4463169689Skan	* stor-layout.c (update_alignment_for_field): Export.
4464169689Skan	* tree.h (update_alignment_for_field): Declare.
4465169689Skan
4466169689Skan2003-12-03  Andrew Haley  <aph@redhat.com>
4467169689Skan
4468169689Skan	* tree-eh.c (tree_could_trap_p): Add division instructions.
4469169689Skan	* expr.c (expand_expr): Check the EH region of an expression and
4470169689Skan	mark all the insns that result from its expansion with the
4471169689Skan	appropriate REG_EH_REGION.
4472169689Skan
4473169689Skan2003-12-03  Jan Hubicka  <jh@suse.cz>
4474169689Skan
4475169689Skan	* tree-cfg.c (verify_addr_expr, verify_stmt, tree_node_shared_p,
4476169689Skan	verify_stmts):  New functions.
4477169689Skan	(verify_flow_info): Remove PHI checking code.
4478169689Skan	* tree-flow.h (verify_stmt, verify_stmts): Declare.
4479169689Skan	* tree-inline.h (walk_tree, walk_tree_without_duplicates): Move
4480169689Skan	prototypes ...
4481169689Skan	* tree.h (walk_tree, walk_tree_without_duplicates): ... here.
4482169689Skan
4483169689Skan2003-12-03  Jan Hubicka  <jh@suse.cz>
4484169689Skan	    Diego Novillo <dnovillo@redhat.com>
4485169689Skan
4486169689Skan	* tree-ssa.c (verify_def, verify_use, verify_phi_args): New static
4487169689Skan	functions.
4488169689Skan	(verify_ssa): New global function.
4489169689Skan	* tree-flow.h (verify_ssa): Declare.
4490169689Skan	* tree-optimize.c (optimize_function_tree): Call it.
4491169689Skan
4492169689Skan2003-12-03  Diego Novillo  <dnovillo@redhat.com>
4493169689Skan
4494169689Skan	* timevar.def (TV_TREE_SSA_VERIFY): New timer.
4495169689Skan	* tree-sra.c (create_scalar_copies): Always mark the previous
4496169689Skan	variables on the LHS for renaming.
4497169689Skan	Do not emit unnecessary assignments from VA_ARG_EXPRs.
4498169689Skan	(scalarize_modify_expr): Similarly, when scalarizing the LHS of a
4499169689Skan	COMPONENT_REF assignment.
4500169689Skan	* tree-must-alias.c (tree_compute_must_alias): Do not promote
4501169689Skan	variables with hidden uses.
4502169689Skan	* tree-ssa-ccp.c (set_rhs): When replacing the whole statement, reset
4503169689Skan	SSA_NAME_DEF_STMT for all the SSA_NAMEs in vdef and def
4504169689Skan	operands.
4505169689Skan
4506169689Skan2003-12-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4507169689Skan	    Diego Novillo  <dnovillo@redhat.com>
4508169689Skan
4509169689Skan	* tree-dfa.c (opf_no_vops): New.
4510169689Skan	(add_stmt_operand): Don't create virtual operands when opf_no_vops
4511169689Skan	is passed in flags.
4512169689Skan	(get_expr_operands): Set opf_no_vops flag before diving into the
4513169689Skan	operand of an ADDR_EXPR node.
4514169689Skan
4515169689Skan2003-12-03  Richard Henderson  <rth@redhat.com>
4516169689Skan
4517169689Skan	* tree-simple.c (is_gimple_min_invariant): Disallow offset of
4518169689Skan	address of a scalar.
4519169689Skan
4520169689Skan	* c-parse.in (primary): Set STMT_LINENO on STMT_EXPR.
4521169689Skan	* c-simplify.c (gimplify_stmt_expr): Be prepared for last_stmt
4522169689Skan	to be null.
4523169689Skan
4524169689Skan2003-12-03  Daniel Berlin  <dberlin@dberlin.org>
4525169689Skan
4526169689Skan	Fix PR 13177
4527169689Skan	* tree-ssa-pre.c (code_motion): Do phi nodes last, and rearrange
4528169689Skan	how we decide what temporary to choose so that we get it right.
4529169689Skan
4530169689Skan2003-12-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4531169689Skan
4532169689Skan	* tree-dfa.c (get_expr_operands): Don't record VUSEs for invariant
4533169689Skan	adresses.
4534169689Skan
4535169689Skan2003-12-03  Brian Booth  <bbooth@redhat.com>
4536169689Skan
4537169689Skan	* tree-pretty-print.c (dump_phi_nodes): Removed superfluous ampersand.
4538169689Skan
4539169689Skan2003-12-03  Jeff Law  <law@redhat.com>
4540169689Skan
4541169689Skan	* ggc-page.c: Resync with mainline sources.  Remove tree-ssa
4542169689Skan	specific hack which disabled special GC pagesizes for 2 operand
4543169689Skan	tree expressions.
4544169689Skan
4545169689Skan	* tree-ssa.c (mark_def_sites): Call prepare_operand_for_rename
4546169689Skan	on the VDEF_RESULT as well, providing a dummy uid argument.
4547169689Skan
4548169689Skan	* tree-phinodes.c: Include rtl.h for ceil_log2.
4549169689Skan	(ideal_phi_node_len): New function.
4550169689Skan	(resize_phi_node): Make static.
4551169689Skan	(make_phi_node): Use ideal_phi_node_len.
4552169689Skan	(add_phi_arg): Likewise.
4553169689Skan	* tree.h (resize_phi_node): Remove prototype.
4554169689Skan	* Makefile.in (tree-phinodes.o): Depend on $(RTL_H).
4555169689Skan
4556169689Skan2003-12-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4557169689Skan
4558169689Skan	* tree-cfg.c: (make_edges): Eliminate fallthru to exit.
4559169689Skan	(make_ctrl_stmt_edges): Nonlocal goto handling moved to
4560169689Skan	make_goto_expr_edges.
4561169689Skan	(make_goto_expr_edges): Remove simple gotos.
4562169689Skan	(cfg_remove_useless_stmts_bb): Goto removal cancelled.
4563169689Skan	(cleanup_cond_expr_graph, cleanup_switch_expr_graph):
4564169689Skan	Replaced by ...
4565169689Skan	(cleanup_control_expr_graph): New.
4566169689Skan	(cleanup_control_flow): Use it.
4567169689Skan	(disband_implicit_edges): New.
4568169689Skan	(tree_find_edge_insert_loc): Never insert before a control statement.
4569169689Skan	(tree_split_edge, thread_jumps, tree_try_redirect_by_replacing_jump,
4570169689Skan	tree_redirect_edge_and_branch): Work over no-gotos form.
4571169689Skan	(tree_verify_flow_info): Check no-gotos form invariants.
4572169689Skan	* tree-pretty-print.c (pp_cfg_jump, dump_implicit_edges): New.
4573169689Skan	(dump_generic_bb_buff): Call dump_implicit_edges.
4574169689Skan	* tree-flow.h (cleanup_cond_expr_graph, cleanup_switch_expr_graph):
4575169689Skan	Declaration removed.
4576169689Skan	(cleanup_control_expr_graph, delete_tree_ssa, disband_implicit_edges):
4577169689Skan	Declare.
4578169689Skan	* tree-optimize.c (tree_ssa_finish): New.
4579169689Skan	(optimize_function_tree): Call it.
4580169689Skan	* tree-ssa-dom.c (thread_jumps_walk_stmts, optimize_stmt): Use
4581169689Skan	cleanup_control_expr_graph.
4582169689Skan	* tree-ssa.c (delete_tree_ssa): Export, work even if there are no
4583169689Skan	referenced_vars.
4584169689Skan	(rewrite_out_of_ssa): Don't call it.
4585169689Skan
4586169689Skan2003-12-03  Jan Hubicka  <jh@suse.cz>
4587169689Skan
4588169689Skan	* tree-ssa.dom.c (tree_ssa_domionator_thread_jumps): Mark back edges.
4589169689Skan	(thread_across_edge): Do not thread across loop headers.
4590169689Skan
4591169689Skan	* Makefile.in (tree-optimize.o): Depend on cgraph.h
4592169689Skan	* cgraph.h (cgraph_preserve_function_body_p): Declare.
4593169689Skan	* cgraphunit.c (cgraph_preserve_function_body_p): New function.
4594169689Skan	* tree-optimize.c: Include cgraph.h
4595169689Skan	(clear_decl_rtl): Kill.
4596169689Skan	(tree_rest_of_compilation): Use cgraph_preserve_function_body_p;
4597169689Skan	do not clear DECL_RTL; do final ggc in the pushed context for nested
4598169689Skan	functions;
4599169689Skan
4600169689Skan2003-12-02  Jeff Law  <law@redhat.com>
4601169689Skan
4602169689Skan	* tree-ssa-dom.c (optimize_stmt): Accept and pass down dominator
4603169689Skan	walker structure instead of individual varrays.  Callers updated.
4604169689Skan	(eliminate_redundant_computations): Likewise.
4605169689Skan	(simplify_rhs_and_lookup_avail_expr): Likewise.  Cache and update
4606169689Skan	a dummy COND_EXPR when querying the hash tables when transforming
4607169689Skan	DIV/MOD into RSHIFT/BIT_AND or ABS_EXPR into NEG_EXPR.
4608169689Skan	(dom_opt_walk_stmts): Don't reload the block data pointer each
4609169689Skan	iteration of the loop.  Load it once outside the loop.
4610169689Skan
4611169689Skan	* tree-dfa.c (cleanup_operand_arrays): Avoid creating a new
4612169689Skan	varray for the vuse operands.
4613169689Skan
4614169689Skan	* tree-ssa-dom.c (extract_range_from_cond): Use int_const_binop to
4615169689Skan	avoid creating useless tree nodes.
4616169689Skan
4617169689Skan	* tree-phinodes.c (add_phi_arg): If we receive a new node from
4618169689Skan	resize_phi_node, then release the old node and update the PHI
4619169689Skan	chain.
4620169689Skan
4621169689Skan2003-12-02  Brian Booth  <bbooth@redhat.com>
4622169689Skan
4623169689Skan	* tree-pretty-print.c (dump_phi_nodes): Added code to always show phi
4624169689Skan	nodes of regular gimple scalars.
4625169689Skan	(dump_generic_bb_buff): Removed condition upon which to show phi nodes.
4626169689Skan
4627169689Skan2003-12-02  Jan Hubicka  <jh@suse.cz>
4628169689Skan
4629169689Skan	* tree-optimize.c (optimize_function_tree): Invoke ggc_collect in
4630169689Skan	between optimization passes.
4631169689Skan
4632169689Skan2003-12-02  Daniel Berlin  <dberlin@dberlin.org>
4633169689Skan
4634169689Skan	* tree-sra.c (can_be_scalarized_p): Print details about why something
4635169689Skan	could not be scalarized to the dump file.
4636169689Skan
4637169689Skan2003-12-01  Jeff Law  <law@redhat.com>
4638169689Skan
4639169689Skan	* Makefile.in (OBJS-common): Add tree-phinodes.o.
4640169689Skan	(tree-phinodes.o): Add dependencies.
4641169689Skan	(GTFILES): Add tree-phinodes.c.
4642169689Skan	* tree-phinodes.c: New file.
4643169689Skan	* tree-dfa.c (create_phi_node): Moved to tree-phinodes.o.
4644169689Skan	(add_phi_arg, remove_phi_arg, remove_phi_arg_num): Similarly.
4645169689Skan	(remove_phi_node, remove_all_phi_nodes_for): Similarly.
4646169689Skan	* tree-ssa.c (init_tree_ssa): Initialize PHI node management.
4647169689Skan	(delete_tree_ssa): Finalize PHI node management.
4648169689Skan	* tree.c (dump_tree_statistics): Dump PHI node stats.
4649169689Skan	(make_phi_node, resize_phi_node): Moved to tree-phinodes.o.
4650169689Skan	* tree.h (init_phinodes): Prototype.
4651169689Skan	(fini_phinodes, release_phi_node): Likewise.
4652169689Skan	(phinodes_print_statistics): Likewise.
4653169689Skan
4654169689Skan2003-12-01  Richard Henderson  <rth@redhat.com>
4655169689Skan
4656169689Skan	* tree-dfa.c (get_expr_operands): Don't handle PLUS_EXPR inside
4657169689Skan	INDIRECT_REF.
4658169689Skan	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use int_const_binop.
4659169689Skan	(maybe_fold_offset_to_component_ref): Likewise.
4660169689Skan	(maybe_fold_stmt_indirect): Likewise.
4661169689Skan	(maybe_fold_stmt_plus): Expand ARRAY_REF when seen with addend.
4662169689Skan	* fold-const.c (int_const_binop): Export.
4663169689Skan	* tree.h (int_const_binop): Declare.
4664169689Skan
4665169689Skan2003-12-01  Jan Hubicka  <jh@suse.cz>
4666169689Skan
4667169689Skan	* basic-block.h (tree_phi_root): New variable.
4668169689Skan	* cfg.c: Include tree-flow.h.
4669169689Skan	(compact_blocks): Compact tree_phi_root
4670169689Skan	* tree-cfg.c (build_tree_cfg): Initialize tree_phi_root.
4671169689Skan	(create_bb, remove_bb, delete_tree_cfg): Update tree_phi_root.
4672169689Skan	* tree-dfa.c (tree_phi_root): Declare.
4673169689Skan	(create_phi_node, add_phi_arg, remove_phi_node,
4674169689Skan	remove_all_phi_nodes_for):  Always use accessor functions for
4675169689Skan	getting, varray for setting phis.
4676169689Skan	* tree-ssa-pre.c (code_motion): Likewsie.
4677169689Skan	* tree-flow-inline.h (phi_nodes): Use varray.
4678169689Skan	* tree-flow.h (bb_ann_d): Remove phi_nodes.
4679169689Skan
4680169689Skan	* tree-ssanames.c (free_ssanames): Do not use deleteable GTY flag.
4681169689Skan
4682169689Skan2003-11-30  Jan Hubicka  <jh@suse.cz>
4683169689Skan
4684169689Skan	* tree-optimize.c (tree_rest_of_compilation): Move ggc_collect call to
4685169689Skan	the end of function; keep clearing of DECL_SAVED_TREE to the cgraph
4686169689Skan	code.
4687169689Skan
4688169689Skan2003-11-30  Jan Hubicka  <jh@suse.cz>
4689169689Skan
4690169689Skan	* cgraphunit.c (cgraph_inline_context): New structure.
4691169689Skan	(cgrpah_mark_inline, cgraph_check_inline_limits): Use context
4692169689Skan	instead of passing all arguments by hand.
4693169689Skan	(cgraph_create_inline_context, cgraph_free_inline_context,
4694169689Skan	cgraph_inline_context_set_caller, cgraph_inline_context_clear_caller,
4695169689Skan	cgraph_inline_context_set_callee, cgrpah_inline_context_clear_callee,
4696169689Skan	cgraph_recursive_inlining_p): New static function.
4697169689Skan	(cgraph_decide_inline*):  Reorganize to use context.
4698169689Skan
4699169689Skan2003-11-30  Paul Brook  <paul@nowt.org>
4700169689Skan
4701169689Skan	* Makefile.in (GTFILES): Remove stray '\'.
4702169689Skan
4703169689Skan2003-11-30  Daniel Berlin  <dberlin@dberlin.org>
4704169689Skan
4705169689Skan	* c-config-lang.in: Move tree-alias-* from here
4706169689Skan	* Makefile.in (GTFILES): To here.
4707169689Skan	* tree-alias-ander.c: Include bitmap.h
4708169689Skan	(andersen_function_call): Updated to take address of variables
4709169689Skan	in an ADDR_EXPR in a CALL_EXPR.
4710169689Skan	* tree-alias-common.h (struct tree_alias_ops): Update arguments to
4711169689Skan	function_call.
4712169689Skan	* tree-alias-type.h (struct alias_typevar_common): Add varnum.
4713169689Skan	* tree-alias-common.c: Include bitmap.h, and function.h.
4714169689Skan	s/global_var/pta_global_var/g.
4715169689Skan	(addrargs): New static variable.
4716169689Skan	(pta_global_var): Ditto.
4717169689Skan	(find_func_decls): Remove.
4718169689Skan	(find_func_aliases): Take one argument, update all callers.
4719169689Skan	Handle (cast) [addr-expr] [var].
4720169689Skan	Handle COMPONENT_REF of an  INDIRECT_REF.
4721169689Skan	Pass info about ADDR_EXPR arguments to function_call function.
4722169689Skan	(deal_with_call_aliasing): New function.
4723169689Skan	(call_may_return): New function.
4724169689Skan	(get_alias_var_decl): Call find_func_aliases on the DECL_INITIAL
4725169689Skan	of a global var.
4726169689Skan	Use ALIAS_TVAR_VARNUM, instead of VARRAY_ACTIVE_SIZE (alias_vars) - 1.
4727169689Skan	(get_alias_var): Handle REALPART_EXPR and IMAGPART_EXPR.
4728169689Skan	Return NULL in default case.
4729169689Skan	(intra_function_call): Remove wrong code.
4730169689Skan	(create_fun_alias_var): Use simple_assign, not addr_assign.
4731169689Skan	Set up ALIAS_TVAR_VARNUM when creating an alias var.
4732169689Skan	(create_fun_alis_var_ptf): Ditto on ALIAS_TVAR_VARNUM.
4733169689Skan	(create_alias_var): Ditto.
4734169689Skan	(create_alias_vars):  Build pta_global_var here.
4735169689Skan	Walk unexpanded_var_list.
4736169689Skan	Walk the statements in basic blocks.
4737169689Skan	(delete_alias_vars): Correct ip_partial case.
4738169689Skan	Free addrargs.
4739169689Skan	(init_alias_vars): Create addrargs.
4740169689Skan
4741169689Skan2003-11-29  Jan Hubicka  <jh@suse.cz>
4742169689Skan
4743169689Skan	* Makefile.in (tree-ssanames.o): Depend on gt-tree-ssanames.h.
4744169689Skan	(tree-eh.o): Depend on gt-tree-eh.h.
4745169689Skan	(gr-tree-ssanames.h, gt-tree-eh.h): New targets.
4746169689Skan	(GTFILES): Add tree-ssanames.c, tree-eh.c
4747169689Skan	* tree-eh.c: Include ggc.h and gt-tree-eh.h
4748169689Skan	(lower_eh_constructs): Allecate throw_stmt_table in ggc.
4749169689Skan	* tree-ssanames.c: Include ggc.h and gt-tree-ssanames.h
4750169689Skan
4751169689Skan	* function.h (struct function): Add saved_tree/saved_args.
4752169689Skan	* toplev.c (rest_of_compilation): Move code to  clear cfun and
4753169689Skan	DECL_SAVED_INSNS and call to ggc_collect to ...
4754169689Skan	* tree-optimize.c (tree_rest_of_compilation): ... this function. Use
4755169689Skan	cfun to save/restore function body.
4756169689Skan
4757169689Skan2003-11-28  Richard Henderson  <rth@redhat.com>
4758169689Skan
4759169689Skan	* gimplify.c (create_tmp_var_raw): Split out from create_tmp_var.
4760169689Skan	(create_tmp_var): Use it.
4761169689Skan	(create_tmp_alias_var): Remove.
4762169689Skan	* tree-alias-common.c, tree-dfa.c: Use create_tmp_var_raw instead.
4763169689Skan	* tree-simple.h: Update decls.
4764169689Skan
4765169689Skan2003-11-28  Richard Henderson  <rth@redhat.com>
4766169689Skan
4767169689Skan	* gimple-low.c (lower_function_body): Call lower_bind_expr
4768169689Skan	to handle the outermost BIND_EXPR.
4769169689Skan
4770169689Skan2003-11-28  Jan Hubicka  <jh@suse.cz>
4771169689Skan
4772169689Skan	* tree-ssa.c (remove_annotations_r): Kill.
4773169689Skan	(delete_tree_ssa): Remove annotations using statement walk;
4774169689Skan	kill argument fndecl.
4775169689Skan	(rewrite_out_of_ssa): Update call.
4776169689Skan
4777169689Skan2003-11-27  Andrew MacLeod  <amacleod@redhat.com>
4778169689Skan
4779169689Skan	* tree-ssa-live.c (register_ssa_partition): Abort if a virtual SSA
4780169689Skan	version is registered.
4781169689Skan	(create_ssa_var_map): Always process PHI nodes.
4782169689Skan	* tree-ssa.c (Eliminate_virtual_phis): Rename from
4783169689Skan	eliminate_extraneous_phis, and look specifically for virtuals.
4784169689Skan	(rewrite_out_of_ssa): Eliminate virtual PHI nodes before building
4785169689Skan	partitions.
4786169689Skan
4787169689Skan2003-11-27  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4788169689Skan
4789169689Skan	* tree-ssa-ccp.c (get_strlen): Mark the visited variables.
4790169689Skan	(ccp_fold_builtin): Changed due to changed calling convention of
4791169689Skan	get_strlen.
4792169689Skan
4793169689Skan2003-11-26  Diego Novillo  <dnovillo@redhat.com>
4794169689Skan
4795169689Skan	Revert
4796169689Skan
4797169689Skan	2003-11-25  Jeff law  <law@redhat.com>
4798169689Skan
4799169689Skan	    * Makefile.in (OBJS-common): Add tree-phinodes.o.
4800169689Skan	    (tree-phinodes.o): Add dependencies.
4801169689Skan	    * tree-phinodes.c: New file.
4802169689Skan	    * tree-dfa.c (create_phi_node): Moved to tree-phinodes.o.
4803169689Skan	    (add_phi_arg, remove_phi_arg, remove_phi_arg_num): Similarly.
4804169689Skan	    (remove_phi_node, remove_all_phi_nodes_for): Similarly.
4805169689Skan	    * tree-ssa.c (init_tree_ssa): Initialize PHI node management.
4806169689Skan	    (delete_tree_ssa): Finalize PHI node management.
4807169689Skan	    * tree.c (dump_tree_statistics): Dump PHI node stats.
4808169689Skan	    (make_phi_node, resize_phi_node): Moved to tree-phinodes.o.
4809169689Skan	    * tree.h (init_phinodes): Prototype.
4810169689Skan	    (fini_phinodes, release_phi_node): Likewise.
4811169689Skan	    (phinodes_print_statistics): Likewise.
4812169689Skan
4813169689Skan2003-11-25  Jan Hubicka  <jh@suse.cz>
4814169689Skan
4815169689Skan	* tree-mustalias.c (promote_var): Do not clear
4816169689Skan	may_point_to_global_mem.
4817169689Skan
4818169689Skan2003-11-25  Jeff law  <law@redhat.com>
4819169689Skan
4820169689Skan	* domwalk.c (walk_dominator_tree): Indicate to the block local
4821169689Skan	data initializer if the block local data is new or recycled.
4822169689Skan	* domwalk.h (struct dom_walk_data): Corresponding changes.
4823169689Skan	* tree-ssa-dom.c (dom_opt_initialize_block_local_data): Accept and use
4824169689Skan	"recycled" argument.  For recycled structures, only clear varrays
4825169689Skan	that have been initialized.  For new blocks, do not initialize
4826169689Skan	varrays here.
4827169689Skan	(dom_opt_finalize_block): When threading across edges, if the
4828169689Skan	true/false varrays have not been initialized, then the limit is zero.
4829169689Skan	Only clear block local varrays that have been initialized.
4830169689Skan	(record_equivalences_from_incoming_edge): If necessary, initialize
4831169689Skan	block local const_and_copies.
4832169689Skan	(dom_opt_walk_stmts): If necessary, initialize block local
4833169689Skan	stmts_to_rescan.
4834169689Skan	(record_var_is_nonzero): If necessary, initialize block local
4835169689Skan	nonzero_vars.
4836169689Skan	(record_cond_is_true): If necessary, initialize block local
4837169689Skan	true_exprs.
4838169689Skan	(record_cond_is_false): If necessary, initialize block local
4839169689Skan	false_exprs.
4840169689Skan	(lookup_avail_expr): If necessary, initialize block local
4841169689Skan	avail_exprs.
4842169689Skan	(record_range): If necessary, initialize block local vrp_varaibles.
4843169689Skan	* tree-ssa.c
4844169689Skan	* tree-ssa.c (rewrite_initialize_block_local_data): Accept and use
4845169689Skan	"recycled" argument.  For recycled structures, only clear varrays
4846169689Skan	that have been initialized.  For new blocks, do not initialize
4847169689Skan	varrays here.
4848169689Skan	(rewrite_finalize_block): Only clear block local varrays that have
4849169689Skan	been initialized.
4850169689Skan	(register_new_def): If necessary, initialize block local defs.
4851169689Skan
4852169689Skan	* tree-ssa-dom.c (get_eq_expr_value): Return a struct rather than
4853169689Skan	a tree node.
4854169689Skan	(record_equivalences_from_incoming_edge): Corresponding changes.
4855169689Skan	(find_equivalent_equality_comparison): Use tree_int_cst_XXX rather
4856169689Skan	then building and folding nodes.
4857169689Skan	(simplify_cond_and_lookup_avail_expr): Likewise.
4858169689Skan
4859169689Skan	* Makefile.in (OBJS-common): Add tree-phinodes.o.
4860169689Skan	(tree-phinodes.o): Add dependencies.
4861169689Skan	* tree-phinodes.c: New file.
4862169689Skan	* tree-dfa.c (create_phi_node): Moved to tree-phinodes.o.
4863169689Skan	(add_phi_arg, remove_phi_arg, remove_phi_arg_num): Similarly.
4864169689Skan	(remove_phi_node, remove_all_phi_nodes_for): Similarly.
4865169689Skan	* tree-ssa.c (init_tree_ssa): Initialize PHI node management.
4866169689Skan	(delete_tree_ssa): Finalize PHI node management.
4867169689Skan	* tree.c (dump_tree_statistics): Dump PHI node stats.
4868169689Skan	(make_phi_node, resize_phi_node): Moved to tree-phinodes.o.
4869169689Skan	* tree.h (init_phinodes): Prototype.
4870169689Skan	(fini_phinodes, release_phi_node): Likewise.
4871169689Skan	(phinodes_print_statistics): Likewise.
4872169689Skan
4873169689Skan2003-11-25  Jan Hubicka  <jh@suse.cz>
4874169689Skan
4875169689Skan	* tree-inline.c (save_body): New body
4876169689Skan	* tree-inline.h (save_body): Declare.
4877169689Skan	* tree-optimize.c (tree_rest_of_compilation): Save function tree
4878169689Skan	properly.
4879169689Skan
4880169689Skan2003-11-24  Richard Henderson  <rth@redhat.com>
4881169689Skan
4882169689Skan	* gimplify.c (canonicalize_addr_expr): New.
4883169689Skan	(gimplify_conversion): Use it.  Canonicalize after nop cast removal.
4884169689Skan	* tree-simple.c (is_gimple_min_invariant): Remove STRING_CST cast
4885169689Skan	special case.
4886169689Skan
4887169689Skan2003-11-24  Jeff Law  <law@redhat.com>
4888169689Skan
4889169689Skan	* flow.c (count_or_remove_death_notes_bb): New.  Extracted from
4890169689Skan	count_or_remove_death_notes.
4891169689Skan	(count_or_remove_death_notes): Use EXECUTE_IF_SET_IN_SBITMAP.
4892169689Skan
4893169689Skan2003-11-24  Richard Henderson  <rth@redhat.com>
4894169689Skan
4895169689Skan	PR 13174, PR 13143
4896169689Skan	* gimplify.c (cpt_same_type): Allow different ARRAY_TYPEs with
4897169689Skan	the same base type.
4898169689Skan
4899169689Skan2003-11-24  Daniel Berlin  <dberlin@dberlin.org>
4900169689Skan
4901169689Skan	Fix PR/13163
4902169689Skan	* tree-ssa-pre.c (append_eref_to_block): Delete.
4903169689Skan	(insert_euse_in_preorder_dt_order_1): Ditto.
4904169689Skan	(insert_one_operand): Take an extra argument, because
4905169689Skan	avdefs may need to be changed.
4906169689Skan	(clear_all_eref_arrays): Use FOR_ALL_BB.
4907169689Skan	(insert_occ_in_preorder_dt_order): Stop appending to bb eref arrays.
4908169689Skan	Use FOR_ALL_BB.
4909169689Skan	(insert_euse_in_preorder_dt_order): Rewrite to just build a new varray
4910169689Skan	with only the EPHI's and EUSE's, and then sort it.
4911169689Skan	(pre_expression): Don't use bb based erefs array when printing
4912169689Skan	expressions.
4913169689Skan	(split_critical_edges): Just use FOR_ALL_BB.
4914169689Skan	(tree_perform_ssapre): Pre-split entry block successor edge if the
4915169689Skan	successor block has multiple preds.
4916169689Skan
4917169689Skan	* tree-flow.h (struct bb_ann_d): Remove erefs varray.
4918169689Skan
4919169689Skan2003-11-24  Daniel Berlin  <dberlin@dberlin.org>
4920169689Skan
4921169689Skan	* tree-cfg.c (cleanup_tree_cfg): FOR_EACH_BB -> FOR_ALL_BB when
4922169689Skan	clearing dom children, because the entry block has dom_children
4923169689Skan	too.
4924169689Skan	* tree-ssa.c (build_dominator_tree): Ditto.
4925169689Skan
4926169689Skan2003-11-24  Diego Novillo  <dnovillo@redhat.com>
4927169689Skan
4928169689Skan	* tree-cfg.c (compute_dominance_frontiers_1,
4929169689Skan	compute_dominance_frontiers): Move from ssa.c.
4930169689Skan	* tree-flow.h (compute_dominance_frontiers): Declare.
4931169689Skan	* Makefile.in (tree-ssa.o, tree-ssa-live.o, tree-ssa-pre.o,
4932169689Skan	tree-optimize.o): Don't depend on ssa.h.
4933169689Skan	* tree-ssa.c: Don't include ssa.h.
4934169689Skan	* tree-ssa-live.c: Likewise.
4935169689Skan	* tree-ssa-pre.c: Likewise.
4936169689Skan	* tree-optimize.c: Likewise.
4937169689Skan
4938169689Skan2003-11-24  Jan Hubicka  <jh@suse.cz>
4939169689Skan
4940169689Skan	* fold-const.c (fold):  Do not return early when
4941169689Skan	optimizing COMPONENT_REF and constant.
4942169689Skan
4943169689Skan2003-11-24  Richard Henderson  <rth@redhat.com>
4944169689Skan
4945169689Skan	* objc/objc-act.c (build_protocol_expr): Use convert instead of
4946169689Skan	smashing TREE_TYPE.
4947169689Skan
4948169689Skan2003-11-23  Andrew MacLeod  <amacleod@redhat.com>
4949169689Skan
4950169689Skan	* tree-ssa-live.h (SSANORM_PERFORM_TER, SSANORM_COMBINE_TEMPS,
4951169689Skan	SSANORM_REMOVE_ALL_PHIS): New flag macros.
4952169689Skan	* tree-ssa.c (replace_variable): Return true if var was rewritten.
4953169689Skan	(eliminate_extraneous_phis): Dump var map to file if checking triggers
4954169689Skan	an abort.
4955169689Skan	(rewrite_trees): Set modified_stmt if stmt was changed.
4956169689Skan	(remove_ssa_form): Move more of rewrite_out_of_ssa to make it serve
4957169689Skan	all the same functions based on new flags in tree-ssa-live.h.
4958169689Skan	(rewrite_out_of_ssa): Call remove_ssa_form.
4959169689Skan
4960169689Skan2003-11-23  Jan Hubicka  <jh@suse.cz>
4961169689Skan
4962169689Skan	* tree-cfg.c (tree_verify_flow_info): Check that ENTRY/EXIT block
4963169689Skan	has no instructions associated with it.
4964169689Skan
4965169689Skan2003-11-22  Jeff Law  <law@redhat.com>
4966169689Skan
4967169689Skan	* tree-ssa-names.c (release_ssa_name): Use SSA_NAME_IN_FREE_LIST
4968169689Skan	instead of checking SSA_NAME_DEF_STMT being null.
4969169689Skan	* tree.h (SSA_NAME_DEF_STMT): Use chain field rather than the
4970169689Skan	def_stmt field.
4971169689Skan	(SSA_NAME_OCCURS_IN_ABNORMAL_PHI): Use existing flag from tree_common.
4972169689Skan	(SSA_NAME_IN_FREE_LIST): Define.
4973169689Skan	(struct tree_ssa_name): Kill DEF_STMT and OCCURS_IN_ABNORMAL_PHI fields.
4974169689Skan
4975169689Skan2003-11-22  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
4976169689Skan
4977169689Skan	* tree-pretty-print.c (dump_generic_node): Remove superfluous ';'.
4978169689Skan
4979169689Skan2003-11-22  Diego Novillo  <dnovillo@redhat.com>
4980169689Skan
4981169689Skan	* Makefile.in (simple-break-elim.o): Remove.
4982169689Skan	(simple-goto-elim.o): Remove.
4983169689Skan	(tree-dchain.o): Remove.
4984169689Skan	* simple-break-elim.c: Remove.
4985169689Skan	* simple-goto-elim.c: Remove.
4986169689Skan	* tree-dchain.c: Remove.
4987169689Skan	* tree-dchain.h: Remove.
4988169689Skan
4989169689Skan2003-11-22  Daniel Berlin  <dberlin@dberlin.org>
4990169689Skan
4991169689Skan	* tree-ssa-pre.c (build_dfs_id_array_1): > should be >=
4992169689Skan	(build_dfn_array): Ditto.
4993169689Skan
4994169689Skan2003-11-21  Diego Novillo  <dnovillo@redhat.com>
4995169689Skan
4996169689Skan	* Makefile.in (tree-dfa.o): Add dependency on $(TREE_DUMP_H)
4997169689Skan	* tree-dfa.c: Include tree-dump.h
4998169689Skan	(compute_alias_sets): Call dump_function_to_file.
4999169689Skan	(may_access_global_mem_p): Check if the base address of _REF nodes
5000169689Skan	may point to global memory.
5001169689Skan
5002169689Skan	* cfgcleanup.c (try_crossjump_to_edge): Initialize newpos1 and
5003169689Skan	newpos2.
5004169689Skan
5005169689Skan2003-11-21  Jeff Law  <law@redhat.com>
5006169689Skan
5007169689Skan	Revert:
5008169689Skan
5009169689Skan	2003-11-21  Jan Hubicka  <jh@suse.cz>
5010169689Skan
5011169689Skan		* tree-dfa.c (get_expr_operands): Fix handling of CALL_EXPR.
5012169689Skan		* tree-must-alias.c (tree_compute_must_alias): promote pointers.
5013169689Skan		(find_addressable_vars):  Deal with complex constant
5014169689Skan		expressions; do not clear may_point_to_global_mem.
5015169689Skan
5016169689Skan2003-11-21  Jeff Law  <law@redhat.com>
5017169689Skan
5018169689Skan	* Makefile.in (domwalk.o): Depend on $(GGC_H).
5019169689Skan	* domwalk.c: Include ggc.h.
5020169689Skan	(walk_dominator_tree): Manage allocation/deallocation and
5021169689Skan	pushing/popping of the toplevel block data pointer here.
5022169689Skan	Use callback to initialize the block local data.
5023169689Skan	(init_walk_dominator_tree): New function.
5024169689Skan	(fini_walk_dominator_tree): Likewise.
5025169689Skan	* domwalk.h (struct dom_walk_data): Add callback to initialize
5026169689Skan	block local data.  Add field for sizeof block local data.
5027169689Skan	Add "private" field free_block_data.
5028169689Skan	(init_dominator_tree, fini_dominator_tree): Prototype.
5029169689Skan	* tree-ssa-dom.c (dom_opt_initialize_local_data): New function.
5030169689Skan	(tree_ssa_dominator_optimize_1): Initialize new fields in the
5031169689Skan	dominator walker structure.  Initialize and finalize the dominator
5032169689Skan	walker.  Slightly reorder code to make it more readable..
5033169689Skan	(dom_opt_initialize_block): No longer deal with allocation and
5034169689Skan	initialization of block local data.
5035169689Skan	(dom_opt_finalize_block): Similarly for deallocation of block
5036169689Skan	local data.
5037169689Skan	* tree-ssa.c (rewrite_block_data): New structure.
5038169689Skan	(rewrite_initialize_block_local_data): New function.
5039169689Skan	(rewrite_initialize_block): No longer deal with allocation and
5040169689Skan	initialization of block local data.
5041169689Skan	(rewrite_into_ssa): Initialize new fields in the dominator walker
5042169689Skan	structure.  Initialize and finalize the dominator walker.
5043169689Skan	(rewrite_initialize_block): No longer deal with allocation and
5044169689Skan	initialization of block local data.
5045169689Skan	(rewrite_optimize_stmts): Deal with changes in the dominator
5046169689Skan	walker structure.
5047169689Skan	(rewrite_finalize_block): No longer with deallocation of block
5048169689Skan	local data.
5049169689Skan
5050169689Skan	* tree-dfa.c (add_vdef, cleanup_voperand_arrays): Use NUM_VDEFS.
5051169689Skan	(mark_new_vars_to_rename, collect_dfa_status_r): Likewise.
5052169689Skan	* tree-pretty-print.c (dump_vops): Likewise.
5053169689Skan	* tree-sra.c (create_scalar_copies): Likewise.
5054169689Skan	* tree-ssa-dce.c (stmt_useful_p, process_worklist): Likewise.
5055169689Skan	* tree-ssa-live.c (create_ssa_var_map): Likewise.
5056169689Skan	(calculate_live_on_entry): Likewise.
5057169689Skan	* tree-ssa-pre.c (process_left_occs_and_kills): Likewise.
5058169689Skan	* tree-ssa.c (mark_def_sites, rewrite_stmt): Likewise.
5059169689Skan	* tree.h (NUM_VDEFS): Define.
5060169689Skan	* tree-ssa-ccp.c (visit_stmt): Use NUM_VDEFS.  Fix thinko in last
5061169689Skan	change.
5062169689Skan	(initialize): Use NUM_VDEFS.
5063169689Skan
5064169689Skan	* tree-dfa.c (add_vdef): Revamp to handle new method for
5065169689Skan	recording vdefs.
5066169689Skan	(cleanup_operand_arrays): Similarly.
5067169689Skan	* tree-sra.c (create_scalar_copies): Similarly.
5068169689Skan	* tree-ssa-ccp.c (visit_stmt, initialize): Similarly.
5069169689Skan	* tree-ssa-dce.c (stmt_useful_p, process_worklist): Similarly.
5070169689Skan	* tree-ssa-dom.c (cprop_into_stmt): Similarly.
5071169689Skan	(record_equivalences_from_stmt): Similarly.
5072169689Skan	* tree-ssa-live.c (create_ssa_var_map): Similarly.
5073169689Skan	(calculate_live_on_entry): Similarly.
5074169689Skan	* tree-ssa.c (mark_def_sites, rewrite_stmt): Similarly.
5075169689Skan	* tree-ssa-pre.c (process_left_occr_and_kills): Similarly.
5076169689Skan	* tree-inline.c (estimate_num_insns_1): Kill VDEF_EXPR.
5077169689Skan	* tree-pretty-print.c (dump_generic_node) Kill VDEF_EXPR.
5078169689Skan	(dump_vops): Dump VDEFs here.
5079169689Skan	* tree.c (build_vdef_expr): Kill.
5080169689Skan	* tree.h (build_vdef_expr): Kill prototype.
5081169689Skan	(VDEF_RESULT, VDEF_OP): Revamp to handle new method for recording
5082169689Skan	vdefs.
5083169689Skan	* tree.def (VDEF_EXPR): Kill.
5084169689Skan
5085169689Skan	* tree-cfg.c (cfg_remove_useless_stmts): Set both VAR and VAL to
5086169689Skan	NULL anytime one of them is determined to be invalid.
5087169689Skan
5088169689Skan2003-11-21  Andrew MacLeod  <amacleod@redhat.com>
5089169689Skan
5090169689Skan	* tree-ssa-live.c (compact_var_map): Fix typo.  Clear correct field.
5091169689Skan	(calculate_live_on_entry): Remove unneeded stmt.
5092169689Skan	* tree-ssa-live.h (version_to_var): New.  Return variable associated
5093169689Skan	with a specific SSA version.
5094169689Skan	* tree-ssa.c (eliminate_build): Add check that ignored results don't
5095169689Skan	have important arguments.  Allow ignored results.
5096169689Skan	(coalesce_abnormal_edges): Allow non-relevant results to be ignored.
5097169689Skan	(eliminate_extraneous_phis): Allow non-relevant results.  Check that
5098169689Skan	no important arguments are being missed.
5099169689Skan	(coalesce_vars): Non-partition variables are allowed now, just ignored.
5100169689Skan	(rewrite_trees): New.  Split out from rewrite_out_of_ssa.  Perform tree
5101169689Skan	rewriting step.
5102169689Skan	(remove_ssa_form): New.  Allow rewriting of just specified variables.
5103169689Skan	(rewrite_out_of_ssa): Use rewrite_trees and reorganize slightly to
5104169689Skan	accommodate typechecking in eliminate_extraneous_phis.
5105169689Skan
5106169689Skan2003-11-21  Jan Hubicka  <jh@suse.cz>
5107169689Skan
5108169689Skan	* tree-dfa.c (get_expr_operands): Fix handling of CALL_EXPR.
5109169689Skan	* tree-must-alias.c (tree_compute_must_alias): promote pointers.
5110169689Skan	(find_addressable_vars):  Deal with complex constant expressions;
5111169689Skan	do not clear may_point_to_global_mem.
5112169689Skan
5113169689Skan2003-11-21  Jan Hubicka  <jh@suse.cz>
5114169689Skan
5115169689Skan	* parser.c (cp_parser_postfix_expression): Initialize 's' to
5116169689Skan	NULL_TREE.
5117169689Skan
5118169689Skan2003-11-20  Richard Henderson  <rth@redhat.com>
5119169689Skan
5120169689Skan	* Makefile.in (bitmap.o-warn, caller-save.o-warn, combine.o-warn,
5121169689Skan	cgraphunit.o-warn, c-semantics.o-warn, emit-rtl.o-warn, expr.o-warn,
5122169689Skan	fold-const.o-warn, genattrtab.o-warn, regmove.o-warn, tree.o-warn,
5123169689Skan	varasm.o-warn, f/expr.o-warn, profile.o-warn): Remove.
5124169689Skan	* bitmap.c (bitmap_first_set_bit): Abort if no non-zero word found.
5125169689Skan	(bitmap_last_set_bit): Likewise.
5126169689Skan	* combine.c (get_pos_from_mask): Always set *plen.
5127169689Skan
5128169689Skan2003-11-20  Richard Henderson  <rth@redhat.com>
5129169689Skan
5130169689Skan	* tree-dfa.c (get_expr_operands): Remove handling of PLUS_EXPR
5131169689Skan	inside INDIRECT_REF.
5132169689Skan
5133169689Skan2003-11-20  Diego Novillo  <dnovillo@redhat.com>
5134169689Skan
5135169689Skan	* tree-nomudflap.c (nogo): Fix prototype.
5136169689Skan
5137169689Skan2003-11-20  Richard Henderson  <rth@redhat.com>
5138169689Skan
5139169689Skan	* except.c (output_function_exception_table): Strip nops.
5140169689Skan	* gimplify.c (gimplify_addr_expr): Kill missing cast workaround.
5141169689Skan	(cpt_same_type, check_pointer_types_r): New.
5142169689Skan	(gimplify_body): Call it.
5143169689Skan	* tree-inline.c (insert_decl_map): New.
5144169689Skan	(remap_decl, remap_type, remap_block, copy_body_r,
5145169689Skan	initialize_inlined_parameters, declare_return_variable,
5146169689Skan	remap_save_expr, mark_local_for_remap_r): Use it.
5147169689Skan
5148169689Skan2003-11-20  Frank Ch. Eigler  <fche@redhat.com>
5149169689Skan
5150169689Skan	libstdc++/11696
5151169689Skan	* c-pragma.c (handle_pragma_redefine_extname): Define always.
5152169689Skan	(init_pragma): Activate #pragma redefine_extname for mudflap.
5153169689Skan
5154169689Skan	* tree-inline.c (copy_tree_r): Propagate mf_marked-ness.
5155169689Skan	* tree-mudflap.c (mudflap_c_function): Break into new
5156169689Skan	_decls and _ops functions.
5157169689Skan	(mudflap_c_function_decls): Avoid unnecessary tree copying.
5158169689Skan	(mudflap_c_function_ops): Ditto.  Gimplify explicitly only for
5159169689Skan	tree dumping.
5160169689Skan	* tree-nomudflap.c: Add new stub functions.  Simplify error
5161169689Skan	message emission throughout.
5162169689Skan	* tree-mudflap.h: Corresponding changes.
5163169689Skan	* tree-optimize.c (tree_rest_of_compilation): Call the _decl
5164169689Skan	instrumentation before gimplification and ssa optimizations;
5165169689Skan	call the _ops instrumentation after ssa optimizations.
5166169689Skan
5167169689Skan2003-11-20  Diego Novillo  <dnovillo@redhat.com>
5168169689Skan
5169169689Skan	Initial fix for PR optimization/12747
5170169689Skan
5171169689Skan	* Makefile.in (OBJS): Add tree-sra.o
5172169689Skan	* common.opt (ftree-sra): Add.
5173169689Skan	* flags.h (flag_tree_sra): Declare.
5174169689Skan	* gimplify.c (gimplify_addr_expr): Set TREE_INVARIANT
5175169689Skan	when producing and address expression for a DECL node.
5176169689Skan	* opts.c (decode_options): Enable SRA at -O1.
5177169689Skan	(common_handle_option): Handle -ftree-sra.
5178169689Skan	* timevar.def (TV_TREE_SRA): New timer.
5179169689Skan	* toplev.c (flag_tree_sra): Define.
5180169689Skan	* tree-cfg.c (stmt_ends_bb_p): Declare extern.
5181169689Skan	(bsi_replace): Add boolean argument to specify whether to
5182169689Skan	preserve EH region information.  Update all callers.
5183169689Skan	(bsi_commit_edge_inserts): Also check the edge from ENTRY_BLOCK_PTR
5184169689Skan	to basic block 0.
5185169689Skan	Move loop body ...
5186169689Skan	(bsi_commit_edge_inserts_1): ... here.
5187169689Skan	* tree-dump.c: Add dump for SRA pass.
5188169689Skan	* tree.h (enum tree_dump_index): Modify accordingly.
5189169689Skan	(STRIP_USELESS_TYPE_CONVERSION): Define.  Update all callers to
5190169689Skan	tree_ssa_useless_type_conversion.
5191169689Skan	* tree-eh.c (add_stmt_to_eh_region): New function.
5192169689Skan	* tree-flow.h (stmt_ends_bb_p): Declare.
5193169689Skan	(add_stmt_to_eh_region): Declare.
5194169689Skan	(tree_sra): Declare.
5195169689Skan	(enum bsi_iterator_update): Mirror entries in
5196169689Skan	enum tsi_iterator_update.
5197169689Skan	* tree-optimize.c (optimize_function_tree): Call SRA pass
5198169689Skan	after must-alias.
5199169689Skan	* tree-sra.c: New file.
5200169689Skan	* doc/invoke.texi: Document -ftree-sra and -fdump-tree-sra.
5201169689Skan
5202169689Skan2003-11-20  Andrew Macleod  <amacleod@redhat.com>
5203169689Skan
5204169689Skan	* tree-ssa.c (check_replaceable): Return false if the LHS is a
5205169689Skan	DECL_HARD_REGISTER.
5206169689Skan
5207169689Skan2003-11-20  Diego Novillo  <dnovillo@redhat.com>
5208169689Skan
5209169689Skan	* tree-ssa-ccp.c (set_rhs): Replace with an empty statement when
5210169689Skan	the replacement has no side effects.
5211169689Skan
5212169689Skan2003-11-20  Jeff Law  <law@redhat.com>
5213169689Skan
5214169689Skan	* Makefile.in (OBJS-common): Kill tree-ssa-copyprop.o.
5215169689Skan	(tree-ssa-copyprop.o): Kill dependencies clause.
5216169689Skan	* common.opt (tree-copyprop): Kill option.
5217169689Skan	* flags.h (flag_tree_copyprop): Kill.
5218169689Skan	* opts.c (decode_options): Don't set flag_tree_copyprop.
5219169689Skan	(common_handle_option): Kill handling of -ftree-copyprop.
5220169689Skan	* timevar.def (TV_TREE_COPYPROP): Kill.
5221169689Skan	* toplev.c (flag_tree_copyprop): Kill.
5222169689Skan	(lang_independent_options): Kill -ftree-copyprop.
5223169689Skan	* tree-dump.c (dump_files): Kill .copyprop dump.
5224169689Skan	* tree-flow.h (tree_ssa_copyprop): Kill prototype.
5225169689Skan	(propagate_copy): Move prototype.
5226169689Skan	* tree-optimize.c (optimize_function_tree): Kill -ftree-copyprop stuff.
5227169689Skan	* tree.h (tree_dump_index): Kill TDI_copyprop.
5228169689Skan	* tree-ssa-copyprop.c: Kill.
5229169689Skan	* tree-ssa-dom.c (propagate_copy): Moved here from tree-ssa-copyprop.c.
5230169689Skan
5231169689Skan	* tree-ssanames.c (free_ssanames): No longer a varray.
5232169689Skan	(init_ssanames, make_ssa_name, release_ssa_name): Corresponding changes.
5233169689Skan
5234169689Skan2003-11-20  Steven Bosscher  <stevenb@suse.de>
5235169689Skan
5236169689Skan	* tree-ssanames.c (ssanames_print_statistics): Use ISO function
5237169689Skan	declaration.  Print unsigned ints, not usinged longs.
5238169689Skan
5239169689Skan2003-11-18  Daniel Berlin  <dberlin@dberlin.org>
5240169689Skan
5241169689Skan	* tree-ssa-pre.c (rename_1): This should be static.
5242169689Skan	(append_eref_to_block): Don't gc allocate.
5243169689Skan	(clear_all_eref_arrays): Free the array rather than
5244169689Skan	clear them.
5245169689Skan	(rename_1): Ditto on both counts.
5246169689Skan	(free_expr_info): Free the arrays.
5247169689Skan	(collect_expressions): Don't gc allocate the arrays.
5248169689Skan
5249169689Skan2003-11-18  Daniel Berlin  <dberlin@dberlin.org>
5250169689Skan
5251169689Skan	* tree-ssa-pre.c (insert_one_operand): Handle self-referential
5252169689Skan	ephi's properly.
5253169689Skan
5254169689Skan2003-11-19  Jeff Law  <law@redhat.com>
5255169689Skan
5256169689Skan	* tree-ssa-dom.c (true_exprs, false_exprs): New hash tables.
5257169689Skan	(nonzero_vars): New varray.
5258169689Skan	(dom_walk_block_data): Add true_exprs, false_exprs and nonzero_vars.
5259169689Skan	(get_value_for, set_value_for): Accept additional argument indicating
5260169689Skan	which table to use.  Callers updated.
5261169689Skan	(tree_ssa_dominator_optimize_1): Initialize and wipe our new hash
5262169689Skan	tables and varray appropriately.
5263169689Skan	(dom_opt_initialize_block): Initialize new block local varrays for
5264169689Skan	true expressions, false expressions and nonzero vars.  Update call
5265169689Skan	to record_equivalences_from_incoming_edge.
5266169689Skan	(dom_opt_finalize_block): Put equivalences from taken edges
5267169689Skan	into the true_exprs and false_exprs hash tables.  Restore global
5268169689Skan	state for true_exprs, false_exprs and nonzero_vars  too.
5269169689Skan	(record_equivalences_from_incoming_edge): Accept dom_walk structure
5270169689Skan	instead of a gazillion varrays.  Pass down block local
5271169689Skan	true_exprs, false_exprs and nonzero_vars varrays to various children.
5272169689Skan	(optimize_stmt):  Accept block local nonzero_vars argument.  Pass
5273169689Skan	new varrays down to record_equivalences_from_stmt.
5274169689Skan	(thread_jumps_walk_stmt): Pass new varrays down to
5275169689Skan	record_equivalences_from_stmt.
5276169689Skan	(dom_opt_walk_stmt): Pass new varrays down to optimize_stmt.
5277169689Skan	(dump_dominator_optimizer_statistics): Dump new hash tables.
5278169689Skan	(record_cond_is_true, record_cond_is_false): Record info into
5279169689Skan	the true/false hash tables/varrays instead of the main expression
5280169689Skan	varrays.  Don't create useless tree nodes.
5281169689Skan	(record_var_is_nonzero): New function.
5282169689Skan	(record_equivalences_from_stmt): Don't generate useless tree nodes.
5283169689Skan	(lookup_avail_expr): Consult nonzero_vars and the true/false
5284169689Skan	expression tables as well.
5285169689Skan	(get_eq_expr_value): Record local true/false expressions in the
5286169689Skan	local true/false varrays rather than the main local expression
5287169689Skan	varray.
5288169689Skan	(true_false_expr_hash, true_false_expr_eq): New functions.
5289169689Skan
5290169689Skan	* Makefile.in (OBJS-sommon): Add tree-ssanames.o.
5291169689Skan	(tree-ssanames.o): Add dependencies.
5292169689Skan	* tree-dfa.c (remove_phi_node): Release SSA_NAME expression when
5293169689Skan	we remove the PHI node.
5294169689Skan	(remove_all_phi_nodes_for): Similarly.
5295169689Skan	* tree-ssa.c (prepare_operand_for_rename): Similarly when we
5296169689Skan	strip away an SSA_NAME expression from an operand.
5297169689Skan	(init_tree_ssa): Call the SSA_NAME initializer.
5298169689Skan	(delete_tree_ssa): Call the SSA_NAME finalizer.
5299169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize_1): Clear the
5300169689Skan	const_and_copies and vrp_data virtual arrays.
5301169689Skan	* tree-ssanames.c: New file for management of SSA_NAME expressions.
5302169689Skan	* tree.h: Prototypes for functions exported by tree-ssanames.c.
5303169689Skan	* tree-flow.h, tree-ssa-ccp.c, tree-ssa-dce.c: Use highest_ssa_version
5304169689Skan	rather than next_ssa_version.
5305169689Skan	* tree-ssa-dom.c, tree-ssa-live.c, tree-ssa.c: Similarly.
5306169689Skan	* tree.c (dump_tree_statistics): Call into tree-ssaname statistics
5307169689Skan	dumper too.
5308169689Skan	(make_ssa_name): Kill.  Now in tree-ssanames.c
5309169689Skan
5310169689Skan2003-11-18  Richard Henderson  <rth@redhat.com>
5311169689Skan
5312169689Skan	* tree.c (recompute_tree_invarant_for_addr_expr): Split out from ...
5313169689Skan	(build1): ... here.
5314169689Skan	* tree.h: Declare it.
5315169689Skan	* gimplify.c (gimplify_addr_expr): Use it.
5316169689Skan	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Split out
5317169689Skan	from fold_indirect_refs_r.
5318169689Skan	(maybe_fold_stmt_indirect): Likewise.
5319169689Skan	(maybe_fold_offset_to_component_ref): New.
5320169689Skan	(maybe_fold_stmt_plus): New.
5321169689Skan	(fold_stmt_r): Rename from fold_indirect_refs_r.
5322169689Skan	(fold_stmt): Strip more useless type conversions.
5323169689Skan
5324169689Skan2003-11-18  Richard Henderson  <rth@redhat.com>
5325169689Skan
5326169689Skan	* tree-cfg.c (dump_function_to_file): Mind when cfun is null.
5327169689Skan
5328169689Skan2003-11-18  Diego Novillo  <dnovillo@redhat.com>
5329169689Skan
5330169689Skan	Revert
5331169689Skan
5332169689Skan	2003-11-18  Jan Hubicka  <jh@suse.cz>
5333169689Skan
5334169689Skan		* tree-cfg.c (cfg_remove_useless_stmts_bb): Avoid crash.
5335169689Skan		* tree-dfa.c (get_expr_operands): Fix handling of CALL_EXPR.
5336169689Skan
5337169689Skan	2003-11-18  Jan Hubicka  <jh@suse.cz>
5338169689Skan
5339169689Skan		* Makefile.in (sibcall.o): Kill.
5340169689Skan		(tree-tailcall.o): Add except.h dependency
5341169689Skan		* sibcall.c: Kill.
5342169689Skan		(purge_reg_equiv_notes, purge_mem_unchanging_flag): Move to ...
5343169689Skan		* calls.c (purge_reg_equiv_notes,
5344169689Skan		purge_mem_unchanging_flag) ... here.
5345169689Skan		(expand_call): Do not produce placeholders; do
5346169689Skan		not deal with tail recursion; update
5347169689Skan		equivalencies after sibcall production.
5348169689Skan		* toplev.c (rest_of_handle_sibling_calls): Kill.
5349169689Skan		(rest_of_compialtion): Do not use rest_of_handle_sibling_calls.
5350169689Skan		* tree-dump.c (dump_files): Add tail2
5351169689Skan		* tree-flow.h (tree_optimize_tail_calls): Update prototype.
5352169689Skan		* tree-optimize.c (optimize_function_tree): Do
5353169689Skan		tail optimization twice.
5354169689Skan		* tree-tailcall.c: Inlucde except.h
5355169689Skan		(suitable_for_tail_call_opt_p): New.
5356169689Skan		(optimize_tail_call): Add opt_tailcalls argument;
5357169689Skan		optimize tailcalls.
5358169689Skan		(tree_optimize_tail_calls): Add opt_tailcalls/pass arguments.
5359169689Skan		* tree.h (CALL_EXPR_TAILCALL): New.
5360169689Skan		(tree_dump_index): Add tail2
5361169689Skan
5362169689Skan2003-11-18  Jan Hubicka  <jh@suse.cz>
5363169689Skan
5364169689Skan	* tree-cfg.c (cfg_remove_useless_stmts_bb): Avoid crash.
5365169689Skan	* tree-dfa.c (get_expr_operands): Fix handling of CALL_EXPR.
5366169689Skan
5367169689Skan2003-11-18  Diego Novillo  <dnovillo@redhat.com>
5368169689Skan
5369169689Skan	* tree-optimize.c (optimize_function_tree): Disable tail
5370169689Skan	call optimizations.
5371169689Skan
5372169689Skan2003-11-18  Jan Hubicka  <jh@suse.cz>
5373169689Skan
5374169689Skan	* Makefile.in (sibcall.o): Kill.
5375169689Skan	(tree-tailcall.o): Add except.h dependency
5376169689Skan	* sibcall.c: Kill.
5377169689Skan	(purge_reg_equiv_notes, purge_mem_unchanging_flag): Move to ...
5378169689Skan	* calls.c (purge_reg_equiv_notes, purge_mem_unchanging_flag) ... here.
5379169689Skan	(expand_call): Do not produce placeholders; do not deal with tail
5380169689Skan	recursion; update equivalencies after sibcall production.
5381169689Skan	* toplev.c (rest_of_handle_sibling_calls): Kill.
5382169689Skan	(rest_of_compialtion): Do not use rest_of_handle_sibling_calls.
5383169689Skan	* tree-dump.c (dump_files): Add tail2
5384169689Skan	* tree-flow.h (tree_optimize_tail_calls): Update prototype.
5385169689Skan	* tree-optimize.c (optimize_function_tree): Do tail optimization twice.
5386169689Skan	* tree-tailcall.c: Inlucde except.h
5387169689Skan	(suitable_for_tail_call_opt_p): New.
5388169689Skan	(optimize_tail_call): Add opt_tailcalls argument; optimize tailcalls.
5389169689Skan	(tree_optimize_tail_calls): Add opt_tailcalls/pass arguments.
5390169689Skan	* tree.h (CALL_EXPR_TAILCALL): New.
5391169689Skan	(tree_dump_index): Add tail2
5392169689Skan
5393169689Skan2003-11-18  Jeff Law  <law@redhat.com>
5394169689Skan
5395169689Skan	* tree-ssa-dom.c (thread_across_edge): Lose block_avail_exprs argument.
5396169689Skan	Callers updated.  Pass NULL for block_avail_exprs in call to
5397169689Skan	lookup_avail_expr.  Record both the condition and the inverted
5398169689Skan	condition when threading across an edge.
5399169689Skan
5400169689Skan2003-11-18  Richard Henderson  <rth@redhat.com>
5401169689Skan
5402169689Skan	* tree-ssa.c (tree_ssa_useless_type_conversion): Use TYPE_MAIN_VARIANT
5403169689Skan	when compariing pointer types too.
5404169689Skan
5405169689Skan2003-11-18  Jan Hubicka  <jh@suse.cz>
5406169689Skan
5407169689Skan	* tree-dump.c (dump_files): Reorder tail calls.
5408169689Skan	* tree-optimize.c (optimize_function_tree): Likewise
5409169689Skan	* tree-tailcall.c (optimize_tail_call, eliminate_tail_call): Remove
5410169689Skan	variable tmpvars; update SSA.
5411169689Skan	(suitable_for_tail_opt_p): Do not give up because of static variables.
5412169689Skan	(find_tail_calls):  Track return values in SSA graph.
5413169689Skan	* tree.c (make-phi_node): Do not create new SSA name when operand
5414169689Skan	already is.
5415169689Skan	* tree.h (enum tree_dump_index): Reorder tail call.
5416169689Skan
5417169689Skan2003-11-17  Diego Novillo  <dnovillo@redhat.com>
5418169689Skan
5419169689Skan	* gimplify.c (gimplify_call_expr): Change gimple_test_f argument to
5420169689Skan	return bool type.
5421169689Skan	(mark_decls_volatile_r): New local function.
5422169689Skan	(gimplify_expr): Make gimple_test_f return bool type.
5423169689Skan	Call mark_decls_volatile_r when gimplifying VA_ARG_EXPR.
5424169689Skan	* tree-dfa.c (struct walk_state): Remove field is_va_arg_expr.
5425169689Skan	Update all callers.
5426169689Skan	(opf_force_vop): Remove.  Update all users.
5427169689Skan	(add_stmt_operand): Re-structure to add real operands only for
5428169689Skan	GIMPLE register variables.
5429169689Skan	(find_vars_r): Don't handle VA_ARG_EXPR nodes.
5430169689Skan	(add_referenced_var): Also assign a UID to variables with hidden
5431169689Skan	uses.
5432169689Skan	Call is_gimple_call_clobbered to determine if a variable is call
5433169689Skan	clobbered.
5434169689Skan	(get_memory_tag_for): Mark memory tags volatile and static.
5435169689Skan	* tree-flow.h (struct var_ann_d): Remove field is_in_va_arg_expr.
5436169689Skan	Update all users.
5437169689Skan	* tree-simple.c (is_gimple_*): Change return type to bool.  Update
5438169689Skan	all users.
5439169689Skan	(is_gimple_reg_type): Return true only for non aggregate types.
5440169689Skan	(is_gimple_non_addressable_1): New local function.
5441169689Skan	(is_gimple_reg): Call it.
5442169689Skan	(is_gimple_non_addressable): New function.
5443169689Skan	(is_gimple_call_clobbered): New function.
5444169689Skan	* tree-simple.h (is_gimple_*): Change return type to bool.
5445169689Skan
5446169689Skan2003-11-17  Jason Merrill  <jason@redhat.com>
5447169689Skan
5448169689Skan	PR c++/11266
5449169689Skan	* gimplify.c (gimple_add_tmp_var): Also make sure
5450169689Skan	seen_in_bind_expr isn't set.
5451169689Skan	(mostly_copy_tree_r): Don't copy a TARGET_EXPR.
5452169689Skan	(gimplify_target_expr): Only expand a TARGET_EXPR the first time
5453169689Skan	we see it.
5454169689Skan
5455169689Skan2003-11-17  Richard Henderson  <rth@redhat.com>
5456169689Skan
5457169689Skan	* tree-pretty-print.c (dump_generic_node): Use %u not %x for
5458169689Skan	printing DECL_UID.
5459169689Skan
5460169689Skan2003-11-16  Richard Henderson  <rth@redhat.com>
5461169689Skan
5462169689Skan	* c-common.c (c_add_case_label): Use create_artificial_label.
5463169689Skan	* tree-simple.h (create_artificial_label): Move decl ...
5464169689Skan	* tree.h: ... here.
5465169689Skan
5466169689Skan2003-11-16  Richard Henderson  <rth@redhat.com>
5467169689Skan
5468169689Skan	PR c++/12770
5469169689Skan	* gimple-low.c (lower_stmt_body): Take a tree, not a tree*.
5470169689Skan	(lower_stmt): Handle EH nodes.
5471169689Skan	(lower_bind_expr): Remove fixme.
5472169689Skan	(block_may_fallthru): Move from tree-eh.c.  Handle COND_EXPR,
5473169689Skan	BIND_EXPR, and TRY_FINALLY_EXPR.
5474169689Skan	(lower_cond_expr): Use it.
5475169689Skan	* tree-eh.c (collect_finally_tree): Ignore COND_EXPR and BIND_EXPR.
5476169689Skan	(replace_goto_queue_cond_clause): New.
5477169689Skan	(replace_goto_queue_1): Use it.  Split out statement_list handling.
5478169689Skan	(replace_goto_queue_stmt_list): New.
5479169689Skan	(-block_may_fallthru): Move to gimple-low.c.
5480169689Skan	(lower_eh_constructs_1): Ignore BIND_EXPR.
5481169689Skan	* tree-flow.h (block_may_fallthru): Declare.
5482169689Skan
5483169689Skan	* tree-dump.c (dump_files): Exchange .eh and .lower passes.
5484169689Skan	* tree-optimize.c (tree_rest_of_compilation): Likewise.
5485169689Skan	* tree.h (enum tree_dump_index): Likewise.
5486169689Skan
5487169689Skan2003-11-16  Jason Merrill  <jason@redhat.com>
5488169689Skan
5489169689Skan	* gimplify.c (mostly_copy_tree_r): Don't walk into a BLOCK.
5490169689Skan
5491169689Skan	* tree-inline.c (walk_tree): Don't walk into the BIND_EXPR_VARS
5492169689Skan	of a BIND_EXPR.
5493169689Skan	* c-common.c (c_walk_subtrees): Don't walk into the decl of a
5494169689Skan	DECL_STMT.
5495169689Skan
5496169689Skan	PR optimization/11269
5497169689Skan	* dwarf2out.c (gen_subprogram_die): Generate a DIE for a named
5498169689Skan	return value.
5499169689Skan	(loc_descriptor_from_tree): Treat RESULT_DECL like VAR_DECL.
5500169689Skan	(add_location_or_const_value_attribute): Likewise.
5501169689Skan	(add_bound_info): Likewise.
5502169689Skan	(gen_decl_die): Likewise.
5503169689Skan
5504169689Skan2003-11-16  Jason Merrill  <jason@redhat.com>
5505169689Skan
5506169689Skan	* c-pretty-print.c (debug_c_tree): Restore removed fn.
5507169689Skan	* diagnostic.h: Declare it.
5508169689Skan
5509169689Skan	* tree-pretty-print.c (dump_generic_node): Use DECL_UID when
5510169689Skan	dumping anonymous decls.
5511169689Skan
5512169689Skan2003-11-16  Richard Henderson  <rth@redhat.com>
5513169689Skan
5514169689Skan	* tree-cfg.c (last_and_only_stmt): New.
5515169689Skan	* tree-flow.h (last_and_only_stmt): Declare.
5516169689Skan	* tree-ssa-dom.c (thread_across_edge): Use it.
5517169689Skan
5518169689Skan	* tree-cfg.c (tree_block_forwards_to): Don't check for empty stmts.
5519169689Skan	(tree_forwarder_block_p): Likewise.
5520169689Skan	* tree-dfa.c (get_stmt_operands): Likewise.
5521169689Skan	* tree-ssa-ccp.c (set_rhs): Likewise.
5522169689Skan	* tree-ssa-dom.c (optimize_stmt): Likewise.
5523169689Skan	* tree-ssa.c (rewrite_stmt): Likewise.
5524169689Skan
5525169689Skan2003-11-16  Richard Henderson  <rth@redhat.com>
5526169689Skan
5527169689Skan	* tree.h (LABEL_DECL_UID): Rename from LABEL_DECL_INDEX.
5528169689Skan	* tree-flow.h (bsi_remove): Declare.
5529169689Skan	* tree-flow-inline.h (bsi_remove): Move ...
5530169689Skan	* tree-cfg.c (set_bb_for_stmt): Don't re-set LABEL_DECL_UID.
5531169689Skan	Verify that a label isn't already in a block before adding it.
5532169689Skan	(bsi_remove): Move from tree-flow-inline.h, clear bb.
5533169689Skan	* tree-pretty-print.c (dump_generic_node): Use LABEL_DECL_UID if set.
5534169689Skan
5535169689Skan2003-11-15  Richard Henderson  <rth@redhat.com>
5536169689Skan
5537169689Skan	* function.c (clear_block_marks): Rename from reorder_blocks_0, export.
5538169689Skan	* function.h (clear_block_marks): Declare.
5539169689Skan	* gimple-low.c (lower_function_body): Use it.
5540169689Skan	(lower_bind_expr): Ensure we don't link blocks into the tree twice.
5541169689Skan	* gimplify.c (gimplify_body): Keep old bind_expr at top level if
5542169689Skan	possible.
5543169689Skan
5544169689Skan2003-11-14  Richard Henderson  <rth@redhat.com>
5545169689Skan
5546169689Skan	* tree-ssa-pre.c (split_critical_edges): Reimplement.  Call
5547169689Skan	tree_split_edge directly.
5548169689Skan
5549169689Skan2003-11-14  Jason Merrill  <jason@redhat.com>
5550169689Skan
5551169689Skan	* tree-eh.c (do_return_redirection): Assign directly to the
5552169689Skan	RESULT_DECL of a function which returns in memory.
5553169689Skan
5554169689Skan2003-11-14  Daniel Berlin  <dberlin@dberlin.org>
5555169689Skan
5556169689Skan	* tree-ssa-pre.c (pre_stats): Add ephis_current member.
5557169689Skan	(create_ephi_node): Use xmalloc, not ggc_alloc_tree.
5558169689Skan	(clear_all_eref_arrays): Free the ephis here.
5559169689Skan	(expr_phi_insertion): Don't append the ephis to the erefs array.
5560169689Skan	(insert_occ_in_preorder_dt_order): Move building/freeing of dfn
5561169689Skan	array so that it only occurs once per function..
5562169689Skan	(rename_1): Ditto on the dfs_id array.
5563169689Skan	(ephi_use_pool): New alloc pool.
5564169689Skan	(add_ephi_use): Pool allocate these things, rather than
5565169689Skan	ggc_alloc'ing them.
5566169689Skan	(insert_euse_in_preorder_dt_order_1): Use ephi_at_block to put the
5567169689Skan	ephi in the list.
5568169689Skan	(pre_expression): Don't PRE when we only have 1 occurrence.
5569169689Skan	(expr_lexically_eq): Make inline.
5570169689Skan	(names_match_p): Move closer to first use.
5571169689Skan	(tree_perform_ssapre): Alloc and free the ephi_use_pool.
5572169689Skan	Make stat printing per-expression.
5573169689Skan	Add checking that we freed all ephis.
5574169689Skan
5575169689Skan2003-11-14  Andrew MacLeod  <amacleod@redhat.com>
5576169689Skan
5577169689Skan	* common.opt (ftree-ter): Document new option.
5578169689Skan	* flags.h (flag_tree_ter): Add new flag.
5579169689Skan	* fold-const.c (invert_truthvalue): Don't ignore cast to BOOLEAN_TYPE.
5580169689Skan	* opts.c (decode_options): Option -ftree-ter defaults to on.
5581169689Skan	(common_handle_option): Add processing for flag_tree_ter.
5582169689Skan	* toplev.c (flag_tree_ter): Initialize to 0.
5583169689Skan	(lang_independent_options f_): Add -ftree-ter flag.
5584169689Skan	* tree-ssa-live.c (init_var_map): Initialize ref_count to 0.
5585169689Skan	(delete_var_map): Free ref count if allocated.
5586169689Skan	(register_ssa_partition): Add "is_use" parameter for reference counting.
5587169689Skan	(create_ssa_var_map): Add flag and code for calculating ref counts.
5588169689Skan	* tree-ssa-live.h (struct _var_map): Add ref_count field.
5589169689Skan	(SSA_VAR_MAP_REF_COUNT): Define flag.
5590169689Skan	(version_ref_count): Function to retreive ref_count.
5591169689Skan	* tree-ssa.c (replace_variable): If an expression vector is passed in,
5592169689Skan	use replacement expression instead of mapped variable when available.
5593169689Skan	(struct value_expr_d): New structure for value lists.
5594169689Skan	(struct temp_expr_table_d): Structure used to build an expression
5595169689Skan	replacement table.
5596169689Skan	(new_temp_expr_table): New. Create a new TER (Temporary Expression
5597169689Skan	Replacement) table.
5598169689Skan	(free_temp_expr_table): New. Free a TER table.
5599169689Skan	(new_value_expr): New. Allocate a value list element.
5600169689Skan	(free_value_expr): New. Free a value list element.
5601169689Skan	(find_value_in_list): New. Find a value in a list.
5602169689Skan	(add_value_to_list): New. Add a value to a list if not already present.
5603169689Skan	(remove_value_from_list): New. Remove a value from a list.
5604169689Skan	(add_dependance): New. Add a dependency to an expression.
5605169689Skan	(check_replaceable): New. Check if a stmt is a candidate for TER. Add
5606169689Skan	to active list and create dependancies if so.
5607169689Skan	(finish_expr): New. Remove an expression from TER consideration.
5608169689Skan	(mark_replaceable): New. Finish a TER expression as a valid replacement.
5609169689Skan	(kill_expr): New. Finish dependent TER expressions as not replaceable.
5610169689Skan	(kill_virtual_exprs): New. Finish any TER expressions dependent on a
5611169689Skan	virtual operand as not replaceable.
5612169689Skan	(find_replaceable_in_bb): New. Process a basic block for TER expression.
5613169689Skan	(find_replaceable_exprs): New. Entry point for TER expression finder.
5614169689Skan	(dump_replaceable_exprs): New. output list of replaceable expressions.
5615169689Skan	(rewrite_out_of_ssa): Build TER table if requested, and use it.
5616169689Skan
5617169689Skan2003-11-14  Andreas Jaeger  <aj@suse.de>
5618169689Skan
5619169689Skan	* c-semantics.c (find_reachable_label): Use C90 function
5620169689Skan	declaration.
5621169689Skan
5622169689Skan2003-11-14  Jason Merrill  <jason@redhat.com>
5623169689Skan
5624169689Skan	PR middle-end/12526
5625169689Skan	* tree-cfg.c (call_expr_flags): Move to calls.c.
5626169689Skan	* tree-flow.h: Move prototype to tree.h.
5627169689Skan
5628169689Skan	PR c++/13033
5629169689Skan	* c-simplify.c (gimplify_c_loop): Wrap the increment in a
5630169689Skan	CLEANUP_POINT_EXPR.
5631169689Skan
5632169689Skan	* tree-dfa.c (get_stmt_operands) <ASM_EXPR>: A memory clobber
5633169689Skan	clobbers all call-clobbered variables.   Clobber clobber.
5634169689Skan
5635169689Skan	* gimplify.c (canonicalize_component_ref): Remove redundant call
5636169689Skan	to recalculate_side_effects.
5637169689Skan
5638169689Skan2003-11-14  Richard Henderson  <rth@redhat.com>
5639169689Skan
5640169689Skan	PR c++/12751
5641169689Skan	* tree-eh.c (struct leh_tf_state): Add outer.
5642169689Skan	(lower_try_finally, lower_cleanup): Set it.
5643169689Skan	(lower_try_finally_fallthru_label): New.
5644169689Skan	(honor_protect_cleanup_actions): Use it.
5645169689Skan	(lower_try_finally_copy, lower_try_finally_switch): Likewise.
5646169689Skan
5647169689Skan	* tree-eh.c (collect_finally_tree): Complete manual tailrecurse
5648169689Skan	transformation.
5649169689Skan
5650169689Skan2003-11-14  Richard Henderson  <rth@redhat.com>
5651169689Skan
5652169689Skan	* gimplify.c (voidify_wrapper_expr): Don't clobber TREE_TYPE of
5653169689Skan	statements in a STATEMENT_LIST.  Be prepared for an empty list.
5654169689Skan
5655169689Skan2003-11-14  Steven Bosscher  <stevenb@suse.de>
5656169689Skan
5657169689Skan	* jump.c (never_reached_warning): Remove function.
5658169689Skan	* rtl.h (never_reached_warning): Don't declare it.
5659169689Skan	* cfgrtl.c (never_reached_warning): Don't call it.
5660169689Skan	* cse.c (never_reached_warning): Ditto.
5661169689Skan
5662169689Skan2003-11-13  Jeff Law  <law@redhat.com>
5663169689Skan
5664169689Skan	* tree-cfg.c (bsi_replace): Restore accidentally removed code.
5665169689Skan
5666169689Skan	* tree-cfg.c (cfg_remove_useless_stmts_bb): Also detect useless
5667169689Skan	var->var copies created by the out-of-ssa translation.
5668169689Skan
5669169689Skan2003-11-13  Steven Bosscher  <stevenb@suse.de>
5670169689Skan
5671169689Skan	PR middle-end/11514
5672169689Skan	* tree-inline.c (walk_tree): Handle PLACEHOLDER_EXPR.
5673169689Skan
5674169689Skan2003-11-13  Richard Henderson  <rth@redhat.com>
5675169689Skan
5676169689Skan	* tree-cfg.c (cfg_remove_useless_stmts_bb): Initialize stmt.
5677169689Skan
5678169689Skan2003-11-13  Jan Hubicka  <jh@suse.cz>
5679169689Skan
5680169689Skan	* calls.c (special_function_p): Do not check for ECF_MALLOC.
5681169689Skan	(flags_from_decl_or_type):  Use special_function_p.
5682169689Skan	(expand_call): Remove call to special_function_p.
5683169689Skan	* tree-cfg.c (notice_special_calls, clear_special_calls): New functions.
5684169689Skan	(remove_useless_stmts): Use clear_special_calls.
5685169689Skan	(remove_useless_stmts_1): Use notice_special_calls.
5686169689Skan	* tree-flow.h (notice_special_calls, clear_special_calls): New functions.
5687169689Skan	* tree-ssa-dce.c (remove_dead_stmts): Use clear_special_calls and
5688169689Skan	notice_special_calls..
5689169689Skan
5690169689Skan	* gimplify.c (gimplify_expr): Check labels.
5691169689Skan
5692169689Skan	* tree-cfg.c (tree_verify_flow_info): Check labels.
5693169689Skan
5694169689Skan	* tree-cfg.c (make_exit_edges): Do not create edges for const
5695169689Skan	functions.
5696169689Skan	(update_call_expr_flags): Fix.
5697169689Skan
5698169689Skan2003-11-12  Diego Novillo  <dnovillo@redhat.com>
5699169689Skan
5700169689Skan	(declare_inlined_vars): New local function.
5701169689Skan	(initialize_inlined_parameters): Call it.
5702169689Skan	(expand_call_inline): Call it.
5703169689Skan
5704169689Skan2003-11-13  Steven Bosscher  <stevenb@suse.de>
5705169689Skan
5706169689Skan	PR optimization/12640
5707169689Skan	* tree-ssa-ccp.c (get_strlen): Don't follow the UD chain
5708169689Skan	of a PHI argument if the DEF stmt for the argument is
5709169689Skan	the PHI itself.
5710169689Skan
5711169689Skan2003-11-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5712169689Skan	    Jeff Law  <law@redhat.com>
5713169689Skan
5714169689Skan	* tree-cfg.c (cfg_remove_useless_stmts): New function.
5715169689Skan	(cfg_remove_useless_stmts_bb): Likewise.
5716169689Skan	* tree-flow.h (cfg_remove_useless_stmts): Prototype.
5717169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Use cfg_remove_useless_stmts
5718169689Skan	instead of remove_useless_stmts.
5719169689Skan
5720169689Skan2003-11-12  Richard Henderson  <rth@redhat.com>
5721169689Skan
5722169689Skan	* Makefile.in (OBJS-common): Add tree-iterator.o.
5723169689Skan	(expr.o): Depend on tree-iterator.h.
5724169689Skan	(GTFILES): Add tree-iterator.c.
5725169689Skan	* basic-block.h (struct basic_block_def): Replace head_tree_p
5726169689Skan	and end_tree_p with stmt_list.
5727169689Skan	(tree_bb_root): New.
5728169689Skan	(create_bb): Don't declare.
5729169689Skan	* c-common.c (c_warn_unused_result): Handle STATEMENT_LIST.
5730169689Skan	* c-simplify.c (c_gimplify_stmt): Don't rationalize_compound_expr.
5731169689Skan	* cfg.c (entry_exit_blocks): Adjust for member changes.
5732169689Skan	(compact_blocks): Manage tree_bb_root.
5733169689Skan	* expr.c (expand_expr_1): Handle STATEMENT_LIST.
5734169689Skan	* gimple-low.c: Update for tree_stmt_iterator changes.
5735169689Skan	(lower_cond_expr): Use expr_only.  Notice empty conditionals.
5736169689Skan	* gimplify.c (append_to_statement_list_1): Create and
5737169689Skan	manage statement_list nodes.
5738169689Skan	(foreach_stmt): Remove.
5739169689Skan	(wfl_locus): Remove.
5740169689Skan	(annotate_all_with_locus_1): Merge into...
5741169689Skan	(annotate_all_with_locus): ... here.  Iterate over the
5742169689Skan	statement list directly.
5743169689Skan	(voidify_wrapper_expr): Handle STATEMENT_LIST.
5744169689Skan	(gimplify_return_expr): Likewise.
5745169689Skan	(gimplify_loop_expr): Likewise.
5746169689Skan	(shortcut_cond_r, shortcut_cond_expr): Likewise.
5747169689Skan	(gimplify_cleanup_point_expr): Likewise.
5748169689Skan	(gimple_build_eh_filter): Create statement list bodies.
5749169689Skan	(gimplify_bind_expr): Likewise.
5750169689Skan	(gimplify_switch_expr): Likewise.
5751169689Skan	(gimplify_cond_expr): Likewise.
5752169689Skan	(gimplify_compound_expr): Handle void expressions as well.
5753169689Skan	(gimplify_statement_list): New.
5754169689Skan	(gimple_push_cleanup): Gimplify the WITH_CLEANUP_EXPR operand.
5755169689Skan	(gimplify_stmt): Ensure non-null result.
5756169689Skan	(gimplify_to_stmt_list): New.
5757169689Skan	(gimplify_expr): Use gimplify_compound_expr, gimplify_statement_list,
5758169689Skan	gimplify_to_stmt_list as appropriate.
5759169689Skan	(gimplify_body): Fix creation of outer BIND_EXPR.
5760169689Skan	* tree-cfg.c (tree_bb_root): New.
5761169689Skan	(build_tree_cfg): Initialize it.  Update for make_blocks changes.
5762169689Skan	(factor_computed_gotos): Use create_bb directly.
5763169689Skan	(make_blocks): Rewrite to use statement lists.
5764169689Skan	(append_stmt_to_bb, prepend_stmt_to_bb): Remove.
5765169689Skan	(create_bb): Make static.  Add stmt_list argument.  Don't allow
5766169689Skan	null after argument.  Set tree_bb_root.
5767169689Skan	(make_edges): ENTRY block successor is FALLTHRU.
5768169689Skan	(remove_useless_stmts_warn_notreached): Handle STATEMENT_LIST.
5769169689Skan	(struct rus_data): Add last_goto.
5770169689Skan	(remove_useless_stmts_cond): Clear it.  Zap empty conditionals.
5771169689Skan	Use expr_only for simple statment elimination.
5772169689Skan	(remove_useless_stmts_tf): Clear last_goto.  Use TREE_SIDE_EFFECTS
5773169689Skan	instead of IS_EMPTY_STMT.  Use append_to_statement_list instead of
5774169689Skan	munging to COMPOUND_EXPR.
5775169689Skan	(remove_useless_stmts_tc): Clear last_goto.  Use TREE_SIDE_EFFECTS.
5776169689Skan	(remove_useless_stmts_goto): Set last_goto.
5777169689Skan	(remove_useless_stmts_label): New.  Kill goto-next-label.
5778169689Skan	(remove_useless_stmts_1): Reorg to handle STATEMENT_LIST.
5779169689Skan	(remove_bb): Simplify block removal.
5780169689Skan	(remove_bsi_from_block): Kill.
5781169689Skan	(tree_block_forwards_to): Tidy bsi loops.  Do not create
5782169689Skan	block label here.
5783169689Skan	(tree_cfg2dot): Update for bb->stmt_list.
5784169689Skan	(delete_tree_cfg): Clear tree_bb_root.
5785169689Skan	(set_bb_for_stmt): Handle STATEMENT_LISTs.
5786169689Skan	(bsi_insert_before, bsi_insert_after): Re-implement on TSIs.
5787169689Skan	(bsi_move_after, bsi_move_before, bsi_move_to_bb_end): Likewise.
5788169689Skan	(bsi_replace): Likewise.
5789169689Skan	(tree_find_edge_insert_loc): New, split from ...
5790169689Skan	(bsi_insert_on_edge_immediate): ... here.
5791169689Skan	(bsi_commit_edge_inserts): Use it.  Add all stmts at once.
5792169689Skan	(bsi_insert_on_edge): Use statement lists.
5793169689Skan	(tree_split_edge): Position new block correctly.  Deal with
5794169689Skan	fallthrough to EXIT.
5795169689Skan	(tree_verify_flow_info): Do not check block order vs statement chain.
5796169689Skan	(tree_make_forwarder_block): Update create_bb call, fix edge flags.
5797169689Skan	(thread_jumps): Call tree_redirect_edge_and_branch directly.
5798169689Skan	(tree_block_label): Don't return a NONLOCAL_LABEL.
5799169689Skan	(tree_redirect_edge_and_branch_1): Rename from s/_1//.  Take an
5800169689Skan	argument to use ssa_redirect_edge or redirect_edge_succ.  Use
5801169689Skan	tree_split_edge instead of bsi_insert_on_edge_immediate.
5802169689Skan	(tree_redirect_edge_and_branch): New.
5803169689Skan	(remove_stmt, first_exec_stmt, bsi_init, bsi_next_in_bb): Kill.
5804169689Skan	(bsi_start, bsi_last, bsi_prev, bsi_from_tsi): Kill.
5805169689Skan	(bsi_update_from_tsi, bsi_link_after): Kill.
5806169689Skan	* tree-eh.c (collect_finally_tree): Handle STATEMENT_LIST.
5807169689Skan	(replace_goto_queue_1): Likewise.
5808169689Skan	(replace_goto_queue): Don't use walk_tree.
5809169689Skan	(do_return_redirection): Create statement lists.
5810169689Skan	(do_goto_redirection): Likewise.
5811169689Skan	(block_may_fallthru_last): Fold into...
5812169689Skan	(block_may_fallthru): ... here.
5813169689Skan	(frob_into_branch_around): Use append_to_statement_list.
5814169689Skan	(honor_protect_cleanup_actions): Likewise.
5815169689Skan	(lower_try_finally_nofallthru): Likewise.
5816169689Skan	(lower_try_finally_onedest): Likewise.
5817169689Skan	(lower_try_finally_copy): Likewise.
5818169689Skan	(lower_try_finally_switch): Likewise.
5819169689Skan	(lower_try_finally): Likewise.
5820169689Skan	(lower_catch): Likewise.
5821169689Skan	(lower_eh_filter): Likewise.
5822169689Skan	(lower_eh_constructs_1): Handle STATEMENT_LIST.
5823169689Skan	* tree-flow-inline.h (BSI_NUM_ELEMENTS, bsi_list_p): Remove.
5824169689Skan	(new_bsi_list, empty_bsi_stack, FOR_EACH_BSI_IN_REVERSE): Remove.
5825169689Skan	(FOR_EACH_STMT_IN_REVERSE): Remove.
5826169689Skan	(bsi_start, bsi_last, bsi_end_p): Re-implement based on TSIs.
5827169689Skan	(bsi_next, bsi_prev, bsi_stmt, bsi_stmt_ptr, bsi_remove): Likewise.
5828169689Skan	* tree-flow.h (block_stmt_iterator): Likewise.
5829169689Skan	* tree-inline.c (copy_statement_list): New.
5830169689Skan	(copy_body_r): Use it, and append_to_statement_list.
5831169689Skan	(initialize_inlined_parameters): Use append_to_statement_list.
5832169689Skan	(expand_call_inline): Likewise.
5833169689Skan	(gimple_expand_calls_inline): New.
5834169689Skan	(expand_calls_inline): Use it.
5835169689Skan	(walk_tree, unsave_r): Handle STATEMENT_LIST.
5836169689Skan	(add_stmt_to_compound): Remove.
5837169689Skan	* tree-iterator.c: New file.
5838169689Skan	* tree-iterator.h: Re-implement based on STATEMENT_LIST.
5839169689Skan	* tree-mudflap.c (mf_decl_cache_locals): Don't
5840169689Skan	rationalize_compound_expr.
5841169689Skan	* tree-optimize.c (optimize_function_tree): Make static.
5842169689Skan	Rechain statements from blocks before deleting the cfg.
5843169689Skan	* tree-pretty-print.c (dump_generic_node): Handle STATEMENT_LIST,
5844169689Skan	update for change in tree_stmt_iterator wrt COMPOUND_EXPR.
5845169689Skan	(dump_generic_node): Dump lowered COND_EXPR on a single line.
5846169689Skan	* tree-simple.c (is_gimple_stmt): Handle STATEMENT_LIST.
5847169689Skan	* tree-simple.h (foreach_stmt_fn, foreach_stmt): Remove.
5848169689Skan	(gimplify_to_stmt_list): Declare.
5849169689Skan	(alloc_stmt_list, free_stmt_list): Declare.
5850169689Skan	* tree-ssa-dce.c (should_remove_dead_stmt): Rename from
5851169689Skan	remove_dead_stmt; return bool if statement should be removed.
5852169689Skan	(remove_dead_stmts): Update to match.
5853169689Skan	* tree-ssa-live.c (build_tree_conflict_graph): Don't use
5854169689Skan	FOR_EACH_STMT_IN_REVERSE.
5855169689Skan	* tree-ssa-pre.c (reaching_def): Tidy BSI usage.
5856169689Skan	(insert_one_operand, collect_expressions): Likewise.
5857169689Skan	* tree.c (tree_size): Handle STATEMENT_LIST.
5858169689Skan	(copy_node): Abort on STATEMENT_LIST.
5859169689Skan	(expr_first, expr_last): Move to tree-iterator.c.
5860169689Skan	(expr_length): Remove.
5861169689Skan	(tree_node_structure): Handle STATEMENT_LIST.
5862169689Skan	(tsi_link_before, tsi_link_after, tsi_delink): Move to tree-iterator.c.
5863169689Skan	(tsi_link_chain_before, tsi_link_chain_after): Merge into non-chain.
5864169689Skan	(tsi_new_stmt_list, tsi_stmt_list_head, body_is_empty): Kill.
5865169689Skan	* tree.def (STATEMENT_LIST): New.
5866169689Skan	* tree.h (STATEMENT_LIST_HEAD, STATEMENT_LIST_TAIL): New.
5867169689Skan	(struct tree_statement_list_node): New.
5868169689Skan	(struct tree_statement_list): New.
5869169689Skan	(enum tree_node_structure_enum): Add TS_STATEMENT_LIST.
5870169689Skan	(union tree_node): Add stmt_list.
5871169689Skan	(expr_length): Remove.
5872169689Skan	(expr_only): New.
5873169689Skan	(add_to_compound_expr, body_is_empty): Remove.
5874169689Skan	(optimize_function_tree): Remove.
5875169689Skan
5876169689Skan2003-11-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5877169689Skan
5878169689Skan	* tree-flow.h (remove_useless_vars): Declare.
5879169689Skan	(expand_var_p): Declaration removed.
5880169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Call remove_useless_vars.
5881169689Skan	* tree-cfg.c (dump_function_to_file): Update dumping of variables.
5882169689Skan	* gimple-low.c (expand_var_p): Made static.
5883169689Skan	(remove_useless_vars): New.
5884169689Skan	(expand_used_vars): Expand all variables in the
5885169689Skan	cfun->unexpanded_var_list.
5886169689Skan
5887169689Skan2003-11-11  Richard Henderson  <rth@redhat.com>
5888169689Skan
5889169689Skan	* c-common.c (c_gimplify_stmt): Fix botched removal of
5890169689Skan	rationalize_compound_expr calls.
5891169689Skan
5892169689Skan	* c-semantics.c (build_stmt): Set TREE_SIDE_EFFECTS.
5893169689Skan	* c-simplify.c (c_gimplify_stmt): Return a gimplify_status;
5894169689Skan	mind the status from subroutines to avoid re-gimplification.
5895169689Skan	(c_build_bind_expr): Do not call gimplify_stmt.
5896169689Skan	(gimplify_c_loop): Don't create a loop_expr; fully gimplify.
5897169689Skan	(gimplify_block, gimplify_cleanup, gimplify_expr_stmt,
5898169689Skan	gimplify_for_stmt, gimplify_while_stmt, gimplify_do_stmt,
5899169689Skan	gimplify_if_stmt, gimplify_switch_stmt, gimplify_return_stmt,
5900169689Skan	gimplify_decl_stmt, gimplify_compound_literal_expr,
5901169689Skan	gimplify_stmt_expr): Return a gimplify_status.  In most cases,
5902169689Skan	don't do local gimplification of sub-structures.
5903169689Skan	(gimplify_decl_stmt): Use append_to_compound_expr when we care
5904169689Skan	about the result value.
5905169689Skan	(gimplify_stmt_expr): Use append_to_statement_list_force and
5906169689Skan	re-gimplify so that voidify_wrapper_expr can work.
5907169689Skan	(finish_bc_block): Don't append to a non-list.
5908169689Skan	(c_gimplify_expr): Pass back the gimplify_status of subroutines.
5909169689Skan	* c-common.h (c_gimplify_stmt): Update decl.
5910169689Skan	* gimplify.c (append_to_statement_list_1): Make sure list_p is
5911169689Skan	never null after call.
5912169689Skan	(append_to_compound_expr): New.
5913169689Skan	* tree-simple.h (append_to_compound_expr): Declare.
5914169689Skan
5915169689Skan2003-11-11  Richard Henderson  <rth@redhat.com>
5916169689Skan
5917169689Skan	* gimplify.c (gimplify_addr_expr): Clear, not copy, TREE_SIDE_EFFECTS.
5918169689Skan
5919169689Skan2003-11-11  Richard Henderson  <rth@redhat.com>
5920169689Skan
5921169689Skan	PR c/13014
5922169689Skan	* c-simplify.c (gimplify_if_stmt): Remove short circuit.
5923169689Skan	* tree-cfg.c (struct rus_data): Add has_label.
5924169689Skan	(remove_useless_stmts_warn_notreached): New.
5925169689Skan	(remove_useless_stmts_cond): Warn for deleted conditionals.
5926169689Skan	(remove_useless_stmts_tc): Warn for deleted catches.
5927169689Skan	(remove_useless_stmts_1): Set has_label.
5928169689Skan
5929169689Skan2003-11-11  Jan Hubicka  <jh@suse.cz>
5930169689Skan
5931169689Skan	* gimplify.c (gimplify_call_expr):  Unset side effects for
5932169689Skan	pure functions too.
5933169689Skan	* tree-cfg.c (update-call_expr_flags): New function.
5934169689Skan	(remove_useless_stmts_and_vars_1): Use it.
5935169689Skan	(is_ctrl_altering_stmt):  Pure/const calls never alter the CFG.
5936169689Skan	* tree-ssa-dce.c (stmt_useful_p): Check side effects flag
5937169689Skan	on call exprs.
5938169689Skan
5939169689Skan2003-11-11  Jan Hubicka  <jh@suse.cz>
5940169689Skan
5941169689Skan	* tree-cfg.c (has_label_p): New function.
5942169689Skan	(tree_verify_flow_info): New checks.
5943169689Skan	* tree-optimize.c (optimize_function_tree): Call verify_flow_info
5944169689Skan	before de-SSA.
5945169689Skan
5946169689Skan2003-11-11  Richard Henderson  <rth@redhat.com>
5947169689Skan
5948169689Skan	* tree-cfg.c (struct rus_data): Rename from rusv_data.
5949169689Skan	Remove remove_unused_vars.
5950169689Skan	(remove_useless_stmts*): Rename from remove_useless_stmts_and_vars*.
5951169689Skan	(remove_useless_stmts_bind): Do not remove dead variables.
5952169689Skan	(remove_useless_stmts): Kill remove_unused_vars argument.
5953169689Skan	* tree-flow.h (remove_useless_stmts): Update.
5954169689Skan	* tree-optimize.c (tree_rest_of_compilation): Update call.
5955169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Likewise.
5956169689Skan
5957169689Skan2003-11-11  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5958169689Skan	    Diego Novillo  <dnovillo@redhat.com>
5959169689Skan
5960169689Skan	* basic-block.h (brief_dump_cfg): Declare.
5961169689Skan	* cfg.c (dump_cfg_bb_info, brief_dump_cfg): New.
5962169689Skan	* diagnostic.h (dump_generic_node): Declaration changed.
5963169689Skan	(print_generic_stmt_indented): Declare.
5964169689Skan	* gimple-low.c (expand_var_p): New.
5965169689Skan	(expand_used_vars): Use it.
5966169689Skan	* tree-cfg.c (struct cfg_stats_d): Remove num_failed_bind_expr_merges
5967169689Skan	field.
5968169689Skan	(remove_bb): Only dump whole block with TDF_DETAILS.
5969169689Skan	(tree_dump_bb): Use dump_generic_bb.
5970169689Skan	(dump_tree_cfg): Use brief_dump_cfg and dump_function_to_file.
5971169689Skan	(dump_cfg_function_to_file): Merged into dump_function_to_file,
5972169689Skan	removed.
5973169689Skan	(dump_cfg_stats): Do not dump cfg_stats.num_failed_bind_expr_merges.
5974169689Skan	(dump_function_to_file): Moved from tree-dump.c, merged with
5975169689Skan	dump_cfg_function_to_file.
5976169689Skan	* tree-dump.c (dump_function_to_file): Removed.
5977169689Skan	* tree-flow.h (dump_cfg_function_to_file): Declaration removed.
5978169689Skan	(dump_generic_bb, expand_var_p): Declare.
5979169689Skan	* tree-must-alias.c (tree_compute_must_alias): Replace
5980169689Skan	dump_cfg_function_to_file by dump_function_to_file.
5981169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Ditto.
5982169689Skan	* tree-ssa-copyprop.c (tree_ssa_copyprop): Ditto.
5983169689Skan	* tree-ssa-dce.c (tree_ssa_dce): Ditto.
5984169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize_1): Ditto.
5985169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Ditto.
5986169689Skan	* tree-ssa.c (rewrite_into_ssa, rewrite_out_of_ssa): Ditto.
5987169689Skan	* tree-tailcall.c (tree_optimize_tail_calls): Ditto.
5988169689Skan	* tree-pretty-print.c (print_declaration, print_generic_decl): Don't
5989169689Skan	use flags argument, change spacing.
5990169689Skan	(dump_block_info): Removed.
5991169689Skan	(dump_generic_bb_buff, dump_generic_bb, print_generic_stmt_indented,
5992169689Skan	dump_bb_header, dump_bb_end, dump_phi_nodes): New functions.
5993169689Skan	(dump_vops): Change spacing, don't dump phi nodes.
5994169689Skan	(do_niy, print_generic_stmt, print_generic_expr, print_declaration,
5995169689Skan	print_struct_decl, print_call_name): Add argument to
5996169689Skan	the dump_generic_node calls.
5997169689Skan	(last_bb): Removed.
5998169689Skan	(dump_generic_node): Print semicolons at end of statements correctly.
5999169689Skan	Don't print bb related stuff.
6000169689Skan	(maybe_init_pretty_print): Don't initialize last_bb.
6001169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Do not allow virtual operands to
6002169689Skan	be shown in the .optimized dump.
6003169689Skan
6004169689Skan2003-11-11  Daniel Berlin  <dberlin@dberlin.org>
6005169689Skan
6006169689Skan	PR optimization/12936
6007169689Skan	* tree-ssa-pre.c (expr_phi_insertion): Remove unused code that was
6008169689Skan	causing ICE's for VA_ARG_EXPR.
6009169689Skan
6010169689Skan2003-11-10  Richard Henderson  <rth@redhat.com>
6011169689Skan
6012169689Skan	* gimple-low.c (lower_function_body): Lower bind_expr in place.
6013169689Skan	(lower_stmt): Only incr for stmts we're skipping.
6014169689Skan	(lower_cond_expr): Detect empty if.
6015169689Skan
6016169689Skan2003-11-10  Steven Bosscher  <stevenb@suse.de>
6017169689Skan
6018169689Skan	* toplev.c (rest_of_decl_compilation): Use the location of the
6019169689Skan	declaration for error messages.
6020169689Skan
6021169689Skan2003-11-10  Richard Henderson  <rth@redhat.com>
6022169689Skan
6023169689Skan	* gimplify.c (add_stmt_to_compound, add_tree): Remove.
6024169689Skan	(append_to_statement_list_1, append_to_statement_list): New.
6025169689Skan	(append_to_statement_list_force): New.
6026169689Skan	(gimplify_loop_expr): Take pre_p.
6027169689Skan	(gimplify_expr): Provide it.
6028169689Skan	* tree-simple.h: Update.
6029169689Skan
6030169689Skan	* c-simplify.c: Replace add_tree with append_to_statement_list.
6031169689Skan	* gimplify.c, tree-mudflap.c: Likewise.
6032169689Skan
6033169689Skan2003-11-10  Richard Henderson  <rth@redhat.com>
6034169689Skan
6035169689Skan	* c-common.c (c_warn_unused_result): Restructure to use iterator
6036169689Skan	on COMPOUND_EXPR only.
6037169689Skan
6038169689Skan2003-11-09  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6039169689Skan
6040169689Skan	* tree-cfg.c (tree_verify_flow_info): Fix checking of order of basic
6041169689Skan	blocks over code.
6042169689Skan
6043169689Skan2003-11-09  Richard Henderson  <rth@redhat.com>
6044169689Skan
6045169689Skan	* basic-block.h (struct edge_def): Turn insns into a union.
6046169689Skan	* cfgrtl.c (insert_insn_on_edge): Update to match.
6047169689Skan	(commit_one_edge_insertion, commit_edge_insertions): Likewise.
6048169689Skan	(commit_edge_insertions_watch_calls): Likewise.
6049169689Skan	* gcse.c (reg_killed_on_edge, bypass_block): Likewise.
6050169689Skan	* profile.c (instrument_edges): Likewise.
6051169689Skan	* rtlanal.c (hoist_insn_to_edge): Likewise.
6052169689Skan	* tree-cfg.c (PENDING_STMT): Likewise.
6053169689Skan	(SET_PENDING_STMT): Remove.
6054169689Skan	(bsi_commit_edge_inserts): Update to match.
6055169689Skan
6056169689Skan2003-11-08  Jan Hubicka  <jh@suse.cz>
6057169689Skan
6058169689Skan	* fold.c (nondestructive_fold_binary_to_constant): Fix typo.
6059169689Skan	* fold-const.c (fold_relational_const): Check for side effects.
6060169689Skan
6061169689Skan2003-11-07  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6062169689Skan
6063169689Skan	* basic-block.h (create_bb): Declaration changed.
6064169689Skan	* tree-cfg.c (create_bb): Enable creating a block on specified place.
6065169689Skan	(make_blocks, tree_split_edge, tree_make_forwarder_block): Use it.
6066169689Skan	(tree_verify_flow_info): Check bbs are in the correct order.
6067169689Skan
6068169689Skan	* tree-cfg.c (find_unreachable_blocks): Remove now incorrect comments.
6069169689Skan
6070169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Don't remove annotations from
6071169689Skan	statements before the final dump.
6072169689Skan
6073169689Skan2003-11-07  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6074169689Skan
6075169689Skan	* tree-tailcall.c (struct tailcall): New.
6076169689Skan	(bb_optimize_tail_calls, find_tail_call_p): Removed.
6077169689Skan	(eliminate_tail_call): Get the tailcall from the struct tailcall.
6078169689Skan	(optimize_tail_call, find_tail_calls): New.
6079169689Skan	(tree_optimize_tail_calls): Use them.
6080169689Skan
6081169689Skan2003-11-07  Jan Hubicka  <jh@suse.cz>
6082169689Skan
6083169689Skan	* gimple-low.c (simple_goto_p): Move to...
6084169689Skan	* tree-cfg.c: (simple_goto_p): ... here;
6085169689Skan	(nonlocal_goto_p): New.
6086169689Skan	(is_computed_goto): Rename to ...
6087169689Skan	(computed_goto_p): ... this; make global.
6088169689Skan	(factor_computed_gotos, make_blocks):  Update calls.
6089169689Skan	(make_ctrl_stmt_edges): Add edge for nonlocal labels; use new functions.
6090169689Skan	* tree-flow.h (is_coputed_goto): Kill.
6091169689Skan	(nonlocal_goto_p, simple_goto_p, computed_goto_p): Declare.
6092169689Skan	* tree-ssa-ccp (visit_stmt): Update.
6093169689Skan
6094169689Skan2003-11-07  Jan Hubicka  <jh@suse.cz>
6095169689Skan
6096169689Skan	* fold-const.c (tree_expr_nonzero_p): Fix typo.
6097169689Skan
6098169689Skan	* fold-const.c (tree_expr_nonzero_p): New function.
6099169689Skan	(fold_relational_const): Use it.
6100169689Skan	(nondestructive_fold_binary_to_constant): Allow casts in address
6101169689Skan	expressions.
6102169689Skan
6103169689Skan2003-11-06  Jan Hubicka  <jh@suse.cz>
6104169689Skan
6105169689Skan	* tree-cfg.c (tree_block_label):  Cleanup.
6106169689Skan
6107169689Skan2003-11-06  Daniel Berlin  <dberlin@dberlin.org>
6108169689Skan
6109169689Skan	* tree-ssa-pre.c (fast_a_dominates_b): New function.
6110169689Skan	(build_dfs_id_array_1): Ditto.
6111169689Skan	(build_dfs_id_array): Ditto.
6112169689Skan	(load_modified_phi_result): Use fast_a_dominates_b.
6113169689Skan	(rename_1): Ditto.
6114169689Skan	Also use build_dfs_id_array, and remove some duplicate ephi_at_block
6115169689Skan	calls.
6116169689Skan	(insert_occ_in_preorder_dt_order): Remove some duplicate ephi_at_block
6117169689Skan	calls.
6118169689Skan	(pre_expression): Ditto.
6119169689Skan	Also free dfs_id arrays here.
6120169689Skan	(collect_expressions): Remove duplicate bsi_stmt calls.
6121169689Skan
6122169689Skan2003-11-06  Daniel Berlin  <dberlin@dberlin.org>
6123169689Skan
6124169689Skan	* tree-ssa-pre.c (count_stmts_in_bb): Removed.
6125169689Skan	(set_var_phis): Only call bb_for_stmt once.
6126169689Skan	(insert_one_operand): Remove endtree, endtreep, a lot of special handling
6127169689Skan	no longer needed.  Remove insert_done.
6128169689Skan	(collect_expressions): Enable INDIRECT_REF and SSA_NAME handling.
6129169689Skan
6130169689Skan2003-11-06  Steven Bosscher  <stevenb@suse.de>
6131169689Skan
6132169689Skan	* tree-cfg.c (STRIP_CONTAINERS): Remove.
6133169689Skan
6134169689Skan2003-11-06  Jan Hubicka  <jh@suse.cz>
6135169689Skan
6136169689Skan	* tree-cfg.c (cleanup_cond_expr_graph):  Clean edge flags.
6137169689Skan
6138169689Skan2003-11-06  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6139169689Skan
6140169689Skan	* tree-dump.c (dump_options): Remove TDF_LINENO from all setting.
6141169689Skan
6142169689Skan2003-11-06  Jan Hubicka  <jh@suse.cz>
6143169689Skan
6144169689Skan	* builtins.c (expand_builtin_strstr, expand_builtin_strchr,
6145169689Skan	expand_builtin_strrchr, expand_builtin_strpbrk,
6146169689Skan	simplify_builtin_strstr, simplify_builtin_strrchr,
6147169689Skan	simplify_builtin_strpbrk): Add missing casts.
6148169689Skan
6149169689Skan2003-11-05  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6150169689Skan
6151169689Skan	* diagnostic.h (print_generic_decl): Declare.
6152169689Skan	* tree-cfg.c (dump_cfg_function_to_file): Dump variables in
6153169689Skan	unexpanded_var_list.
6154169689Skan	* tree-pretty-print.c (print_generic_decl): New function.
6155169689Skan
6156169689Skan2003-11-05  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6157169689Skan
6158169689Skan	* Makefile.in (gimplify.o): Add function.h dependency.
6159169689Skan	* c-call-graph.c (construct_call_graph): Modify build_tree_cfg call.
6160169689Skan	* gimple-low.c (record_vars): Export.
6161169689Skan	(lower_function_body): Remove the topmost BIND_EXPR.
6162169689Skan	* gimplify.c: Include function.h.
6163169689Skan	(gimple_add_tmp_var): Record temporaries in the
6164169689Skan	cfun->unexpanded_vars_list if available.
6165169689Skan	* tree-cfg.c (build_tree_cfg): Work without the topmost BIND_EXPR.
6166169689Skan	(dump_cfg_function_to_file): New.
6167169689Skan	(dump_tree_cfg): Use dump_cfg_function_to_file.
6168169689Skan	* tree-dump.c (dump_function_to_file): Work without the topmost
6169169689Skan	BIND_EXPR.
6170169689Skan	* tree-flow.h (build_tree_cfg): Declaration changed.
6171169689Skan	(dump_cfg_function_to_file, record_vars): Declare.
6172169689Skan	* tree-optimize.c (optimize_function_tree, tree_rest_of_compilation):
6173169689Skan	Work without the topmost BIND_EXPR.
6174169689Skan	* tree-must-alias.c (tree_compute_must_alias): Use
6175169689Skan	dump_cfg_function_to_file.
6176169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Ditto.
6177169689Skan	* tree-ssa-copyprop.c (tree_ssa_copyprop): Ditto.
6178169689Skan	* tree-ssa-dce.c (tree_ssa_dce): Ditto.
6179169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize_1): Ditto.
6180169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Ditto.
6181169689Skan	* tree-ssa.c (rewrite_into_ssa, rewrite_out_of_ssa): Ditto.
6182169689Skan	* tree-tailcall.c (tree_optimize_tail_calls): Ditto.
6183169689Skan	* tree.h (optimize_function_tree): Declaration changed.
6184169689Skan
6185169689Skan2003-11-03  Daniel Berlin  <dberlin@dberlin.org>
6186169689Skan
6187169689Skan	* tree-ssa-pre.c (handle_bb_creation): Removed.
6188169689Skan	(redo_dominators): Removed.
6189169689Skan	(insert_one_operand): Remove code to handle bb creation, since all
6190169689Skan	critical edges are now pre-split.
6191169689Skan	(finalize_2): Remove redo_dominators related code.
6192169689Skan	(pre_expression): Return 1 if we exited early because nothing happened.
6193169689Skan	(split_critical_edges): Do fake variable assignments instead, because
6194169689Skan	it works. return true if we actually split an edge.
6195169689Skan	(tree_perform_ssapre): Remove redo_dominators code.
6196169689Skan
6197169689Skan2003-11-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6198169689Skan
6199169689Skan	* function.h (struct function): New field unexpanded_var_list.
6200169689Skan	* gimple-low.c (unexpanded_var_list): Removed.
6201169689Skan	(record_vars, expand_used_vars): Use cfun->unexpanded_var_list.
6202169689Skan	* tree-flow.h (unexpanded_var_list): Declaration removed.
6203169689Skan
6204169689Skan	* gimplify.c (should_carry_locus_p): New.
6205169689Skan	(annotate_all_with_locus_1): Use it.  Do not annotate empty
6206169689Skan	statements.
6207169689Skan
6208169689Skan2003-11-03  Jan Hubicka  <jh@suse.cz>
6209169689Skan
6210169689Skan	* tree-cfg.c (tree_try_redirect_by_replacing_jump): Do not use
6211169689Skan	succesor_block.
6212169689Skan
6213169689Skan2003-11-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6214169689Skan
6215169689Skan	* tree-pretty-print.c (dump_block_info): Add flags parameter.
6216169689Skan	Only show line number when asked to.
6217169689Skan	(dump_generic_node): Pass flags to dump_block_info.
6218169689Skan
6219169689Skan2003-11-03  Jan Hubicka  <jh@suse.cz>
6220169689Skan
6221169689Skan	* cfghooks.h (redirect_edge_and_branch hook): Make it return edge.
6222169689Skan	* cfgrtl.c (cfg_layout_redirect_edge_and_branch,
6223169689Skan	rtl_redirect_edge_and_branch, try_redirect_by_replacing_jump):
6224169689Skan	Update to new interface.
6225169689Skan	* tree-cfg.c (tree_cfg_hooks): Move to end of file; set
6226169689Skan	redirect_edge_and_branch and redirect_edge_and_branch_force.
6227169689Skan	(thread_jumps): Use redirect_edge_and_branch.
6228169689Skan	(tree_block_label): new; break out of thread_edge.
6229169689Skan	(tree_try_redirect_by_replacing_jump): New.
6230169689Skan	(thread_edge): Rename to tree_redirect_edge_and_branch; deal sanely
6231169689Skan	with unusual edges; preserve profile.
6232169689Skan	(tree_redirect_edge_and_branch_force): New.
6233169689Skan	* tree-flow.h (ssa_redirect_edge): Declare.
6234169689Skan	* tree-ssa.dom.c (tree_ssa_dominator_optimize): Use redirect_edge_and_branch.
6235169689Skan	* tree-ssa.c (ssa_redirect_edge): New.
6236169689Skan
6237169689Skan2003-11-03  Jeff Law  <law@redhat.com>
6238169689Skan
6239169689Skan	* domwalk.h (struct dom_walk_data): New field "global_data".
6240169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize_1): Initialize new
6241169689Skan	"global_data" field.
6242169689Skan	* tree-flow.h (enum need_phi_state): New enumeration.
6243169689Skan	(var_ann_d): Add bitfield for need_phi_state.
6244169689Skan	* tree-ssa.c (mark_def_sites_global_data): New structure to hold
6245169689Skan	global data for mark_def_sites dominator walk.
6246169689Skan	(mark_def_sites): Revamp to be called via the dominator walker.
6247169689Skan	(set_def_block): Update need_phi_state for the variable as needed.
6248169689Skan	(set_livein_block): Similarly.
6249169689Skan	(rewrite_into_ssa): Use dominator walker to call mark_def_sites.
6250169689Skan	Delay freeing dominance info.  Kill "globals" bitmap.
6251169689Skan	(insert_phi_nodes): No longer need "globals" bitmap.  Use
6252169689Skan	need_phi_state in variable's annotation to determine if a PHI
6253169689Skan	may be needed.
6254169689Skan
6255169689Skan	* tree-ssa-dom.c (dom_opt_finalize_block): Try to thread across the
6256169689Skan	edges leaving COND_EXPR nodes which are leafs in the dominator
6257169689Skan	tree.
6258169689Skan	(record_equivalences_from_incoming_edge): Do not set EQ_EXPR_VALUE
6259169689Skan	unless the block's single predecessor contains parent_block_last_stmt.
6260169689Skan
6261169689Skan2003-11-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6262169689Skan
6263169689Skan	* tree-dump.c (dump_options): Add TDF_LINENO.
6264169689Skan	* tree-pretty-print.c (dump_generic_node): Print line number for
6265169689Skan	statements if asked to.
6266169689Skan	* tree.h (TDF_LINENO): New.
6267169689Skan	* doc/invoke.texi (lineno): Document.
6268169689Skan
6269169689Skan2003-11-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6270169689Skan
6271169689Skan	* expr.c (expand_vars, expand_var): Split of ...
6272169689Skan	(expand_expr_1): ... here.
6273169689Skan	* expr.h (expand_var): Declare.
6274169689Skan	* gimple-low.c (lower_function_body, lower_stmt, lower_bind_expr):
6275169689Skan	Eliminate BIND_EXPRs.
6276169689Skan	(expand_used_vars): New.
6277169689Skan	* tree-alias-common.c (create_alias_vars): Walk variables in blocks.
6278169689Skan	* tree-cfg.c (make_bind_expr_blocks): Removed.
6279169689Skan	(make_blocks, build_tree_cfg, factor_computed_gotos): Don't handle
6280169689Skan	BIND_EXPRs.
6281169689Skan	(assign_vars_to_scope, successor_block, NEXT_BLOCK_LINK): Removed.
6282169689Skan	(make_edges, make_exit_edges): Don't use successor_block.
6283169689Skan	(remove_useless_stmts_and_vars_goto): Don't expect NEXT_BLOCK_LINK
6284169689Skan	to be set.
6285169689Skan	(bsi_init, bsi_next_in_bb, bsi_from_tsi): Don't handle BIND_EXPRs.
6286169689Skan	(replace_stmt): Don't create BIND_EXPRs.
6287169689Skan	* tree-flow.h (struct var_ann_d): Removed field scope.
6288169689Skan	(struct stmt_ann_d): Removed fields scope and scope_level.
6289169689Skan	(propagate_copy): Declaration changed.
6290169689Skan	(fixup_var_scope): Removed.
6291169689Skan	* tree-must-alias.c (tree_compute_must_alias): Consider DECL_NONLOCAL
6292169689Skan	vars call clobbered.
6293169689Skan	* tree-optimize.c (tree_rest_of_compilation): Call expand_used_vars.
6294169689Skan	* tree-ssa-copyprop.c (move_var_to_scope, fixup_var_scope): Removed.
6295169689Skan	(copyprop_stmt): Call to propagate_copy changed.
6296169689Skan	(propagate_copy): Don't update scope.
6297169689Skan	* tree-ssa-dom.c (cprop_into_stmt): Call to propagate_copy changed.
6298169689Skan	(eliminate_redundant_computations): Don't call fixup_var_scope.
6299169689Skan	* tree-ssa.c (insert_copy_on_edge): Don't update scope.
6300169689Skan
6301169689Skan2003-11-02  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6302169689Skan
6303169689Skan	* tree-inline.c (walk_tree): Tail recursion optimized for
6304169689Skan	COMPOUND_EXPRs.
6305169689Skan	* tree-eh.c (collect_finally_tree): Ditto.
6306169689Skan
6307169689Skan2003-11-02  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6308169689Skan
6309169689Skan	* tree-optimize.c (optimize_function_tree): Removed duplicate call of
6310169689Skan	lower_function_body.  Moved call of reset_block_changes ...
6311169689Skan	(tree_rest_of_compilation) ... here.  Reset the scope to top before
6312169689Skan	expanding function end.
6313169689Skan
6314169689Skan2003-11-01  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6315169689Skan
6316169689Skan	* basic-block.h (BB_CONTROL_STRUCTURE): Removed.
6317169689Skan	* tree-cfg.c (struct cfg_stats_d): Field num_merged_cases removed.
6318169689Skan	(make_blocks, make_bind_expr_blocks, append_stmt_to_bb, bsi_link_after,
6319169689Skan	build_tree_cfg, factor_computed_gotos, prepend_stmt_to_bb,
6320169689Skan	remove_stmt, replace_stmt): Don't set parent.
6321169689Skan	(set_parent_stmt, add_stmt_to_bb, find_contained_blocks,
6322169689Skan	blocks_unreachable_p, remove_blocks, remove_unreachable_block,
6323169689Skan	move_outgoing_edges, merge_tree_blocks, remap_stmts): Removed.
6324169689Skan	(REMOVE_ALL_STMTS, REMOVE_NO_STMTS, REMOVE_NON_CONTROL_STRUCTS,
6325169689Skan	REMOVE_CONTROL_STRUCTS): Removed.
6326169689Skan	(remove_bb): Code to handle control structures removed.
6327169689Skan	(tree_block_forwards_to): Don't stop due to CASE_LABEL_EXPRs.
6328169689Skan	(tree_dump_bb): Don't print parent.  Print only BIND_EXPRs in slim
6329169689Skan	form.
6330169689Skan	(dump_tree_cfg): Don't count merged case labels.
6331169689Skan	(is_ctrl_structure): Removed.
6332169689Skan	(stmt_starts_bb_p): Don't handle CASE_LABEL_EXPRs.
6333169689Skan	(tree_verify_flow_info): Don't check BB_CONTROL_STRUCTURE.
6334169689Skan	* tree-flow-inline.h (parent_block, parent_stmt): Removed.
6335169689Skan	* tree-flow.h (struct stmt_ann_d): Remove parent_stmt field.
6336169689Skan	(parent_stmt, parent_block, is_ctrl_structure): Declarations removed.
6337169689Skan	* tree-pretty-print.c (dump_generic_node): Don't handle lowered
6338169689Skan	COND_EXPRs specially.
6339169689Skan	* tree-ssa-ccp.c (visit_stmt): Don't check is_ctrl_structure.
6340169689Skan
6341169689Skan2003-10-31  Jeff Law  <law@redhat.com>
6342169689Skan
6343169689Skan	* tree-ssa-dom.c (record_equivalences_from_stmt): Restore lost code
6344169689Skan	to create equivalences from BIT_IOR_EXPR.
6345169689Skan
6346169689Skan	* tree-ssa-dom.c (thread_jumps_walk_stmts): Go ahead and optimize
6347169689Skan	a COND_EXPR with a compile-time constant condition.
6348169689Skan
6349169689Skan2003-10-31  Diego Novillo  <dnovillo@redhat.com>
6350169689Skan
6351169689Skan	* tree-optimize.c (optimize_function_tree): Fix comment
6352169689Skan	describing SSA pass after DOM2.
6353169689Skan
6354169689Skan2003-10-31  Diego Novillo  <dnovillo@redhat.com>
6355169689Skan
6356169689Skan	Fix PR optimization/12825
6357169689Skan	* tree-optimize.c (optimize_function_tree): Run SSA renamer after
6358169689Skan	second DOM pass.
6359169689Skan
6360169689Skan2003-10-30  Richard Henderson  <rth@redhat.com>
6361169689Skan
6362169689Skan	* c-common.c (match_case_to_enum_1, match_case_to_enum): New.
6363169689Skan	(c_do_switch_warnings): New.
6364169689Skan	* c-common.h (c_do_switch_warnings): Declare.
6365169689Skan	* c-typeck.c (c_finish_case): Call it.
6366169689Skan	* stmt.c (all_cases_count, BITARRAY_TEST, BITARRAY_SET,
6367169689Skan	mark_seen_cases, check_for_full_enumeration_handling): Remove.
6368169689Skan	(expand_end_case_type): Don't do warn_switch handling.
6369169689Skan	* expr.h, tree.h: Remove dead decls.
6370169689Skan
6371169689Skan	* c-simplify.c (gimplify_switch_stmt): Force switch body non-null.
6372169689Skan
6373169689Skan2003-10-30  Richard Henderson  <rth@redhat.com>
6374169689Skan
6375169689Skan	* tree-cfg.c (thread_jumps): Allow SWITCH_EXPR.
6376169689Skan	(thread_edge): Handle it.  Tidy surrounding code.
6377169689Skan
6378169689Skan2003-10-30  Richard Henderson  <rth@redhat.com>
6379169689Skan
6380169689Skan	* domwalk.c (walk_dominator_tree): Pass any final is_ctrl_stmt
6381169689Skan	down the recursive walk.
6382169689Skan
6383169689Skan2003-10-30  Jeff Law  <law@redhat.com>
6384169689Skan
6385169689Skan	* tree-ssa-dom.c (thread_across_edge): Renamed from
6386169689Skan	thread_through_successor.  Revamp to thread the destination of an edge
6387169689Skan	rather than the successors of a block.
6388169689Skan	(dom_opt_finalize_block): Corresponding changes.  Do not bother calling
6389169689Skan	thread_across_edge unless we are at a leaf in the dominator tree.
6390169689Skan
6391169689Skan	* tree-cfg.c (thread_jumps): Now returns a bool.  Move some tests into
6392169689Skan	tree_forwarder_block_p.  Improve comments.
6393169689Skan	(cleanup_control_flow): Now returns a bool indicating if anything was
6394169689Skan	changed.
6395169689Skan	(thread_unconditional_jumps): Kill.
6396169689Skan	(cleanup_tree_cfg): Repeat cascading cleanups until nothing changes.
6397169689Skan	(tree_forwarder_block_p): Check forwardable bit in the block's
6398169689Skan	annotation to avoid useless work.  Mark blocks as not forwardable as
6399169689Skan	appropriate.  Verify destination is not the exit block here.  Do not
6400169689Skan	consider successors of the entry block as forwarders.  Ignore empty
6401169689Skan	statements when walking through the block's statements.  Verify target
6402169689Skan	block is not the start of a case label and that we can safely insert
6403169689Skan	a label at the target block.
6404169689Skan
6405169689Skan2003-10-29  Richard Henderson  <rth@redhat.com>
6406169689Skan
6407169689Skan	* c-common.c (c_warn_unused_result): Remove lowered containers.
6408169689Skan	* c-semantics.c (genrtl_case_label): Update add_case_node call.
6409169689Skan	* c-simplify.c (gimplify_switch_stmt): Build SWITCH_EXPR and
6410169689Skan	gimplify it simultaneously with the body.
6411169689Skan	* expr.c (expand_expr_1): Handle SWITCH_BODY clear and
6412169689Skan	SWITCH_LABELS set.  Update add_case_node calls.
6413169689Skan	* gimple-low.c (lower_stmt): Don't do anything for SWITCH_EXPR.
6414169689Skan	(lower_switch_expr, lower_case_label_expr): Remove.
6415169689Skan	* gimplify.c (gimplify_switch_expr): Zap SWITCH_BODY after
6416169689Skan	gimplification.  Force default entry for SWITCH_LABELS.
6417169689Skan	(gimplify_case_label_expr): Rename from gimple_add_case_label.
6418169689Skan	Assert switch in scope; lower to LABEL_EXPR.
6419169689Skan	* stmt.c (pushcase, pushcase_range) Update add_case_node calls.
6420169689Skan	(add_case_node): Add dont_expand_label argument.
6421169689Skan	(same_case_target_p): Don't search rtl.
6422169689Skan	* tree-cfg.c (enum find_location_action): Remove.
6423169689Skan	(make_switch_expr_blocks): Remove.
6424169689Skan	(make_blocks): Update.
6425169689Skan	(make_case_label_edges): Remove.
6426169689Skan	(make_edges): Update.
6427169689Skan	(find_contained_blocks): Remove lowered containers.
6428169689Skan	(make_switch_expr_edges): New.
6429169689Skan	(make_ctrl_stmt_edges): Call it.
6430169689Skan	(make_cond_expr_edges): Use label_to_block.
6431169689Skan	(remove_useless_stmts_and_vars_1): Don't go into SWITCH_BODY.
6432169689Skan	(remove_unreachable_block): Remove SWITCH_EXPR special case.
6433169689Skan	(cleanup_cond_expr_graph): Tidy.
6434169689Skan	(cleanup_switch_expr_graph): Rewrite.
6435169689Skan	(disconnect_unreachable_case_labels): Remove.
6436169689Skan	(find_taken_edge_cond_expr): Use integer_zerop/integer_nonzerop.
6437169689Skan	(find_taken_edge_switch_expr): Rewrite.
6438169689Skan	(value_matches_some_label): Remove.
6439169689Skan	(find_case_label_for_value): New.
6440169689Skan	(is_ctrl_structure): Remove lowered containers.
6441169689Skan	(is_ctrl_stmt): Add SWITCH_EXPR.
6442169689Skan	(switch_parent): Remove.
6443169689Skan	(handle_switch_fallthru): Remove.
6444169689Skan	(handle_switch_split): Remove.
6445169689Skan	(find_insert_location): Merge into ...
6446169689Skan	(bsi_insert_on_edge_immediate): ... here.  Simplify.
6447169689Skan	(tree_split_edge): Don't set EDGE_FALLTHRU.
6448169689Skan	* tree-eh.c (collect_finally_tree): Remove lowered containers.
6449169689Skan	(replace_goto_queue_1, block_may_fallthru_last): Likewise.
6450169689Skan	(lower_eh_constructs_1): Likewise.
6451169689Skan	(verify_norecord_switch_expr): New.
6452169689Skan	(lower_try_finally_switch): Generate lowered switches.
6453169689Skan	* tree-inline.c (expand_calls_inline): Don't search null SWITCH_BODY.
6454169689Skan	* tree-pretty-print.c (dump_generic_node): Do something sensible
6455169689Skan	with lowered switch_expr.
6456169689Skan	* tree-ssa-dom.c (record_equivalences_from_incoming_edge): Update
6457169689Skan	for lowered switch_expr.
6458169689Skan	* tree.def (SWITCH_EXPR): Update docs.
6459169689Skan	* tree.h (add_case_node): Update decl.
6460169689Skan
6461169689Skan2003-10-29  Daniel Berlin <dberlin@dberlin.org>
6462169689Skan
6463169689Skan	* tree-ssa-pre.c (n_phi_preds): New variable.
6464169689Skan	(generate_vops_as_of_bb): New function
6465169689Skan	(generate_expr_as_of_bb): Remove unused first argument. Update all
6466169689Skan	callers.
6467169689Skan	(subst_phis): Add boundary check for the phi_pred_cache array.
6468169689Skan	(same_e_version_phi_result): Once modified, no point in continuing
6469169689Skan	the loop.
6470169689Skan	(finalize_2): ESSA Minimization can crash if we ended up with new
6471169689Skan	BB's
6472169689Skan
6473169689Skan2003-10-29  Richard Henderson  <rth@redhat.com>
6474169689Skan
6475169689Skan	* tree-eh.c (do_return_redirection): Don't move copy to RESULT_DECL
6476169689Skan	outside the RETURN_EXPR.  Introduce a new temporary as needed.
6477169689Skan
6478169689Skan2003-10-26  Richard Henderson  <rth@redhat.com>
6479169689Skan
6480169689Skan	* gimplify.c (keep_function_tree_in_gimple_form): Remove.
6481169689Skan	(gimplify_function_tree): Return void.  Remove hack for
6482169689Skan	language not supporting gimple.
6483169689Skan	* tree.h: Update decls.
6484169689Skan	* langhooks-def.h (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
6485169689Skan	* langhooks.h (struct lang_hooks): Add gimple_before_inlining.
6486169689Skan	* tree-inline.c (copy_body_r): Check that instead of
6487169689Skan	keep_function_tree_in_gimple_form.
6488169689Skan	(initialize_inlined_parameters): Likewise.
6489169689Skan	(expand_call_inline, expand_calls_inline): Likewise.
6490169689Skan
6491169689Skan	* explow.c (probe_stack_range): Never emit loop notes.
6492169689Skan	* expr.c (emit_block_move_via_loop): Likewise.
6493169689Skan	* toplev.c (rest_of_compilation): Always synthesize loop notes.
6494169689Skan
6495169689Skan2003-10-26  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6496169689Skan
6497169689Skan	* Makefile.in (gimple-low.o): Add function.h dependency.
6498169689Skan	* gimple-low.c (struct lower_data): New field block.
6499169689Skan	(lower_function_body, lower_stmt, lower_bind_expr): Record
6500169689Skan	the block at statements.
6501169689Skan	* cfglayout.c (insn_locators_initialize): Use new info about
6502169689Skan	blocks.
6503169689Skan	* expr.c (expand_expr): Record block changes.
6504169689Skan	* function.c (blocks_nreverse): Export.
6505169689Skan	(uninitialized_vars_warning): Use DECL_RTL_SET_P to test for presence
6506169689Skan	of rtl.
6507169689Skan	(reset_block_changes, record_block_change, finalize_block_changes,
6508169689Skan	check_block_change, free_block_changes): New functions.
6509169689Skan	* function.h (struct function): New bitfield dont_emit_block_notes.
6510169689Skan	New field ib_boundaries_block.
6511169689Skan	(blocks_nreverse, reset_block_changes, record_block_change,
6512169689Skan	finalize_block_changes, check_block_change, free_block_changes):
6513169689Skan	Declare.
6514169689Skan	* sibcall.c (optimize_sibling_and_tail_recursive_call): Don't call
6515169689Skan	reorder_blocks when dont_emit_block_notes.
6516169689Skan	* stmt.c (expand_start_bindings_and_block, expand_end_bindings):
6517169689Skan	Don't emit block notes when dont_emit_block_notes.
6518169689Skan	* toplev.c (rest_of_compilation): Don't call reorder_blocks when
6519169689Skan	dont_emit_block_notes.
6520169689Skan	* tree.c (build1): Initialize TREE_BLOCK field.
6521169689Skan	* tree-flow.h (lower_function_body): Declare.
6522169689Skan	* tree-optimize.c: Include function.h.
6523169689Skan	(optimize_function_tree): Call lower_function_body.
6524169689Skan	* tree.h (struct tree_exp): Add block field.
6525169689Skan	(TREE_BLOCK): New macro.
6526169689Skan
6527169689Skan2003-10-26  Richard Henderson  <rth@redhat.com>
6528169689Skan
6529169689Skan	* tree.h (tree_dump_index): Add TDI_lower.
6530169689Skan	* tree-dump.c (dump_files): Add .lower entry.
6531169689Skan	* tree-optimize.c (optimize_function_tree): Move lower_function_body,
6532169689Skan	(tree_rest_of_compilation): here.  Tidy .useless dump.
6533169689Skan
6534169689Skan2003-10-25  Jan Hubicka  <jh@suse.cz>
6535169689Skan
6536169689Skan	* c-common.c (c_estimate_num_insns_1): Kill.
6537169689Skan	(c_estimate_num_insns): Kill.
6538169689Skan	* c-common.h (c_estimate_num_insns): Kill.
6539169689Skan	* c-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
6540169689Skan	* cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
6541169689Skan	* objc-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
6542169689Skan	* java/lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
6543169689Skan	(java_estimate_num_insns_1, java_estimate_num_insns): Kill.
6544169689Skan	* cgraphunit (cgraph_analyze_function): Use estimate_num_insns.
6545169689Skan	* tree-eh.c (decide_copy_try_finally): Likewise.
6546169689Skan	* tree-inline.c (limits_allow_inilining, optimize_inline_calls): Likewise.
6547169689Skan	(estimate_num_insns_1, estimate_num_insns): New functions.
6548169689Skan	* langhooks-def.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
6549169689Skan	* langhooks.h (estimate_num_inssn): Kill.
6550169689Skan	* tree-inline.h (estimate_num_insns): Declare.
6551169689Skan
6552169689Skan2003-10-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6553169689Skan
6554169689Skan	* gimple-low.c: New.
6555169689Skan	* Makefile.in (gimple-low.o): Add.
6556169689Skan	* domwalk.c (walk_dominator_tree): Consider COND_EXPR a control
6557169689Skan	structure.
6558169689Skan	* tree-cfg.c (make_cond_expr_blocks, linearize_control_structures,
6559169689Skan	linearize_cond_expr): Removed.
6560169689Skan	(thread_jumps, tree_forwarder_block_p): New.
6561169689Skan	(merge_tree_blocks): Unused now.
6562169689Skan	(phi_alternatives_equal): Modified for use in jump threading.
6563169689Skan	(enum find_location_action): Remove EDGE_INSERT_LOCATION_NEW_ELSE.
6564169689Skan	(make_blocks): Don't call make_cond_expr_blocks.
6565169689Skan	(set_parent_stmt): Ensure we don't set COND_EXPR as a parent
6566169689Skan	statement.
6567169689Skan	(find_contained_blocks): Remove COND_EXPR alternative.
6568169689Skan	(make_cond_expr_edges): Handle lowered gotos.
6569169689Skan	(cleanup_tree_cfg): Don't call linearize_control_structures,
6570169689Skan	call thread_jumps and verify_flow_info and rerun cleanup_control_flow.
6571169689Skan	(remove_unreachable_block): Remove handling of structured COND_EXPRs.
6572169689Skan	(remove_bb): Fix warning for removed goto exprs.
6573169689Skan	(cleanup_control_flow, cleanup_cond_expr_graph,
6574169689Skan	cleanup_switch_expr_graph, find_taken_edge_cond_expr,
6575169689Skan	bsi_insert_before, find_insert_location, bsi_insert_on_edge_immediate):
6576169689Skan	Handle lowered COND_EXPRs.
6577169689Skan	(is_ctrl_structure): Remove COND_EXPR.
6578169689Skan	(is_ctrl_stmt): Add COND_EXPR.
6579169689Skan	(tree_verify_flow_info): Check validity of COND_EXPRs.
6580169689Skan	(thread_edge): Moved from tree-ssa-dom.c.
6581169689Skan	* tree-flow.h (cleanup_cond_expr_graph, cleanup_switch_expr_graph):
6582169689Skan	Declaration changed.
6583169689Skan	(thread_edge, lower_function_body): Declare.
6584169689Skan	* tree-optimize.c (optimize_function_tree): Call lower_function_body.
6585169689Skan	* tree-pretty-print.c (dump_generic_node): Dump lowered cond_exprs in
6586169689Skan	full.
6587169689Skan	* tree-ssa-copyprop.c (fixup_var_scope): Handle non-SSA_NAMEs.
6588169689Skan	* tree-ssa-dce.c (stmt_useful_p, process_worklist): Cleaned up when
6589169689Skan	COND_EXPRs are lowered.
6590169689Skan	* tree-ssa-dom.c (thread_edge): Moved to tree-cfg.c.
6591169689Skan	(tree_ssa_dominator_optimize_1): Dumps and setting of vars_to_rename
6592169689Skan	moved from thread_edge.
6593169689Skan	(optimize_stmt): Pass block iterator to cleanup_cond_expr_graph and
6594169689Skan	cleanup_switch_expr_graph.
6595169689Skan	* tree-ssa.c (insert_copy_on_edge): Fixup scope for emitted variables.
6596169689Skan
6597169689Skan	* dominance.c (BB_NODE): Use VARRAY_GENERIC_PTR_NOGC.
6598169689Skan	(calculate_dominance_info): Use VARRAY_GENERIC_PTR_NOGC_INIT.
6599169689Skan	* varray.c (element): Add GENERIC_PTR_NOGC entry.
6600169689Skan	* varray.h (enum varray_data_enum): Add VARRAY_DATA_GENERIC_NOGC.
6601169689Skan	(union varray_data_tag): Add generic_nogc.
6602169689Skan	(VARRAY_GENERIC_PTR_NOGC_INIT,  VARRAY_GENERIC_PTR_NOGC,
6603169689Skan	VARRAY_PUSH_GENERIC_PTR_NOGC, VARRAY_TOP_GENERIC_PTR_NOGC): New.
6604169689Skan
6605169689Skan2003-10-25  Jan Hubicka  <jh@suse.cz>
6606169689Skan
6607169689Skan	* cppcharset.c (one_utf8_to_utf32): Initialize 's' to silence warning.
6608169689Skan
6609169689Skan2003-10-25  Jan Hubicka  <jh@suse.cz>
6610169689Skan
6611169689Skan	* fold-const.c (nondestructive_fold_binary_to_constant): Realize that
6612169689Skan	(plus (address) (const_int)) is a constant.
6613169689Skan
6614169689Skan2003-10-25  Jan Hubicka  <jh@suse.cz>
6615169689Skan
6616169689Skan	* opts.c (decode_options): Uncomment unit-at-a-time setting
6617169689Skan	* params.def: Syncrhonize with manline.
6618169689Skan	* tree-inline.c (initialize_inlined_parameters):  Set variable as
6619169689Skan	gimplified.
6620169689Skan
6621169689Skan2003-10-24  Steven Bosscher  <steven@gcc.gnu.org>
6622169689Skan
6623169689Skan	* gimplify.c (create_artificial_label): New function.
6624169689Skan	(build_and_jump): Use it.
6625169689Skan	* c-simplify.c (c_gimplify_stmt): Likewise.
6626169689Skan	(gimplify_condition): Likewise.
6627169689Skan	* tree-cfg.c (factor_computed_gotos, tree_block_forwards_to,
6628169689Skan	handle_switch_fallthru, handle_switch_split): Likewise.
6629169689Skan	* tree-ssa-dom.c (thread_edge): Likewise.
6630169689Skan	* tree-ssa-pre.c (split_critical_edges): Likewise.
6631169689Skan	* tree-tailcall.c (eliminate_tail_call): Likewise.
6632169689Skan	* tree-eh.c (frob_into_branch_around,
6633169689Skan	honor_protect_cleanup_actions, lower_try_finally_nofallthru,
6634169689Skan	lower_try_finally_onedest, lower_try_finally_copy,
6635169689Skan	lower_try_finally_switch, lower_catch, lower_eh_filter,
6636169689Skan	lower_cleanup): Likewise.
6637169689Skan	(make_label): Remove.
6638169689Skan	* tree-simple.h (create_artificial_label): Add prototype.
6639169689Skan	* tree-inline.c (expand_call_inline): Make return label for
6640169689Skan	inlined function artificial.
6641169689Skan
6642169689Skan2003-10-23  Jeff Law  <law@redhat.com>
6643169689Skan
6644169689Skan	* timevar.def (TV_TREE_SSA_THREAD_JUMPS): New timevar.
6645169689Skan	* tree-dump.c (dump_files): Add dump file for jump threading.
6646169689Skan	* tree.h (TDI_thread_jumps): New enum member.
6647169689Skan	* tree-cfg.c (tree_block_forwards_to): No longer static.
6648169689Skan	* tree-flow.h (tree_block_forwards_to): Prototype.
6649169689Skan	(tree_ssa_dominator_thread_jumps): Likewise.
6650169689Skan	* tree-optimize.c (optimize_function_tree): Call jump threader.
6651169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize_1): New function.
6652169689Skan	Common code for redundancy elimination and jump threading on
6653169689Skan	the dominator tree.  Slightly different callback initialization
6654169689Skan	for redundancy elimination and jump threading.  Initialize
6655169689Skan	block forwardable attribute.
6656169689Skan	(tree_ssa_dominator_optimize): Call tree_ssa_dominator_optimize_1.
6657169689Skan	(tree_ssa_dominator_thread_jumps): New function.
6658169689Skan	(thread_edge): Mark results of PHI nodes as needing rewriting if
6659169689Skan	we have threaded through a block with PHI nodes.
6660169689Skan	(thread_through_successor): If thread_through_phis is nonzero,
6661169689Skan	then allow jump threading through blocks with PHI nodes.  If the
6662169689Skan	target block is a forwarder block, then forward the jump.
6663169689Skan	(thread_jumps_walk_stmts): Statement walker for dominator thread
6664169689Skan	jumping.
6665169689Skan
6666169689Skan	* tree-ssa-dom.c (record_equivalence_from_incoming_edge): Fix
6667169689Skan	comment typo.
6668169689Skan
6669169689Skan2003-10-23  Richard Henderson  <rth@redhat.com>
6670169689Skan
6671169689Skan	* gimplify.c (gimplify_*): Return gimplify_status.
6672169689Skan	(gimple_add_tmp_var): Set seen_in_bind_expr.
6673169689Skan	(gimplify_bind_expr): Likewise.  Kill if 0 code.
6674169689Skan	(gimplify_return_expr): Cope with error marks.
6675169689Skan	(gimple_push_cleanup): Do nothing if errors seen.
6676169689Skan	(gimplify_expr): Cope with error marks.  Use gimplify_status to
6677169689Skan	decide when to exit the main loop.  Zap statements with errors.
6678169689Skan	(gimplify_body): Return void.
6679169689Skan	(keep_function_tree_in_gimple_form): Don't exit on errors.
6680169689Skan	(gimplify_function_tree): Return bool.  Don't exit on errors.
6681169689Skan	* langhooks.c (lhd_gimplify_expr): Return GS_UNHANDLED.
6682169689Skan	* langhooks.h (struct lang_hooks): Update docs for gimplify_expr.
6683169689Skan	* tree-optimize.c (optimize_function_tree): Don't exit on errors.
6684169689Skan	Move delete_tree_cfg call outside optimization clause.
6685169689Skan	(tree_rest_of_compilation): Don't exit on errors.
6686169689Skan	* tree-simple.h (enum gimplify_status): New.
6687169689Skan	(gimplify_expr, gimplify_stmt, gimplify_body): Update.
6688169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Move delete_tree_cfg call to
6689169689Skan	optimize_function_tree.
6690169689Skan	* tree.h (struct tree_decl): Add seen_in_bind_expr.
6691169689Skan	(gimplify_function_tree): Update.
6692169689Skan	* c-common.c (c_add_case_label): Unify three error exit paths.
6693169689Skan	Create a normal label, not a case label to suppress unreachable
6694169689Skan	code warning.
6695169689Skan	* c-simplify.c (c_build_bind_expr): Don't create an empty bind
6696169689Skan	body.  Pass entire bind_expr to gimplify_stmt.
6697169689Skan	(gimplify_block): Don't abort on mismatches if errors seen.
6698169689Skan	(gimplify_expr_stmt): Cope with error marks.
6699169689Skan	(gimplify_decl_stmt): Likewise.
6700169689Skan	(c_gimplify_expr): Return gimplify_status.
6701169689Skan
6702169689Skan2003-10-22  Daniel Berlin  <dberlin@dberlin.org>
6703169689Skan
6704169689Skan	* tree-pretty-print.c (dump_generic_node): Kill off ELEFT_NODE.
6705169689Skan	Print out status of new EUSE_LVAL flag.
6706169689Skan
6707169689Skan	* tree-ssa-pre.c: #include alloc-pool.h
6708169689Skan	(append_eref_to_block): Inline.
6709169689Skan	(names_match_p): Ditto.
6710169689Skan	(pre_expression): Take sbitmap of variables to rename so we can
6711169689Skan	mark our new variable if necessary.
6712169689Skan	(insert_occ_in_preorder): Completely redo to be an O(n log n)
6713169689Skan	algorithm worst case, instead O(n^2) all the time.
6714169689Skan	(build_dfn_array): New function.
6715169689Skan	(eref_compare): Ditto.
6716169689Skan	(preorder_count): Remove no-longer used variable.
6717169689Skan	(pre_stats): Add new stats about memory use.
6718169689Skan	(struct expr_info): add loadpre_cand member.
6719169689Skan	(euse_node_pool): New alloc-pool
6720169689Skan	(eref_node_pool): Ditto
6721169689Skan	(create_expr_ref): Use them.
6722169689Skan	(expr_phi_insertion): Insert on PHI's of VUSES for loadpre cands.
6723169689Skan	Not all expressions have uses (left occurrences don't).
6724169689Skan	(load_modified_real_occ_real_occ): Return false, not abort.
6725169689Skan	(process_delayed_rename): Remove useless fibheap, do proper LVAL
6726169689Skan	handling.
6727169689Skan	(insert_euse_in_preorder_dt_order_1): No more ELEFT_NODE's.
6728169689Skan	(finalize_1): Ditto.
6729169689Skan	(set_save): Ditto.
6730169689Skan	(really_available_def): New function.
6731169689Skan	(finalize_2): Use really_available_def, not EUSE_SAVE, during EPHI
6732169689Skan	minimization.
6733169689Skan	(names_match_p): Handle INDIRECT_REF properly.
6734169689Skan	(call_modifies_slot): Removed.
6735169689Skan	(add_call_to_ei): Removed.
6736169689Skan	(process_left_occs_and_kills): Fix.
6737169689Skan	(pre_expression): Zero out counts.
6738169689Skan	(collect_expressions): Split out from tree_perform_ssapre. Do this
6739169689Skan	in domtree order.
6740169689Skan	(tree_perform_ssapre): Create and free alloc-pools.
6741169689Skan	Rename new variables that need to be renamed.
6742169689Skan
6743169689Skan	* tree.c (tree_size): Remove ELEFT_NODE.
6744169689Skan	(tree_node_size): Ditto.
6745169689Skan	(is_essa_node): Ditto.
6746169689Skan
6747169689Skan	* tree.def (ELEFT_NODE): Gone.
6748169689Skan
6749169689Skan	* tree.h (EREF_NODE_CHECK): No more ELEFT_NODE.
6750169689Skan	(struct tree_eref_common): Add ID flag.
6751169689Skan	(struct tree_euse_node): Add lval flag.
6752169689Skan	(EREF_ID): New macro.
6753169689Skan	(EUSE_LVAL): New macro.
6754169689Skan
6755169689Skan2003-10-22  Daniel Berlin  <dberlin@dberlin.org>
6756169689Skan
6757169689Skan	* tree-flow-inline.h (add_dom_child): XMALLOC, not GGC_ALLOC,
6758169689Skan	the bitmap.
6759169689Skan	(clear_dom_children): XFREE the bitmap.
6760169689Skan
6761169689Skan2003-10-22  Andrew MacLeod  <amacleod@redhat.com>
6762169689Skan
6763169689Skan	* tree-ssa-live.c (new_tree_live_info, (delete_tree_live_info,
6764169689Skan	live_worklist, set_if_valid, add_livein_if_notdef,
6765169689Skan	calculate_live_on_entry, calculate_live_on_exit,
6766169689Skan	add_conflicts_if_valid, dump_live_info): Use bitmap instead of sbitmap.
6767169689Skan	(build_tree_conflict_graph): Use bitmap, Change mechanism for
6768169689Skan	adding conflicts between live-on-entry partitions.
6769169689Skan	* tree-ssa-live.h (struct tree_live_info_d): Switch to bitmaps.
6770169689Skan	(partition_is_global, live_entry_blocks, live_on_exit,
6771169689Skan	live_merge_and_clear, make_live_on_entry): Switch to bitmaps.
6772169689Skan	* tree-ssa.c (struct _elim_graph): Remove bitmaps, use varrays.
6773169689Skan	(new_elim_graph, clear_elim_graph, delete_elim_graph): Switch from
6774169689Skan	old bitmap implementation.
6775169689Skan	(elim_graph_size): New. Number of elements in elimination graph.
6776169689Skan	(elim_graph_add_node): New. Add an element to the elim-graph.
6777169689Skan	(elim_graph_add_edge): New. Add an edge to the elim-graph.
6778169689Skan	(elim_graph_remove_succ_edge): New. Remove an edge for which a node
6779169689Skan	has a successor.
6780169689Skan	(FOR_EACH_ELIM_GRAPH_SUCC): Find all successor nodes.
6781169689Skan	(FOR_EACH_ELIM_GRAPH_PRED): Find all predeccesor nodes.
6782169689Skan	(eliminate_name, eliminate_build, elim_forward,
6783169689Skan	elim_unvisited_predecessor, elim_backward, elim_create, eliminate_phi):
6784169689Skan	Use new elim-graph routines.
6785169689Skan	(rewrite_out_of_ssa): Enable single-definition compaction when not
6786169689Skan	combining temporaries.
6787169689Skan
6788169689Skan2003-10-21  Richard Henderson  <rth@redhat.com>
6789169689Skan
6790169689Skan	* gimplify.c: Sort functions into use order, and all gimplification
6791169689Skan	functions to the end.
6792169689Skan
6793169689Skan2003-10-22  Jeff Law  <law@redhat.com>
6794169689Skan
6795169689Skan	* tree-cfg.c (thread_unconditional_jumps): New function.
6796169689Skan	(tree_block_forwards_to): Likewise.
6797169689Skan	(cleanup_tree_cfg): Call thread_unconditional_jumps.
6798169689Skan	* tree-flow.h (bb_ann_t): Add forwardable status bit.
6799169689Skan
6800169689Skan	* tree-dump.c (dump_files): Add entry for TDI_none.
6801169689Skan	(dump_begin): Do nothing for TDI_none.
6802169689Skan	(dump_enable_all, dump_switch_p): Start our scan at TDI_none + 1.
6803169689Skan	* tree.h (tree_dump_index): Add.
6804169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): If we have altered the
6805169689Skan	CFG and we have variables to [re]rename, go ahead and rename them before
6806169689Skan	starting the next iteration of the dominator optimizer.
6807169689Skan
6808169689Skan2003-10-21  Jason Merrill  <jason@redhat.com>
6809169689Skan
6810169689Skan	* gimplify.c (gimplify_modify_expr): Require a regvar on either
6811169689Skan	the lhs or rhs if we're dealing with a renameable type.
6812169689Skan	(canonicalize_component_ref): New fn.
6813169689Skan	(gimplify_compound_lval): Use it.
6814169689Skan	(gimplify_conversion): Use it.
6815169689Skan	(gimplify_expr): Lose redundant STRIP_MAIN_TYPE_NOPS.
6816169689Skan	Discard conversions in void context.
6817169689Skan
6818169689Skan2003-10-21  Daniel Berlin  <dberlin@dberlin.org>
6819169689Skan
6820169689Skan	* tree-ssa-pre.c (pre_expression): Free and allocate the
6821169689Skan	ephi_pindex_htab and phi_pred_cache in this function only.
6822169689Skan	(phi_pred_cache): New array to store cached phi preds, to avoid
6823169689Skan	recomputation and unnecessary copying.
6824169689Skan	(subst_phis): Use it.
6825169689Skan	(added_phis): array of added phis that is marked for GC.
6826169689Skan
6827169689Skan	* Makefile.in: Add tree-ssa-pre.c to the gtype files, and
6828169689Skan	gt-tree-ssa-pre.h to the list of generated files.
6829169689Skan
6830169689Skan2003-10-21  Jason Merrill  <jason@redhat.com>
6831169689Skan
6832169689Skan	PR optimization/12661
6833169689Skan	* tree-dfa.c (get_expr_operands): Handle TRUTH_NOT_EXPR.
6834169689Skan	* tree-simple.c (is_gimple_rhs): Allow TRUTH_NOT_EXPR.
6835169689Skan	* gimplify.c (gimplify_expr) <TRUTH_NOT_EXPR>: Don't rewrite to an
6836169689Skan	EQ_EXPR.
6837169689Skan
6838169689Skan2003-10-21  Jan Hubicka  <jh@suse.cz>
6839169689Skan
6840169689Skan	* haifa-sched.c (choose_ready): Initialize index.
6841169689Skan	* tree-tailcall.c (bb_optimize_tail_calls): Initialize has_return.
6842169689Skan	* f/lex.c (ffelex_cfelex_): Initialize d.
6843169689Skan
6844169689Skan2003-10-20  Diego Novillo  <dnovillo@redhat.com>
6845169689Skan
6846169689Skan	Fix PR optimization/12688
6847169689Skan	* tree-dfa.c (get_stmt_operands): Don't return early when dealing
6848169689Skan	with an empty statement.
6849169689Skan	* tree-ssa-ccp.c (set_rhs): If the expression has no side effects,
6850169689Skan	replace the statement with an empty statement.
6851169689Skan
6852169689Skan2003-10-20  Andrew MacLeod  <amacleod@redhat.com>
6853169689Skan
6854169689Skan	* tree-ssa-dce.c (processed): Change to an sbitmap.
6855169689Skan	(mark_necessary): Test bits in 'processed'.
6856169689Skan	(tree_ssa_dce): Initialize/free processed as an sbitmap.
6857169689Skan
6858169689Skan2003-10-20  Diego Novillo  <dnovillo@redhat.com>
6859169689Skan
6860169689Skan	* tree-cfg.c (bsi_prev): Also copy the context from the previous
6861169689Skan	iterator.
6862169689Skan
6863169689Skan2003-10-18  Richard Henderson  <rth@redhat.com>
6864169689Skan
6865169689Skan	* builtins.c (simplify_builtin): Handle BUILT_IN_CONSTANT_P.
6866169689Skan
6867169689Skan2003-10-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6868169689Skan
6869169689Skan	* tree-tailcall.c: New.
6870169689Skan	* Makefile.in (tree-tailcall.o): Add.
6871169689Skan	* function.c (assign_parms): Setting of current_function_stdarg
6872169689Skan	moved ...
6873169689Skan	(allocate_struct_function): ... here.
6874169689Skan	* tree-dump.c (dump_files): Add .tail dump.
6875169689Skan	* tree-flow.h (tree_optimize_tail_calls): Declare.
6876169689Skan	* tree-optimize.c (optimize_function_tree): Call
6877169689Skan	tree_optimize_tail_calls.
6878169689Skan	* tree.h (enum tree_dump_index): Add TDI_tail.
6879169689Skan
6880169689Skan2003-10-18  Jan Hubicka  <jh@suse.cz>
6881169689Skan
6882169689Skan	* tree-ssa-copyprop.c (move_var_to_scope):  Do not clear abstract
6883169689Skan	origin for static variables.
6884169689Skan
6885169689Skan2003-10-18  Jan Hubicka  <jh@suse.cz>
6886169689Skan
6887169689Skan	* integrate.c (copy_decl_for_inlinig): Fix copying of copies.
6888169689Skan
6889169689Skan2003-10-18  Jan Hubicka  <jh@suse.cz>
6890169689Skan
6891169689Skan	* cgraphunit.c (cgraph_analyze_function):  Fix call of estimate_num_insns.
6892169689Skan
6893169689Skan2003-10-17  Kazu Hirata  <kazu@cs.umass.edu>
6894169689Skan
6895169689Skan	* ChangeLog.tree-ssa: Fix typos.
6896169689Skan	* tree-alias-common.c: Fix comment typos.
6897169689Skan	* tree-cfg.c: Likewise.
6898169689Skan	* tree-dfa.c: Likewise.
6899169689Skan	* tree-eh.c: Likewise.
6900169689Skan	* tree-flow.h: Likewise.
6901169689Skan	* tree-iterator.h: Likewise.
6902169689Skan	* tree-mudflap.c: Likewise.
6903169689Skan	* tree-ssa-ccp.c: Likewise.
6904169689Skan	* tree-ssa-dce.c: Likewise.
6905169689Skan	* tree-ssa-dom.c: Likewise.
6906169689Skan	* tree-ssa-live.c: Likewise.
6907169689Skan	* tree-ssa-live.h: Likewise.
6908169689Skan	* tree-ssa-pre.c: Likewise.
6909169689Skan	* tree-ssa.c: Likewise.
6910169689Skan
6911169689Skan2003-10-17  Andrew MacLeod  <amacleod@redhat.com>
6912169689Skan
6913169689Skan	* tree-ssa-dce.c (processed): New Global vector.
6914169689Skan	(mark_necessary): Check if SSA_NAME has already been processed first.
6915169689Skan	(find_useful_stmts, process_worklist): Change call to mark_necessary().
6916169689Skan	(tree_ssa_dce): Initialize and free processed vector.
6917169689Skan	* tree-cfg.c (handle_switch_fallthru): A new basic block can result
6918169689Skan	from splitting edges of nested switch stmts.
6919169689Skan	(handle_switch_split): If a new block is created, restart the loop for
6920169689Skan	inserting GOTO's to handle the new block.
6921169689Skan
6922169689Skan2003-10-17  Jan Hubicka  <jh@suse.cz>
6923169689Skan
6924169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars_bind): Fix handling of
6925169689Skan	static variables.
6926169689Skan
6927169689Skan2003-10-16  Richard Henderson  <rth@redhat.com>
6928169689Skan
6929169689Skan	* common.opt (fdisable-gimple): Remove.
6930169689Skan	* flags.h (flag_disable_gimple): Remove.
6931169689Skan	* toplev.c (flag_disable_gimple): Remove.
6932169689Skan	(process_options): Don't check it.
6933169689Skan	(lang_independent_options): Don't set it.
6934169689Skan	* opts.c (common_handle_option): Likewise.
6935169689Skan	* gimplify.c (keep_function_tree_in_gimple_form): Don't check it.
6936169689Skan	* c-semantics.c (expand_stmt_toplev): Likewise.
6937169689Skan	* tree-optimize.c (tree_rest_of_compilation): Likewise.
6938169689Skan	* doc/invoke.texi: Don't document it.
6939169689Skan
6940169689Skan2003-10-16  Roger Sayle  <roger@eyesopen.com>
6941169689Skan
6942169689Skan	* fold-const.c: Merge from mainline.
6943169689Skan	* tree.c (associate_tree_code, commutative_tree_code): Use a
6944169689Skan	switch statement instead of a sequence of comparisons.
6945169689Skan
6946169689Skan2003-10-16  Richard Henderson  <rth@redhat.com>
6947169689Skan
6948169689Skan	* gimplify.c (maybe_protect_cleanup): Remove.
6949169689Skan	* tree-simple.h (maybe_protect_cleanup): Remove.
6950169689Skan	* c-simplify.c (gimplify_cleanup): Don't call it.
6951169689Skan
6952169689Skan2003-10-16  Jeff Law  <law@redhat.com>
6953169689Skan
6954169689Skan	* tree-cfg.c (found_computed_goto): New global for computed goto
6955169689Skan	factoring/unfactoring.
6956169689Skan	(factored_computed_goto_label, factored_computed_goto): Likewise.
6957169689Skan	(factor_computed_gotos): New function.
6958169689Skan	(build_tree_cfg): Use it.
6959169689Skan	(make_blocks): Record whether or not we find a computed goto.
6960169689Skan	(remove_useless_stmts_and_vars): Un-factor computed gotos.
6961169689Skan	(remove_useless_stmts_and_vars): Reset factored_computed_goto_label
6962169689Skan	and factored_computed_goto.
6963169689Skan
6964169689Skan	* tree-ssa-dom.c (get_value_for, set_value_for): Move to the start
6965169689Skan	of the file.  Delete pointless sanity checking.
6966169689Skan
6967169689Skan	* tree-ssa.c (currdefs): Now a varray instead of a hash table.
6968169689Skan	(get_value_for, set_value_for): Corresponding changes.  Move to
6969169689Skan	the start of the file and delete pointless sanity checking.
6970169689Skan	(rewrite_into_ssa, dump_tree_ssa_stats): Corresponding changes.
6971169689Skan	(var_value_hash, var_value_eq): Kill.
6972169689Skan
6973169689Skan	* tree-ssa.c (rewrite_add_phi_arguments): Once we encounter a
6974169689Skan	rewritten PHI break the inner loop.
6975169689Skan
6976169689Skan	* tree-ssa.c (insert_phi_nodes_for): Use EXECUTE_IF_AND_COMPL_IN_BITMAP.
6977169689Skan
6978169689Skan	* tree-dfa.c (create_phi_node):  Clear PHI_REWRITTEN on all new PHIs
6979169689Skan	(remove_all_phi_nodes_for): Set PHI_REWRITTEN on any PHIs which are
6980169689Skan	not removed.
6981169689Skan	* tree-ssa.c (rewrite_add_phi_arguments): Check the PHI node itself
6982169689Skan	to see if it has already been rewritten.
6983169689Skan	* tree.h (PHI_REWRITTEN): New accessor macro.
6984169689Skan	(struct phi_node): New field rewritten.
6985169689Skan
6986169689Skan	* tree-flow.h (struct bb_ann_d): New field num_preds.
6987169689Skan	* tree-dfa.c (create_phi_node): Get the number of predecessors from
6988169689Skan	the block's annotation.
6989169689Skan	* tree-ssa.c (rewrite_into_ssa): Compute number of preds for each
6990169689Skan	block and store it into the block's annotation.
6991169689Skan	(insert_phi_nodes_for): Get the number of preds for each block
6992169689Skan	from the block's annotation.
6993169689Skan
6994169689Skan	* tree-ssa.c: Remove parallel lifetime analysis code from April 2003.
6995169689Skan	(def_blocks_d): Remove PHI_INSERTION_POINTS field.
6996169689Skan	(compute_global_livein): Accept livein/def bitmaps to use for
6997169689Skan	life analyis rather than a varray of variables.  Callers updated.
6998169689Skan	Rewritten to compute life information for one variable at a
6999169689Skan	time instead of several variables at once.
7000169689Skan	(insert_phis_for_deferred_variables): Remove.
7001169689Skan	(insert_phi_nodes_for): Lose varray argument.  Callers updated.
7002169689Skan	No longer mess with deferring PHI insertions for variables.
7003169689Skan	(insert_phi_nodes): No longer need to deal with deferred variables.
7004169689Skan	Kill everything related to them.
7005169689Skan
7006169689Skan2003-10-15  Jeff Law  <law@redhat.com>
7007169689Skan
7008169689Skan	* domwalk.c, domwalk.h: New files.
7009169689Skan	* Makefile.in (OBJS-common): Add domwalk.c.
7010169689Skan	(tree-ssa-dom.o): Add dependency on $(BASIC_BLOCK_H) and domwalk.h.
7011169689Skan	(tree-ssa.o): Add dependency on domwalk.h.
7012169689Skan	(domwalk.o): Add dependencies.
7013169689Skan	* tree-ssa-dom.c: Include domwalk.h.
7014169689Skan	(cfg_altered, vars_to_rename): Now globals.
7015169689Skan	(dom_walk_block_data): New structure for block data used by dominator
7016169689Skan	walker.
7017169689Skan	(optimize_block, record_equivalences_from_block_entry): Kill.
7018169689Skan	(optimize_stmt): Lose "cfg_altered" argument.  Update callers.
7019169689Skan	Initialize may_have_exposed_new_symbols.
7020169689Skan	(get_value_for, set_value_for): Lose "table" argument.  Update
7021169689Skan	callers.  Use const_and_copies table directly.
7022169689Skan	(lookup_avail_expr): Lose "const_and_copies" argument.  Callers
7023169689Skan	updated.
7024169689Skan	(get_eq_expr_value): Similarly.  Also accept a pointer to the
7025169689Skan	vrp_variables. Callers updated.
7026169689Skan	(update_rhs_and_lookup_avail_expr): Similarly.
7027169689Skan	(record_cond_is_true, record_cond_is_false): Similarly.
7028169689Skan	(simplify_rhs_and_lookup_avail_expr): Similarly.
7029169689Skan	(simplify_cond_and_lookup_avail_expr): Similarly.
7030169689Skan	(record_equivalences_from_phis): Similarly.
7031169689Skan	(record_equivalences_from_incoming_edge): Similarly.  Also accept
7032169689Skan	a pointer to the block const_and_copies table and vrp_variables.
7033169689Skan	Callers updated.
7034169689Skan	(eliminate_redundant_computations): Similarly
7035169689Skan	(record_equivalences_from_stmt, thread_through_successor): Similarly.
7036169689Skan	(dom_opt_initialize_block): New function.  Perform block local
7037169689Skan	initialization for the dominator optimizer.
7038169689Skan	(dom_opt_finalize_block): Renamed from finalize_block.  Get
7039169689Skan	block local varrays from walk_data.  Pop entry off block local
7040169689Skan	data stack when complete.
7041169689Skan	(dom_opt_walk_stmts): New function.
7042169689Skan	(cprop_into_phis): Get block local varrays from walk_data.
7043169689Skan	(record_range): Get vrp varray by reference than by value.
7044169689Skan	(tree_ssa_dominator_optimize): Store incoming "vars" variable into
7045169689Skan	global "vars_to_rename".  Initialize walk_data.  Use
7046169689Skan	walk_dominator_tree.
7047169689Skan	(cprop_into_stmt): Initialize may_have_exposed_new_symbols.
7048169689Skan	* tree-ssa.c: Include domwalk.h
7049169689Skan	(rewrite_finalize_block, rewrite_initialize_block): New functions
7050169689Skan	extracted from rewrite_block.
7051169689Skan	(rewrite_walk_stmts, rewrite_add_phi_arguments): Similarly.
7052169689Skan	(rewrite_block): Kill.
7053169689Skan	(rewrite_into_ssa): Initialize walk_data.  Use walk_dominator_tree.
7054169689Skan
7055169689Skan2003-10-14  Richard Henderson  <rth@redhat.com>
7056169689Skan
7057169689Skan	* gimplify.c (gimplify_expr): Return bool.  Bail gracefully if
7058169689Skan	fb_mayfail is set.
7059169689Skan	(gimplify_asm_expr): Take pointer-to-expr.  Allow gimplify_expr
7060169689Skan	to fail for lvalues, and issue appropriate error messages.  Zap
7061169689Skan	the entire asm statement on failure.
7062169689Skan	* tree-simple.h (enum fallback_t): Add fb_mayfail.
7063169689Skan
7064169689Skan2003-10-14  Richard Henderson  <rth@redhat.com>
7065169689Skan
7066169689Skan	* c-tree.h (C_LANG_TREE_NODE_CHAIN_NEXT): New.
7067169689Skan	(union lang_tree_node): Use it for chain_next annotation.
7068169689Skan
7069169689Skan2003-10-14  Richard Henderson  <rth@redhat.com>
7070169689Skan
7071169689Skan	* c-common.c: Include tree-iterator.h.
7072169689Skan	(c_expand_expr): Kill warn_unused_result checks.
7073169689Skan	(c_warn_unused_result): New.
7074169689Skan	* c-common.h (STMT_EXPR_WARN_UNUSED_RESULT): Remove.
7075169689Skan	(c_warn_unused_result): Declare.
7076169689Skan	* c-decl.c (finish_function): Always gimplify.  Call
7077169689Skan	c_warn_unused_result.
7078169689Skan	* calls.c (expand_call): Kill warn_unused_result checks.
7079169689Skan	* Makefile.in (c-common.o): Update.
7080169689Skan
7081169689Skan2003-10-15  Steven Bosscher  <steven@gcc.gnu.org>
7082169689Skan
7083169689Skan	* cfghooks.c (dump_bb): Take extra `int indent' argument.
7084169689Skan	* cfg.c (dump_bb): Take extra argument to match cfg hook.
7085169689Skan	Write out all information about bb that is shared between the tree
7086169689Skan	and rtl representations.
7087169689Skan	* basic-block.c (dump_bb): Adjust prototype.
7088169689Skan	* cfgrtl.c (rtl_dump_bb): Update prototype to match cfg hook.
7089169689Skan	Use indent.
7090169689Skan	* flow.c (verify_wide_reg, verify_local_live_at_start):
7091169689Skan	Fixup dump_bb calls.
7092169689Skan	* tree-cfg.c (dump_tree_bb): Rename to tree_dump_bb.  Remove unused
7093169689Skan	 `prefix' argument.  Put in tree_cfg_hooks as cfg hook for dump_bb.
7094169689Skan	(remove_bb, debug_tree_bb, dump_tree_cfg): Call dump_bb.
7095169689Skan	* tree-ssa (dump_tree_ssa): Likewise.
7096169689Skan	* tree-flow.h (dump_tree_bb): Replace with new tree_dump_bb
7097169689Skan	prototype.
7098169689Skan	* tree-pretty-print (dump_block_info): Match case of BLOCK, SUCC,
7099169689Skan	PRED with dump_bb.
7100169689Skan
7101169689Skan2003-10-14  Daniel Berlin  <dberlin@dberlin.org>
7102169689Skan
7103169689Skan	* tree-alias-ander.c (throwaway_global): Delete.
7104169689Skan	(andersen_same_ponts_to_set): We handle all globals individually
7105169689Skan	now.
7106169689Skan	* tree-alias-common.c:  Remove doxygen markers.
7107169689Skan	(get_alias_var_decl): Always create an alias var for globals now.
7108169689Skan	Assign the global alias vars to GLOBAL_VAR, too.
7109169689Skan	(intra_function_call): Fix logic, do a bit of pre-filtering to
7110169689Skan	avoid useless global aliasing.
7111169689Skan	(get_values_from_constructor): It's the same for field based and
7112169689Skan	not field based.
7113169689Skan	(create_alias_vars): Remove special global var handling.
7114169689Skan	(same_points_to_set): Ditto.
7115169689Skan	(ptr_may_alias_var): Ditto.
7116169689Skan
7117169689Skan2003-10-14  Jeff Law  <law@redhat.com>
7118169689Skan
7119169689Skan	* tree-ssa-dom.c (cprop_into_phis): Avoid doing useless work if the
7120169689Skan	edge we care about is abnormal.
7121169689Skan	* tree-ssa-copyprop (cprop_phi): Avoid doing useless work if the
7122169689Skan	destination of the PHI node occurs in an abnormal PHI.
7123169689Skan
7124169689Skan	* tree-ssa-dom.c (record_equivalences_from_stmt): Renamed from
7125169689Skan	record_equivalances.  Caller updated.
7126169689Skan	(record_equivalences_from_phis): New function extracted from
7127169689Skan	optimize_block.
7128169689Skan	(record_equivalences_from_incoming_edge): Likewise.
7129169689Skan	(record_equivalances_from_block_entry): Likewise.
7130169689Skan	(cprop_into_phis): Likewise.
7131169689Skan	(optimize_stmt): Lots of code moved into new functions.  Call
7132169689Skan	record_equivlances_from_block_entry.
7133169689Skan
7134169689Skan	* tree-ssa-dom.c (optimize_block): Simplify interface slightly.
7135169689Skan	Use finalize_block.  Extract edge_flags from our block's
7136169689Skan	incoming edge as necessary.  Simplify recursive call.
7137169689Skan	(thread_through_successor): Extracted from optimize_block.
7138169689Skan	(finalize_block): Similarly.
7139169689Skan
7140169689Skan	* tree-ssa-dom.c (eliminate_redundant_computations): New function
7141169689Skan	extracted from optimize_stmt.
7142169689Skan	(record_equivalences): Similarly.
7143169689Skan	(optimize_stmt): Use eliminate_redundant_computations and
7144169689Skan	record_equivalences.  If fold_stmt changes stmt, then make sure
7145169689Skan	to get a new annotation as well.
7146169689Skan
7147169689Skan	* tree-cfg.c (cleanup_control_flow): Pass last statement down to
7148169689Skan	cleanup_cond_expr_graph and cleanup_switch_expr_graph.
7149169689Skan	(cleanup_cond_expr_graph): Accept statement from caller and
7150169689Skan	use it.  Return nonzero if the predicate was constant.  No longer
7151169689Skan	static.
7152169689Skan	(cleanup_switch_expr_graph): Similarly.
7153169689Skan	(disconnect_unreachable_case_labels): Similarly, except that it
7154169689Skan	is still static.
7155169689Skan	* tree-flow.h (cleanup_cond_expr_graph): Prototype.
7156169689Skan	(cleanup_switch_expr_graph): Similarly.
7157169689Skan	* tree-ssa-dom.c (optimize_stmt): Also optimize the condition
7158169689Skan	in a SWITCH_EXPR.  Use COND_EXPR_COND and SWITCH_COND to get
7159169689Skan	conditions instead of relying upon known operand positions.
7160169689Skan	Use cleanup_cond_expr_graph and cleanup_switch_expr_graph rather
7161169689Skan	than open coding equivalents.
7162169689Skan	(lookup_avail_expr): Handle SWITCH_EXPRs.  Use COND_EXPR_COND and
7163169689Skan	SWITCH_COND to get conditions instead of relying upon known
7164169689Skan	operand positions.
7165169689Skan	(avail_expr_hash, avail_expr_eq): Similarly.
7166169689Skan
7167169689Skan2003-10-14  Richard Henderson  <rth@redhat.com>
7168169689Skan
7169169689Skan	* gimplify.c (gimplify_body): Save and restore input_location;
7170169689Skan	initialize input_location to DECL_SOURCE_LOCATION.
7171169689Skan	(gimplify_expr): Always save and restore input_location.
7172169689Skan
7173169689Skan2003-10-14  Richard Henderson  <rth@redhat.com>
7174169689Skan
7175169689Skan	* expr.c (expand_expr): Break out EXPR_LOCUS code from ...
7176169689Skan	(expand_expr_1): ... here, renamed from expand_expr.
7177169689Skan
7178169689Skan2003-10-13  Richard Henderson  <rth@redhat.com>
7179169689Skan
7180169689Skan	* c-simplify.c (c_gimplify_stmt): Upreate on location_t and not
7181169689Skan	fine and line individually.
7182169689Skan	(gimplify_c_loop, gimplify_switch_stmt): Likewise.
7183169689Skan	* gimplify.c (wfl_locus): Merge wfl_filename+wfl_lineno.
7184169689Skan	(annotate_all_with_locus_1): Rename from annotate_stmt_with_file_line.
7185169689Skan	(annotate_all_with_locus): Replace annotate_all_with_file_line;
7186169689Skan	update all callers.
7187169689Skan	* tree-simple.h: Update.
7188169689Skan	* tree.c, tree.h (annotate_with_locus): New.
7189169689Skan
7190169689Skan2003-10-13  Steven Bosscher  <steven@gcc.gnu.org>
7191169689Skan
7192169689Skan	* tree-flow-inline.h (def_ops): Take a stmt_ann_t as argument
7193169689Skan	instead of a tree.
7194169689Skan	(use_ops): Likewise.
7195169689Skan	(vdef_ops): Likewise.
7196169689Skan	(vuse_ops): Likewise.
7197169689Skan	* tree-flow.h: Update prototypes.
7198169689Skan	* tree-cfg.c (remove_stmt): Load the statement annotation.
7199169689Skan	Adjust *_ops calls.
7200169689Skan	* tree-dfa.c (compute_immediate_uses_for_stmt,
7201169689Skan	mark_new_vars_to_rename): Likewise.
7202169689Skan	* tree-pretty-print.c (dump_vops): Likewise.
7203169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Likewise.  Also remove now
7204169689Skan	superfluous stmt_ann() calls.
7205169689Skan	(visit_stmt, cpp_fold, add_var_to_ssa_edges_worklist,
7206169689Skan	initialize, replace_uses_in, likely_value): Likewise.
7207169689Skan	* tree-ssa-copyprop.c (copyprop_stmt): Likewise.
7208169689Skan	* tree-ssa-dce.c (stmt_useful_p, process_worklist): Likewise.
7209169689Skan	* tree-ssa-dom.c (cprop_into_stmt, optimize_stmt,
7210169689Skan	avail_expr_hash, avail_expr_eq):
7211169689Skan	Likewise.
7212169689Skan	* tree-ssa-live.c (create_ssa_var_map, calculate_live_on_entry,
7213169689Skan	build_tree_conflict_graph): Likewise.
7214169689Skan	* tree-ssa-pre.c (maybe_find_rhs_use_for_var,
7215169689Skan	expr_phi_insertion, same_e_version_real_occ_real_occ,
7216169689Skan	generate_expr_as_of_bb, bool load_modified_real_occ_real_occ,
7217169689Skan	bool same_e_version_phi_result, get_default_def,reaching_def,
7218169689Skan	tree_perform_ssapre): Likewise.
7219169689Skan	* tree-ssa.c (mark_def_sites, rewrite_out_of_ssa, rewrite_stmt):
7220169689Skan	Likewise.
7221169689Skan
7222169689Skan2003-10-12  Richard Henderson  <rth@redhat.com>
7223169689Skan
7224169689Skan	* gimplify.c (gimplify_array_ref_to_plus): Be prepared for
7225169689Skan	null TYPE_DOMAIN or TYPE_MIN_VALUE for the array.
7226169689Skan	* tree-ssa-ccp.c (fold_indirect_refs_r): Likewise.
7227169689Skan
7228169689Skan2003-10-12  Richard Henderson  <rth@redhat.com>
7229169689Skan
7230169689Skan	* tree.h (struct tree_common): Rename unused_1 to invariant_flag.
7231169689Skan	(TREE_INVARIANT): New.
7232169689Skan	* builtins.c (build_string_literal): Set TREE_INVARIANT.
7233169689Skan	* c-common.c (fix_string_type): Likewise.
7234169689Skan	* c-typeck.c (build_external_ref): Likewise.
7235169689Skan	(build_c_cast, pop_init_level): Likewise.
7236169689Skan	* fold-const.c (fold_convert, fold): Likewise.
7237169689Skan	* tree.c (make_node, build_constructor): Likewise.
7238169689Skan	(build, build1): Likewise.
7239169689Skan	(staticp): Pass unknown component references to the language.
7240169689Skan	(save_expr): Check TREE_INVARIANT instead of TREE_CONSTANT.
7241169689Skan	(skip_simple_arithmetic): Likewise.
7242169689Skan	(stabilize_reference_1): Likewise.
7243169689Skan	* print-tree.c (print_node): Print TREE_INVARIANT.
7244169689Skan
7245169689Skan	* c-common.c (pointer_int_sum): Rely on build to set TREE_CONSTANT.
7246169689Skan	(finish_label_address_expr): Likewise.
7247169689Skan	* c-typeck.c (default_function_array_conversion): Likewise.
7248169689Skan	(parser_build_binary_op, pointer_diff): Likewise.
7249169689Skan	(build_unary_op, build_binary_op): Likewise.
7250169689Skan	* fold-const.c (non_lvalue): Likewise.
7251169689Skan
7252169689Skan	* tree-pretty-print.c (dump_generic_node): Handle VIEW_CONVERT_EXPR.
7253169689Skan
7254169689Skan2003-10-12  Richard Henderson  <rth@redhat.com>
7255169689Skan	    Diego Novillo  <dnovillo@redhat.com>
7256169689Skan
7257169689Skan	* gimplify.c (gimplify_array_ref_to_plus): Subtract the array
7258169689Skan	domain minimum index.
7259169689Skan	(gimplify_addr_expr): Expand ARRAY_REFs.  Cope with Fortran
7260169689Skan	missing cast wierdnesses.
7261169689Skan	* tree-dfa.c (get_expr_operands): Handle (&v + c); abort on
7262169689Skan	other address invariants that should have been folded.
7263169689Skan	(vdefs_disappeared_p): New.
7264169689Skan	(mark_new_vars_to_rename): Use it.  Move from ...
7265169689Skan	* tree-ssa-dom.c: ... here.
7266169689Skan	* tree-flow-inline.h (is_unchanging_value): Remove; use
7267169689Skan	is_gimple_min_invariant everywhere instead.
7268169689Skan	(phi_ssa_name_p): New.
7269169689Skan	* tree-must-alias.c (find_addressable_vars): Process PHIs.
7270169689Skan	* tree-simple.c (is_gimple_min_invariant): Rename from
7271169689Skan	is_gimple_const; allow non-static variable addresses; update callers.
7272169689Skan	(is_gimple_val): Remove ADDR_EXPR checks.
7273169689Skan	* tree-simple.h: Update.
7274169689Skan	* tree-ssa-ccp.c (replace_uses_in): Add replaced_address argument.
7275169689Skan	(substitute_and_fold): Use that to mark_new_vars_to_rename.
7276169689Skan	(fold_indirect_refs_r): New.
7277169689Skan	(fold_stmt): Use it.
7278169689Skan	* tree-ssa-copyprop.c (copyprop_stmt): Call fold_stmt.
7279169689Skan	* tree-ssa-dce.c (NECESSARY): Use asm_written_flag.
7280169689Skan	(mark_necessary): Reject DECLs.
7281169689Skan	* tree-ssa-live.c (register_ssa_partition): Use phi_ssa_name_p.
7282169689Skan	* tree-ssa-pre.c (generate_expr_as_of_bb): Call fold_stmt if we
7283169689Skan	replaced with constants.
7284169689Skan	* tree-ssa.c (insert_copy_on_edge): Unwrap ADDR_EXPRs to set_is_used.
7285169689Skan	(eliminate_build, coalesce_abnormal_edges, coalesce_vars): Use
7286169689Skan	phi_ssa_name_p.
7287169689Skan
7288169689Skan2003-10-09  Frank Ch. Eigler  <fche@redhat.com>
7289169689Skan
7290169689Skan	java/12211
7291169689Skan	* gimplify.c (gimplify_save_expr): Tolerate void-typed saved
7292169689Skan	expressions.
7293169689Skan
7294169689Skan2003-10-09  Diego Novillo  <dnovillo@redhat.com>
7295169689Skan
7296169689Skan	* tree-dfa.c (add_call_clobber_ops): If a variable is read-only,
7297169689Skan	add a VUSE operand instead of VDEF.
7298169689Skan
7299169689Skan2003-10-08  Jason Merrill  <jason@redhat.com>
7300169689Skan
7301169689Skan	PR optimization/12525
7302169689Skan	* tree-dfa.c (note_addressable): New fn, split out from...
7303169689Skan	(add_stmt_operands): Here.
7304169689Skan	(get_stmt_operands) <ASM_EXPR>: Call it for mem ops.
7305169689Skan	* gimplify.c (gimplify_asm_expr): Call parse_input_constraint
7306169689Skan	directly.  It's only a mem op if allows_mem is set.
7307169689Skan
7308169689Skan2003-10-08  Diego Novillo  <dnovillo@redhat.com>
7309169689Skan
7310169689Skan	PR/12187
7311169689Skan	* tree-dfa.c (add_stmt_operand): Test against current_function_decl
7312169689Skan	when checking for global variables.
7313169689Skan	(may_access_global_mem_p): Likewise.
7314169689Skan	(add_referenced_var): Likewise.
7315169689Skan	Consider DECL_NONLOCAL variables call clobbered and used.
7316169689Skan	(find_hidden_use_vars): Do not test for DECL_NONLOCAL variables.
7317169689Skan	* tree-optimize.c (tree_rest_of_compilation): Test against
7318169689Skan	current_function_decl when checking for global variables.
7319169689Skan	* tree-ssa-ccp.c (get_default_value): Likewise.
7320169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Likewise.
7321169689Skan
7322169689Skan2003-10-07  Jason Merrill  <jason@redhat.com>
7323169689Skan
7324169689Skan	PR optimization/12525
7325169689Skan	* gimplify.c (gimplify_asm_expr): If the constraint doesn't allow
7326169689Skan	a register, call mark_addressable.  Split an in/out operand that
7327169689Skan	does allow a register into separate input and output operands.
7328169689Skan
7329169689Skan2003-10-06  Richard Henderson  <rth@redhat.com>
7330169689Skan
7331169689Skan	* fold-const.c (fold): Fold (T1)((T2)X op Y) into (T1)X op Y,
7332169689Skan	for suitable values of T1 & T2.
7333169689Skan
7334169689Skan2003-10-06  Andrew Macleod  <amacleod@redhat.com>
7335169689Skan
7336169689Skan	* tree-dfa.c (compute_immediate_uses): Add optional callback.
7337169689Skan	(compute_immediate_uses_for_phi): Remove unused parameter. Add optional
7338169689Skan	callback to determine if usage info should be calculated for variable.
7339169689Skan	(compute_immediate_uses_for_stmt): Add optional callback to determine
7340169689Skan	if usage info should be calculated for variable.
7341169689Skan	* tree-flow.h (compute_immediate_uses): Update prototype.
7342169689Skan	* tree-ssa-ccp.c (need_imm_uses_for): New. Callback function passed to
7343169689Skan	compute_immediate_uses.
7344169689Skan	(initialize): Calculate defaults initially, then build reduced
7345169689Skan	immediate use information.
7346169689Skan	(get_default_value): Non empty stmt's which are not a PHI_NODE or
7347169689Skan	a MODIFY_EXPR default to VARYING.
7348169689Skan
7349169689Skan2003-10-06  Andrew Macleod  <amacleod@redhat.com>
7350169689Skan
7351169689Skan	* tree-cfg.c (tree_split_edge): Mark edge as FALLTHRU when splitting.
7352169689Skan
7353169689Skan2003-10-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
7354169689Skan
7355169689Skan	* tree-ssa.c (rewrite_block): Test vars_to_rename instead of
7356169689Skan	PHI_ARG_CAPACITY.
7357169689Skan	* tree-dfa.c (remove_phi_arg_num): Don't update
7358169689Skan	PHI_ARG_CAPACITY.
7359169689Skan
7360169689Skan2003-10-01  Richard Henderson  <rth@redhat.com>
7361169689Skan
7362169689Skan	* c-decl.c (set_decl_nonlocal): New.
7363169689Skan	(store_parm_decls): Use it via walk_tree.
7364169689Skan
7365169689Skan2003-10-01  Jeff Law  <law@redhat.com>
7366169689Skan
7367169689Skan	* tree-ssa-dom.c (cprop_into_stmt): New function extracted from
7368169689Skan	optimize_stmt.
7369169689Skan	(optimize_stmt): Use cprop_into_stmt.
7370169689Skan
7371169689Skan2003-09-30  Richard Henderson  <rth@redhat.com>
7372169689Skan
7373169689Skan	* function.h (struct function): Add function_end_locus.
7374169689Skan	* c-decl.c (finish_function): Set it.
7375169689Skan	* tree-optimize.c (tree_rest_of_compilation): Set input_location
7376169689Skan	to function_end_locus before expand_function_end.
7377169689Skan
7378169689Skan	* tree-optimize.c (optimize_function_tree): Move calls to
7379169689Skan	remove_useless_stmts_and_vars and lower_eh_constructs ...
7380169689Skan	(tree_rest_of_compilation): ... here.
7381169689Skan
7382169689Skan	* c-simplify.c (gimplify_expr_stmt): Don't warn for any statement
7383169689Skan	with void result type.
7384169689Skan
7385169689Skan2003-09-30  Jeff Law  <law@redhat.com>
7386169689Skan
7387169689Skan	* tree-ssa-dom.c (simplify_cond_and_lookup_avail_expr): Fix thinko
7388169689Skan	in test for swapping ranges.
7389169689Skan
7390169689Skan	* tree-ssa-dom.c (record_range): New function.
7391169689Skan	(extract_range_from_cond): Likewise.
7392169689Skan	(tree_ssa_dominator_optimize): Initialize the vrp_data varray.
7393169689Skan	(optimize_block): Initialize the vrp_variables varray.  Wipe
7394169689Skan	appropriate entries from the VRP varrays when done processing a block.
7395169689Skan	(get_eq_expr_value): Accept new argument "bb".  Call record_range
7396169689Skan	appropriately.  Refactor code to avoid useless work.
7397169689Skan	(simplify_cond_and_lookup_avail_expr): Use value range records to
7398169689Skan	simplify conditions.
7399169689Skan	(simplify_rhs_and_lookup_avail_expr): When simplifying ABS_EXPR,
7400169689Skan	DIV_EXPR and MOD_EXPR, use simplify_cond_and_lookup_avail_expr
7401169689Skan	to determine the range of the given variable.
7402169689Skan
7403169689Skan	* tree-ssa-dom.c (find_equivalent_equality_comparison): Do not
7404169689Skan	look through a typecast which narrows a value.
7405169689Skan
7406169689Skan2003-09-30  Paul Brook  <paul@nowt.org>
7407169689Skan
7408169689Skan	* Makefile.in: Add rules for check-gfortran.
7409169689Skan
7410169689Skan2003-09-29  Richard Henderson  <rth@redhat.com>
7411169689Skan
7412169689Skan	* gimplify.c (gimplify_cond_expr): Fix both arms dead return value.
7413169689Skan
7414169689Skan2003-09-29  Jeff Law  <law@redhat.com>
7415169689Skan
7416169689Skan	* tree-ssa-dom.c (simplify_cond_and_lookup_avail_expr): New function.
7417169689Skan	(find_equivalent_equality_comparison): Likewise.
7418169689Skan	(optimize_block): Remove code to build a == c equivalence after
7419169689Skan	seeing a == b and b == c.  Remove code to walk backwards
7420169689Skan	though typecasts to record equivalences and move relevant parts
7421169689Skan	into find_equivalent_equality_comparison.
7422169689Skan	(optimize_stmt): Call simplify_cond_and_lookup_avail_expr.
7423169689Skan
7424169689Skan2003-09-28  Richard Henderson  <rth@redhat.com>
7425169689Skan
7426169689Skan	* gimplify.c (gimplify_call_expr): Annotate all call_exprs.
7427169689Skan	* tree-inline.c (expand_call_inline): Set input_location based
7428169689Skan	on EXPR_LOCUS; save and restore input_location around that.
7429169689Skan	(walk_tree): Do not set input_location.
7430169689Skan
7431169689Skan2003-09-27  Graham Stott  <graham.stott@btinternet.com>
7432169689Skan
7433169689Skan	* expr.c (expand_expr)[CATCH_EXPR]: Fix bogus return value.
7434169689Skan
7435169689Skan2003-09-26  Andrew MacLeod  <amacloeod@redhat.com>
7436169689Skan
7437169689Skan	* tree-ssa-dom.c (struct var_value_d): Remove.
7438169689Skan	(const_and_copies): Change to a varray_type.
7439169689Skan	(tree_ssa_dominator_optimize): Initialize const_and_copies as a varray.
7440169689Skan	(optimize_block): Simply set the value in const_and_copies.
7441169689Skan	(dump_dominator_optimization_stats): No hash stats for const_and_copies.
7442169689Skan	(record_cond_is_true, record_cond_is_false,
7443169689Skan	simplify_rhs_and_lookup_avail_expr, update_rhs_and_lookup_avail_expr):
7444169689Skan	Parameter const_and_copies is now a varray_type.
7445169689Skan	(var_value_hash, var_value_eq): Remove.
7446169689Skan	(get_value_for, set_value_for): Access varray elements.
7447169689Skan	(get_eq_expr_value): Parameter const_and_copies is now a varray_type.
7448169689Skan
7449169689Skan	* tree-cfg.c (handle_switch_split): Update container of previous stmt.
7450169689Skan
7451169689Skan2003-09-25  Daniel Berlin  <dberlin@dberlin.org>
7452169689Skan
7453169689Skan	* tree-ssa-pre.c (split_critical_edges): New function, temporarily
7454169689Skan	disabled until some edge splitting/insertion problems are fixed.
7455169689Skan	(opnum_of_ephi): Take an edge argument, constify. Use hash table lookup.
7456169689Skan	Update all callers.
7457169689Skan	(ephi_pindex_eq): New function.
7458169689Skan	(ephi_pindex_hash): New function.
7459169689Skan	(ephi_pindex_htab): New variable.
7460169689Skan	(add_ephi_pred): Update hash table.
7461169689Skan	(expr_phi_insertion): Don't free the bitmap returned by compute_idfs
7462169689Skan	anymore.
7463169689Skan	(idfs_cache): New variable.
7464169689Skan	(compute_idfs): Rewrite to use cache as much as possible, and not
7465169689Skan	recompute when we can avoid it.
7466169689Skan
7467169689Skan2003-09-25  Daniel Berlin  <dberlin@dberlin.org>
7468169689Skan
7469169689Skan	* tree-alias-ander.c:  Fixup comment spacing.
7470169689Skan	(andersen_op_assign):  Handle >2 operands case.
7471169689Skan
7472169689Skan2003-09-24  Steven Bosscher  <steven@gcc.gnu.org>
7473169689Skan
7474169689Skan	* tree-dfa.c (compute_immediate_uses_for): Split up in two
7475169689Skan	separate functions, one for PHIs and one for normal statements.
7476169689Skan	(compute_immediate_uses_for_phi): New.
7477169689Skan	(compute_immediate_uses_for_stmt): New.
7478169689Skan
7479169689Skan2003-09-25  Jeff Law  <law@redhat.com>
7480169689Skan
7481169689Skan	* tree-ssa-dom.c (optimize_block): When EQ_EXPR_VALUE has the
7482169689Skan	form DEST = SRC where both DEST and SRC are SSA_NAMEs also
7483169689Skan	record SRC = DEST into the const and copies table.
7484169689Skan
7485169689Skan	* tree-ssa-dom.c (optimize_block): Change tests which checked
7486169689Skan	for SSA_VAR_P to only allow SSA_NAMEs.
7487169689Skan	(get_value_for, set_value_for): Likewise.
7488169689Skan	(lookup_avail_expr, get_eq_expr_value): Likewise.
7489169689Skan
7490169689Skan2003-09-25  Andrew MacLeod  <amacleod@redhat.com>
7491169689Skan
7492169689Skan	* tree-ssa-dce.c (pdom_info, needed_stmts): Remove.
7493169689Skan	(NECESSARY): Define.
7494169689Skan	(necessary_p): Check bit instead of hash table lookup.
7495169689Skan	(clear_necessary): New. Clear necessary bit.
7496169689Skan	(mark_necessary): Use bit instead of hash table. No control lookup.
7497169689Skan	(mark_tree_necessary): Remove.
7498169689Skan	(find_useful_stmts): Clear necessary bit before checking it.
7499169689Skan	(stmt_useful_p): Remove GOTO_EXPR case. Check arms of COND_EXPR for
7500169689Skan	GOTO. All other control flow stmts are necessary.
7501169689Skan	(process_worklist): Dont look for control parents.
7502169689Skan	(remove_dead_stmts): No dominattor info is necessary.
7503169689Skan	(remove_dead_stmt): Don't need BB any more. Remove COND_EXPR by changing
7504169689Skan	the condition to 'if (0)'. Abort on other control flow.
7505169689Skan	(tree_ssa_dce): No longer need the hash table.
7506169689Skan	(remove_conditional): Remove.
7507169689Skan
7508169689Skan2003-09-25  Andreas Schwab  <schwab@suse.de>
7509169689Skan
7510169689Skan	* tree-flow.h: Declare next_ssa_version.
7511169689Skan	* tree-ssa-ccp.c: Remove conflicting declaration.
7512169689Skan	* tree-ssa-live.c: Likewise.
7513169689Skan	* tree.c (make_ssa_name): Likewise.
7514169689Skan
7515169689Skan2003-09-24  Jason Merrill  <jason@redhat.com>
7516169689Skan
7517169689Skan	* tree.h (DECL_SOURCE_LOCATION): Resurrect.
7518169689Skan	(DECL_SOURCE_FILE, DECL_SOURCE_LINE): Likewise.
7519169689Skan	(EXPR_LOCUS): Renamed from TREE_LOCUS.  Null for non-exprs.
7520169689Skan	(SET_EXPR_LOCUS): New macro.
7521169689Skan	(EXPR_FILENAME): Renamed from TREE_FILENAME.
7522169689Skan	(EXPR_LINENO): Renamed from TREE_LINENO.
7523169689Skan	(struct tree_common): Remove locus field.
7524169689Skan	(struct tree_decl): Re-add locus field.
7525169689Skan	(struct tree_expr): Add locus field.
7526169689Skan	* c-aux-info.c, c-decl.c, coverage.c, c-parse.in, dbxout.c,
7527169689Skan	diagnostic.c, dwarf2out.c, expr.c, function.c, gimplify.c,
7528169689Skan	integrate.c, print-tree.c, stmt.c, tree.c, tree-cfg.c,
7529169689Skan	tree-dump.c, tree-flow-inline.h, config/alpha/alpha.c,
7530169689Skan	config/mips/mips.c: Adjust.
7531169689Skan
7532169689Skan2003-09-24  Andrew MacLeod  <amacleod@redhat.com>
7533169689Skan
7534169689Skan	* tree-ssa-ccp.c (enum latticevalue): Add UNINITIALIZED.
7535169689Skan	(const_values, struct value_map_d): Remove hash table structures.
7536169689Skan	(value_vector): New array of values.
7537169689Skan	(get_value): Use value_vector instead of hash table. Mark inline.
7538169689Skan	(visit_phi_node): Ignore arguments if the PHI result is already VARYING.
7539169689Skan	(initialize): Initialize value vector instead of hash table.
7540169689Skan	(finalize): Free value vector instead of hash table.
7541169689Skan	(add_var_to_ssa_edges_worklist): Don't add to worklist if
7542169689Skan	DONT_SIMULATE_AGAIN flag is set.
7543169689Skan	(value_map_hash, value_map_eq): Delete.
7544169689Skan
7545169689Skan2003-09-24  Jeff Law  <law@redhat.com>
7546169689Skan
7547169689Skan	* tree-ssa-dom.c (optimize_block): Create infrastructure for
7548169689Skan	tracking const_and_copies equivalences which disappear when
7549169689Skan	we leave the current block.  Use it for equivalences created
7550169689Skan	by EQ_EXPR_VALUE.  Follow use-def chains for EQ_EXPR_VALUE
7551169689Skan	equivalences and see if certain NOP_EXPRs can be ignored
7552169689Skan	to create a block-local equivalence for const_and_copies.
7553169689Skan	(optimize_stmt): Do not get confused by a cast of the return
7554169689Skan	value from alloca or the address of a non-weak decl.
7555169689Skan
7556169689Skan	* fold-const.c (fold_read_from_constant_string): New function.
7557169689Skan	* tree.h (fold_read_from_constant_string): Prototype.
7558169689Skan	* expr.c (expand_expr, case INDIRECT_REF):  Use it.
7559169689Skan	(expand_expr, case ARRAY_REF): Likewise.  Put checking code
7560169689Skan	inside an ENABLE_CHECKING.
7561169689Skan	* tree-ssa-ccp.c (fold_stmt): Use fold_read_from_constant_string.
7562169689Skan	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
7563169689Skan
7564169689Skan2003-09-23  Jeff Law  <law@redhat.com>
7565169689Skan
7566169689Skan	* tree-ssa-dom.c (optimize_block): Ignore "useless" type
7567169689Skan	conversions in SWITCH_COND when creating equivalenecs at
7568169689Skan	case labels.
7569169689Skan
7570169689Skan2003-09-22  Jeff Law  <law@redhat.com>
7571169689Skan
7572169689Skan	* tree-ssa-dom.c (optimize_stmt): Addresses of non-weak symbols
7573169689Skan	as well as dynamically allocated stack space are always nonzero.
7574169689Skan
7575169689Skan	* tree-cfg.c (handle_switch_split): Properly mark the fallthru
7576169689Skan	edge from SRC to DEST with EDGE_FALLTHRU.
7577169689Skan
7578169689Skan2003-09-22  Daniel Berlin  <dberlin@dberlin.org>
7579169689Skan
7580169689Skan	* tree-flow.h (struct bb_ann_d): Add erefs array.
7581169689Skan	* tree-ssa-pre.c (handle_bb_creation): Remove ei parameter.
7582169689Skan	Update caller.
7583169689Skan	(struct expr_info): Remove erefs array.
7584169689Skan	(append_eref_to_block): New function.
7585169689Skan	(clear_all_eref_arrays): Ditto.
7586169689Skan	(expr_phi_insertion): Use append_eref_to_block.
7587169689Skan	(insert_occ_in_preorder_dt_order_1): Ditto.
7588169689Skan	(subst_phis): Only copy expression, not the containing EUSE/EPHI.
7589169689Skan	Update all callers to reflect this.
7590169689Skan	(compute_will_be_avail): Update for per-block eref array.
7591169689Skan	(handle_bb_creation): Ditto.
7592169689Skan	(pre_expression): Ditto.
7593169689Skan	(tree_perform_ssapre): Clear eref arrays when done with expression.
7594169689Skan
7595169689Skan2003-09-22  Diego Novillo  <dnovillo@redhat.com>
7596169689Skan
7597169689Skan	* tree-cfg.c (dump_tree_bb): Remove superlfuous newlines.
7598169689Skan
7599169689Skan2003-09-21  Diego Novillo  <dnovillo@redhat.com>
7600169689Skan
7601169689Skan	* tree-dfa.c (compute_alias_sets): Use TDI_alias instead of
7602169689Skan	TDI_ssa.
7603169689Skan	* tree-dump.c (dump_files): Add enties for TDI_alias, TDI_ssa1,
7604169689Skan	TDI_dom1, TDI_ssa2, TDI_dce1, TDI_ssa3, TDI_dom2, TDI_ssa4,
7605169689Skan	TDI_ssa5 and TDI_dce2.
7606169689Skan	Remove entries for TDI_ssa, TDI_dom and TDI_dce.
7607169689Skan	* tree.h (enum tree_dump_index): Similarly.
7608169689Skan	(TDF_ALIAS): Remove.
7609169689Skan	(TDF_VOPS): Change value.
7610169689Skan	* doc/invoke.texi (-fdump-tree-alias): Document.
7611169689Skan	* tree-flow.h (tree_warn_uninitialized): Remove unused variable.
7612169689Skan	(rewrite_into_ssa): Add enum tree_dump_index argument.  Update all
7613169689Skan	callers.
7614169689Skan	(rewrite_out_of_ssa): Likewise.
7615169689Skan	(tree_perform_ssa_pre): Likewise.
7616169689Skan	(tree_ssa_dominator_optimize): Likewise.
7617169689Skan	(tree_ssa_dce): Likewise.
7618169689Skan	(tree_ssa_copyprop): Likewise.
7619169689Skan	(tree_ssa_ccp): Likewise.
7620169689Skan	Add sbitmap argument.
7621169689Skan	(tree_compute_must_alias): Likewise.
7622169689Skan	(mark_new_vars_to_rename): Declare.
7623169689Skan	* tree-must-alias.c (tree_compute_must_alias): Do not call
7624169689Skan	rewrite_into_ssa.
7625169689Skan	Remove local vars_to_rename.  Use new argument instead.
7626169689Skan	* tree-optimize.c (optimize_function_tree): Re-write optimization
7627169689Skan	ordering to support passes that need the SSA form updated.
7628169689Skan	Call tree_ssa_dominator_optimize.
7629169689Skan	Re-arrange optimization ordering.
7630169689Skan	* tree-ssa-ccp.c (substitute_and_fold): Take new argument
7631169689Skan	vars_to_rename.
7632169689Skan	Call mark_new_vars_to_rename.
7633169689Skan	(visit_phi_node): Move variable 'val' into the right scope.
7634169689Skan	(initialize): Move call dump_begin ...
7635169689Skan	(tree_ssa_ccp): ... here.
7636169689Skan	* tree-ssa-dom.c (mark_new_vars_to_rename): Declare extern.
7637169689Skan	Make sure that variables in virtual operands aren't marked
7638169689Skan	unnecessarily.
7639169689Skan	* tree-ssa.c (rewrite_into_ssa): Do not call
7640169689Skan	tree_ssa_dominator_optimize.
7641169689Skan
7642169689Skan2003-09-21  Diego Novillo  <dnovillo@redhat.com>
7643169689Skan
7644169689Skan	* tree-ssa-dce.c (dom_info): Remove unused variable.
7645169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): If the CFG has been
7646169689Skan	altered, call cleanup_tree_cfg.
7647169689Skan	Call cleanup_tree_cfg before returning.
7648169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Call get_stmt_operands
7649169689Skan	before processing the statement.
7650169689Skan	* tree-ssa-dom.c (thread_edge): Remove attribute EDGE_FALLTHRU from
7651169689Skan	edge.
7652169689Skan
7653169689Skan2003-09-21  Jeff Law  <law@redhat.com>
7654169689Skan
7655169689Skan	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Break out of
7656169689Skan	optimize_stmt.  Follow the def-use chains back for certain expressions
7657169689Skan	to see if we can simplify the RHS of the current expression based
7658169689Skan	on earlier expressions.
7659169689Skan
7660169689Skan	* tree-ssa-dom.c (optimize_block): Rework code to propagate values
7661169689Skan	into PHI nodes to be more efficient.
7662169689Skan
7663169689Skan2003-09-20  Andrew MacLeod  <amacleod@redhat.com>
7664169689Skan
7665169689Skan	* tree-flow.h (struct dataflow_d): Remove reaching fields, add 2 element
7666169689Skan	vector of trees.
7667169689Skan	* tree-flow-inline.h (immediate_uses): Rename to get_immediate_uses,
7668169689Skan	return a dataflow object.
7669169689Skan	(reaching_defs): Remove until needed.
7670169689Skan	(num_immediate_uses): New. Return number of immediate uses.
7671169689Skan	(immediate_use): New. Return a specified immediate use.
7672169689Skan	* tree-dfa.c (add_immediate_use): Use new fields.
7673169689Skan	(dump_immediate_uses_for): Use new interface.
7674169689Skan	(create_phi_node): Chain to start of list.
7675169689Skan	* tree-ssa-ccp.c (add_var_to_ssa_edges_worklist): Use new interface.
7676169689Skan	* tree-ssa.c (compute_global_livein): Loop interchange.
7677169689Skan
7678169689Skan2003-09-18  Jeff Law  <law@redhat.com>
7679169689Skan
7680169689Skan	* tree-ssa-dom.c (optimize_stmt): Allow optimizing the RHS of a
7681169689Skan	MODIFY_EXPR even if we can't record any equivalences created by
7682169689Skan	the MODIFY_EXPR.  Move code to simplify ABS_EXPR, TRUNC_DIV_EXPR
7683169689Skan	and TRUNC_MOD_EXPR to an earlier position.
7684169689Skan
7685169689Skan2003-09-19  Andrew MacLeod  <amacleod@redhat.com>
7686169689Skan
7687169689Skan	* tree-ssa-ccp.c (cfg_edges): Rename to cfg_blocks.
7688169689Skan	(cfg_blocks_num, cfg_blocks_head, cfg_blocks_tail): New. Queue markers.
7689169689Skan	(bb_in_list): New. Vector indicating if a BB is in the cfg_blocks list.
7690169689Skan	(tree_ssa_ccp): Use new routines.
7691169689Skan	(add_control_edge): Add to cfg_blocks list.
7692169689Skan	(initialize): Initialize new variables.
7693169689Skan	(finalize): Free allocations.
7694169689Skan	(cfg_blocks_empty): New. Is cfg_blocks queue list.
7695169689Skan	(cfg_blocks_add): New. Add a basic block to cfg_blocks list.
7696169689Skan	(cfg_blocks_pop): New. Get a basic_block from the list.
7697169689Skan
7698169689Skan2003-09-18  Richard Henderson  <rth@redhat.com>
7699169689Skan
7700169689Skan	* tree-cfg.c (struct rusv_data): Add may_throw, may_branch.
7701169689Skan	(remove_useless_stmts_and_vars_1): Set them.
7702169689Skan	(remove_useless_stmts_and_vars_goto): Likewise.
7703169689Skan	(remove_useless_stmts_and_vars_tf): Transform to compound_expr
7704169689Skan	if only fallthrough.
7705169689Skan	(remove_useless_stmts_and_vars_tc): Kill region if nothrow.
7706169689Skan	Detect catch regions that don't propagate exceptions.
7707169689Skan	(remove_useless_stmts_and_vars): Zero entire data struct.
7708169689Skan
7709169689Skan2003-09-18  Richard Henderson  <rth@redhat.com>
7710169689Skan
7711169689Skan	* tree-eh.c (lower_try_finally_dup_block): New.
7712169689Skan	(honor_protect_cleanup_actions, lower_try_finally_copy): Use it.
7713169689Skan
7714169689Skan2003-09-18  Richard Henderson  <rth@redhat.com>
7715169689Skan
7716169689Skan	* tree-cfg (remove_useless_stmts_and_vars_cond,
7717169689Skan	remove_useless_stmts_and_vars_tf,
7718169689Skan	remove_useless_stmts_and_vars_tc,
7719169689Skan	remove_useless_stmts_and_vars_bind,
7720169689Skan	remove_useless_stmts_and_vars_goto): Break out of ...
7721169689Skan	(remove_useless_stmts_and_vars_1): ... here.  Rename to _1;
7722169689Skan	take and use struct rusv_data.
7723169689Skan	(remove_useless_stmts_and_vars): New.  Loop until no change.
7724169689Skan	* tree-flow.h (remove_useless_stmts_and_vars): Update decl.
7725169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Don't loop here.
7726169689Skan
7727169689Skan2003-09-18  Richard Henderson  <rth@redhat.com>
7728169689Skan
7729169689Skan	* tree-pretty-print.c (dump_generic_node): Don't double indent asms.
7730169689Skan
7731169689Skan2003-09-18  Richard Henderson  <rth@redhat.com>
7732169689Skan
7733169689Skan	* tree-eh.c: Include langhooks.h, remove errors.h.
7734169689Skan	(decide_copy_try_finally): Use estimate_num_insns to choose
7735169689Skan	between copy and switch implementations.
7736169689Skan
7737169689Skan	* c-common.c (c_estimate_num_insns): Take an expr, not a decl.
7738169689Skan	* tree-inline.c (limits_allow_inlining): Pass it the body of the decl.
7739169689Skan
7740169689Skan2003-09-18  Jeff Law  <law@redhat.com>
7741169689Skan
7742169689Skan	* tree-ssa-dom.c (lookup_avail_expr): New argument which indicates
7743169689Skan	if the expression should be entered into the hash table.  All
7744169689Skan	callers updated.
7745169689Skan	(update_rhs_and_lookup_avail_expr): New function factored out
7746169689Skan	of optimize_stmt.
7747169689Skan
7748169689Skan	* tree.h (commutative_tree_code, associative_tree_code): Declare
7749169689Skan	* tree.c (commutative_tree_code, associative_tree_code): New
7750169689Skan	functions.
7751169689Skan	(iterative_hash_expr): Use commutative_tree_code.
7752169689Skan	* fold-const.c (operand_equal_p): Use commutative_tree_code
7753169689Skan	rather than inlining the communitivy check.
7754169689Skan	(fold, nondestructive_fold_binary_to_constant): Similarly.
7755169689Skan
7756169689Skan2003-09-18  Diego Novillo  <dnovillo@redhat.com>
7757169689Skan
7758169689Skan	* Makefile.in (tree-eh.o): Add dependency on errors.h
7759169689Skan	* tree-eh.c: Include errors.h
7760169689Skan
7761169689Skan2003-09-17  Richard Henderson  <rth@redhat.com>
7762169689Skan
7763169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Revert last change.
7764169689Skan	* tree-flow.h, tree-ssa.c: Likewise.
7765169689Skan
7766169689Skan2003-09-17  Richard Henderson  <rth@redhat.com>
7767169689Skan
7768169689Skan	* tree-eh.c (decide_copy_try_finally): Remove forgotten debug code.
7769169689Skan
7770169689Skan2003-09-17  Daniel Berlin  <dberlin@dberlin.org>
7771169689Skan
7772169689Skan	* tree-ssa-pre.c (pick_ssa_name): New function.
7773169689Skan	(code_motion): Use it.
7774169689Skan
7775169689Skan2003-09-17  Richard Henderson  <rth@redhat.com>
7776169689Skan
7777169689Skan	* tree-eh.c: New file.
7778169689Skan	* Makefile.in (OBJS-common): Add it.
7779169689Skan	(tree-eh.o): New.
7780169689Skan	* calls.c (emit_call_1): New argument for full call expr.
7781169689Skan	Check with lookup_stmt_eh_region to set REG_EH_REGION.
7782169689Skan	(expand_call): Likewise for tail-calls.
7783169689Skan	* except.c (struct eh_region): Add tree_label.
7784169689Skan	(gen_eh_region, gen_eh_region_cleanup, gen_eh_region_try,
7785169689Skan	gen_eh_region_catch, gen_eh_region_allowed,
7786169689Skan	gen_eh_region_must_not_throw, get_eh_region_number,
7787169689Skan	get_eh_region_may_contain_throw, get_eh_region_tree_label,
7788169689Skan	set_eh_region_tree_label, expand_resx_expr): New.
7789169689Skan	(expand_eh_region_start, expand_start_catch): Use them.
7790169689Skan	(expand_end_catch): Tidy.
7791169689Skan	(note_eh_region_may_contain_throw): Take region argument.
7792169689Skan	(note_current_region_may_contain_throw): New.
7793169689Skan	(get_exception_filter): Export.
7794169689Skan	(collect_eh_region_array): Export.
7795169689Skan	(remove_unreachable_regions): Check ERT_TRY based on reachability
7796169689Skan	of catches, not reachability of continue_label.  Never remove
7797169689Skan	ERT_MUST_NOT_THROW regions.
7798169689Skan	(collect_rtl_labels_from_trees): New.
7799169689Skan	(convert_from_eh_region_ranges): Use it.
7800169689Skan	(connect_post_landing_pads): Handle dying cleanups.
7801169689Skan	(struct reachable_info): Add callback data.
7802169689Skan	(add_reachable_handler): Invoke the callback.
7803169689Skan	(foreach_reachable_handler): New.
7804169689Skan	(reachable_handlers): Use it.
7805169689Skan	(arh_to_landing_pad, arh_to_label): New.
7806169689Skan	(can_throw_internal_1): Split out from can_throw_internal.
7807169689Skan	(can_throw_external_1): Similarly.
7808169689Skan	* except.h: Update.
7809169689Skan	* expr.c (expand_expr): Handle RESX_EXPR, FILTER_EXPR.
7810169689Skan	* gimplify.c (gimplify_modify_expr): Use tree_could_trap_p.
7811169689Skan	* stmt.c (using_eh_for_cleanups_p): Export.
7812169689Skan	(expand_return): Allow any typed rhs.
7813169689Skan	* timevar.def (TV_TREE_EH): New.
7814169689Skan	* tree-cfg.c (eh_stack): Kill.
7815169689Skan	(build_tree_cfg): Don't set it.  Kill code to handle EH.
7816169689Skan	(could_trap_p): Move to tree-eh.c as tree_could_trap_p.
7817169689Skan	(get_eh_region_type, make_try_expr_blocks, make_catch_expr_blocks,
7818169689Skan	make_eh_filter_expr_blocks, try_finallys): Kill.
7819169689Skan	(make_edges): Kill code to handle EH.
7820169689Skan	(make_ctrl_stmt_edges): Kill TRY_FINALLY_EXPR, CATCH_EXPR,
7821169689Skan	EH_FILTER_EXPR.  Handle RESX_EXPR.
7822169689Skan	(make_call_expr_edges): Kill.
7823169689Skan	(make_exit_edges): Use make_eh_edges.
7824169689Skan	(label_to_block): New.
7825169689Skan	(make_goto_expr_edges): Use it.
7826169689Skan	(is_ctrl_stmt): Add RESX_EXPR.
7827169689Skan	(is_ctrl_altering_stmt): Restructure.  Use tree_can_throw_internal.
7828169689Skan	(last_exec_block, compute_reachable_eh): Kill.
7829169689Skan	* tree-dfa.c (get_stmt_operands): Add RESX_EXPR.
7830169689Skan	(get_expr_operands): Add FILTER_EXPR.
7831169689Skan	* tree-dump.c (dump_files): Add tree-eh.
7832169689Skan	* tree-flow.h (struct stmt_ann_d): Kill reachable_exception_handlers.
7833169689Skan	(label_to_block, lower_eh_constructs, make_eh_edges,
7834169689Skan	tree_could_trap_p, tree_could_throw_p, tree_can_throw_internal,
7835169689Skan	tree_can_throw_external): Declare.
7836169689Skan	* tree-optimize.c (optimize_function_tree): Call lower_eh_constructs.
7837169689Skan	(tree_rest_of_compilation): Save tree for inlining.
7838169689Skan	* tree-pretty-print.c (dump_generic_node): Handle FILTER_EXPR,
7839169689Skan	RESX_EXPR.
7840169689Skan	* tree-simple.c (is_gimple_stmt): Add RESX_EXPR.
7841169689Skan	(is_gimple_val): Add FILTER_EXPR.
7842169689Skan	* tree-ssa-dce.c (stmt_useful_p): Restructure.  Add lhs of
7843169689Skan	EXC_PTR_EXPR or FILTER_EXPR.
7844169689Skan	* tree.def (FILTER_EXPR, RESX_EXPR): New.
7845169689Skan	* tree.h (enum tree_dump_index): Add TDI_eh.
7846169689Skan
7847169689Skan2003-09-17  Richard Henderson  <rth@redhat.com>
7848169689Skan
7849169689Skan	* tree.c (tsi_link_before): Remove unnecessary parens.
7850169689Skan	(tsi_link_chain_before, tsi_delink): Likewise.
7851169689Skan	(tsi_link_after): Accept the case if the iterator points
7852169689Skan	to a NULL node; treat it as an empty list.
7853169689Skan	(tsi_link_chain_after): Likewise.  Update iterator properly
7854169689Skan	for TSI_CHAIN_END.
7855169689Skan
7856169689Skan2003-09-17  Richard Henderson  <rth@redhat.com>
7857169689Skan
7858169689Skan	* tree-inline.c (debug_find_tree_1, debug_find_tree): New.
7859169689Skan
7860169689Skan2003-09-17  Richard Henderson  <rth@redhat.com>
7861169689Skan
7862169689Skan	* tree-cfg.c (struct rusv_data): New.
7863169689Skan	(remove_useless_stmts_and_vars_1): Rename from
7864169689Skan	remove_useless_stmts_and_vars.  Use rusv_data.  Handle goto-next
7865169689Skan	via remembering the last goto seen, and zapping it when appropriate.
7866169689Skan	(remove_useless_stmts_and_vars): New.  Loop until done.
7867169689Skan	* tree-flow.h (remove_useless_stmts_and_vars): Update decl.
7868169689Skan	* tree-optimize.c (optimize_function_tree): Don't cache fnbody.
7869169689Skan	Dump data after remove_useless_stmts_and_vars.
7870169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Kill loop around
7871169689Skan	remove_useless_stmts_and_vars.
7872169689Skan	* tree-dump.c (dump_files): Add .useless.
7873169689Skan	* tree.h (enum tree_dump_index): Add TDI_useless.
7874169689Skan
7875169689Skan2003-09-17  Diego Novillo  <dnovillo@redhat.com>
7876169689Skan
7877169689Skan	* pretty-print.c (pp_write_text_to_stream): Export.
7878169689Skan	* pretty-print.h (pp_write_text_to_stream): Declare.
7879169689Skan	* tree-pretty-print.c (print_generic_stmt): Flush to file.
7880169689Skan	(dump_generic_node): Call pp_write_text_to_stream.
7881169689Skan	(maybe_init_pretty_print): Take file argument; associate the
7882169689Skan	stream with the buffer.
7883169689Skan
7884169689Skan2003-09-17  Jeff Law  <law@redhat.com>
7885169689Skan
7886169689Skan	* tree-ssa-ccp.c (ccp_fold): If the return value has the wrong
7887169689Skan	type, try to convert it to the proper type rather than failing.
7888169689Skan
7889169689Skan	* tree-ssa-dom.c (optimize_stmt): Note that the statement is
7890169689Skan	modified, even if we just change the virtual operands.  If
7891169689Skan	the statement was modified by const/copy propagation, then
7892169689Skan	set may_have_exposed_new_symbols.
7893169689Skan
7894169689Skan2003-09-17  Diego Novillo  <dnovillo@redhat.com>
7895169689Skan
7896169689Skan	* tree-dfa.c (find_vars_r): Do not consider 'void *' pointers as
7897169689Skan	dereferenced when scanning function call arguments.
7898169689Skan	* tree-flow-inline.h (may_propagate_copy): Block propagation of
7899169689Skan	pointers when they have different memory tags.
7900169689Skan	* tree-ssa-copyprop.c (propagate_copy): When copy propagating
7901169689Skan	pointers, abort if the two pointers don't have identical memory
7902169689Skan	tags.
7903169689Skan
7904169689Skan2003-09-16  Jeff Law  <law@redhat.com>
7905169689Skan
7906169689Skan	* tree-ssa-ccp.c (visit_stmt): Do not set DONT_SIMULATE_AGAIN
7907169689Skan	just because a statement as virtual definitions.
7908169689Skan	(likely_value): A CALL_EXPR is assumed to return a VARYING
7909169689Skan	result, regardless of its operands.
7910169689Skan
7911169689Skan2003-09-15  Jason Merrill  <jason@redhat.com>
7912169689Skan
7913169689Skan	* tree-simple.c (is_gimple_val): Allow addresses of all decls.
7914169689Skan	(is_gimple_const): Allow addresses of all non-weak statics.
7915169689Skan	* tree-ssa-ccp.c (fold_stmt): Return bool.
7916169689Skan	* tree-flow.h: Adjust prototype.
7917169689Skan	* tree-ssa-dom.c (optimize_stmt): If folding changed stuff, we
7918169689Skan	need to recalculate the vops.
7919169689Skan
7920169689Skan2003-09-13  Diego Novillo  <dnovillo@redhat.com>
7921169689Skan
7922169689Skan	Fix PR optimization/12268
7923169689Skan	* tree-dfa.c (add_referenced_var): Call-clobbered pointers may
7924169689Skan	point to global memory.
7925169689Skan
7926169689Skan2003-09-13  Jason Merrill  <jason@redhat.com>
7927169689Skan
7928169689Skan	* c-common.c (c_apply_type_quals_to_decl): Unset TREE_READONLY for
7929169689Skan	types with constructors.
7930169689Skan	Remove superfluous references to TREE_TYPE (decl).
7931169689Skan
7932169689Skan2003-09-13  Diego Novillo  <dnovillo@redhat.com>
7933169689Skan
7934169689Skan	* opts.c (decode_options): Enable must-alias optimization by default.
7935169689Skan	* tree-dfa.c (get_expr_operands): Always call add_stmt_operand when
7936169689Skan	dealing with ADDR_EXPR nodes.
7937169689Skan	(add_stmt_operand): If the variable has an alias set
7938169689Skan	of size zero, abort.
7939169689Skan	Call get_base_symbol() to retrieve the variable from an ADDR_EXPR
7940169689Skan	node.
7941169689Skan	(compute_alias_sets): Deep copy the aliases array when triggering
7942169689Skan	the alias grouping heuristic.
7943169689Skan	Don't group aliases if -ftree-must-alias is given.
7944169689Skan	* tree-must-alias.c (tree_compute_must_alias): Call
7945169689Skan	dump_referenced_vars when doing detailed dumps.
7946169689Skan	Rename promoted_vars to vars_to_rename.  Update all users.
7947169689Skan	(find_addressable_vars): Always mark statements modified.
7948169689Skan	(promote_var): Also mark aliases of promoted variable to be
7949169689Skan	renamed.
7950169689Skan	Call find_variable_in and remove_element_from to update varrays for
7951169689Skan	call-clobbered variables and alias sets.
7952169689Skan	(find_variable_in): New local function.
7953169689Skan	(remove_element_from): New local function.
7954169689Skan	* varray.c (varray_copy): New function.
7955169689Skan	* varray.h (varray_copy): Declare.
7956169689Skan
7957169689Skan2003-09-13  Diego Novillo  <dnovillo@redhat.com>
7958169689Skan
7959169689Skan	* tree-flow-inline.h (is_optimizable_addr_expr): Remove.  Update
7960169689Skan	all users.
7961169689Skan	* tree-ssa-dom.c (optimize_stmt): Do not propagate SSA names from
7962169689Skan	redundant expressions across abnormal edges.
7963169689Skan
7964169689Skan2003-09-13  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
7965169689Skan
7966169689Skan	* tree-cfg.c (remove_unreachable_blocks): Clean up.
7967169689Skan	(debug_tree_bb_n): New.
7968169689Skan	(is_ctrl_structure): Remove LOOP_EXPR.
7969169689Skan	* tree-flow.h (debug_tree_bb_n): Declare.
7970169689Skan
7971169689Skan2003-09-12  Andrew Macleod  <amacleod@redhat.com>
7972169689Skan
7973169689Skan	* tree-ssa-live.c (calculate_live_on_entry): Use default_def to add
7974169689Skan	addition checks to live on entry calculations.
7975169689Skan	* tree-ssa.c (print_exprs_edge): New debug output function.
7976169689Skan	(coalesce_abnormal_edges): Add basic block information to output.
7977169689Skan	(coalesce_ssa_name): Use default_def instead of trying to compute live
7978169689Skan	on entry variables.
7979169689Skan
7980169689Skan2003-09-12  Diego Novillo  <dnovillo@redhat.com>
7981169689Skan
7982169689Skan	* tree-optimize.c (tree_rest_of_compilation): Set TREE_ASM_WRITTEN
7983169689Skan	for functions that have errors.
7984169689Skan
7985169689Skan2003-09-12  Diego Novillo  <dnovillo@redhat.com>
7986169689Skan
7987169689Skan	* tree-ssa-pre.c (graph_dump_file, graph_dump_flags): Remove
7988169689Skan	unused variables.
7989169689Skan
7990169689Skan2003-09-11  Daniel Berlin  <dberlin@dberlin.org>
7991169689Skan
7992169689Skan	* tree-ssa-pre.c (reset_down_safe): Make test less conservative.
7993169689Skan	(cba_search_start_from): Start from abnormal edge arguments, too.
7994169689Skan	(cba_search_continue_from_to): Ditto here.
7995169689Skan
7996169689Skan2003-09-11  Daniel Berlin  <dberlin@dberlin.org>
7997169689Skan
7998169689Skan	* tree-ssa-pre.c: s/#if ENABLE_CHECKING/#ifdef ENABLE_CHECKING/g.
7999169689Skan	Add more comments to DFS searching functions.
8000169689Skan	(cba_search_reach_from_to): Remove empty function.
8001169689Skan	(code_motion): Remove #if 0'd code.
8002169689Skan	(pre_expression): Ditto.
8003169689Skan	* tree.h (tree_dump_index): Remove TDI_predot.
8004169689Skan	* tree-dump.c (dump_files): Ditto.
8005169689Skan
8006169689Skan2003-09-11  Jason Merrill  <jason@redhat.com>
8007169689Skan
8008169689Skan	Make EDGE_FALLTHRU meaningful for tree-cfg.
8009169689Skan	* tree-cfg.c (make_edges): Set EDGE_FALLTHRU on fallthrough edge.
8010169689Skan	(make_exit_edges): Likewise.
8011169689Skan	(make_ctrl_stmt_edges): Don't set EDGE_FALLTHRU on edges into a
8012169689Skan	control structure.
8013169689Skan	(handle_switch_fallthru): Clear EDGE_FALLTHRU after inserting a goto.
8014169689Skan	(find_insert_location): Only insert after a CALL_EXPR or MODIFY_EXPR.
8015169689Skan	(bsi_insert_on_edge_immediate): Count outgoing abnormal edges.
8016169689Skan	Insert before all control stmts.
8017169689Skan	(bsi_link_after): Handle a block with nops after the last stmt.
8018169689Skan
8019169689Skan	Rename some things to clarify difference between "control structures"
8020169689Skan	(i.e. COND_EXPR) and "control statements" (also GOTO_EXPR).
8021169689Skan	* basic-block.h (BB_CONTROL_STRUCTURE): Rename from BB_CONTROL_EXPR.
8022169689Skan	* tree-cfg.c (REMOVE_NON_CONTROL_STRUCTS): Rename from
8023169689Skan	REMOVE_NON_CONTROL_STMTS.
8024169689Skan	(REMOVE_CONTROL_STRUCTS): Rename from REMOVE_CONTROL_STMTS.
8025169689Skan	(make_ctrl_stmt_edges): Move GOTO_EXPR/RETURN_EXPR handling here...
8026169689Skan	(make_exit_edges): ...from here.
8027169689Skan	(is_ctrl_altering_stmt): Don't accept GOTO_EXPR/RETURN_EXPR.
8028169689Skan	(is_ctrl_structure): Renamed from old is_ctrl_stmt.
8029169689Skan	(is_ctrl_stmt): New fn.
8030169689Skan	(bsi_move_to_bb_end): Use it.
8031169689Skan	(stmt_starts_bb_p): Use is_ctrl_stmt and is_ctrl_altering_stmt.
8032169689Skan	* tree-flow.h: Add prototype.
8033169689Skan	* tree-ssa-ccp.c, tree-ssa-dom.c: Update for name changes.
8034169689Skan
8035169689Skan2003-09-10  Daniel Berlin  <dberlin@dberlin.org>
8036169689Skan
8037169689Skan	* tree-ssa-pre.c (ephi_has_bottom): Remove dead function.
8038169689Skan	(ephi_has_unsafe_arg): New function.
8039169689Skan	(compute_down_safety): Use it.
8040169689Skan	(reset_down_safe): Continue search on abnormal edges, too.
8041169689Skan
8042169689Skan2003-09-10  Jason Merrill  <jason@redhat.com>
8043169689Skan
8044169689Skan	* gimplify.c (gimplify_asm_expr): Add post_p parm.
8045169689Skan	(get_initialized_tmp_var): Add post_p parm.
8046169689Skan	(internal_get_tmp_var): Likewise.
8047169689Skan	(gimplify_expr, get_formal_tmp_var): Pass it.
8048169689Skan	* c-simplify.c (gimplify_decl_stmt): Pass it.
8049169689Skan	* tree-simple.h: Adjust prototype.
8050169689Skan
8051169689Skan	* tree-cfg.c (make_call_expr_edges): Break out from...
8052169689Skan	(make_exit_edges): ...here.  Check TREE_NOTHROW.
8053169689Skan	(is_ctrl_altering_stmt): Check TREE_NOTHROW.
8054169689Skan
8055169689Skan2003-09-10  Paul Brook  <paul@nowt.org>
8056169689Skan
8057169689Skan	* gimplify.c (gimplify_compound_lval): Treat REALPART_EXPR and
8058169689Skan	IMAGPART_EXPR the same as COMPONENT_REF.
8059169689Skan	* tree-simple.c (is_gimple_addr_expr_arg): Ditto.
8060169689Skan	(is_gimple_lvalue): Remove REALPART_EXPR and IMAGPART_EXPR.
8061169689Skan
8062169689Skan2003-09-10  Diego Novillo  <dnovillo@redhat.com>
8063169689Skan
8064169689Skan	* c-pretty-print.c (decl_name_str): New local function.
8065169689Skan	(pp_c_direct_declarator): Call it.
8066169689Skan	(pp_c_primary_expression): Call it.
8067169689Skan	(pp_c_id_expression): Call it.
8068169689Skan	(pp_c_statement): Call it.
8069169689Skan
8070169689Skan2003-09-10  Diego Novillo  <dnovillo@redhat.com>
8071169689Skan
8072169689Skan	* tree-pretty-print.c (dump_generic_node): Change string used to
8073169689Skan	display _DECL nodes with no DECL_NAME.
8074169689Skan
8075169689Skan2003-09-10  Diego Novillo  <dnovillo@redhat.com>
8076169689Skan
8077169689Skan	* tree-dfa.c (add_referenced_var): Handle cases when argument
8078169689Skan	walk_state is NULL.
8079169689Skan	(add_referenced_tmp_var): New function.
8080169689Skan	* tree-flow.h (add_referenced_tmp_var): Declare it.
8081169689Skan	* tree-ssa-pre.c (pre_expression): Call it.
8082169689Skan	* tree-ssa-live.c (create_ssa_var_map): Add checking for variables
8083169689Skan	being in real and virtual operands.
8084169689Skan
8085169689Skan2003-09-01  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8086169689Skan	    Jeff Law  <law@redhat.com>
8087169689Skan
8088169689Skan	* tree-flow.h (remove_unreachable_blocks): Declare.
8089169689Skan	* tree-cfg.c (remove_unreachable_blocks): Export. Return true
8090169689Skan	if blocks were removed.
8091169689Skan	* tree-ssa-dom.c (optimize_block, optimize_stmt): Record whether
8092169689Skan	the cfg has changed.  Schedule jump threading.  If a block
8093169689Skan	has more than one pred, then do not record equivalences created
8094169689Skan	by a controlling COND_EXPR.
8095169689Skan	(edges_to_redirect, redirection_targets): New variables.
8096169689Skan	(thread_edge): Split out of optimize_block.
8097169689Skan	(tree_ssa_dominator_optimize); Remove unreachable blocks and
8098169689Skan	recompute dominator tree when the cfg changes.
8099169689Skan
8100169689Skan2003-09-07  Steven Bosscher  <steven@gcc.gnu.org>
8101169689Skan
8102169689Skan	* c-tree.h: Don't declare c_genericize, it's already
8103169689Skan	declared in c-common.h.
8104169689Skan
8105169689Skan2003-09-07  Steven Bosscher  <steven@gcc.gnu.org>
8106169689Skan
8107169689Skan	Fix PR optimization/12198
8108169689Skan	* tree-cfg.c (value_matches_some_label): Handle integer
8109169689Skan	case ranges.
8110169689Skan
8111169689Skan2003-09-06  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8112169689Skan
8113169689Skan	* tree-iterator.h (tsi_iterator_update): Added TSI_CHAIN_START,
8114169689Skan	TSI_CHAIN_END, TSI_CONTINUE_LINKING and comments.
8115169689Skan	(tsi_link_chain_before, tsi_link_chain_after): Declare.
8116169689Skan	* tree.c (tsi_link_chain_before, tsi_link_chain_after): New.
8117169689Skan	(tsi_link_before, tsi_link_after): Handle new TSI_...
8118169689Skan	positions.
8119169689Skan
8120169689Skan2003-09-06  Diego Novillo  <dnovillo@redhat.com>
8121169689Skan
8122169689Skan	* varray.c (element): Add entry for 'tree *'.
8123169689Skan	* varray.h (enum varray_data_enum): Add VARRAY_DATA_TREE_PTR.
8124169689Skan	(union varray_data_tag): Add entry for 'tree *'.
8125169689Skan	(VARRAY_TREE_PTR_INIT): Define.
8126169689Skan	(VARRAY_TREE_PTR): Define.
8127169689Skan	(VARRAY_PUSH_TREE_PTR): Define.
8128169689Skan	(VARRAY_TOP_TREE_PTR): Define.
8129169689Skan	* tree-cfg.c: Replace uses of VARRAY_GENERIC_PTR with
8130169689Skan	VARRAY_TREE_PTR when accessing operand arrays.
8131169689Skan	* tree-ssa-ccp.c: Likewise.
8132169689Skan	* tree-ssa-copyprop.c: Likewise.
8133169689Skan	* tree-ssa-dce.c: Likewise.
8134169689Skan	* tree-ssa-dom.c: Likewise.
8135169689Skan	* tree-ssa-live.c: Likewise.
8136169689Skan	* tree-ssa-pre.c: Likewise.
8137169689Skan	* tree-dfa.c: Likewise.
8138169689Skan	* tree-ssa.c: Likewise.
8139169689Skan	* tree-flow.h (struct operands_d): Remove 'skip' GC markers from
8140169689Skan	all fields.
8141169689Skan	(struct dataflow_d): Likewise.
8142169689Skan
8143169689Skan2003-09-05  Diego Novillo  <dnovillo@redhat.com>
8144169689Skan
8145169689Skan	* tree-dfa.c (find_referenced_vars): Re-enable .GLOBAL_VAR
8146169689Skan	optimization.
8147169689Skan
8148169689Skan2003-09-05  Daniel Berlin  <dberlin@dberlin.org>
8149169689Skan
8150169689Skan	* tree.h (tree_eref_common): Make stmt a tree, not a tree *.
8151169689Skan	* tree-ssa-pre.c: Transform all tree *'s to tree.
8152169689Skan
8153169689Skan2003-09-05  Paul Brook  <paul@nowt.org>
8154169689Skan
8155169689Skan	* tree.h (enum tree_index): Delete TI_SIGNED_SIZE_TYPE here.
8156169689Skan	(signed_size_type_node): No longer a member of global_trees.
8157169689Skan	* c-common.h (enum c_tree_index): New member CTI_SIGNED_SIZE_TYPE.
8158169689Skan	(signed_size_type_node): Moved, now a member of c_global_trees.
8159169689Skan
8160169689Skan2003-09-05  Diego Novillo  <dnovillo@redhat.com>
8161169689Skan
8162169689Skan	* tree-dfa.c (find_referenced_vars): Temporarily disable
8163169689Skan	.GLOBAL_VAR optimization.
8164169689Skan
8165169689Skan2003-09-04  Daniel Berlin  <dberlin@dberlin.org>
8166169689Skan
8167169689Skan	* tree-alias-common.c:  Add overview.
8168169689Skan	* tree-alias-ander.c: Add overview and more specific comments on what
8169169689Skan	each function does.
8170169689Skan
8171169689Skan2003-09-04  Diego Novillo  <dnovillo@redhat.com>
8172169689Skan
8173169689Skan	* tree-optimize.c (tree_rest_of_compilation): Return if errorcount
8174169689Skan	or sorrycount are non-zero.
8175169689Skan
8176169689Skan2003-09-04  Diego Novillo  <dnovillo@redhat.com>
8177169689Skan
8178169689Skan	* tree-cfg.c (cleanup_tree_cfg): Traverse basic blocks
8179169689Skan	with FOR_EACH_BB.
8180169689Skan	(remove_useless_stmts_and_vars): Likewise.
8181169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
8182169689Skan	* tree-ssa.c (rewrite_into_ssa): Likewise.
8183169689Skan	* tree-dfa.c (remove_all_phi_nodes_for): Make sure that the new
8184169689Skan	list of PHI nodes is NULL-terminated.
8185169689Skan	Add sanity checks to make sure all the PHI nodes for variables to
8186169689Skan	rename are gone.
8187169689Skan
8188169689Skan2003-09-04  Diego Novillo  <dnovillo@redhat.com>
8189169689Skan
8190169689Skan	* tree-dfa.c (struct walk_state): Add field 'num_calls'.
8191169689Skan	(add_call_clobber_ops): New local function.
8192169689Skan	(add_call_read_ops): New local function.
8193169689Skan	(get_expr_operands): Call them.
8194169689Skan	(add_stmt_operand): Call-clobbered variables are always added to
8195169689Skan	virtual operands.
8196169689Skan	(find_referenced_vars): If the number of call-clobbered variables
8197169689Skan	and number of call sites is larger than a certain threshold, group
8198169689Skan	all call-clobbered variables under .GLOBAL_VAR.
8199169689Skan	(find_vars_r): Count the number of call sites.
8200169689Skan	Don't add .GLOBAL_VAR to the list of referenced variables.
8201169689Skan	(add_referenced_var): If the addressable variable is an array,
8202169689Skan	register alias set of the type of the elements, not the type of the
8203169689Skan	array.
8204169689Skan	* tree-ssa-dom.c (mark_new_vars_to_rename): Rename from
8205169689Skan	find_new_vars_to_rename.  Update all users.
8206169689Skan	Before scanning the statement for new operands, mark the existing
8207169689Skan	virtual operands to be renamed again.
8208169689Skan	(optimize_stmt): Also check for newly exposed variables when doing
8209169689Skan	redundancy elimination.
8210169689Skan	* tree-ssa.c (rewrite_into_ssa): Don't abort when rename_count is
8211169689Skan	greater than 2.  Simply stop trying at 3.
8212169689Skan	(prepare_operand_for_rename): New function.
8213169689Skan	(mark_def_sites): Call it.
8214169689Skan	(rewrite_stmt): Don't check if the operand is an SSA_NAME before
8215169689Skan	calling rewrite_operand.
8216169689Skan	(rewrite_operand): Don't abort if the operand was already an
8217169689Skan	SSA_NAME.  Ignore it.
8218169689Skan
8219169689Skan2003-09-03  Richard Henderson  <rth@redhat.com>
8220169689Skan
8221169689Skan	* tree-optimize.c (set_save_expr_context, clear_decl_rtl,
8222169689Skan	tree_rest_of_compilation): Merge from mainline new file.
8223169689Skan	* Makefile.in (tree-optimize.o): Update.
8224169689Skan	* c-semantics.c (expand_stmt_toplev): New.
8225169689Skan	* c-common.h (expand_stmt_toplev): Declare.
8226169689Skan	* c-lang.c, objc/objc-lang.c (LANG_HOOKS_RTL_EXPAND_STMT): Use it.
8227169689Skan
8228169689Skan2003-09-03  Richard Henderson  <rth@redhat.com>
8229169689Skan
8230169689Skan	* gimplify.c (gimplify_switch_expr): Leave the outermost cast
8231169689Skan	as part of the switch condition.
8232169689Skan
8233169689Skan2003-09-02  Diego Novillo  <dnovillo@redhat.com>
8234169689Skan
8235169689Skan	* Makefile.in (tree.o): Add dependency on $(BASIC_BLOCK_H) and
8236169689Skan	$(TREE_FLOW_H)
8237169689Skan	* tree.c: Include basic-block.h and tree-flow.h
8238169689Skan	(tsi_link_after): Adjust basic block tree pointers when inserting a
8239169689Skan	new COMPOUND_EXPR.
8240169689Skan
8241169689Skan2003-09-02  Richard Henderson  <rth@redhat.com>
8242169689Skan
8243169689Skan	* c-decl.c (finish_function): Fix misapplied patch.  Don't
8244169689Skan	free_after_parsing or free_after_compilation.  For real this time.
8245169689Skan
8246169689Skan2003-09-01  Daniel Berlin  <dberlin@dberlin.org>
8247169689Skan
8248169689Skan	* tree-ssa-pre.c (finalize_1):  Remove unnecessary call to
8249169689Skan	insert_euse_in_preorder_dt_order.
8250169689Skan	(code_motion): Ditto.
8251169689Skan	(pre_expression): Ditto.
8252169689Skan
8253169689Skan2003-09-01  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8254169689Skan	    Jeff Law  <law@redhat.com>
8255169689Skan
8256169689Skan	* basic-block.h (BB_LOOP_CONTROL_EXPR): Remove.
8257169689Skan	* c-simplify.c (gimplify_c_loop): Create loops in a better shape.
8258169689Skan	* cfgloop.h (create_loop_notes): Declare.
8259169689Skan	* cfgloopmanip.c (create_loop_notes): New.
8260169689Skan	* explow.c (probe_stack_range): Don't produce loop notes when we
8261169689Skan	recreate them.
8262169689Skan	* expr.c (emit_block_move_via_loop): Ditto.
8263169689Skan	* gimplify.c (build_and_jump): Export.
8264169689Skan	(gimplify_loop_expr): Don't produce LOOP_EXPRs.
8265169689Skan	* toplev.c (rest_of_compilation): Recreate loop notes if needed.
8266169689Skan	* tree-cfg.c (make_loop_expr_edges, make_loop_expr_blocks): Removed.
8267169689Skan	(find_contained_blocks, make_ctrl_stmt_edges,
8268169689Skan	remove_useless_stmts_and_vars, stmt_ends_bb_p, bsi_insert_before,
8269169689Skan	find_insert_location, bsi_insert_on_edge_immediate,
8270169689Skan	merge_tree_blocks): Remove handling of LOOP_EXPRs.
8271169689Skan	(remove_stmt): Remove handling of BB_LOOP_CONTROL_EXPR.
8272169689Skan	(find_taken_edge): Remove comment on LOOP_EXPRs.
8273169689Skan	(dump_tree_bb): Don't dump loop-related information.
8274169689Skan	(is_loop_stmt, is_latch_block_for): Removed.
8275169689Skan	(find_insert_location): Handle TRY_CATCH and TRY_FINALLY.
8276169689Skan	* tree-flow.h (is_loop_stmt, loop_body, set_loop_body,
8277169689Skan	is_latch_block_for): Removed.
8278169689Skan	* tree-dfa.c (get_stmt_operands): Don't handle LOOP_EXPRs.
8279169689Skan	* tree-simple.c (is_gimple_stmt): Remove handling of LOOP_EXPRs.
8280169689Skan	* tree-simple.h: Remove LOOP_EXPRs from gimple grammar comment.
8281169689Skan	(build_and_jump): Declare.
8282169689Skan	* tree-ssa.c (remove_annotations_r): Don't handle LOOP_EXPRs.
8283169689Skan
8284169689Skan2003-08-29  Daniel Berlin  <dberlin@dberlin.org>
8285169689Skan
8286169689Skan	* opts.c (decode_options): Turn on SSAPRE by default.
8287169689Skan
8288169689Skan2003-08-29  Jason Merrill  <jason@redhat.com>
8289169689Skan
8290169689Skan	* builtins.c (simplify_builtin): Make sure that the replacement
8291169689Skan	has the same type as the original expression.
8292169689Skan	(simplify_builtin_strpbrk): Fix type of COMPOUND_EXPR.
8293169689Skan	(simplify_builtin_strncpy, simplify_builtin_memcmp): Likewise.
8294169689Skan	(simplify_builtin_strncmp, simplify_builtin_strncat): Likewise.
8295169689Skan	(simplify_builtin_strspn, simplify_builtin_strcspn): Likewise.
8296169689Skan	(simplify_builtin_fputs, simplify_builtin_sprintf): Likewise.
8297169689Skan
8298169689Skan2003-08-28  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8299169689Skan
8300169689Skan	* builtins.c (expand_builtin): Expand BUILT_IN_STACK_SAVE and
8301169689Skan	BUILT_IN_STACK_RESTORE.
8302169689Skan	* builtins.def (BUILT_IN_STACK_SAVE, BUILT_IN_STACK_RESTORE): New.
8303169689Skan	* gimplify.c (build_stack_save_restore): New functions.
8304169689Skan	(struct gimplify_ctx): New field save_stack.
8305169689Skan	(gimplify_bind_expr, gimplify_call_expr): Arrange save of stack on
8306169689Skan	BIND_EXPR entry and restore on exits.
8307169689Skan	* stmt.c (expand_stack_alloc): Saving of stack removed.
8308169689Skan	(expand_stack_save, expand_stack_restore): New.
8309169689Skan	* tree.h (expand_stack_save, expand_stack_restore): Declare.
8310169689Skan
8311169689Skan2003-08-28  Diego Novillo  <dnovillo@redhat.com>
8312169689Skan
8313169689Skan	* tree-dfa.c (add_vdef): Check for duplicate voperands first.
8314169689Skan	Handle SSA_NAME in voperands.
8315169689Skan	(add_vuse): Likewise.
8316169689Skan
8317169689Skan2003-08-27  Diego Novillo  <dnovillo@redhat.com>
8318169689Skan
8319169689Skan	* tree-flow.h (var_ann_d): Convert is_in_va_arg_expr into a
8320169689Skan	bitfield.
8321169689Skan
8322169689Skan2003-08-27  Daniel Berlin  <dberlin@dberlin.org>
8323169689Skan
8324169689Skan	* tree-ssa-pre.c: Update comments to reflect reality.
8325169689Skan	(insert_one_operand): Remove #if'0d code.
8326169689Skan
8327169689Skan2003-08-27  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8328169689Skan
8329169689Skan	* gcov.c (typedef struct arc_info): New field cs_count.
8330169689Skan	(accumulate_line_counts): Find cycles correctly.
8331169689Skan
8332169689Skan2003-08-27  Daniel Berlin  <dberlin@dberlin.org>
8333169689Skan
8334169689Skan	* tree-ssa-pre.c (compute_du_info): Move #if ENABLE_CHECKING up one
8335169689Skan	line.
8336169689Skan
8337169689Skan2003-08-27  Daniel Berlin  <dberlin@dberlin.org>
8338169689Skan
8339169689Skan	* tree.h (struct ephi_arg_d): New structure.
8340169689Skan	(struct eref_common): Remove non-used members, move some members
8341169689Skan	elsewhere.
8342169689Skan	(struct ephi_node): Ditto.
8343169689Skan
8344169689Skan	* tree-optimize.c (optimize_function_tree): Move PRE before DCE.
8345169689Skan
8346169689Skan	* tree.c (tree_size): use sizeof (struct ephi_arg_d) for ephi's.
8347169689Skan
8348169689Skan	* tree-pretty-print.c (dump_generic_node): Re-teach to pretty
8349169689Skan	print euses/ephis/etc given new structures, members, and
8350169689Skan	relationships.
8351169689Skan
8352169689Skan	* tree-ssa-pre.c (fixup_domchildren): Removed.
8353169689Skan	(a_dom_b): Ditto.
8354169689Skan	(calculate_preorder): Ditto.
8355169689Skan	(defs_match_p): Ditto.
8356169689Skan	(defs_y_dom_x): Ditto.
8357169689Skan	(compute_can_be_avail): Ditto.
8358169689Skan	(reset_can_be_avail): Ditto.
8359169689Skan	(reset_later): Ditto.
8360169689Skan	(compute_later): Ditto.
8361169689Skan	(repair_*): Ditto.
8362169689Skan	(set_replacement): Ditto.
8363169689Skan	(remove_ephi): Ditto.
8364169689Skan	(set_expruse_def): Ditto.
8365169689Skan	(occ_compare): Ditto.
8366169689Skan	(defs_hash_expr): Ditto.
8367169689Skan	(compute_dt_preorder): Ditto
8368169689Skan	(search_dt_preorder): Ditto.
8369169689Skan	(ephi_operand_for_pred): Ditto.
8370169689Skan	(injured_ephi_operand): Ditto.
8371169689Skan	(compute_stops): New function.
8372169689Skan	(occ_identical_to): Ditto.
8373169689Skan	(require_phi): Ditto.
8374169689Skan	(do_ephi_df_search_1): Ditto.
8375169689Skan	(do_ephi_df_search): Ditto.
8376169689Skan	(any_operand_injured): Ditto.
8377169689Skan	(compute_du_info): Ditto.
8378169689Skan	(add_ephi_use): Ditto.
8379169689Skan	(insert_one_operand): Ditto.
8380169689Skan	(add_ephi_pred): Ditto.
8381169689Skan	(created_phi_preds): New bitmap.
8382169689Skan	(dfn) Removed static variable.
8383169689Skan	(idom_of_ephi): Ditto.
8384169689Skan	(avdefs): Move into expr_info).
8385169689Skan	(struct ephi_use_entry): New structure for EPHI uses.
8386169689Skan	(struct ephi_df_search): New structure for depth first searchs.
8387169689Skan	(cant_be_avail_search): Implementation of structure for
8388169689Skan	cant_be_avail search.
8389169689Skan	(stops_search): Ditto for stops.
8390169689Skan	(replacing_search): Ditto for replacing_search.
8391169689Skan	(do_proper_save): Arguments changed, callers updated.
8392169689Skan	(create_ephi_node): Use sizeof (struct ephi_arg_d).
8393169689Skan	(ephi_has_bottom): Rewrite for updated ephi-pred handling.
8394169689Skan	(ephi_will_be_avail): Rewrite in terms of CANT_BE_AVAIL and STOPS.
8395169689Skan	(expr_phi_insertion): Remove dead code.
8396169689Skan	Update for new flags.
8397169689Skan	(insert_occ_in_preorder_dt_order_1): Only insert one ephi-pred per
8398169689Skan	block.
8399169689Skan	Fix exit occurence handling.
8400169689Skan	(rename_1): Remove occs stuff.
8401169689Skan	Update for new ephi-pred handling.
8402169689Skan	(reset_down_safe): Update for new ephi-pred handling.
8403169689Skan	(compute_down_safe): Ditto.
8404169689Skan	(can_insert): Ditto.
8405169689Skan	(insert_one_operand): Split out from finalize_1.
8406169689Skan	(finalize_1): Update for new ephi-pred handling.
8407169689Skan	Only insert non-pointless, will-be-avail phis, rather than *all*
8408169689Skan	ephis.
8409169689Skan	(get_temp): New function. Hand us the right temporary for a given
8410169689Skan	EPHI/EUSE.
8411169689Skan	(code_motion): Use EREF_TEMP again, now that we can do it
8412169689Skan	properly.
8413169689Skan
8414169689Skan2003-08-26  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8415169689Skan
8416169689Skan	* builtins.c (expand_builtin): Handle STACK_ALLOC.
8417169689Skan	* builtins.def (BUILT_IN_STACK_ALLOC): New.
8418169689Skan	* c-simplify.c (gimplify_decl_stmt, c_gimplify_stmt,
8419169689Skan	gimplify_compound_literal_expr): Arrange explicit stack allocation.
8420169689Skan	* expr.c (expand_expr): Handle deferred variables.
8421169689Skan	* stmt.c (expand_stack_alloc): New.
8422169689Skan	* tree-simple.c (is_gimple_val): Prevent ADDR_EXPRs of vla's from
8423169689Skan	being reduced.
8424169689Skan	* tree.h (expand_stack_alloc): Declare.
8425169689Skan
8426169689Skan2003-08-26  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8427169689Skan
8428169689Skan	* tree-ssa.c (build_dominator_tree): Use FOR_EACH_BB.
8429169689Skan
8430169689Skan2003-08-26  Jason Merrill  <jason@redhat.com>
8431169689Skan
8432169689Skan	* tree-simple.c (is_gimple_val): Also disallow memory vars.
8433169689Skan
8434169689Skan2003-08-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8435169689Skan
8436169689Skan	* integrate.c (copy_decl_for_inlining): Reset DECL_TOO_LATE.
8437169689Skan
8438169689Skan2003-08-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8439169689Skan
8440169689Skan	* tree-ssa-dom.c (optimize_block): Handle empty source block.
8441169689Skan
8442169689Skan	* tree-ssa-dom.c (optimize_block):  Handle case when dominance
8443169689Skan	tree children have also other sucessors.  Add dump to jump
8444169689Skan	threading.
8445169689Skan
8446169689Skan2003-08-25  Jason Merrill  <jason@redhat.com>
8447169689Skan
8448169689Skan	* c-simplify.c (mark_labels_r): New fn.
8449169689Skan	(gimplify_decl_stmt): Use it to mark labels in static initializers.
8450169689Skan	* tree-simple.c (is_gimple_initializer): Remove.
8451169689Skan	(is_gimple_reg_type): New fn.
8452169689Skan	(is_gimple_reg): Use it.  Handle SSA_NAMEs properly.
8453169689Skan	* tree-simple.h: Adjust.
8454169689Skan	* gimplify.c (gimplify_expr) <CONSTRUCTOR>: Do nothing here.
8455169689Skan
8456169689Skan	* gimplify.c (create_tmp_var): Set DECL_IGNORED_P.
8457169689Skan
8458169689Skan	* tree-inline.c (initialize_inlined_parameters): Improve error
8459169689Skan	recovery.
8460169689Skan
8461169689Skan	* gimplify.c (gimplify_boolean_expr): Just replace with a COND_EXPR.
8462169689Skan
8463169689Skan2003-08-25  Diego Novillo  <dnovillo@redhat.com>
8464169689Skan
8465169689Skan	* tree-dfa.c (get_expr_operands): Don't create shared operands when
8466169689Skan	folding *&VAR expressions.
8467169689Skan
8468169689Skan2003-08-24  Diego Novillo  <dnovillo@redhat.com>
8469169689Skan
8470169689Skan	* tree-flow.h (struct var_ann_d): Add field default_def.
8471169689Skan	(widen_bitfield): Declare.
8472169689Skan	(set_default_def): Declare.
8473169689Skan	(default_def): Declare.
8474169689Skan	* tree-flow-inline.h (set_default_def): New inline function.
8475169689Skan	(default_def): New inline function.
8476169689Skan	* tree-dfa.c (dump_variable): Display default_def, if set.
8477169689Skan	* tree-simple.c (is_gimple_reg): Check for DECL_P before checking
8478169689Skan	for DECL_EXTERNAL.
8479169689Skan	* tree-ssa-dom.c (add_expr_propagated_p): Remove.  Update all
8480169689Skan	users.
8481169689Skan	(find_new_vars_to_rename): New local function.
8482169689Skan	(tree_ssa_dominator_optimize): Add new argument vars_to_rename.
8483169689Skan	Change return type to void.  Update all users.
8484169689Skan	(optimize_block): Add new argument vars_to_rename.  Update all
8485169689Skan	users.
8486169689Skan	If the call to optimize_stmt returns true, add the statement to the
8487169689Skan	list of statements to re-scan for operands.
8488169689Skan	After optimizing the block and its dominator children, call
8489169689Skan	find_new_vars_to_rename for every statement that may have had new
8490169689Skan	symbols exposed.
8491169689Skan	(optimize_stmt): Change return type to bool.  Return true if the
8492169689Skan	statement may have had new symbols exposed by optimization.
8493169689Skan	Add a sanity check for the value returned by lookup_avail_expr.
8494169689Skan	Create equivalences for more memory stores, not just the ones done
8495169689Skan	via INDIRECT_REF expressions.
8496169689Skan	Call widen_bitfield when optimizing stores to bitfields.
8497169689Skan	(lookup_avail_expr): Reformat comment.
8498169689Skan	* tree-ssa.c (rewrite_into_ssa): Remove local variable
8499169689Skan	addr_expr_propagated_p.
8500169689Skan	Clear out vars_to_rename before running dominator optimizations.
8501169689Skan	(check_for_new_variables): Remove.
8502169689Skan	(rewrite_stmt): Always register new definitions and virtual
8503169689Skan	definitions.
8504169689Skan	(register_new_def): Update comment.
8505169689Skan	(get_reaching_def): Update the default_def field for the variable
8506169689Skan	if it didn't have a reaching definition.
8507169689Skan	* tree-ssa-ccp.c (widen_bitfield): Declare it extern.
8508169689Skan
8509169689Skan2003-08-23  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8510169689Skan
8511169689Skan	* tree-cfg.c (bsi_next_in_bb): Work correctly when the block ends
8512169689Skan	with start of BIND_EXPR.
8513169689Skan
8514169689Skan2003-08-23  Daniel Berlin  <dberlin@dberlin.org>
8515169689Skan
8516169689Skan	* tree-alias-ander.c (andersen_op_assign): Fix to join the operands,
8517169689Skan	the assign to the lhs.
8518169689Skan
8519169689Skan2003-08-23  Daniel Berlin  <dberlin@dberlin.org>
8520169689Skan
8521169689Skan	* tree-alias-common.c (get_alias_var): Remove REFERENCE_EXPR.
8522169689Skan	(find_func_aliases): Fix some not quite right predicates, add ARRAY_REF
8523169689Skan	handling.
8524169689Skan
8525169689Skan2003-08-22  Jeff Law  <law@redhat.com>
8526169689Skan
8527169689Skan	* tree-dfa.c (compute_alias_sets): A memory tag used for stores can
8528169689Skan	not conflict with objects marked TREE_READONLY.
8529169689Skan
8530169689Skan	* tree-ssa-ccp.c (fold_stmt): Optimize reads from constant strings.
8531169689Skan
8532169689Skan2003-08-22  Jason Merrill  <jason@redhat.com>
8533169689Skan
8534169689Skan	* tree-simple.c: Total overhaul to only check forms and remove
8535169689Skan	unnecessary predicates.
8536169689Skan	(is_gimple_const): Accept function addresses here.
8537169689Skan	Don't accept LABEL_DECL or RESULT_DECL.
8538169689Skan	(is_gimple_val): Accept EXC_PTR_EXPR here.
8539169689Skan	(is_gimple_lvalue): Rename from is_gimple_modify_expr_lhs.
8540169689Skan	Accept BIT_FIELD_REF, REALPART_EXPR and IMAGPART_EXPR here.
8541169689Skan	(is_gimple_addr_expr_arg): Replace with former is_gimple_varname.
8542169689Skan	(is_gimple_constructor_elt): Just check for CONSTRUCTOR.
8543169689Skan	(is_gimple_initializer): Just hand off to is_gimple_rhs.
8544169689Skan	(is_gimple_rhs): Recognize most expressions here.
8545169689Skan	(is_gimple_variable): New fn.
8546169689Skan	(is_gimple_id): Use it.  Now static.
8547169689Skan	(is_gimple_reg): New fn.
8548169689Skan	(is_gimple_cast): Replace with former is_gimple_cast_op.
8549169689Skan	(is_gimple_constructor, is_gimple_expr): Remove.
8550169689Skan	(is_gimple_modify_expr, is_gimple_relop): Remove.
8551169689Skan	(is_gimple_binary_expr, is_gimple_unary_expr): Remove.
8552169689Skan	(is_gimple_call_expr, is_gimple_arglist): Remove.
8553169689Skan	(is_gimple_compound_lval, is_gimple_arrayref): Remove.
8554169689Skan	(is_gimple_compref, is_gimple_exprseq): Remove.
8555169689Skan	(is_gimplifiable_builtin): Remove.
8556169689Skan	* tree-simple.h: Adjust.
8557169689Skan	* gimplify.c (gimplify_conversion): Break out from gimplify_expr.
8558169689Skan	(gimplify_expr): Use is_gimple_reg predicate to force a temp.
8559169689Skan	<COMPONENT_REF>: Use gimplify_compound_lval.
8560169689Skan	<REALPART_EXPR, IMAGPART_EXPR>: Likewise.
8561169689Skan	<INDIRECT_REF>: Use is_gimple_reg predicate.
8562169689Skan	<MIN_EXPR, MAX_EXPR>: Use new gimplify_minimax_expr.
8563169689Skan	<TREE_LIST>: Reject.
8564169689Skan	(gimplify_tree_list, gimplify_component_ref): Remove.
8565169689Skan	(gimplify_compound_lval): Include REALPART_EXPR and IMAGPART_EXPR.
8566169689Skan	(gimplify_component_ref): Remove.
8567169689Skan	(gimplify_call_expr): Handle non-gimplifiable builtins and walking
8568169689Skan	the argument list here.
8569169689Skan	(gimplify_tree_list): Remove.
8570169689Skan	(gimplify_addr_expr): Use fb_either.
8571169689Skan	* tree-simple.h: Adjust.
8572169689Skan	* tree-alias-common.c (find_func_aliases): Update use of predicates.
8573169689Skan
8574169689Skan2003-08-21  Andrew Pinski  <pinskia@physics.uc.edu>
8575169689Skan
8576169689Skan	* tree-ssa.c (tree_ssa_useless_type_conversion): Check also the
8577169689Skan	precision of the type to make sure they are really useless type
8578169689Skan	conversions.
8579169689Skan
8580169689Skan2003-08-21  Diego Novillo  <dnovillo@redhat.com>
8581169689Skan
8582169689Skan	* tree-dump.c (dequeue_and_dump): Handle 'r' and 's' code classes.
8583169689Skan
8584169689Skan2003-08-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8585169689Skan
8586169689Skan	* c-pretty-print.c (print_c_tree): Create new pp object.
8587169689Skan
8588169689Skan2003-08-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8589169689Skan
8590169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Don't free hash tables
8591169689Skan	before statistics are made from them.
8592169689Skan	* tree-ssa.c (rewrite_into_ssa): Ditto.
8593169689Skan
8594169689Skan2003-08-21  Jason Merrill  <jason@redhat.com>
8595169689Skan
8596169689Skan	* tree-inline.c (copy_body_r): Don't convert when stripping &*.
8597169689Skan	Fix thinko in stripping *&.
8598169689Skan
8599169689Skan2003-08-21  Diego Novillo  <dnovillo@redhat.com>
8600169689Skan	    Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8601169689Skan
8602169689Skan	* tree-cfg.c (stmt_starts_bb_p): Nonlocal and computed GOTO targets
8603169689Skan	always start a new block.
8604169689Skan
8605169689Skan2003-08-20  Jason Merrill  <jason@redhat.com>
8606169689Skan
8607169689Skan	* tree-pretty-print.c (dump_generic_node): Just print "<retval>"
8608169689Skan	for the RESULT_DECL.
8609169689Skan
8610169689Skan	* c-simplify.c (make_type_writable, mostly_copy_tree_r): Remove.
8611169689Skan	(deep_copy_list, deep_copy_node): Remove.
8612169689Skan
8613169689Skan	* expr.c (expand_expr): Don't check for 'r' or 's' if we're
8614169689Skan	checking IS_EXPR_CODE_CLASS.
8615169689Skan	* tree-dfa.c (may_access_global_mem_p): Likewise.
8616169689Skan	* tree-browser.c (browse_tree): Likewise.
8617169689Skan	* tree-ssa-pre.c (defs_hash_expr): Likewise.
8618169689Skan	* gimplify.c (gimplify_expr): Likewise.
8619169689Skan	(internal_get_tmp_var): Only copy TREE_LOCUS from an expr.
8620169689Skan	(mostly_copy_tree_r): Ignore decls here.
8621169689Skan
8622169689Skan2003-08-20  Diego Novillo  <dnovillo@redhat.com>
8623169689Skan
8624169689Skan	* c-pretty-print.c: Discard.  Replace with same file from
8625169689Skan	mainline.  Update all users.
8626169689Skan	(print_c_tree): New function.
8627169689Skan	* c-pretty-print.h (print_c_tree): Declare.
8628169689Skan	* tree-pretty-print.c: Update to use new pp_* primitives.
8629169689Skan	* c-simplify.c: Include c-pretty-print.h.
8630169689Skan	* Makefile.in (c-simplify.o): Add dependency on $(C_PRETTY_PRINT_H).
8631169689Skan
8632169689Skan2003-08-20  Roger Sayle  <roger@eyesopen.com>
8633169689Skan
8634169689Skan	* c-common.h (enum c_tree_index): Delete CTI_SIGNED_SIZE_TYPE.
8635169689Skan	(signed_size_type_node): No longer a member of c_global_trees.
8636169689Skan	* tree.h (enum tree_index): New member TI_SIGNED_SIZE_TYPE here.
8637169689Skan	(signed_size_type_node): Moved, now a member of global_trees.
8638169689Skan
8639169689Skan2003-08-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8640169689Skan
8641169689Skan	* tree-ssa-dom.c (optimize_block): Thread jump into empty
8642169689Skan	block correctly.
8643169689Skan
8644169689Skan	* tree-cfg.c (linearize_cond_expr): Don't merge blocks if the
8645169689Skan	later has other predecessors.
8646169689Skan
8647169689Skan2003-08-19  Jason Merrill  <jason@redhat.com>
8648169689Skan
8649169689Skan	* c-typeck.c (build_array_ref): Also build ARRAY_REFs from
8650169689Skan	INDIRECT_REFs of ARRAY_TYPE.
8651169689Skan
8652169689Skan	* tree-ssa.c (tree_ssa_useless_type_conversion): Also strip
8653169689Skan	conversions between pointer and reference types.
8654169689Skan
8655169689Skan	* tree-dfa.c (get_stmt_operands): Just mark non-GIMPLE statements
8656169689Skan	as unmodified.
8657169689Skan	(find_referenced_vars): So we don't need to mark them here.
8658169689Skan
8659169689Skan	* tree-inline.c (inline_data): Add retvar field.
8660169689Skan	(declare_return_variable): Set it.
8661169689Skan	(remap_decls): Use it.
8662169689Skan	(expand_call_inline): Tweak.
8663169689Skan
8664169689Skan2003-08-19  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8665169689Skan
8666169689Skan	* cfg.c (dump_edge_info): Add name for EDGE_LOOP_EXIT flag.
8667169689Skan
8668169689Skan2003-08-19  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8669169689Skan
8670169689Skan	* tree-flow.h (struct var_ann_d): New field scope.
8671169689Skan	(struct stmt_ann_d): New field scope.
8672169689Skan	(propagate_copy): Declaration changed.
8673169689Skan	(fixup_var_scope): Declare.
8674169689Skan	* tree-cfg.c (make_blocks, make_cond_expr_blocks,
8675169689Skan	make_catch_expr_blocks, make_eh_filter_expr_blocks,
8676169689Skan	make_try_expr_blocks, make_loop_expr_blocks, make_switch_expr_blocks,
8677169689Skan	make_bind_expr_blocks, build_tree_cfg): Assign variables and statements
8678169689Skan	to scopes.
8679169689Skan	(assign_vars_to_scope): New.
8680169689Skan	* tree-ssa-copyprop.c (move_var_to_scope): New.
8681169689Skan	(copyprop_stmt): Pass scope of statement to propagate_copy.
8682169689Skan	(propagate_copy): Assign variable to the right bind_expr.
8683169689Skan	(fixup_var_scope): New.
8684169689Skan	* tree-ssa-dom.c (optimize_stmt): Pass scope of statement to
8685169689Skan	propagate_copy.
8686169689Skan
8687169689Skan2003-08-19  Daniel Berlin <dberlin@dberlin.org>
8688169689Skan
8689169689Skan	* tree-cfg (bsi_move_after): New function.
8690169689Skan	(bsi_move_before): New function.
8691169689Skan	(bsi_move_to_bb_end): New function.
8692169689Skan	* tree-flow.h: Prototype new functions.
8693169689Skan
8694169689Skan2003-08-18  Daniel Berlin  <dberlin@dberlin.org>
8695169689Skan
8696169689Skan	* tree-alias-ander.c: Remove doxygen markers.
8697169689Skan	(eq_to_var): remove.
8698169689Skan	(simple_cmp): Add.
8699169689Skan	(throwaway_global): Add.
8700169689Skan	(andersen_same_points_to_set): Handle ignoring global var aliasing the
8701169689Skan	right way here.
8702169689Skan	(andersen_may_alias): Use list_member to avoid stupid hack.
8703169689Skan	* tree-alias-common.c: Remove hacks for disabling global var aliasing.
8704169689Skan
8705169689Skan2003-08-17  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8706169689Skan
8707169689Skan	* tree.c (resize_phi_node): Initialize new entries.
8708169689Skan
8709169689Skan2003-08-17  Jeff Law  <law@redhat.com>
8710169689Skan
8711169689Skan	* tree-pretty-print.c (last_bb): Actually record the basic block,
8712169689Skan	not just its index.
8713169689Skan	(maybe_init_pretty_print): Corresponding changes.
8714169689Skan	(dump_generic_node, dump_vops): Test the actual block pointers, not
8715169689Skan	their indices.
8716169689Skan
8717169689Skan	* tree-ssa-dom.c (optimize_block): Use equivalences from the
8718169689Skan	dominator tree walk to thread through conditional jumps at leafs in
8719169689Skan	the dominator tree.
8720169689Skan
8721169689Skan	* tree-cfg.c (blocks_unreachable_p, remove_blocks): Use a bitmap
8722169689Skan	rather than a varray.
8723169689Skan	(REMOVE_ALL_STMTS, REMOVE_NO_STMTS): New defines for remove_bb.
8724169689Skan	(REMOVE_NON_CONTROL_STMTS, REMOVE_CONTROL_STMTS): Likewise.
8725169689Skan	(remove_unreachable_block): Use find_contained_blocks rather
8726169689Skan	than find_subblocks.  If we have a COND_EXPR or SWITCH_EXPR which
8727169689Skan	is unreachable, but which has reachable children clear out the
8728169689Skan	condition and request all non-control statements be removed
8729169689Skan	from the block.
8730169689Skan	(remove_bb): Allow better control over what (if any) statements
8731169689Skan	are removed.  All callers updated.
8732169689Skan	(find_subblocks): Remove.
8733169689Skan	(find_contained_blocks): Handle statements with no associated
8734169689Skan	basic block.
8735169689Skan
8736169689Skan2003-08-15  Andrew Pinski <pinskia@physics.uc.edu>
8737169689Skan
8738169689Skan	* objc/objc-lang.c (LANG_HOOKS_GIMPLIFY_EXPR): Define
8739169689Skan	as the c gimplifier.
8740169689Skan
8741169689Skan2003-08-15  Jeff Law  <law@redhat.com>
8742169689Skan
8743169689Skan	* tree-cfg.c (cleanup_tree_cfg): Wipe out the dominator tree
8744169689Skan	if the number of basic blocks changes as a result of cfg cleanups.
8745169689Skan	* tree-flow.h (build_dominator_tree): Prototype.
8746169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Build the dominator
8747169689Skan	tree if it is not already available.
8748169689Skan	* tree-ssa.c (build_dominator_tree): New function.
8749169689Skan	(rewrite_into_ssa): Use it.
8750169689Skan
8751169689Skan	* gimplify.c (gimplify_expr, cases NOP_EXPR, CONVERT_EXPR): If a
8752169689Skan	COMPONENT_REF is wrapped with a NOP_EXPR, then force the type of
8753169689Skan	the COMPONENT_REF to match the accessed field.  Strip away
8754169689Skan	unnecessary type conversions and handle the case where all type
8755169689Skan	conversions were removed.
8756169689Skan	(case ARRAY_REF, COMPONENT_REF): Indicate to gimplify_array_ref
8757169689Skan	and gimplify_component_ref if we want an lvalue or not.
8758169689Skan	(gimplify_array_ref, gimplify_component_ref): Pass new argument
8759169689Skan	WANT_LVALUE through to gimplify_compound_lval.
8760169689Skan	(gimplify_compound_lval): If we do not want an lvalue and the
8761169689Skan	toplevel COMPONENT_REF's type does not match its field's type,
8762169689Skan	then wrap the COMPONENT_REF in a NOP_EXPR and force the
8763169689Skan	COMPONENT_REF's type to match its field's type.
8764169689Skan	(gimplify_modify_expr): If the RHS is a CALL_EXPR and the LHS
8765169689Skan	is not a gimple temporary, then force the RHS through a gimple
8766169689Skan	temporary, even if the call can not throw.
8767169689Skan	(create_tmp_var): Make sure not to lose the type's attributes
8768169689Skan	for the new variable.
8769169689Skan	* tree-ssa.c (tree_ssa_useless_type_conversion): New function.
8770169689Skan	* tree-flow.h (tree_ssa_useless_type_conversion): Prototype.
8771169689Skan	* tree-ssa-dom.c (optimize_stmt): Use tree_ssa_useless_type_conversion.
8772169689Skan
8773169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Catch more
8774169689Skan	useless statements created during the out-of-ssa pass.
8775169689Skan
8776169689Skan2003-08-14  Jeff Law  <law@redhat.com>
8777169689Skan
8778169689Skan	* tree-ssa-dom.c (optimize_block): Record equivalences created by
8779169689Skan	SWITCH_EXPRs.
8780169689Skan
8781169689Skan	* tree-ssa-dom.c (optimize_stmt): Allow optimizing the RHS of
8782169689Skan	a RETURN_EXPR which contains an optimizable MODIFY_EXPR.
8783169689Skan	(lookup_avail_expr): Corresponding changes.
8784169689Skan	(avail_expr_hash, avail_expr_eq): Likewise.
8785169689Skan
8786169689Skan	* tree-ssa-dom.c (optimize_stmt): Fix typo which prevented
8787169689Skan	stores with more than one VDEF from creating useful equivalences.
8788169689Skan
8789169689Skan	* tree-dfa.c (get_expr_operands): Do not special case *0;
8790169689Skan
8791169689Skan	* fold-const.c (fold, case INDIRECT_REF): Revert last change.
8792169689Skan
8793169689Skan2003-08-14  Diego Novillo  <dnovillo@redhat.com>
8794169689Skan
8795169689Skan	* tree-cfg.c (bsi_insert_on_edge_immediate): Only update the
8796169689Skan	container for the head tree of the next block if the new statement
8797169689Skan	needs to be linked to it.
8798169689Skan
8799169689Skan2003-08-13  Jeff Law  <law@redhat.com>
8800169689Skan
8801169689Skan	* fold-const.c (fold, case INDIRECT_REF): Optimize reads from
8802169689Skan	constant strings.
8803169689Skan
8804169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): For a COND_EXPR
8805169689Skan	where the condition is a variable and the ELSE clause merely
8806169689Skan	sets that variable to zero, remove the ELSE clause.
8807169689Skan
8808169689Skan	* tree-ssa-dom.c (optimize_stmt): Do not check the type of the
8809169689Skan	value returned by lookup_avail_expr.
8810169689Skan
8811169689Skan2003-08-13  Daniel Berlin  <dberlin@dberlin.org>
8812169689Skan
8813169689Skan	* tree-cfg.c (remove_stmt):  Add new argument saying whether to remove
8814169689Skan	annotations and invalidate defs.  Update all callers
8815169689Skan	(remove_bsi_from_block): Moved from bsi_remove, argument added.
8816169689Skan	(bsi_remove): Made into wrapper for remove_bsi_from_block.
8817169689Skan
8818169689Skan2003-08-13  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8819169689Skan
8820169689Skan	* tree-ssa-dom.c (optimize_stmt): Call get_stmt_operands.
8821169689Skan
8822169689Skan2003-08-12  Jeff Law  <law@redhat.com>
8823169689Skan
8824169689Skan	* tree-ssa-dom.c (optimize_stmt): Record equivalences created
8825169689Skan	by memory stores.
8826169689Skan
8827169689Skan2003-08-12  Diego Novillo  <dnovillo@redhat.com>
8828169689Skan
8829169689Skan	* tree-cfg.c (find_insert_location): Handle other control
8830169689Skan	statements that may be at the end of the block.
8831169689Skan
8832169689Skan2003-08-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
8833169689Skan
8834169689Skan	* Makefile.in (tree-pretty-print.o): Add tree-iterator.h dependency.
8835169689Skan	* tree-pretty-print.c: Include tree-iterator.h.
8836169689Skan	(dump_generic_node): Avoid recursing into COMPOUND_EXPRs.
8837169689Skan
8838169689Skan2003-08-12  Jeff Law  <law@redhat.com>
8839169689Skan
8840169689Skan	* tree-ssa-dom.c (optimize_stmt): Optimize ABS_EXPR when we know
8841169689Skan	the sign of the source operand.
8842169689Skan
8843169689Skan	* tree-ssa-dom.c (optimize_stmt): Rewrite TRUNC_DIV_EXPR and
8844169689Skan	TRUNC_MOD_EXPR even if the LHS is not an SSA variable.  Do not
8845169689Skan	enter the new expression in the hash tables if !may_optimize_p.
8846169689Skan	Also try GE_EXPR to see if this transformation is safe.
8847169689Skan
8848169689Skan	* tree-ssa-dom.c (optimize_stmt): Fix typo in last change which
8849169689Skan	prevented recording equivalences created by IOR_EXPR.
8850169689Skan
8851169689Skan	* tree-ssa-dom.c (optimize_stmt): Record that the destination of
8852169689Skan	a MODIFY_EXPR nonzero if the RHS contains an IOR with a nonzero
8853169689Skan	constant.  Turn DIV/MOD by a power of 2 into SHIFT/AND if we know
8854169689Skan	dividend is positive.
8855169689Skan
8856169689Skan2003-08-11  Jeff Law  <law@redhat.com>
8857169689Skan
8858169689Skan	* fold-const.c (fold, cases NE_EXPR and EQ_EXPR): Fold equality
8859169689Skan	comparisons of non-weak symbol addresses against zero.
8860169689Skan
8861169689Skan	* tree-ssa-ccp.c (fold_stmt): Strip unnecessary NOP_EXPRs from
8862169689Skan	the folded result.
8863169689Skan
8864169689Skan	* gimplify.c (gimplify_expr, case INDIRECT_REF): Copy the base
8865169689Skan	object into a temporary if it's in static memory or is addressable.
8866169689Skan
8867169689Skan2003-08-11  Steven Bosscher  <steven@gcc.gnu.org>
8868169689Skan
8869169689Skan	* tree-alias-common.h (struct tree_alias_ops): Add a semicolon, fix
8870169689Skan	bootstrap.
8871169689Skan
8872169689Skan2003-08-10  Daniel Berlin  <dberlin@dberlin.org>
8873169689Skan
8874169689Skan	* tree-dfa.c (compute_may_aliases): Move points-to initialization from
8875169689Skan	here.
8876169689Skan	(find_referenced_vars): To here.
8877169689Skan	(get_memory_tag_for): Use new same_points_to_set function.
8878169689Skan
8879169689Skan	* tree-alias-common.h (struct tree_alias_ops): Remove doxygen markers.
8880169689Skan	Add same_points_to_set function to struct.
8881169689Skan	(same_points_to_set): New function.
8882169689Skan
8883169689Skan	* tree-alias-common.c (we_created_global_var): A bit of magic to ignore
8884169689Skan	global var aliasing when we didn't create global var.  This will go
8885169689Skan	away soon
8886169689Skan	(same_points_to_set): New function.
8887169689Skan
8888169689Skan	* tree-alias-andersen.c (struct andersen_alias_ops): Add
8889169689Skan	andersen_same_points_to_set.
8890169689Skan	(andersen_same_points_to_set): New function. Return true if the two
8891169689Skan	variables have the same points-to set.
8892169689Skan
8893169689Skan	* opts.c (common_handle_option): Add "none" as a points-to option.
8894169689Skan
8895169689Skan2003-08-10  Paul Brook  <paul@nowt.org>
8896169689Skan
8897169689Skan	* doc/install.texi: Mention --enable-languages=f95.
8898169689Skan
8899169689Skan2003-08-09  Daniel Berlin  <dberlin@dberlin.org>
8900169689Skan
8901169689Skan	* tree-pretty-print.c (dump_vops): check bb->tree_annotations, not
8902169689Skan	bb->aux.
8903169689Skan
8904169689Skan2003-08-08  Daniel Berlin  <dberlin@dberlin.org>
8905169689Skan
8906169689Skan	* tree-cfg.c (bsi_insert_on_edge_immediate): If there's only
8907169689Skan	one statement in the block, and it's an empty statement, replace it.
8908169689Skan
8909169689Skan2003-08-08  Jason Merrill  <jason@redhat.com>
8910169689Skan
8911169689Skan	* c-decl.c (c_expand_body_1): Restore support for
8912169689Skan	!keep_function_tree_in_gimple_form.
8913169689Skan	(finish_function, c_expand_deferred_function): Do TDI_inlined dump.
8914169689Skan
8915169689Skan	* gimplify.c (voidify_wrapper_expr): Set TREE_SIDE_EFFECTS on the
8916169689Skan	wrapper if we insert a MODIFY_EXPR.
8917169689Skan
8918169689Skan2003-08-07  Diego Novillo  <dnovillo@redhat.com>
8919169689Skan
8920169689Skan	* Makefile.in (GTFILES): Add tree-ssa.c, tree-dfa.c and
8921169689Skan	tree-ssa-ccp.c.
8922169689Skan	(gt-tree-ssa.h, gt-tree-dfa.h, gt-tree-ssa-ccp.h): Depend on
8923169689Skan	s-gtype.
8924169689Skan	* tree-dfa.c (struct clobber_data_d): Remove.  Update all users.
8925169689Skan	(struct alias_map_d): Mark for garbage collection.
8926169689Skan	(struct walk_state): Add fields 'is_not_gimple' and
8927169689Skan	'is_va_arg_expr'.
8928169689Skan	(clobber_vars_r): Remove.  Update all users.
8929169689Skan	(get_stmt_operands): Abort if attempting to get operands from a
8930169689Skan	non-GIMPLE statement.
8931169689Skan	(get_expr_operands): Likewise.
8932169689Skan	Do not force a virtual operand when scanning VA_ARG_EXPR.
8933169689Skan	(add_stmt_operand): If the variable has hidden uses, mark the
8934169689Skan	statement as having volatile operands and return.
8935169689Skan	If the variable occurs inside a VA_ARG_EXPR, add it as a virtual
8936169689Skan	operand.
8937169689Skan	(add_immediate_use): Call VARRAY_TREE_INIT instead of
8938169689Skan	VARRAY_GENERIC_PTR_INIT.
8939169689Skan	(dump_variable): Check is_in_va_arg_expr flag.
8940169689Skan	(compute_may_aliases): Move code to find variables ...
8941169689Skan	(find_referenced_vars): ... here.
8942169689Skan	(find_vars_r): Abort if we find a non-GIMPLE expression
8943169689Skan	unexpectedly.
8944169689Skan	Mark variables found inside a VA_ARG_EXPR.
8945169689Skan	Do not scan arguments for non-GIMPLE CALL_EXPRs.
8946169689Skan	Remove local variable saved_is_store.
8947169689Skan	Reformat some code for readability.
8948169689Skan	(add_referenced_var): If the variable is already marked as having
8949169689Skan	hidden uses, ignore it.
8950169689Skan	If the variable is found inside a non-GIMPLE expression, mark it.
8951169689Skan	If the variable is found inside a VA_ARG_EXPR, mark it.
8952169689Skan
8953169689Skan	* tree-flow.h (struct var_ann_d): Add field is_in_va_arg_expr.
8954169689Skan	(find_referenced_vars): Declare.
8955169689Skan	* tree-optimize.c (optimize_function_tree): Call
8956169689Skan	find_referenced_vars before computing may aliases.
8957169689Skan
8958169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Do not check if the
8959169689Skan	variable has hidden uses.
8960169689Skan	* tree-ssa-live.c (type_var_init): Likewise.
8961169689Skan
8962169689Skan	* tree-ssa-ccp.c (ssa_edges): Mark for garbage collection.
8963169689Skan	(tree_ssa_ccp): Use VARRAY_.*_EDGE calls to manipulate the varray
8964169689Skan	of CFG edges.
8965169689Skan	(add_control_edge): Likewise.
8966169689Skan	(initialize): Likewise.
8967169689Skan	* tree-ssa.c (struct def_blocks_d): Mark for garbage collection.
8968169689Skan	(struct var_value_d): Likewise.
8969169689Skan	(def_blocks_free): Remove.  Update all users.
8970169689Skan	(rewrite_into_ssa): Do not specify free function when creating
8971169689Skan	def_blocks and currdefs.
8972169689Skan	Call sbitmap_free instead of free.
8973169689Skan	(mark_def_sites): Call sbitmap_free instead of free.
8974169689Skan	(set_def_block): Use GC allocation.
8975169689Skan	(set_livein_block): Likewise.
8976169689Skan	(insert_phi_nodes): Adjust name of varray def_maps when creating it.
8977169689Skan	(insert_phis_for_deferred_variables): Remove call to BITMAP_XFREE.
8978169689Skan	(insert_phi_nodes_for): Use GC allocation for phi_insertion_points.
8979169689Skan	(init_tree_ssa): Remove typecast in call to memset.
8980169689Skan	(set_value_for): Use GC allocation.
8981169689Skan	(get_def_blocks_for): Remove typecast in call to htab_find.
8982169689Skan	* varray.c (element): Add entry for struct edge_def *.
8983169689Skan	* varray.h (enum varray_data_enum): Add VARRAY_DATA_EDGE.
8984169689Skan	(union varray_data_tag): Add field of type struct edge_def *.
8985169689Skan	(VARRAY_EDGE_INIT): Define.
8986169689Skan	(VARRAY_EDGE): Define.
8987169689Skan	(VARRAY_PUSH_EDGE): Define.
8988169689Skan	(VARRAY_TOP_EDGE): Define.
8989169689Skan
8990169689Skan2003-08-06  Diego Novillo  <dnovillo@redhat.com>
8991169689Skan
8992169689Skan	* tree-cfg.c (handle_switch_fallthru): Do not abort when the last
8993169689Skan	statement of the case block needs to be the last statement of the
8994169689Skan	block.
8995169689Skan	(find_insert_location): Fix typo.
8996169689Skan
8997169689Skan2003-08-06  Steven Bosscher  <steven@gcc.gnu.org>
8998169689Skan
8999169689Skan	* tree-dfa.c (remove_phi_arg):  When the PHI no longer has
9000169689Skan	arguments, don't remove it here, but do so...
9001169689Skan	(remove_phi_arg_num): ...from here.
9002169689Skan
9003169689Skan2003-08-05  Jason Merrill  <jason@redhat.com>
9004169689Skan
9005169689Skan	* gimplify.c (gimplify_cond_expr): Gimplify shortcut expansion in
9006169689Skan	a conditional context.
9007169689Skan
9008169689Skan	* tree-cfg.c (make_catch_expr_blocks): Don't change next_block_link.
9009169689Skan	(make_eh_filter_expr_blocks): Likewise.
9010169689Skan
9011169689Skan	* tree-dfa.c (add_referenced_var): Static locals are call
9012169689Skan	clobbered.
9013169689Skan
9014169689Skan2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
9015169689Skan
9016169689Skan	* tree-dfa.c (add_phi_arg): Allow PHI capacity to grow.
9017169689Skan	* tree-flow.h  (add_phi_arg): Adjust prototype.
9018169689Skan	* tree-ssa-pre.c (code_motion): Adjust call.
9019169689Skan	* tree-ssa.c (rewrite_block): Likewise.
9020169689Skan	* tree.c (resize_phi_node): New function.
9021169689Skan	* tree.h (resize_phi_node): Add prototype.
9022169689Skan
9023169689Skan2003-08-05  Jeff Law  <law@redhat.com>
9024169689Skan
9025169689Skan	* tree-ssa-dom.c (optimize_block): Be more aggressive about
9026169689Skan	creating equivalences from PHI nodes.
9027169689Skan
9028169689Skan	* tree-ssa-dom.c (optimize_stmt): Strip away certain NOP_EXPRs
9029169689Skan	before determining if we have an equivalence to enter into
9030169689Skan	the const_and_copies table.
9031169689Skan
9032169689Skan	* tree-ssa-dce.c (remove_dead_stmts): Iterate backwards through the
9033169689Skan	basic blocks removing dead statements.  Within each block iterate
9034169689Skan	backwards through the statements removing those which are dead.
9035169689Skan
9036169689Skan	* tree-ssa-optimize.c (optimize_function_tree): Call
9037169689Skan	remove_useless_stmts_and_vars before building the flow graph.
9038169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Rename argument from
9039169689Skan	first_iteration to remove_unused_vars.
9040169689Skan
9041169689Skan	* tree-cfg.c (remove_unreachable_blocks): Remove blocks in reverse
9042169689Skan	order.
9043169689Skan	(remove_bb): Remove unwanted call to bsi_next.
9044169689Skan	(bsi_remove): Refine code which removes useless COMPOUND_EXPRs to allow
9045169689Skan	removal if one of the arms is not associated with a basic block.
9046169689Skan	(remove_stmt): Improve check for testing when a basic block head/end
9047169689Skan	pointer needs to be updated when removing a COMPOUND_EXPR.
9048169689Skan
9049169689Skan	* tree-cfg.c (phi_alternatives_equal): New function.
9050169689Skan	(linearize_cond_expr): Allow linearization if the PHI nodes at the
9051169689Skan	target have equivalent arguments for the incoming edges from the THEN
9052169689Skan	and ELSE clauses.
9053169689Skan
9054169689Skan	* tree-ssa-dce.c (mark_tree_necessary): Empty statements may be
9055169689Skan	necessary.
9056169689Skan	(process_worklist): Handle any incoming abnormal edges the first
9057169689Skan	time a statement in each block becomes executable.
9058169689Skan
9059169689Skan	* tree-ssa-ccp.c (substitute_and_fold): Substitute known
9060169689Skan	constants into PHI nodes.
9061169689Skan
9062169689Skan2003-08-04  Sebastian Pop  <s.pop@laposte.net>
9063169689Skan
9064169689Skan	* basic-block.h: Declare bb_ann_d.
9065169689Skan	(basic_block_def): Add a field tree_annotations.
9066169689Skan	* cfg.c (entry_exit_blocks): Initialize tree_annotations to NULL.
9067169689Skan	* cfghooks.c: Remove the definition of cfg_level.
9068169689Skan	(rtl_register_cfg_hooks): Remove the initiallization of cfg_level.
9069169689Skan	* cfghooks.h (cfg_hooks): Add cfgh_loop_optimizer_init, and
9070169689Skan	cfgh_loop_optimizer_finalize.
9071169689Skan	(loop_optimizer_init, loop_optimizer_finalize): New macros.
9072169689Skan	(cfg_level): Remove.
9073169689Skan	* cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Rename
9074169689Skan	to rtl_loop_optimizer_init and rtl_loop_optimizer_finalize.
9075169689Skan	* cfgrtl.c (rtl_loop_optimizer_init, rtl_loop_optimizer_finalize):
9076169689Skan	Declare, and register them in rtl_cfg_hooks and cfg_layout_rtl_cfg_hook.
9077169689Skan	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Rename
9078169689Skan	to rtl_loop_optimizer_init and rtl_loop_optimizer_finalize.  Remove
9079169689Skan	the checks to cfg_level.
9080169689Skan	* tree-cfg.c (block_tree_ann_obstack, first_block_tree_ann_obj): New.
9081169689Skan	(create_blocks_annotations, create_block_annotation,
9082169689Skan	free_blocks_annotations, clear_blocks_annotations): New functions.
9083169689Skan	(tree_loop_optimizer_init, tree_loop_optimizer_finalize): New
9084169689Skan	functions.  Register them in tree_cfg_hooks.
9085169689Skan	(build_tree_cfg, dump_tree_bb, delete_tree_cfg, tree_split_edge): Use
9086169689Skan	create_blocks_annotations instead of alloc_aux_for_blocks,
9087169689Skan	create_block_annotation instead of alloc_aux_for_block,
9088169689Skan	.tree_annotations instead of .aux,
9089169689Skan	free_blocks_annotations instead of free_aux_for_blocks.
9090169689Skan	(tree_register_cfg_hooks): Remove initialization of cfg_level.
9091169689Skan	* tree-flow-inline.h (bb_ann): Use .tree_annotations.
9092169689Skan	* tree-flow.h: Update comment.
9093169689Skan
9094169689Skan2003-08-04  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
9095169689Skan
9096169689Skan	* Makefile.in (c-pretty-print.o): Add TREE_H and C_TREE_H dependencies.
9097169689Skan
9098169689Skan2003-08-01  Paul Brook  <paul@nowt.org>
9099169689Skan
9100169689Skan	* Makefile.in (GMPINC): Set and use.
9101169689Skan	(GMPLIBS): Set it.
9102169689Skan	* configure.in: Add test and switches for the GMP library.
9103169689Skan	(all_need_gmp): Set from config-lang.in.
9104169689Skan	* sourcebuild.texi: Document need_gmp.
9105169689Skan	* configure: regen
9106169689Skan
9107169689Skan2003-08-01  Steven Bosscher  <steven@gcc.gnu.org>
9108169689Skan
9109169689Skan	* tree-inline.c (expand_calls_inline): Fix comments.
9110169689Skan
9111169689Skan2003-07-31  Diego Novillo  <dnovillo@redhat.com>
9112169689Skan
9113169689Skan	* Makefile.in (tree-ssa-ccp.o): Depend on $(EXPR_H).
9114169689Skan	* builtins.c (c_strlen): Remove static declaration.
9115169689Skan	(simplify_builtin_fputs): Remove static declaration.
9116169689Skan	(simplify_builtin_sprintf): New local function.
9117169689Skan	(expand_builtin_sprintf): Remove by surrounding with #if 0.
9118169689Skan	(expand_builtin): Add BUILT_IN_SPRINTF to the list of built-ins
9119169689Skan	handed over to simplify_builtin.
9120169689Skan	(validate_arglist): Do not allow arguments with TREE_SIDE_EFFECTS.
9121169689Skan	(simplify_builtin_fputs): Add new argument KNOWN_LEN.  If it's set,
9122169689Skan	use it instead of trying to compute the length of the string.
9123169689Skan	Update all callers.
9124169689Skan	* expr.h (simplify_builtin_fputs): Declare.
9125169689Skan	* tree-flow.h (fold_stmt): Change argument type to tree *.  Update
9126169689Skan	all users.
9127169689Skan	* tree-ssa-ccp.c: Include expr.h.
9128169689Skan	(replace_uses_in): If the statement makes a call to some selected
9129169689Skan	built-ins, mark it for folding.
9130169689Skan	(get_strlen): New local function.
9131169689Skan	(ccp_fold_builtin): New local function.
9132169689Skan	(fold_stmt): Call it.
9133169689Skan	(set_rhs): Fix if-else-if chaining.  Handle cases where the whole
9134169689Skan	statement needs to be replaced.
9135169689Skan	* tree.h (c_strlen): Declare.
9136169689Skan
9137169689Skan2003-07-31  Diego Novillo  <dnovillo@redhat.com>
9138169689Skan
9139169689Skan	Fix PR optimization/11373
9140169689Skan	* tree-ssa-dce.c (stmt_useful_p): Get statement operands before
9141169689Skan	checking for volatile operands.
9142169689Skan	* tree-dfa.c (get_expr_operands): If a constant is dereferenced as a
9143169689Skan	pointer, mark the statement as having volatile operands.
9144169689Skan	(may_access_global_mem_p): If a non-NULL constant is used as a
9145169689Skan	pointer, consider it as pointing to global memory.
9146169689Skan	* tree-ssa-dom.c (optimize_stmt): Set addr_expr_propagated_p when
9147169689Skan	propagating pointers that are integer constants.
9148169689Skan
9149169689Skan2003-07-31  Andrew MacLeod  <amacleod@redhat.com>
9150169689Skan
9151169689Skan	* tree-dfa.c (add_stmt_operand): Don't treat complex types as scalars.
9152169689Skan	* tree-ssa-live.c (var_union):  Change comment.
9153169689Skan	(coalesce_tpa_members): Don't proceed if var_union fails.
9154169689Skan	* tree-ssa.c (insert_copy_on_edge): Change comment.
9155169689Skan	(coalesce_abnormal_edges): Handle var_union failing.
9156169689Skan	(coalesce_vars): Skip constant PHI arguments.
9157169689Skan
9158169689Skan2003-07-30  Jeff Law  <law@redhat.com>
9159169689Skan
9160169689Skan	* tree-cfg.c (bsi_remove): Don't remove a COMPOUND_EXPR with empty
9161169689Skan	arms if the arms are in different basic blocks.
9162169689Skan
9163169689Skan	* tree-ssa-dom.c (record_cond_is_false): New function.
9164169689Skan	(record_cond_is_true): Similarly.
9165169689Skan	(get_eq_expr_value): Use record_cond_expr_is_{true,false}.
9166169689Skan	(optimize_stmt): Fix minor formatting issue.  If we encounter an
9167169689Skan	INDIRECT_REF, record that the dereferenced pointer can not be
9168169689Skan	null.
9169169689Skan
9170169689Skan2003-07-30  Daniel Berlin  <dberlin@dberlin.org>
9171169689Skan
9172169689Skan	* tree-dump.c (dump_option_value_in): "all" is now everything but
9173169689Skan	TDF_RAW and TDF_SLIM.
9174169689Skan
9175169689Skan2003-07-30  Diego Novillo  <dnovillo@redhat.com>
9176169689Skan
9177169689Skan	* tree-simple.c (is_gimple_const): Accept CONST + CONST expressions
9178169689Skan	as GIMPLE constants.
9179169689Skan
9180169689Skan2003-07-30  Daniel Berlin  <dberlin@dberlin.org>
9181169689Skan
9182169689Skan	* tree-ssa-pre.c: #include real.h
9183169689Skan	(defs_match_p): Change arguments to something normal now that we use
9184169689Skan	the new renaming algorithm. Update all callers.
9185169689Skan	Use defs_hash_expr.
9186169689Skan	(defs_y_dom_x): Ditto.
9187169689Skan	(defs_hash_expr): New. Based on iterative_hash_expr.
9188169689Skan	(generate_exr_as_of_bb): If there aren't any uses, return.
9189169689Skan	(subst_phis): Call modify_stmt on the actually modified statement. :)
9190169689Skan	(get_default_def): Only walk SSA_NAME arguments in PHI's.
9191169689Skan
9192169689Skan2003-07-30  Jason Merrill  <jason@redhat.com>
9193169689Skan
9194169689Skan	Don't modify code that is already GIMPLE.
9195169689Skan	* gimplify.c (gimplify_expr): Don't return early if the predicate
9196169689Skan	matches.
9197169689Skan	Use a variable temp if the caller wants an lvalue.
9198169689Skan	Don't call gimplify_constructor if we're on the rhs of a MODIFY_EXPR.
9199169689Skan	(add_tree, add_stmt_to_compound): Do add an empty stmt if we
9200169689Skan	previously had nothing at all.
9201169689Skan	(gimplify_return_expr): Don't mess with iterators if it was already
9202169689Skan	gimple.
9203169689Skan	(gimplify_cond_expr): Remove a COND_EXPR with two empty arms.
9204169689Skan	(gimplify_call_expr): Try to simplify a builtin again after
9205169689Skan	gimplifying the args.
9206169689Skan	(internal_get_tmp_var): Gimplify the new MODIFY_EXPR.
9207169689Skan	(gimplify_expr, gimple_push_cleanup): Use boolean_false_node.
9208169689Skan	(gimplify_init_constructor): New fn, broken out from...
9209169689Skan	(gimplify_modify_expr): ...here.  Be smarter about zero-initialization.
9210169689Skan	* tree-simple.c (is_gimple_rhs): Accept any CONSTRUCTOR.
9211169689Skan	* tree-simple.h: Adjust add_tree prototype.
9212169689Skan
9213169689Skan2003-07-29  Daniel Berlin  <dberlin@dberlin.org>
9214169689Skan
9215169689Skan	* tree-alias-common.c (create_alias_vars):  If we created global_var,
9216169689Skan	delete it when we are done.
9217169689Skan	(ptr_may_alias_var): Handle case that global_var is now NULL_TREE.
9218169689Skan
9219169689Skan2003-07-29  Jeff Law  <law@redhat.com>
9220169689Skan
9221169689Skan	* tree-ssa-dom.c (optimize_stmt): Propagate copies into VUSEs and
9222169689Skan	the RHS of VDEFs.
9223169689Skan
9224169689Skan2003-07-29  Andrew MacLeod  <amacleod@redhat.com>
9225169689Skan
9226169689Skan	* tree-ssa.c (insert_copy_on_edge): Only set used bit on DECL nodes.
9227169689Skan
9228169689Skan2003-07-29  Andrew MacLeod  <amacleod@redhat.com>
9229169689Skan
9230169689Skan	* common.opt (ftree-combine-temps): Add new option.
9231169689Skan	* flags.h (flag_tree_combine_temps): New flag.
9232169689Skan	* opts.c (decode_options): Initialize flag_tree_combine_temps.
9233169689Skan	(common_handle_option): Handle new flag.
9234169689Skan	* toplev.c (flag_tree_combine_temps): Declare.
9235169689Skan	(lang_independent_options f): Add tree-combine-temp.
9236169689Skan	* tree-ssa-live.c (var_union): When combining 2 root variables, choose
9237169689Skan	the user variable over a temporary as the new variable.
9238169689Skan	(compact_var_map): Use renamed root_var routines.
9239169689Skan	(calculate_live_on_exit): Reformatting.
9240169689Skan	(tpa_init): Initialize a tpa object.
9241169689Skan	(tpa_remove_partition): Remove a partition from a tpa list.
9242169689Skan	(tpa_delete): Delete a tpa object.
9243169689Skan	(tpa_compact): Hide single elemenet lists.
9244169689Skan	(root_var_init): Split common part into tpa_init and rename.
9245169689Skan	(remove_root_var_partition, delete_root_va, dump_root_var): Delete.
9246169689Skan	(type_var_init): New. Initialize a type_var object.
9247169689Skan	(create_coalesce_list): New. Create a coalesce_list object.
9248169689Skan	(delete_coalesce_list): New. Free a coalesce list's memory.
9249169689Skan	(find_partition_pair): New. Find a coalesce pair in a coalesce list.
9250169689Skan	(add_coalesce): New. Add a coalesce between 2 partitions.
9251169689Skan	(sort_coalesce_list): New. Sort coalesce pairs by importance.
9252169689Skan	(pop_best_coalesce): New. Get best remaining pair to coalesce.
9253169689Skan	(add_conflicts_if_valid): Move from tree-ssa.c.
9254169689Skan	(build_tree_conflict_graph): Move from coalesce_ssa_name in tree-ssa.c.
9255169689Skan	Genericize to use tpa_p instead of root_var object. Don't add
9256169689Skan	interferences between copies. Update coalesce list.
9257169689Skan	(coalesce_tpa_members): Move from coalesce_ssa_name in tree-ssa.c. Use
9258169689Skan	tpa_p instead of root_var. Use coalesce list if provided.
9259169689Skan	(dump_coalesce_list): New. Show debug info for a coalesce list.
9260169689Skan	(tpa_dump): Rename from dump_root_var and genericize to use tpa_p.
9261169689Skan	* tree-ssa-live.h (root_var_p): Rename structure type to tpa_p
9262169689Skan	(tpa_num_trees, tpa_tree, tpa_first_partition, tpa_next_partition,
9263169689Skan	tpa_find_tree): New. Generic versions of existing root_var routines.
9264169689Skan	(tpa_decompact): New. Include single version lists.
9265169689Skan	(root_var_p): Declare as type tpa_p.
9266169689Skan	(root_var_num, root_var, root_var_first_partition,
9267169689Skan	root_var_next_partition, root_var_dump, root_var_delete,
9268169689Skan	root_var_remove_partition, root_var_find , root_var_compac,
9269169689Skan	root_var_decompac): Rename and call generic versions.
9270169689Skan	(type_var_p): New. Use tpa_p structure for a type based association.
9271169689Skan	(type_var_num, type_var, type_var_first_partition,
9272169689Skan	type_var_next_partition, type_var_dump, type_var_delete,
9273169689Skan	type_var_remove_partition, type_var_find, type_var_compact,
9274169689Skan	type_var_decompact): New. Call generic versions of the routine.
9275169689Skan	(struct partition_pair_d): New. Represent a desired coalesce.
9276169689Skan	(struct coalesce_list_d): New. Organize lists of desired coalesces.
9277169689Skan	(NO_BEST_COALESCE): Define value.
9278169689Skan	* tree-ssa.c (set_if_valid): Remove.
9279169689Skan	(insert_copy_on_edge): Set variable as used when inserting a copy.
9280169689Skan	(add_conflicts_if_valid): Remove. Move to tree-ssa-live.c.
9281169689Skan	(print_exprs): New. Routine for commonly used output format.
9282169689Skan	(coalesce_abnormal_edges): New. Split from coalece_ssa_name. Force
9283169689Skan	partition coalesces across abnormal edges.
9284169689Skan	(coalesce_ssa_name): Split out build_tree_conflict_graph,
9285169689Skan	coalesce_abnormal_edges, and coalesce_tpa_members. Return live
9286169689Skan	range info if required. Use renamed root_var routines.
9287169689Skan	(assign_vars): Use renamed root_var routines.
9288169689Skan	(replace_variable): Mark as inline.
9289169689Skan	(coalesce_vars): Coalesce variable memory storage.
9290169689Skan	(rewrite_out_of_ssa): Don't compact varmap anymore. Free live range
9291169689Skan	info if required. Call coalesce_vars if combining temps.
9292169689Skan
9293169689Skan2003-07-29  Andrew MacLeod  <amacleod@redhat.com>
9294169689Skan
9295169689Skan	* tree-cfg.c (handle_switch_fallthru): Use bsi_link_after if stmt is
9296169689Skan	in a basic block.
9297169689Skan
9298169689Skan2003-07-28  Diego Novillo  <dnovillo@redhat.com>
9299169689Skan
9300169689Skan	* opts.c (decode_options): Disable must-alias optimization.
9301169689Skan
9302169689Skan2003-07-28  Andrew MacLeod  <amacleod@redhat.com>
9303169689Skan
9304169689Skan	* tree-ssa.c (struct _elim_graph): Add varray for constant copies.
9305169689Skan	(new_elim_graph): Initialize constant copy array..
9306169689Skan	(eliminate_build): Push constant copies onto stack instead of emitting.
9307169689Skan	(eliminate_phi): Emit any pending constant copies.
9308169689Skan
9309169689Skan2003-07-28  Jeff Law  <law@redhat.com>
9310169689Skan
9311169689Skan	* tree-ssa-dom.c (optimize_block): If a PHI has a single argument
9312169689Skan	that is a constant, then that creates a useful equivalence.
9313169689Skan	Propagate constant values into PHI nodes.
9314169689Skan
9315169689Skan	* tree-flow-inline.h (may_propagate_copy): Allow RHS to be a
9316169689Skan	constant.
9317169689Skan
9318169689Skan	* tree-dfa.c (compute_immediate_uses_for): Do not assume that
9319169689Skan	PHI arguments are SSA_NAMEs.
9320169689Skan	* tree-ssa-dce.c (process_worklist): Likewise.
9321169689Skan	* tree-ssa-copyprop.c (copyprop_phi): Likewise.  Use may_propagate_copy.
9322169689Skan	* tree-ssa-ccp.c (visit_phi_node): Do not assume that PHI arguments
9323169689Skan	are SSA_NAMEs.  Create a suitable value if a PHI argument is a
9324169689Skan	constant.
9325169689Skan
9326169689Skan	* tree-cfg.c (move_outgoing_edges): Correctly handle case where
9327169689Skan	an edge already exists from BB1 to BB2's successor.
9328169689Skan
9329169689Skan2003-07-27  Daniel Berlin  <dberlin@dberlin.org>
9330169689Skan
9331169689Skan	* tree.h (EREF_TEMP): Rename to EPHI_TEMP.
9332169689Skan	(tree_eref_common): Move temp to tree_ephi_node.
9333169689Skan	* tree-ssa-pre.c: Remove #if 0'd code.
9334169689Skan	Use EPHI_TEMP rather than EREF_TEMP, remove EREF_TEMP on EUSE nodes.
9335169689Skan    (finalize_1): Handle empty blocks properly.
9336169689Skan
9337169689Skan2003-07-27  Andreas Jaeger  <aj@suse.de>
9338169689Skan
9339169689Skan	* tree.c: Convert remaining K&R prototypes to ISO C90.
9340169689Skan	* tree-dump.c: Likewise.
9341169689Skan	* tree-inline.c: Likewise.
9342169689Skan	* stmt.c (expand_asm_expr): Likewise.
9343169689Skan
9344169689Skan	* diagnostic.h: Remove PARAMS.
9345169689Skan
9346169689Skan2003-07-26  Paul Brook  <paul@nowt.org>
9347169689Skan
9348169689Skan	* Makefile.in: Rename check-g95 to check-gfortran.
9349169689Skan	* gcc.c (default_compilers): Add entries for .f90 and .f95.
9350169689Skan	* doc/frontends.texi: Document new F95 front end.
9351169689Skan	* doc/install.texi: Ditto.
9352169689Skan	* doc/invoke.texi: Ditto.
9353169689Skan	* doc/sourcebuild.texi: Ditto.
9354169689Skan	* fortran: New front end.
9355169689Skan
9356169689Skan2003-07-25  Jeff law  <law@redhat.com>
9357169689Skan
9358169689Skan	* tree-ssa-dom.c (optimize_block): Use may_propagate_copy.
9359169689Skan
9360169689Skan2003-07-25  Diego Novillo  <dnovillo@redhat.com>
9361169689Skan
9362169689Skan	* opts.c (decode_options): Re-enable must-alias optimizations.
9363169689Skan
9364169689Skan2003-07-25  Daniel Berlin  <dberlin@dberlin.org>
9365169689Skan
9366169689Skan	* configure.in:  Update BANSHEEREBUILD for PWD change.
9367169689Skan	* configure: regen
9368169689Skan
9369169689Skan2003-07-25  Andreas Jaeger  <aj@suse.de>
9370169689Skan
9371169689Skan	* c-call-graph.c: Convert to ISO C90.
9372169689Skan	* c-common.c: Likewise.
9373169689Skan	* c-mudflap.c: Likewise.
9374169689Skan	* c-pretty-print.c: Likewise.
9375169689Skan	* cfganal.c (find_edge): Likewise.
9376169689Skan	* dependence.c: Likewise.
9377169689Skan	* diagnostic.c (debug_output_buffer): Likewise.
9378169689Skan	* except.c (expand_eh_handler): Likewise.
9379169689Skan	* fold-const.c: Likewise.
9380169689Skan	* langhooks.c: Likewise.
9381169689Skan	* tree-cfg.c (last_exec_block): Likewise.
9382169689Skan	* tree-ssa-pre.c: Likewise.
9383169689Skan	* builtins.c: Likewise.
9384169689Skan
9385169689Skan	* tree.h: Remove remaining PARAMS.
9386169689Skan	* c-common.h: Likewise.
9387169689Skan	* c-pretty-print.h: Likewise
9388169689Skan	* c-tree.h: Likewise.
9389169689Skan	* except.h: Likewise.
9390169689Skan	* langhooks-def.h: Likewise.
9391169689Skan	* langhooks.h: Likewise.
9392169689Skan
9393169689Skan2003-07-24  Diego Novillo  <dnovillo@redhat.com>
9394169689Skan
9395169689Skan	* tree-dfa.c (cleanup_operand_arrays): New local function.  Remove
9396169689Skan	superfluous VUSE operands.
9397169689Skan	(get_stmt_operands): Call it.
9398169689Skan
9399169689Skan2003-07-24  Jason Merrill  <jason@redhat.com>
9400169689Skan
9401169689Skan	* gimplify.c (gimple_boolify): New fn.
9402169689Skan	(gimplify_expr) <TRUTH_NOT_EXPR>: Boolify arg.
9403169689Skan	(gimplify_cond_expr): Boolify condition.
9404169689Skan	(gimplify_boolean_expr): Boolify args.
9405169689Skan	(gimple_push_cleanup): Make flag boolean.
9406169689Skan
9407169689Skan	* tree-simple.c (is_gimple_relop): TRUTH_{AND,OR,XOR}_EXPR
9408169689Skan	are not comparisons.
9409169689Skan	(is_gimple_binary_expr): They are binary ops.
9410169689Skan
9411169689Skan	* tree-mudflap.c (mf_build_check_statement_for): Use TRUTH_OR_EXPR
9412169689Skan	rather than BIT_IOR_EXPR.
9413169689Skan
9414169689Skan2003-07-23  Jason Merrill  <jason@redhat.com>
9415169689Skan	    Diego Novillo  <dnovillo@redhat.com>
9416169689Skan
9417169689Skan	* c-common.h (DECL_C_HARD_REGISTER): Replace ...
9418169689Skan	* tree.h (DECL_HARD_REGISTER): ... with this.  Update all users.
9419169689Skan
9420169689Skan2003-07-23  Diego Novillo  <dnovillo@redhat.com>
9421169689Skan
9422169689Skan	* tree-flow-inline.h (may_propagate_copy): New function.
9423169689Skan	* tree-flow.h (may_propagate_copy): Declare.
9424169689Skan	* tree-ssa-copyprop.c (copyprop_stmt): Call it.
9425169689Skan	(get_original): Likewise.
9426169689Skan	* tree-ssa-dom.c (optimize_stmt): Likewise.
9427169689Skan
9428169689Skan2003-07-23  Frank Ch. Eigler  <fche@redhat.com>
9429169689Skan
9430169689Skan	* gcc.c (MFWRAP_SPEC): Also wrap pthread_join and pthread_exit.
9431169689Skan
9432169689Skan2003-07-23  Steven Bosscher  <steven@gcc.gnu.org>
9433169689Skan
9434169689Skan	* tree-flow-inline.h (remove_dom_child): New function.
9435169689Skan	(clear_dom_children): New function.
9436169689Skan	* tree-cfg.c (bsi_insert_on_edge_immediate): Do not clear
9437169689Skan	the annotation for the new bb, it is already memset to zero
9438169689Skan	in alloc_aux_for_block().
9439169689Skan	(move_outgoing_edges): Use dom_children() instead of looking
9440169689Skan	at the dom_children field in the basic block annotation.
9441169689Skan	* tree-ssa.c (rewrite_into_ssa): Use clear_dom_children().
9442169689Skan
9443169689Skan	* tree-cfg.c (dump_tree_cfg): Dump to `file', not `dump_file'.
9444169689Skan
9445169689Skan2003-07-23  Diego Novillo  <dnovillo@redhat.com>
9446169689Skan
9447169689Skan	* tree.h (DECL_ESTIMATED_INSNS): Move from c-common.h.
9448169689Skan
9449169689Skan2003-07-23  Steven Bosscher  <steven@gcc.gnu.org>
9450169689Skan
9451169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Make
9452169689Skan	found_unreachable a bool.  Create/delete hash tables for
9453169689Skan	copies and available exprs outside the main loop.  Use
9454169689Skan	htab_clean to wipe them after each iteration.
9455169689Skan
9456169689Skan2003-07-22  Diego Novillo  <dnovillo@redhat.com>
9457169689Skan
9458169689Skan	* opts.c (decode_options): Add temporary test for environment
9459169689Skan	variable TREE_SSA_DO_PRE.
9460169689Skan	Do not disable dominator optimizations when PRE is enabled.
9461169689Skan
9462169689Skan2003-07-22  Daniel Berlin  <dberlin@dberlin.org>
9463169689Skan
9464169689Skan	* tree-ssa-pre.c (finalize_1): Change to not use bsi_last.
9465169689Skan
9466169689Skan2003-07-22  Daniel Berlin  <dberlin@dberlin.org>
9467169689Skan
9468169689Skan	* tree-cfg.c (remove_stmt): Revert 07-15 change. Turns out the bug is in
9469169689Skan	the reverse iterator.
9470169689Skan
9471169689Skan2003-07-22  Diego Novillo  <dnovillo@redhat.com>
9472169689Skan
9473169689Skan	* tree-ssa-ccp.c (visit_phi_node): Assume default value of CONSTANT
9474169689Skan	if the PHI value was already constant.
9475169689Skan
9476169689Skan2003-07-22  Andrew MacLeod  <amacleod@redhat.com>
9477169689Skan
9478169689Skan	* c-pretty-print.c (print_call_name): Handle COND_EXPR correctly.
9479169689Skan	* tree-pretty-print.c (print_call_name): Handle COND_EXPR correctly and
9480169689Skan	handle SSA_NAME.
9481169689Skan	* tree-dfa.c (add_phi_arg, remove_phi_arg_num): Remove references to
9482169689Skan	SSA_NAME_HAS_REAL_REFS.
9483169689Skan	* tree-ssa-ccp.c (visit_phi_node): Remove SSA_NAME_HAS_REAL_REFS.
9484169689Skan	* tree-ssa-copyprop.c (copyprop_phi): Remove SSA_NAME_HAS_REAL_REFS.
9485169689Skan	* tree-ssa-live.c (register_ssa_partition): Register the PHI and it's
9486169689Skan	arguments if this variable is defined by a PHI.
9487169689Skan	(create_ssa_var_map): Only register real uses and defs, and virtual
9488169689Skan	operands of ASM_EXPR's. Remove SSA_NAME_HAS_REAL_REFS. Don't set
9489169689Skan	used flag on variables here.
9490169689Skan	(calculate_live_on_entry): Ignore constants in PHI arguments.
9491169689Skan	(calculate_live_on_exit): Ignore constants in PHI arguments.
9492169689Skan	(dump_live_info): New. Dump live range information.
9493169689Skan	* tree-ssa-live.h (dump_live_info): New prototype and flags.
9494169689Skan	* tree-ssa-pre.c (create_expr_ref, finalize_1, repair_use_injury,
9495169689Skan	code_motion): Remove SSA_NAME_HAS_REAL_REFS.
9496169689Skan	* tree-ssa.c (rewrite_operand, register_new_def): Remove real_ref
9497169689Skan	parameter and SSA_NAME_HAS_REAL_REFS.
9498169689Skan	(rewrite_block): Remove real_ref parameter from register_new_def call.
9499169689Skan	(eliminate_build): Remove SSA_NAME_HAS_REAL_REFS. Insert copy if PHI
9500169689Skan	argument is a constant. Handle irregular PHI argument ordering.
9501169689Skan	(elim_create): Remove dead code to count PHI nodes.
9502169689Skan	(assign_vars): Set used flag on variables when assigned.
9503169689Skan	(replace_variable): Eliminate dead code.
9504169689Skan	(coalesce_ssa_name): Remove SSA_NAME_HAS_REAL_REFS. Print error for
9505169689Skan	constant argument across an abnormal edge.
9506169689Skan	(eliminate_extraneous_phis): New. Remove PHI nodes which are not in
9507169689Skan	the partition.
9508169689Skan	(rewrite_out_of_ssa): Call eliminate_extraneous_phis.
9509169689Skan	(rewrite_stmt): Remove real_ref parameter from rewrite_operand and
9510169689Skan	register_new_def.
9511169689Skan	* tree.h (SSA_NAME_HAS_REAL_REFS): Remove.
9512169689Skan	(struct tree_ssa_name): Remove 'has_real_refs' field.
9513169689Skan
9514169689Skan2003-07-22  Daniel Berlin  <dberlin@dberlin.org>
9515169689Skan
9516169689Skan	* tree-ssa-pre.c (factor_through_injuries): Take new argument specifying
9517169689Skan	whether use was injured or not (needed for SR).   Update all callers.
9518169689Skan	(maybe_find_rhs_use_for_var): Take new argument specifying which
9519169689Skan	operand to start search with.   Update all callers.
9520169689Skan	(phi_opnd_from_res): #if 0 out.
9521169689Skan	(rename_2): Ditto.
9522169689Skan	(rename_1): Ditto.
9523169689Skan	(defs_match_p): Take new arguments specifying which defs were injured.
9524169689Skan	Update all callers.
9525169689Skan	(defs_y_dom_x): Ditto.
9526169689Skan	(generate_expr_as_of_bb): Fix small memory overwrite.
9527169689Skan	(process_delayed_rename): Propagate injured flag around.
9528169689Skan	(new_rename_1): Ditto.
9529169689Skan	(finalize_1): Get correct variable names for newly created statement if
9530169689Skan	necessary due to PHI.
9531169689Skan	(repair_use_injury): Note the repair in the stats. Insert repair
9532169689Skan	in right place.
9533169689Skan	(repair_euse_injury): Fix handling of PHI_NODE.
9534169689Skan	(code_motion): Fix algorithm so it can handle using reaching_def all the
9535169689Skan	time (needed for SR).
9536169689Skan	Use reaching_def rather than EREF_TEMP.
9537169689Skan
9538169689Skan2003-07-21  Diego Novillo  <dnovillo@redhat.com>
9539169689Skan
9540169689Skan	* tree-dfa.c (get_stmt_operands): Remove FIXME note
9541169689Skan	regarding virtual operands for ASM_EXPRs.
9542169689Skan
9543169689Skan2003-07-21  Diego Novillo  <dnovillo@redhat.com>
9544169689Skan
9545169689Skan	* tree-dfa.c (add_def): Renamed from set_def.  Update all users.
9546169689Skan	(get_stmt_operands): Don't force ASM_EXPR operands to be virtual.
9547169689Skan	(add_stmt_operand): Allow non-assignments to create new defs.
9548169689Skan	* tree-dump.c (dump_function): Move header dump...
9549169689Skan	(dump_function_to_file): ... here.
9550169689Skan	* tree-flow-inline.h (def_ops): Renamed from def_op.  Return a
9551169689Skan	varray with all the definitions made by the statement.
9552169689Skan	Update all users.
9553169689Skan	* tree-flow.h (struct operands_d): Rename field 'def_op' to
9554169689Skan	'def_ops'.  Convert it into a varray.
9555169689Skan	* tree-must-alias.c (tree_compute_must_alias): Call
9556169689Skan	dump_function_to_file instead of dump_function.
9557169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Likewise.
9558169689Skan	(visit_stmt): Only visit statements that make new definitions using
9559169689Skan	MODIFY_EXPR.
9560169689Skan	Definitions coming from other statements are considered VARYING.
9561169689Skan	* tree-ssa-copyprop.c (tree_ssa_copyprop): Call
9562169689Skan	dump_function_to_file instead of dump_function.
9563169689Skan	* tree-ssa-dce.c (tree_ssa_dce): Likewise.
9564169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
9565169689Skan	(optimize_stmt): Don't abort if a statement makes more than one
9566169689Skan	definition.
9567169689Skan	Check for MODIFY_EXPR statements directly, instead of relying on
9568169689Skan	the presence of a single definition.
9569169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Call dump_function_to_file
9570169689Skan	instead of dump_function.
9571169689Skan	* tree-ssa.c (rewrite_into_ssa): Likewise.
9572169689Skan	Dump the function before dominator optimizations if TDF_DETAILS is
9573169689Skan	set.
9574169689Skan	(rewrite_stmt): Don't abort if the statement makes more than one
9575169689Skan	definition.
9576169689Skan
9577169689Skan2003-07-21  Jeff Law  <law@redhat.com>
9578169689Skan
9579169689Skan	* tree-ssa-dom.c (tree_ssa_dominator_optimize): If we made any
9580169689Skan	blocks unreachable, repeat the dominator optimizations.
9581169689Skan	(optimize_block): Enter PHIs with a single source argument into
9582169689Skan	the const_and_copies table.  When propagating into a PHI node,
9583169689Skan	break the loop over the PHI arguments when a propagation is performed.
9584169689Skan	If the PHI agument is not an SSA_VAR, then no propagation is possible.
9585169689Skan	(optimize_stmt): If an operand is not an SSA_VAR, then no propagation
9586169689Skan	is possible/needed.
9587169689Skan
9588169689Skan2003-07-21  Diego Novillo  <dnovillo@redhat.com>
9589169689Skan
9590169689Skan	* Makefile.in (tree-ssa-dom.o): Add dependency on $(TREE_DUMP_H).
9591169689Skan	* fold-const.c (fold): Remove unusued local variable 'invert'.
9592169689Skan	* tree-dump.c (dump_files): Add entry for -fdump-tree-dom.
9593169689Skan	* tree-flow.h (tree_ssa_dominator_optimize): Change declaration to
9594169689Skan	accept a function decl.
9595169689Skan	* tree-ssa-dom.c: Include timevar.h and tree-dump.h.
9596169689Skan	(tree_ssa_dominator_optimize): Change to receive the function decl
9597169689Skan	for the function to optimize.  Update callers.
9598169689Skan	Use own dump file instead of dumping on the .ssa dump file.
9599169689Skan	Dump function at the end.
9600169689Skan	Push and pop TV_TREE_SSA_DOMINATOR_OPTS.
9601169689Skan	* tree-ssa.c (rewrite_into_ssa): Restore check for number of times
9602169689Skan	that the rename loop has been executed.  Abort if the loop executes
9603169689Skan	more than twice.
9604169689Skan	* tree.h (enum tree_dump_index): Add TDI_dom.
9605169689Skan	* doc/invoke.texi: Document -fdump-tree-dom.
9606169689Skan
9607169689Skan2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
9608169689Skan	    Diego Novillo  <dnovillo@redhat.com>
9609169689Skan
9610169689Skan	* Makefile.in (install-po): Check if $CATALOGS is empty to avoid
9611169689Skan	buggy shells.
9612169689Skan	* basic-block.h (rtl_verify_flow_info): Remove.
9613169689Skan	(tree_verify_flow_info): Remove.
9614169689Skan	(verify_flow_info): Declare.
9615169689Skan	* builtins.c: Rearrange to simplify merges.  Add #if 0 around
9616169689Skan	expand_ functions that are not used in the branch and move new code
9617169689Skan	to the end of the file.
9618169689Skan	* c-opts.c (c_common_handle_option): Move handling of -fdump- to
9619169689Skan	opts.c.
9620169689Skan	* cfgloopmanip.c (loop_split_edge_with_NULL): Remove.  Update all
9621169689Skan	users.
9622169689Skan	* common.opt: Add all the tree-ssa switches.
9623169689Skan	* opts.c: Handle them.
9624169689Skan	* flags.h (flag_tree_cp): Remove unused variable.
9625169689Skan	(enum pta_type): Move from tree-must-alias.h
9626169689Skan	(flag_tree_points_to): Likewise.
9627169689Skan	* toplev.c (flag_tree_cp): Remove unused variable.
9628169689Skan	* tree-cfg.c: Move cfg_hooks structures and functions for
9629169689Skan	trees from cfghooks.c.
9630169689Skan	* tree-mudflap.c (mudflap_enqueue_decl): Don't use %D to
9631169689Skan	avoid warning about format specifiers.
9632169689Skan
9633169689Skan2003-07-21  Diego Novillo  <dnovillo@redhat.com>
9634169689Skan
9635169689Skan	* gimplify.c (gimplify_function_tree): Move gimplification of the
9636169689Skan	function body ...
9637169689Skan	(gimplify_body): ... here.
9638169689Skan	* tree-simple.h (gimplify_body): Declare.
9639169689Skan	* tree-inline.c (initialize_inlined_parameters): If the
9640169689Skan	emitted assignment is not in GIMPLE form, gimplify the
9641169689Skan	body of assignments emitted.
9642169689Skan
9643169689Skan2003-07-17  Jeff Law  <law@redhat.com>
9644169689Skan
9645169689Skan	* tree-dfa.c (remove_phi_arg): Update PHI_ARG_CAPACITY.
9646169689Skan
9647169689Skan	* tree-ssa.c (mark_def_sites): Do not build the dominator tree here.
9648169689Skan	(rewrite_into_ssa): Do not depend on mark_def_sites to build the
9649169689Skan	dominator tree.   Move computation of dominance frontiers out
9650169689Skan	of main loop (even though it was only done once).  Free immediate
9651169689Skan	dominator information as soon as we're done with it.
9652169689Skan
9653169689Skan	* tree-flow.h (remove_phi_nodes_and_edges_for_unreachable_block):
9654169689Skan	Prototype.
9655169689Skan	* tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block): New
9656169689Skan	function extracted from remove_bb.
9657169689Skan	(remove_bb): Call remove_phi_nodes_and_edges_for_unreachable_block.
9658169689Skan
9659169689Skan	* tree-ssa-dom.c (optimize_block): Propagate values into PHI nodes.
9660169689Skan	Do not optimize a block which has become unreachable.
9661169689Skan	If a COND_EXPR has a compile-time constant condition, then remove
9662169689Skan	outgoing from the COND_EXPR which can not execute.
9663169689Skan
9664169689Skan2003-07-16  Frank Ch. Eigler  <fche@redhat.com>
9665169689Skan
9666169689Skan	* tree-mudflap.c (mx_xfn_indirect_ref): Correct source locations
9667169689Skan	for tracked expressions by ignoring incidental decl source loci.
9668169689Skan
9669169689Skan2003-07-16  Jeff Law  <law@redhat.com>
9670169689Skan
9671169689Skan	* tree-cfg.c (remove_bb): Remove statements in reverse order.
9672169689Skan	Simplify code to issue warnings for unreachable code.
9673169689Skan
9674169689Skan	* tree-ssa-dom.c (get_eq_expr_value): Also enter expressions
9675169689Skan	into the available expression hash table.  Callers changed to
9676169689Skan	pass in the block_avail_exprs varray and const_and_copies hash
9677169689Skan	table.
9678169689Skan	(optimize_stmt): Allow optimization of the condition in
9679169689Skan	a COND_EXPR statement.
9680169689Skan	(lookup_avail_expr): For COND_EXPRs, just see if their condition
9681169689Skan	has been recorded into the hash table, do not enter them into
9682169689Skan	the hash table.  Only do a lookup of the result in the
9683169689Skan	const_and_copies table if it is an SSA_VAR.
9684169689Skan	(avail_expr_hash): Handle COND_EXPRs, specifically we only care
9685169689Skan	about their condition and virtual operands.
9686169689Skan	(avail_expr_eq): Likewise.  If one statement has virtual operands
9687169689Skan	and the other does not, then the expressions are not equal.
9688169689Skan
9689169689Skan	* tree-ssa.c (rewrite_into_ssa): If we have done dominator
9690169689Skan	optimizations, then call cleanup_tree_cfg after rewriting is
9691169689Skan	complete.
9692169689Skan	* tree-ssa-dom.c (optimize_block): Get eq_expr_value for the
9693169689Skan	current block rather than having it passed in by the caller.
9694169689Skan	Propagate eq_expr_value into the false arm of a COND_EXPR.
9695169689Skan	(get_eq_expr_value): Return equivalences for the false
9696169689Skan	arm of a COND_EXPR if requested.
9697169689Skan
9698169689Skan2003-07-16  Daniel Berlin  <dberlin@dberlin.org>
9699169689Skan
9700169689Skan	* c-decl.c (store_parm_decls): Also strip NON_LVALUE_EXPRs and
9701169689Skan	CONVERT_EXPRs when setting DECL_NONLOCAL.
9702169689Skan
9703169689Skan2003-07-15  Daniel Berlin  <dberlin@dberlin.org>
9704169689Skan
9705169689Skan	* tree-cfg.c (remove_stmt): Update bb->end_tree_p properly when
9706169689Skan	stmt_p is the end of the bb.
9707169689Skan
9708169689Skan2003-07-15  Jeff Law  <law@redhat.com>
9709169689Skan
9710169689Skan	* tree-ssa-dom.c (optimize_stmt): Consider two types equivalent if
9711169689Skan	their TYPE_MAIN_VARIANT is equivalent.
9712169689Skan	(avail_expr_eq): Likewise.
9713169689Skan
9714169689Skan	* Makefile.in (OBJS): Add tree-ssa-dom.o
9715169689Skan	(tree-ssa-dom.o): Add dependencies.
9716169689Skan	(ssa.o, cfghooks.o): Use $(TREE_FLOW_H), not tree-flow.h.
9717169689Skan	* timevar.def: Add new timevar for dominator optimizer.  Reorder
9718169689Skan	slightly.
9719169689Skan	* tree-dfa.c (add_stmt_operand): Do not consider references to
9720169689Skan	static storage as volatile operands.
9721169689Skan	(add_referenced_var): Static storage items reference global memory.
9722169689Skan	* tree-ssa.c: Simplify by moving everything specific to the
9723169689Skan	dominator optimizer into tree-ssa-dom.c.  Call into the dominator
9724169689Skan	optimizer after rewriting all the basic blocks.
9725169689Skan	* tree-ssa-dom.c: New file.  Mostly extracted from tree-ssa.c
9726169689Skan	* tree-flow.h (tree_ssa_dominator_optimize): Prototype.
9727169689Skan	(dump_dominator_optimization_stats): Likewise.
9728169689Skan	(debug_dominator_optimization_stats): Likewise.
9729169689Skan
9730169689Skan2003-07-15  Diego Novillo  <dnovillo@redhat.com>
9731169689Skan
9732169689Skan	* tree-dfa.c (add_stmt_operand): Move volatile handling...
9733169689Skan	(find_vars_r): ... here.
9734169689Skan	Mark when the walker is inside an ASM_EXPR.
9735169689Skan	(struct walk_state): Add field 'is_asm_expr'.
9736169689Skan	Change flag fields to bitfields.
9737169689Skan	(add_referenced_var): If the variable is a pointer being stored by
9738169689Skan	an ASM_EXPR, mark it as a global memory pointer.
9739169689Skan	* tree-flow-inline.h (is_optimizable_addr_expr): New function.
9740169689Skan	* tree-flow.h (is_optimizable_addr_expr): Declare it.
9741169689Skan	* tree-ssa.c (rewrite_and_optimize_stmt): Use it.
9742169689Skan	(lookup_avail_expr): Likewise.
9743169689Skan	(get_eq_expr_value): Likewise.
9744169689Skan	(avail_expr_eq): Return 'true' when comparing a statement against
9745169689Skan	itself.
9746169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Move volatile checking...
9747169689Skan	(stmt_useful_p): ...here.
9748169689Skan
9749169689Skan2003-07-15  Andreas Jaeger  <aj@suse.de>
9750169689Skan
9751169689Skan	* c-simplify.c: Convert prototypes to ISO C90.
9752169689Skan	* gimplify.c: Likewise.
9753169689Skan	* simple-break-elim.c: Likewise.
9754169689Skan	* simple-goto-elim.c: Likewise.
9755169689Skan
9756169689Skan	* tree-alias-ander.c: Convert prototypes to ISO C90.
9757169689Skan	* tree-alias-common.c: Likewise.
9758169689Skan	* tree-alias-type.c: Likewise.
9759169689Skan	* tree-browser.c: Likewise.
9760169689Skan	* tree-dchain.c: Likewise.
9761169689Skan	* tree-mudflap.c: Likewise.
9762169689Skan	* tree-nomudflap.c: Likewise.
9763169689Skan	* tree-optimize.c: Likewise.
9764169689Skan	* tree-pretty-print.c: Likewise.
9765169689Skan	* tree-simple.c: Likewise.
9766169689Skan
9767169689Skan	* tree-alias-common.h: Convert prototypes to ISO C90, remove extra
9768169689Skan	whitespace.
9769169689Skan	* tree-alias-type.h: Convert prototypes to ISO C90.
9770169689Skan	* tree-dchain.h: Likewise.
9771169689Skan	* tree-flow-inline.h: Likewise.
9772169689Skan	* tree-flow.h: Likewise.
9773169689Skan	* tree-iterator.h: Likewise.
9774169689Skan	* tree-mudflap.h: Likewise.
9775169689Skan	* tree-simple.h: Likewise.
9776169689Skan
9777169689Skan2003-07-14  Daniel Berlin  <dberlin@dberlin.org>
9778169689Skan
9779169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Fix dom_children after DCE
9780169689Skan	breaks them.
9781169689Skan
9782169689Skan2003-07-14  Diego Novillo  <dnovillo@redhat.com>
9783169689Skan
9784169689Skan	* tree-dfa.c (add_vdef): Initialize variable 'vdef'.
9785169689Skan	(add_vuse): Initialize variable 'vuse'.
9786169689Skan
9787169689Skan2003-07-14  Diego Novillo  <dnovillo@redhat.com>
9788169689Skan
9789169689Skan	Must alias analysis.  Allow the SSA rename pass to be done on a set
9790169689Skan	of variables.
9791169689Skan
9792169689Skan	* Makefile.in (OBJS): Add tree-must-alias.o.
9793169689Skan	* flags.h (flag_tree_must_alias): Declare.
9794169689Skan	* timevar.def (TV_TREE_MUST_ALIAS): Define.
9795169689Skan	* toplev.c (flag_tree_must_alias): Declare.
9796169689Skan	(f_options): Add entry for -ftree-must-alias.
9797169689Skan	(parse_options_and_default_flags): Enable must-alias analysis at -O1.
9798169689Skan
9799169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Do not remove
9800169689Skan	addressable variables.
9801169689Skan
9802169689Skan	* tree-dfa.c (dump_file, dump_flags): New local variables to
9803169689Skan	replace tree_ssa_dump_file and tree_ssa_dump_flags.  Update every
9804169689Skan	user.
9805169689Skan	(get_stmt_operands): Clear the array of virtual operands before
9806169689Skan	scanning the statement.
9807169689Skan	(get_expr_operands): Do not add an operand for ADDR_EXPR if the
9808169689Skan	expression takes the address of a VAR_DECL or a PARM_DECL.  Instead
9809169689Skan	add the variable to the list of variables whose address has been
9810169689Skan	taken by the statement.
9811169689Skan	Allow INDIRECT_REF expressions of the form *&VAR.  Convert them
9812169689Skan	into an operand for VAR.
9813169689Skan	When processing function calls, add a VUSE for .GLOBAL_VAR if the
9814169689Skan	function is pure but not const.
9815169689Skan	(add_stmt_operand): If the operand is an ADDR_EXPR, add the
9816169689Skan	variable to the list of variables whose address has been taken by
9817169689Skan	the statement.
9818169689Skan	(add_vdef): If the statement had virtual definitions, try to find
9819169689Skan	an existing VDEF for the variable, to preserve SSA information.  If
9820169689Skan	none is found, create a new one.
9821169689Skan	(add_vuse): Likewise.
9822169689Skan	(remove_all_phi_nodes_for): New function.
9823169689Skan	(get_call_flags): New function to replace call_may_clobber.  Update
9824169689Skan	all callers.
9825169689Skan
9826169689Skan	* tree-dump.c (dump_files): Add entry for -fdump-tree-mustalias.
9827169689Skan	* tree-flow-inline.h (addresses_taken): New function.
9828169689Skan	(is_unchanging_value): New function.
9829169689Skan
9830169689Skan	* tree-flow.h (addresses_taken): Declare.
9831169689Skan	(remove_all_phi_nodes): Declare.
9832169689Skan	(init_tree_ssa): Declare.
9833169689Skan	(propagate_copy): Declare.
9834169689Skan	(is_unchanging_value): Declare.
9835169689Skan	(tree_compute_must_alias): Declare.
9836169689Skan
9837169689Skan	* tree-inline.c (copy_body_r): Fold instances of *&VAR.
9838169689Skan
9839169689Skan	* tree-must-alias.c: New file.
9840169689Skan
9841169689Skan	* tree-optimize.c (optimize_function_tree): Call init_tree_ssa and
9842169689Skan	compute_may_aliases before calling rewrite_into_ssa.
9843169689Skan	After the SSA pass, run dead code elimination and compute
9844169689Skan	must-aliases.
9845169689Skan
9846169689Skan	* tree-simple.c (is_gimple_call_expr): Add comment that
9847169689Skan	is_gimple_* predicates should not have side effects.
9848169689Skan
9849169689Skan	* tree-ssa-ccp.c: Replace calls to really_constant_p with
9850169689Skan	is_unchanging_value everywhere.
9851169689Skan	(fold_stmt): Don't fold if the RHS is already a constant.
9852169689Skan
9853169689Skan	* tree-ssa-copyprop.c (copyprop_stmt): Remove unnecessary
9854169689Skan	variable 'vuse'.
9855169689Skan	Call propagate_copy to replace the operand with its new value.
9856169689Skan	(copyprop_phi): Remove unnecessary variable 'vuse'.
9857169689Skan	(get_original): Remove unused parameter 'vuse_p'.
9858169689Skan	(propagate_copy): New function.
9859169689Skan
9860169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Update comments.
9861169689Skan
9862169689Skan	* tree-ssa.c (dump_file, dump_flags): New local variables to
9863169689Skan	replace globals tree_ssa_dump_file and tree_ssa_dump_flags.  Update
9864169689Skan	all users.
9865169689Skan	(addr_expr_propagated_p): New local variable.
9866169689Skan	(vars_to_rename): New local variable.
9867169689Skan	(check_for_new_variables): New local function.
9868169689Skan	(rewrite_into_ssa): Add new argument VARS which is a bitmap
9869169689Skan	representing all the variables that should be renamed into SSA.  If
9870169689Skan	VARS is NULL, all the variables in the program are renamed.
9871169689Skan	Don't call init_tree_ssa nor compute_may_aliases.
9872169689Skan	Initialize all the local hash tables and bitmaps.
9873169689Skan	Add support for repeating the SSA rename process more than once.
9874169689Skan	If the dominator optimizations produced new symbols, repeat the
9875169689Skan	process.
9876169689Skan	(mark_def_sites): Ignore operands that are in SSA form already.
9877169689Skan	(insert_phi_nodes): Only add PHI nodes for variables in the
9878169689Skan	VARS_TO_RENAME bitmap.
9879169689Skan	(rewrite_block): Ignore PHI nodes that have been renamed already.
9880169689Skan	(rewrite_and_optimize_stmt): Ignore operands that are already in
9881169689Skan	SSA form.
9882169689Skan	When propagating ADDR_EXPR set addr_expr_propagated_p to 'true'.
9883169689Skan	Call propagate_copy when doing copy propagation.
9884169689Skan	Call is_unchanging_value to decide if the RHS of an assignment is a
9885169689Skan	constant.
9886169689Skan	(rewrite_stmt): Ignore operands that are already in SSA form.
9887169689Skan	(init_tree_ssa): Make external.
9888169689Skan	Move initialization of local hash tables and bitmaps to
9889169689Skan	rewrite_into_ssa.
9890169689Skan	(remove_annotations_r): Don't special case MODIFY_EXPR nodes.
9891169689Skan	(lookup_avail_expr): Call is_unchanging_value.
9892169689Skan	(get_eq_expr_value): Likewise.
9893169689Skan
9894169689Skan	* tree.h (enum tree_dump_index): Add TDI_must_alias.
9895169689Skan
9896169689Skan	* cp/optimize.c (optimize_function): Don't call the tree optimizers
9897169689Skan	  if -fdisable-tree-ssa is given.
9898169689Skan
9899169689Skan	* doc/invoke.texi: Add documentation for -ftree-must-alias.
9900169689Skan
9901169689Skan2003-07-07  Jeff Law  <law@redhat.com>
9902169689Skan
9903169689Skan	* fold-const.c (nondestructive_fold_unary_to_constant: For BIT_NOT_EXPR
9904169689Skan	make sure OP0 is a suitable constant before trying to fold it.
9905169689Skan
9906169689Skan	* tree-cfg.c (handle_switch_fallthru): Set DECL_CONTEXT for
9907169689Skan	newly created labels.
9908169689Skan
9909169689Skan	* tree-cfg.c (move_outgoing_edges): New function.
9910169689Skan	(merge_tree_blocks): Use it.
9911169689Skan	(remove_bb): Remove the block from the pdom_info structures
9912169689Skan	as well if they exist.
9913169689Skan	(linearize_cond_expr): Move important edges from the then and
9914169689Skan	else arms to BB as appropriately
9915169689Skan
9916169689Skan	* tree-cfg.c (remove_stmt): When removing a COMPOUND_EXPR, make
9917169689Skan	sure that any basic block pointers to the arms of the COMPOUND_EXPR
9918169689Skan	are updated.
9919169689Skan
9920169689Skan	* tree-cfg.c (make_goto_expr_edges): Computed gotos create
9921169689Skan	abnormal edges.
9922169689Skan
9923169689Skan2003-07-05  Daniel Berlin  <dberlin@dberlin.org>
9924169689Skan
9925169689Skan	* tree-ssa-pre.c (defs_match_p): Check for copies of the same version.
9926169689Skan
9927169689Skan2003-07-03  Frank Ch. Eigler  <fche@redhat.com>
9928169689Skan
9929169689Skan	* tree-nomudflap.c (mf_marked_p, mf_mark): New dummy functions.
9930169689Skan
9931169689Skan2003-07-03  Jeff Law  <law@redhat.com>
9932169689Skan
9933169689Skan	* tree-ssa.c (lookup_avail_expr): Accept new argument containing the
9934169689Skan	const_and_copies table.  All callers changed.  If we find the
9935169689Skan	given expression in the availe expression hash table, then lookup
9936169689Skan	the LHS of the hash table's entry in the const_and_copies_table.
9937169689Skan	Do record type casts into the available expression table.
9938169689Skan
9939169689Skan	* tree-nomudflap.c (mf_marked_p): Mark arguments as being unused.
9940169689Skan	(mf_mark): Likewise.
9941169689Skan
9942169689Skan	* c-decl.c (store_parm_decls): Strip away NOP_EXPRs when looking
9943169689Skan	for hidden use variables.
9944169689Skan
9945169689Skan2003-07-02  Frank Ch. Eigler  <fche@redhat.com>
9946169689Skan
9947169689Skan	* varasm.c (build_constant_desc): Propagate mudflap marked-ness
9948169689Skan	across constant copying.
9949169689Skan
9950169689Skan2003-07-02  Daniel Berlin  <dberlin@dberlin.org>
9951169689Skan
9952169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Don't optimize things with
9953169689Skan	volatile ops or making aliased loads right now.
9954169689Skan	(create_expr_ref): Mark the phi result of the new phi as having
9955169689Skan	real refs.
9956169689Skan	(finalize_1): Mark the new temp as having real refs.
9957169689Skan	(repair_use_injury): Ditto.
9958169689Skan	(code_motion): Ditto.
9959169689Skan
9960169689Skan2003-07-01  Daniel Berlin  <dberlin@dberlin.org>
9961169689Skan
9962169689Skan	* tree.h (struct tree_eref_common): Add injured flag.
9963169689Skan	Add EREF_INJURED macro.
9964169689Skan
9965169689Skan2003-07-01  Daniel Berlin  <dberlin@dberlin.org>
9966169689Skan
9967169689Skan	* tree-flow-inline.h (stmt_ann): We have stmt_ann on E*_NODE's as well,
9968169689Skan	so use is_essa_node as well.
9969169689Skan	* tree-dfa.c (create_stmt_ann): Ditto.
9970169689Skan	* tree.h (is_essa_node): Declare.
9971169689Skan	* tree.c (is_essa_node): Define.
9972169689Skan
9973169689Skan2003-07-01  Jason Merrill  <jason@redhat.com>
9974169689Skan
9975169689Skan	* tree-cfg.c (prepend_stmt_to_bb): New fn.
9976169689Skan	(bsi_insert_after): Add to the beginning of an empty block.
9977169689Skan
9978169689Skan2003-07-01  Jeff Law  <law@redhat.com>
9979169689Skan
9980169689Skan	* expr.c (expand_expr, case COND_EXPR): Correctly (?) handle
9981169689Skan	cases where a containing block has a stack level.  Handle
9982169689Skan	cases where one arm is a GOTO_EXPR and the other arm has
9983169689Skan	side effects.
9984169689Skan
9985169689Skan	* stmt.c (containing_blocks_have_cleanups_or_stack_level): New
9986169689Skan	function.
9987169689Skan	(any_pending_cleanups): Further simplification.
9988169689Skan	* tree.h (containing_blocks_have_cleanups_or_stack_level): Prototype.
9989169689Skan
9990169689Skan2003-06-30  Diego Novillo  <dnovillo@redhat.com>
9991169689Skan
9992169689Skan	* tree-flow.h (struct tree_ann_common_d): Remove 'stmt' field.
9993169689Skan	Update all users.
9994169689Skan	(struct var_ann_d): Remove field 'has_real_refs'.  Update all callers
9995169689Skan	with calls to SSA_NAME_HAS_REAL_REFS.
9996169689Skan	Remove field 'occurs_in_abnormal_phi'.  Update all callers with
9997169689Skan	calls to SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
9998169689Skan	* tree-flow-inline.h (var_ann): Only accept _DECL nodes.
9999169689Skan	(stmt_ann): Only accept GIMPLE statements.
10000169689Skan	(tree_stmt): Remove.  Update all users.
10001169689Skan
10002169689Skan	* tree-cfg.c (linearize_cond_expr): Handle cases where BB doesn't
10003169689Skan	have a postdominator.
10004169689Skan	(find_contained_blocks): Do not look inside COND_EXPR_COND nor
10005169689Skan	SWITCH_COND expressions.
10006169689Skan
10007169689Skan	* tree-dfa.c (get_stmt_operands): Force virtual operands on
10008169689Skan	ASM_EXPRs.
10009169689Skan	(get_expr_operands): Handle SSA names when adding operands for
10010169689Skan	memory tags.
10011169689Skan	(add_stmt_operand): Handle SSA names.
10012169689Skan	Move checks for volatile operands earlier in the code.
10013169689Skan	(add_vdef): Re-format for readability.
10014169689Skan	(create_var_ann): Only allow _DECL nodes.
10015169689Skan	(create_stmt_ann): Only allow GIMPLE statements.
10016169689Skan	(dump_variable): Handle SSA names.
10017169689Skan	(dump_may_aliases_for): Likewise.
10018169689Skan	(may_access_global_mem_p): Handle SSA names.
10019169689Skan	(remove_phi_arg): If the argument removed was the last one with
10020169689Skan	real references, update the LHS of the PHI node.
10021169689Skan	(add_phi_arg): If the argument added has real references, propagate
10022169689Skan	the attribute into the LHS of the PHI node.
10023169689Skan
10024169689Skan	* tree-pretty-print.c (dump_generic_node): Only retrieve basic
10025169689Skan	block information from GIMPLE statements.
10026169689Skan	Always output the THEN and ELSE clauses of COND_EXPR nodes.
10027169689Skan
10028169689Skan	* tree-simple.c (is_gimple_stmt): Accept PHI_NODEs.
10029169689Skan	(is_gimple_id): Accept SSA_NAMEs.
10030169689Skan
10031169689Skan	* tree-ssa-copyprop.c (copyprop_phi): If an argument is used as a
10032169689Skan	real operand, propagate the attribute into the LHS of the PHI.
10033169689Skan
10034169689Skan	* tree-ssa-live.c (create_ssa_var_map): Don't set 'used' flag on
10035169689Skan	both the operand and the result of VDEFs.
10036169689Skan	Only register PHI results and arguments that have been used as real
10037169689Skan	operands.
10038169689Skan	(calculate_live_on_entry): Fix formatting in debugging message.
10039169689Skan
10040169689Skan	* tree-ssa.c (register_new_def): Add new argument
10041169689Skan	'is_real_operand'.  If it's set, set SSA_NAME_HAS_REAL_REFS for the
10042169689Skan	new name.  Update all callers.
10043169689Skan	(rewrite_operand): Add new argument 'is_real_operand'.  If it's
10044169689Skan	set, set SSA_NAME_HAS_REAL_REFS to the operand.
10045169689Skan	(eliminate_build): Ignore PHI arguments and PHI results that have
10046169689Skan	not been used in real operands.
10047169689Skan	(rewrite_vdefs): Remove.  Update all users.
10048169689Skan	(set_is_used): Don't handle SSA names.
10049169689Skan	(coalesce_ssa_name): Ignore PHI arguments that have not had real
10050169689Skan	references in the program.
10051169689Skan
10052169689Skan	* tree.c (make_ssa_name): Update documentation.
10053169689Skan	* tree.h (IS_EMPTY_STMT): Call integer_zerop instead of comparing
10054169689Skan	against size_zero_node.
10055169689Skan	(SSA_NAME_HAS_REAL_REFS): Define.
10056169689Skan	(SSA_NAME_OCCURS_IN_ABNORMAL_PHI): Define.
10057169689Skan	(struct tree_ssa_name): Add bitfields 'has_real_refs' and
10058169689Skan	'occurs_in_abnormal_phi'.
10059169689Skan
10060169689Skan2003-06-30  Jeff Law  <law@redhat.com>
10061169689Skan
10062169689Skan	* c-simplify.c (gimplify_c_loop): Don't return a LOOP_EXPR for
10063169689Skan	a do ... while (0) loop.
10064169689Skan
10065169689Skan	* expr.c (expand_expr, case COND_EXPR): Be smarter about expanding
10066169689Skan	a COND_EXPR with only one useful arm, which happens to be a GOTO_EXPR.
10067169689Skan
10068169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Don't remove user
10069169689Skan	variables unless we're at -O2 or higher.
10070169689Skan
10071169689Skan2003-06-30  Daniel Berlin  <dberlin@dberlin.org>
10072169689Skan
10073169689Skan	* tree-ssa-pre.c (expr_phi_insertion): Stop optimizing the expression
10074169689Skan	if we have > some very large number of ephi operands, as it will
10075169689Skan	take an ungodly amount of memory and time.
10076169689Skan	(pre_expression): Push/pop gc context so we can do gc collection
10077169689Skan	in between expressions.
10078169689Skan	Throw away expression info right after done optimizing it.
10079169689Skan
10080169689Skan2003-06-30  Jason Merrill  <jason@redhat.com>
10081169689Skan
10082169689Skan	* gimplify.c (gimplify_call_expr): Check PUSH_ARGS_REVERSED.
10083169689Skan
10084169689Skan	* gimplify.c (gimplify_modify_expr): Also force a call with a
10085169689Skan	possible nonlocal goto into a temporary.
10086169689Skan	(gimplify_return_expr): Don't duplicate the MODIFY_EXPR.
10087169689Skan	* tree-iterator.h (tsi_one_before_end_p): New fn.
10088169689Skan
10089169689Skan2003-06-29  Jeff Sturm   <jsturm@one-point.com>
10090169689Skan
10091169689Skan	* fold-const.c (fold): Don't save_expr unless TREE_SIDE_EFFECTS.
10092169689Skan
10093169689Skan2003-06-26  Diego Novillo  <dnovillo@redhat.com>
10094169689Skan
10095169689Skan	* c-simplify.c (gimplify_stmt_expr): Handle statement-expressions
10096169689Skan	that don't end in a non-void expression.  Emit a warning in that
10097169689Skan	case.
10098169689Skan
10099169689Skan2003-06-26  Daniel Berlin  <dberlin@dberlin.org>
10100169689Skan
10101169689Skan	* tree-ssa-pre.c (fixup_domchildren): Rename from
10102169689Skan	compute_domchildren, change to not use our own array.
10103169689Skan	(domchildren): Remove variable.
10104169689Skan	(insert_occ_in_preorder_dt_order_1): Use dom_children now.
10105169689Skan	(insert_euse_in_preorder_dt_order_1): Ditto.
10106169689Skan	(search_dt_preorder): Ditto.
10107169689Skan	(handle_bb_creation): Fix to work properly.
10108169689Skan	(tree_perform_ssapre): Remove remnants of domchildren.
10109169689Skan	Redo dominator info if we have to due to a new block.
10110169689Skan
10111169689Skan2003-06-26  Andrew MacLeod  <amacleod@redhat.com>
10112169689Skan
10113169689Skan	* tree-cfg.c (handle_switch_split): Use a tree iterator to find the
10114169689Skan	real split point rather than a block iterator.
10115169689Skan
10116169689Skan2003-06-26  Jason Merrill  <jason@redhat.com>
10117169689Skan
10118169689Skan	* tree-simple.c (is_gimple_stmt): Complete.
10119169689Skan
10120169689Skan2003-06-24  Jeff Law  <law@redhat.com>
10121169689Skan
10122169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): On the first
10123169689Skan	iteration, remove unused variables from BIND_EXPRs.
10124169689Skan	* tree-flow.h (var_ann_d): Add new field USED.
10125169689Skan	(set_is_used): Prototype.
10126169689Skan	(remove_useless_stmts_and_vars): Update prototype.
10127169689Skan	* tree-ssa-live.c (create_ssa_var_map): Note which variables
10128169689Skan	are used so that we can delete those which are not used.
10129169689Skan	* tree-ssa.c (create_temp): Mark the new temporary as being used.
10130169689Skan	(rewrite_out_of_ssa): Note if the call to remove_useless_stmts_and_vars
10131169689Skan	is the first iteration or not.
10132169689Skan	(set_is_used): New function.
10133169689Skan
10134169689Skan	* c-decl.c (store_parm_decls): Variables and parameters on the
10135169689Skan	pending_sizes chain have nonlocal uses.
10136169689Skan
10137169689Skan2003-06-25  Daniel Berlin  <dberlin@dberlin.org>
10138169689Skan
10139169689Skan	* tree-ssa-pre.c: Convert to ISO C.
10140169689Skan	(handle_bb_creation): New function.
10141169689Skan	(ephi_will_be_avail): Remove dead code.
10142169689Skan	(finalize_1): Use handle_bb_creation, start to fix edge insertion
10143169689Skan	related fun.
10144169689Skan	(maybe_find_rhs_use_for_var): Stop using tree_stmt.
10145169689Skan	(code_motion): Always get the temporary from the right place.
10146169689Skan
10147169689Skan2003-06-24  Jason Merrill  <jason@redhat.com>
10148169689Skan
10149169689Skan	* gimplify.c (gimplify_self_mod_expr): Add want_value parm.
10150169689Skan	For postfix ops, make sure it returns an rvalue.
10151169689Skan	(gimplify_expr): Copy a volatile reference into a temp.
10152169689Skan	(create_tmp_var): Require a complete type.
10153169689Skan	(create_tmp_alias_var): Use TYPE_VOLATILE on types.
10154169689Skan	* tree-simple.c (is_gimple_stmt): Flesh out a bit.
10155169689Skan	(is_gimple_val): Don't allow volatiles.
10156169689Skan
10157169689Skan	* c-simplify.c (gimplify_expr_stmt): Don't insert a null pointer.
10158169689Skan
10159169689Skan	* gimplify.c (gimplify_return_expr): Search through the gimple
10160169689Skan	form for the interesting MODIFY_EXPR.
10161169689Skan	(gimplify_modify_expr): Don't suppress posteffects if want_value.
10162169689Skan
10163169689Skan2003-06-24  Diego Novillo  <dnovillo@redhat.com>
10164169689Skan
10165169689Skan	* tree-dfa.c (struct dfa_stats_d): Remove obsolete fields
10166169689Skan	num_tree_refs and size_tree_refs.  Update all users.
10167169689Skan	(dump_dfa_stats): Also dump information about VUSE and VDEF
10168169689Skan	operands.
10169169689Skan	* tree-ssa.c (rewrite_vdefs): Dump information about VDEF operators
10170169689Skan	promoted to real copies if -fdump-tree-optimized-details is given.
10171169689Skan
10172169689Skan2003-06-23  Jeff Law  <law@redhat.com>
10173169689Skan
10174169689Skan	* tree-ssa.c (avail_expr_eq): Verify types are the same before
10175169689Skan	handing expressions to operand_equal_p.
10176169689Skan
10177169689Skan	* tree-cfg.c (make_edges): Remove fake edges before building
10178169689Skan	extra edges for TRY_FINALLY_EXPRs.  Delete unnecessary edges
10179169689Skan	leaving the TRY block in a TRY_FINALLY_EXPR.
10180169689Skan	(find_contained_blocks): Don't consider statements in the CATCH
10181169689Skan	clause of a TRY_CATCH_EXPR when noting the last statement in
10182169689Skan	the block.
10183169689Skan	* tree-dfa.c (remove_phi_arg): If we removed the last PHI argument,
10184169689Skan	then remove the entire PHI node.
10185169689Skan	* tree-ssa-dce.c (stmt_useful_p): Consider the other EH related
10186169689Skan	nodes useful as well (TRY_FINALLY_EXPR, TRY_CATCH_EXPR, and
10187169689Skan	EH_FILTER_EXPR).
10188169689Skan
10189169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): If the body of a
10190169689Skan	TRY_CATCH_EXPR is empty, then the entire TRY_CATCH_EXPR can
10191169689Skan	be safely removed.
10192169689Skan
10193169689Skan	* tree-cfg.c (find_contained_blocks): Renamed from
10194169689Skan	find_contained_blocks_and_edge_targets.  Remove targets
10195169689Skan	bitmap argument and no longer record targets of edges.
10196169689Skan	All callers changed.
10197169689Skan	(make_edges): No longer need TRY_TARGETS bitmap.  Kill it.
10198169689Skan	Simplify code which creates additional edges out of the TRY
10199169689Skan	block and the FINALLY block in a TRY_FINALLY_EXPR.
10200169689Skan
10201169689Skan2003-06-23  Diego Novillo  <dnovillo@redhat.com>
10202169689Skan
10203169689Skan	* tree-alias-common.c (ptr_may_alias_var): Don't handle memory
10204169689Skan	tags.
10205169689Skan	* tree-dfa.c (struct alias_set_d): Remove.  Update all users.
10206169689Skan	(alias_sets): Remove.  Update all users.
10207169689Skan	(struct walk_state): Remove field aliased_objects_found.
10208169689Skan	(struct alias_map_d): New.
10209169689Skan	(addressable_vars): New local variable.
10210169689Skan	(pointers): New local variable.
10211169689Skan	(add_stmt_operand): Do not force aliased variables to be in virtual
10212169689Skan	operands.
10213169689Skan	(register_alias_set): Remove.  Update all users.
10214169689Skan	(find_alias_for): Remove.  Update all users.
10215169689Skan	(get_memory_tag_for): New local function.
10216169689Skan	(num_referenced_vars): Remove.
10217169689Skan	(num_aliased_objects): Remove.  Update all users.
10218169689Skan	(aliased_objects): Remove.  Update all users.
10219169689Skan	(aliased_objects_alias_set): Remove.  Update all users.
10220169689Skan	(num_call_clobbered_vars): Remove.  Update all users.
10221169689Skan	(dump_variable): Move code to dump aliases ...
10222169689Skan	(dump_may_aliases_for): ... here.
10223169689Skan	(debug_may_aliases_for): New function.
10224169689Skan	(compute_may_aliases): Initialize 'addressable_vars' and 'pointers'
10225169689Skan	arrays.
10226169689Skan	(compute_alias_sets): Re-implement matching pointers with
10227169689Skan	addressable variables.  Limit the size of may-alias sets.
10228169689Skan	(may_alias_p): Re-implement to compare pointers against variables,
10229169689Skan	instead of memory tags.
10230169689Skan	(dump_alias_info): Re-implement to display pointers and addresable
10231169689Skan	variables arrays.
10232169689Skan	(add_referenced_var): Collect addressable variables and pointers.
10233169689Skan	Share memory tags among pointers that may alias each other.
10234169689Skan	* tree-flow.h (num_referenced_vars): Change to macro.
10235169689Skan	(referenced_var): Likewise.
10236169689Skan	(num_call_clobbered_vars): Likewise.
10237169689Skan	(call_clobbered_var): Likewise.
10238169689Skan	(dump_may_aliases_for): Declare.
10239169689Skan	(debug_may_aliases_for): Declare.
10240169689Skan	* tree-ssa.c (rewrite_vdefs): New local function.
10241169689Skan	(rewrite_out_of_ssa): Call it.
10242169689Skan
10243169689Skan2003-06-23  Jeff Law  <law@redhat.com>
10244169689Skan
10245169689Skan	* tree-cfg.c (make_edges): Walk TRY_FINALLYs inner to outer and
10246169689Skan	simplify creation of special edges related to the TRY_FINALLY_EXPR.
10247169689Skan
10248169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): More aggressively
10249169689Skan	remove TRY_CATCH_EXPRs and TRY_FINALLY_EXPRs.
10250169689Skan
10251169689Skan	* tree-cfg.c (make_edges): Remove fake edges.
10252169689Skan	(make_exit_edges): Mark edges from nonreturning functions to the
10253169689Skan	exit block as being fake edges.
10254169689Skan
10255169689Skan	* gimplify.c (gimplify_modify_expr): Don't create a new MODIFY_EXPR,
10256169689Skan	reuse the existing one.
10257169689Skan
10258169689Skan2003-06-23  Andrew MacLeod  <amacleod@redhat.com>
10259169689Skan
10260169689Skan	* tree-cfg.c (find_insert_location): Default case should insert after
10261169689Skan	the last stmt in the block.
10262169689Skan
10263169689Skan2003-06-22  Jeff Sturm  <jsturm@one-point.com>
10264169689Skan
10265169689Skan	* Makefile.in (old-tree-inline.o): Remove rule.
10266169689Skan	* old-tree-inline.c: Remove.
10267169689Skan
10268169689Skan2003-06-19  Jeff Law  <law@redhat.com>
10269169689Skan
10270169689Skan	* tree-cfg.c (make_ctrl_stmt_edges): Do not create bogus edges
10271169689Skan	to the successor block of TRY_CATCH_EXPR, TRY_FINALLY_EXPR,
10272169689Skan	CATCH_EXPR or EH_FILTER_EXPR nodes.
10273169689Skan
10274169689Skan	* gimplify.c (gimplify_modify_expr): If the RHS of an MODIFY_EXPR
10275169689Skan	might throw, then make sure its result goes into a temporary.
10276169689Skan
10277169689Skan	* tree-cfg.c (handle_switch_split): Handle case where target
10278169689Skan	block has only one statement (the case label itself).
10279169689Skan
10280169689Skan2003-06-19  Diego Novillo  <dnovillo@redhat.com>
10281169689Skan
10282169689Skan	* doc/invoke.texi: Add documentation for -ftree-dominator-opts
10283169689Skan	that was missing from an earlier patch.
10284169689Skan
10285169689Skan2003-06-19  Jeff Sturm  <jsturm@one-point.com>
10286169689Skan
10287169689Skan	* gimplify.c (gimplify_expr): Handle LABELED_BLOCK_EXPR
10288169689Skan	and EXIT_BLOCK_EXPR.
10289169689Skan	(gimplify_labeled_block_expr): New function.
10290169689Skan	(gimplify_exit_block_expr): New function.
10291169689Skan
10292169689Skan2003-06-18  Andrew MacLeod  <amacleod@redhat.com>
10293169689Skan
10294169689Skan	* tree-cfg.c (EDGE_INSERT_LOCATION_BSI_AFTER): New location code.
10295169689Skan	(cleanup_switch_expr_graph): Find default case correctly.
10296169689Skan	(bsi_insert_after): Get BB from stmt when its avialble.
10297169689Skan	(bsi_insert_before): Get BB from stmt when its avialble.
10298169689Skan	(handle_switch_fallthru): New. Handle edge from switch to the fallthru.
10299169689Skan	(handle_switch_split): Re-implement using new scheme.
10300169689Skan	(find_insert_location): Use handle_switch_fallthru ().
10301169689Skan	(bsi_insert_on_edge_immediate): Handle EDGE_INSERT_LOCATION_BSI_AFTER.
10302169689Skan	* tree-iterator.h (tsi_last): New. Find last stmt in a chain.
10303169689Skan
10304169689Skan2003-06-17  Daniel Berlin  <dberlin@dberlin.org>
10305169689Skan
10306169689Skan	* tree-alias-common.c (find_func_aliases): Guard cast op
10307169689Skan	properly.
10308169689Skan	(ptr_may_alias_var): Small optimization to avoid calling
10309169689Skan	decl_function_context so often.
10310169689Skan	* tree-alias-ander.c (ander_simple_assign): Ignore if lhs == rhs.
10311169689Skan
10312169689Skan2003-06-17  Steven Bosscher  <steven@gcc.gnu.org>
10313169689Skan
10314169689Skan	* timevar.def (TV_TREE_BUILD_FUD_CHAINS): Remove.
10315169689Skan
10316169689Skan2003-06-16  Diego Novillo  <dnovillo@redhat.com>
10317169689Skan
10318169689Skan	* tree-ssa-ccp.c (DONT_SIMULATE_AGAIN): Define.
10319169689Skan	(visit_phi_node): Don't do anything if the PHI node doesn't need to
10320169689Skan	be simulated.
10321169689Skan	If the PHI variable does not have real references, consider it
10322169689Skan	VARYING.
10323169689Skan	If the PHI node has a lattice value of VARYING, set
10324169689Skan	DONT_SIMULATE_AGAIN.
10325169689Skan	(visit_stmt): Don't do anything if the statement doesn't need to be
10326169689Skan	simulated.
10327169689Skan	Only visit conditional branches COND_EXPR and SWITCH_EXPR.
10328169689Skan	If the statement doesn't produce a result mark it with
10329169689Skan	DONT_SIMULATE_AGAIN.
10330169689Skan	(visit_assignment): Remove unnecessary def_op() check.
10331169689Skan	If the value is VARYING, mark the statement with
10332169689Skan	DONT_SIMULATE_AGAIN.
10333169689Skan	(visit_cond_stmt): Remove unnecessary is_ctrl_stmt() check.
10334169689Skan	If the predicate is VARYING, mark the statement with
10335169689Skan	DONT_SIMULATE_AGAIN.
10336169689Skan	(initialize): Clear DONT_SIMULATE_AGAIN flag for every statement
10337169689Skan	and PHI node.
10338169689Skan	(likely_value): Get statement operands after checking if it makes
10339169689Skan	aliased loads or has volatile operands.
10340169689Skan
10341169689Skan2003-06-16  Jeff Law  <law@redhat.com>
10342169689Skan	    Jason Merrill  <jason@redhat.com>
10343169689Skan
10344169689Skan	* except.c (enum eh_region_type): Don't declare the enumeration
10345169689Skan	members here.  Instead do it in except.h.
10346169689Skan	(expand_eh_hander): Use expr_first instead of open-coding it.
10347169689Skan	* except.h (enum eh_region_type): Define the enumeration memebers
10348169689Skan	here.
10349169689Skan	* tree-cfg.c (last_exec_block): Break out from make_edges.
10350169689Skan	(could_trap_p): No longer static.
10351169689Skan	(get_eh_region_type): New function.
10352169689Skan	(make_try_expr_blocks): Keep the whole TRY_CATCH_EXPR or
10353169689Skan	TRY_FINALLY_EXPR instead of just the handler part in the
10354169689Skan	EH_STACK varray.  For a cleanup, record which cleanup higher
10355169689Skan	in the EH_STACK it can reach.
10356169689Skan	(make_edges): Use last_exec_block.
10357169689Skan	(make_ctrl_stmt_edges): Thread cleanups as needed.
10358169689Skan	(compute_reachable_eh):  Use get_eh_region_type.  Properly
10359169689Skan	track when we can skip cleanups.  Skip cleanups when possible.
10360169689Skan	* tree-flow.h (could_trap_p): Prototype.
10361169689Skan
10362169689Skan2003-06-16  Andrew Macleod  <amacleod@redhat.com>
10363169689Skan
10364169689Skan	* tree-cfg.c (find_insert_location): Check for control_altering stmts,
10365169689Skan	and abort if its an unrecognized BB ending stmt.
10366169689Skan	(bsi_commit_first_edge_insert): Rename to bsi_insert_on_edge_immediate,
10367169689Skan	externalize, and change the interface to an on-demand inserter.
10368169689Skan	(bsi_commit_edge_inserts): Call bsi_insert_on_edge_immediate().
10369169689Skan	* tree-flow.h (bsi_insert_on_edge_immediate): Prototype.
10370169689Skan	* tree-pretty-print.c (dump_block_info): Add 'ab' for abnormal edges.
10371169689Skan	* tree-ssa-dce.c (process_worklist): Use sparse bitmaps.
10372169689Skan	* tree-ssa-live.c (calculate_live_on_entry): Abort if ssa_name has a
10373169689Skan	definition, but is also live on entry.
10374169689Skan	* tree-ssa.c (coalesce_ssa_name): Call abort() instead of error(), and
10375169689Skan	provide more detailed info.
10376169689Skan	(rewrite_out_of_ssa): Provide CFG dumps before and after rewritting.
10377169689Skan
10378169689Skan2003-06-16  Frank Ch. Eigler  <fche@redhat.com>
10379169689Skan
10380169689Skan	* tree-mudflap.c (mf_mark): Use GC-compatible htab_create_ggc.
10381169689Skan
10382169689Skan2003-06-15  Jeff Law  <law@redhat.com>
10383169689Skan
10384169689Skan	* tree-ssa-ccp.c (visit_phi_node): If the PHI is already known
10385169689Skan	to be varying, don't recompute its value.
10386169689Skan
10387169689Skan2003-06-14  Jeff Law  <law@redhat.com>
10388169689Skan	    Jason Merrill <jason@redhat.com>
10389169689Skan
10390169689Skan	* tree-cfg.c (make_blocks): Do not return early if presented
10391169689Skan	with an empty statement.
10392169689Skan	(make_ctrl_stmt_edges):  Do not try to optimize an empty TRY
10393169689Skan	block in a TRY_FINALLY_EXPR.  Simplify TRY_FINALLY_EXPR,
10394169689Skan	TRY_CATCH_EXPR, CATCH_EXPR, and EH_FILTER_EXPR now that empty
10395169689Skan	statements are no longer shared.
10396169689Skan
10397169689Skan2003-06-14  Kazu Hirata  <kazu@cs.umass.edu>
10398169689Skan
10399169689Skan	* tree-ssa-pre.c: Fix a comment typo.
10400169689Skan
10401169689Skan2003-06-13  Diego Novillo  <dnovillo@redhat.com>
10402169689Skan
10403169689Skan	* tree-dfa.c (get_stmt_operands): Abort if the statement is a
10404169689Skan	variable.
10405169689Skan	(create_var_ann): Abort if the variable is not a _DECL node.
10406169689Skan
10407169689Skan2003-06-13  Frank Ch. Eigler  <fche@redhat.com>
10408169689Skan
10409169689Skan	* tree-mudflap.c (mudflap_c_function): Change calling conventions so
10410169689Skan	as to return the instrumented function body rather than changing the
10411169689Skan	given fndecl in place.  Gimplify at the very end, for cosmetic
10412169689Skan	reasons.
10413169689Skan	* tree-mudflap.h, tree-nomudflap.c: Corresponding changes.
10414169689Skan	* c-decl.c (c_expand_body_1): Call mudflap_c_function just before
10415169689Skan	rtl expansion of function body; don't interfere with inlining.
10416169689Skan
10417169689Skan2003-06-13  Diego Novillo  <dnovillo@redhat.com>
10418169689Skan
10419169689Skan	* c-simplify.c: Fix typo in previous change.
10420169689Skan
10421169689Skan2003-06-13  Diego Novillo  <dnovillo@redhat.com>
10422169689Skan
10423169689Skan	* c-common.c, c-common.h, c-decl.c, c-lang.c, c-simplify.c,
10424169689Skan	flags.h, gimplify.c, langhooks-def.h, langhooks.c, langhooks.h,
10425169689Skan	simple-break-elim.c, simple-goto-elim.c, toplev.c,
10426169689Skan	tree-alias-common.c, tree-cfg.c, tree-dfa.c, tree-dump.c,
10427169689Skan	tree-inline.c, tree-mudflap.c, tree-simple.c, tree-simple.h,
10428169689Skan	tree-ssa-ccp.c, tree-ssa-pre.c, tree-ssa.c, tree.h, doc/invoke.texi:
10429169689Skan	Rename SIMPLE to GIMPLE everywhere.
10430169689Skan
10431169689Skan2003-06-13  Andrew MacLeod  <amacleod@redhat.com>
10432169689Skan
10433169689Skan	* tree-cfg.c (bsi_commit_first_edge_insert): Only consider non-abnormal
10434169689Skan	edges when determining whether an edge needs to be split.
10435169689Skan
10436169689Skan	* tree-ssa-dce.c (process_worklist): When checking for GOTO and
10437169689Skan	COND_EXPR's that are necessary, check each BB's predecessors only once.
10438169689Skan
10439169689Skan2003-06-12  Jeff Law  <law@redhat.com>
10440169689Skan
10441169689Skan	* tree-ssa.c (avail_expr_eq): Add some checking code to
10442169689Skan	detect when equal expressions have different hash values.
10443169689Skan
10444169689Skan	* tree.c (iterative_hash_expr): Don't hash types associated
10445169689Skan	with conversions.  Instead hash on the signedness of the
10446169689Skan	toplevel object and the operand of the conversion.
10447169689Skan
10448169689Skan	* Makefile.in (gimplify.o): Depend on $(RTL_H).  Ugh.
10449169689Skan	* gimplify.c: Include "rtl.h".
10450169689Skan	(simplify_call_expr): Use call_expr_flags and check for ECF_CONST
10451169689Skan	rather than checking bits in the tree node directly.
10452169689Skan
10453169689Skan	* fold-const.c (operand_equal_p): CALL_EXPRs with side effects
10454169689Skan	are never equal.
10455169689Skan
10456169689Skan2003-06-11  Frank Ch. Eigler  <fche@redhat.com>
10457169689Skan
10458169689Skan	* gcc.c (MFWRAP_SPEC): Always wrap main().
10459169689Skan	* tree-mudflap.c (mudflap_enqueue_decl): Mark enqueued decls
10460169689Skan	to prevent their repeated processing.
10461169689Skan
10462169689Skan2003-06-11  Daniel Berlin  <dberlin@dberlin.org>
10463169689Skan
10464169689Skan	* tree-ssa-pre.c: add graph_dump_file, graph_dump_flags.
10465169689Skan	(finalize_1): Modify to use temporary in expr_info structure,
10466169689Skan	remove temporary from arguments.
10467169689Skan	Use bsi_insert_on_edge for ephi insertions.
10468169689Skan	Set EREF_TEMP on inserted euses.
10469169689Skan	(repair_phi_injury): Note (to dump file)  injuries we have
10470169689Skan	repaired already.
10471169689Skan	(repair_use_injury): Ditto.
10472169689Skan	(repair_euse_injury): Ditto.
10473169689Skan	(count_stmts_in_bb): Count both forwards and backwards, and make
10474169689Skan	sure the numbers agree. This makes sure both the head and end are
10475169689Skan	updated properly.
10476169689Skan	(code_motion): Use the EREF_TEMP, rather than calculating the
10477169689Skan	reaching def, when possible, because it's faster.
10478169689Skan	Add the phi we created when we insert the ephi.  We should always
10479169689Skan	be able to get the reaching def of the ephi from EREF_TEMP (since
10480169689Skan	the args should have already been inserted, or in the case of
10481169689Skan	phi's, have a phi already allocated), so abort if we can't.
10482169689Skan	(create_expr_ref): Take expr_info parameter.  Make a phi for the
10483169689Skan	ephi's, but don't add to the bb yet. Update all callers.
10484169689Skan	(get_default_def): New function.
10485169689Skan	(get_reaching_def): Use it to find the default def when we hit the
10486169689Skan	top of the dom tree.
10487169689Skan	(struct expr_info): Add temp.
10488169689Skan	(new_rename_1): Dump out occurrences after rename 1, but before
10489169689Skan	rename 2.
10490169689Skan	(requires_edge_placement): Now that we can insert on edges, we
10491169689Skan	shouldn't need this, so make it always return false.
10492169689Skan	Will remove unless something bad comes up.
10493169689Skan	(pre_expression): Start working on dumping the redundancy graph.
10494169689Skan
10495169689Skan	* tree.h (struct treeeref_common): Add the temp member.
10496169689Skan	Add EREF_TEMP macro.
10497169689Skan	(tree_dump_index): Reorder to match actual optimization order.
10498169689Skan	Add TDI_predot.
10499169689Skan
10500169689Skan	* tree-dump.c: Ditto.
10501169689Skan
10502169689Skan2003-06-11  Jeff Law  <law@redhat.com>
10503169689Skan
10504169689Skan	* gimplify.c (simplify_call_expr): Clear TREE_SIDE_EFFECTS for
10505169689Skan	calls to "const" functions.
10506169689Skan
10507169689Skan	* tree-inline.c (expand_call_inline): Recalculate TREE_SIDE_EFFECTS
10508169689Skan	properly when inlining gimplified functions.
10509169689Skan
10510169689Skan	* fold-const.c (operand_equal_p): Handle CALL_EXPRs.
10511169689Skan
10512169689Skan	* tree-cfg.c (first_exec_block): Kill.
10513169689Skan	(make_edges): Use bb_for_stmt rather than first_exec_block.
10514169689Skan	(make_ctrl_stmt_edges, make_exit_edges): Likewise.
10515169689Skan	(make_loop_expr_edges, make_cond_expr_edges): Likewise.
10516169689Skan	(successor_block): Don't skip empty statements.
10517169689Skan
10518169689Skan	* tree-ssa.c (rewrite_and_optimize_stmt): Do not special case
10519169689Skan	CALL_EXPRs they're caught by the TREE_SIDE_EFFECTS test.
10520169689Skan
10521169689Skan	* tree-ssa.c (rewrite_and_optimize_stmt): Improve/correct setting of
10522169689Skan	may_optimize_p.  Simplify later code knowing may_optimize_p is
10523169689Skan	correctly set.
10524169689Skan	(avail_expr_hash): Do not use iterative_hash_object or deal with
10525169689Skan	SSA names for real operands.  Instead use iterative_hash_expr
10526169689Skan	which handles both.
10527169689Skan	(avail_expr_eq): Use operand_equal_p to test for equality.
10528169689Skan
10529169689Skan2003-06-11  Steven Bosscher  <steven@gcc.gnu.org>
10530169689Skan
10531169689Skan	* tree-flow.h, tree-ssa-ccp.c, tree-ssa-copyprop.c,
10532169689Skan	tree-ssa-dce.c, tree-ssa-live.c, tree-ssa-live.h:
10533169689Skan	Convert function prototypes to ISO C.
10534169689Skan
10535169689Skan2003-06-10  Jeff Law  <law@redhat.com>
10536169689Skan
10537169689Skan	* toplev.c (parse_options_and_default_flags): Fix typo in last change.
10538169689Skan
10539169689Skan	* gimplify.c (simplify_expr, case BIT_FIELD_REF): Make sure
10540169689Skan	to call recalculate_side_effects after gimplifying the
10541169689Skan	operands.
10542169689Skan
10543169689Skan2003-06-10  Diego Novillo  <dnovillo@redhat.com>
10544169689Skan
10545169689Skan	* toplev.c (flag_tree_dom): New variable.
10546169689Skan	(f_options): Add new entry for -ftree-dominator-opts.
10547169689Skan	(parse_options_and_default_flags): Enable flag_tree_dom for
10548169689Skan	-O1 and higher.  At -O2 and higher, disable flag_tree_dom is
10549169689Skan	SSA-PRE is also specified.
10550169689Skan	* flags.h (flag_tree_dom): Declare.
10551169689Skan	* doc/invoke.texi: Document -ftree-dominator-opts.
10552169689Skan	* tree-ssa.c (rewrite_block): Disable tracking of available
10553169689Skan	expressions when not doing dominator optimizations.
10554169689Skan	Call rewrite_stmt when not doing dominator optimizations.
10555169689Skan	Otherwise, call rewrite_and_optimize_stmt.
10556169689Skan	(rewrite_stmt): Don't optimize the statement.  Just rename.
10557169689Skan	(rewrite_and_optimize_stmt): Optimize the statement while rewriting
10558169689Skan	its operands.
10559169689Skan	(lookup_avail_expr): Update comments.
10560169689Skan
10561169689Skan2003-06-10  Andrew Haley  <aph@redhat.com>
10562169689Skan
10563169689Skan	* c-simplify.c (c_simplify_stmt): case ASM_STMT: Ensure qualifiers
10564169689Skan	come from input statement.
10565169689Skan
10566169689Skan2003-06-09  Andrew MacLeod  <amacleod@redhat.com>
10567169689Skan
10568169689Skan	* tree-cfg.c (handle_switch_split): Update PHI nodes when splitting.
10569169689Skan	(tree_split_edge): Update PHI nodes in destination block.
10570169689Skan
10571169689Skan2003-06-09  Steven Bosscher  <steven@gcc.gnu.org>
10572169689Skan
10573169689Skan	* basic-block.h, tree-dfa.c, tree-ssa.c, tree-cfg.c,
10574169689Skan	tree-flow.h: Convert function prototypes to ISO C.
10575169689Skan
10576169689Skan2003-06-09  Daniel Berlin  <dberlin@dberlin.org>
10577169689Skan
10578169689Skan	* tree-cfg.c (bsi_commit_edge_inserts): Fix computation of
10579169689Skan	new_blocks.
10580169689Skan
10581169689Skan2003-06-08  Diego Novillo  <dnovillo@redhat.com>
10582169689Skan
10583169689Skan	* tree-cfg.c (handle_switch_split): Don't allocate basic block
10584169689Skan	annotations more than once.
10585169689Skan	(bsi_commit_first_edge_insert): Likewise.
10586169689Skan
10587169689Skan2003-06-07  Jeff Sturm  <jsturm@one-point.com>
10588169689Skan
10589169689Skan	* tree-cfg.c (could_trap_p): New function.
10590169689Skan	(stmt_ends_bb_p): Handle flag_non_call_exceptions.
10591169689Skan	(make_exit_edges): Handle flag_non_call_exceptions.
10592169689Skan	(is_ctrl_altering_stmt): Handle flag_non_call_exceptions.
10593169689Skan	* tree-inline.c (walk_tree): Add case for CHAR_TYPE.
10594169689Skan	* tree-ssa-dce.c (stmt_useful_p): Keep all CATCH_EXPRs.
10595169689Skan
10596169689Skan2003-06-05  Jason Merrill  <jason@redhat.com>
10597169689Skan
10598169689Skan	* stmt.c (asm_op_is_mem_input): New fn.
10599169689Skan	* tree.h: Declare it.
10600169689Skan	* gimplify.c (simplify_asm_expr): Call resolve_asm_operand_names.
10601169689Skan	Use is_simple_modify_expr_lhs for mem input ops.
10602169689Skan
10603169689Skan2003-06-05  Frank Ch. Eigler  <fche@redhat.com>
10604169689Skan
10605169689Skan	* c-mudflap.c (mflang_register_call): Give the synthetic decl
10606169689Skan	undefined (not zero) size.
10607169689Skan
10608169689Skan2003-06-05  Frank Ch. Eigler  <fche@redhat.com>
10609169689Skan
10610169689Skan	* tree-mudflap.c (mx_flag): Remove.  Update callers to use mf_mark.
10611169689Skan	(TREE_MUDFLAPPED_P): Remove.  Update callers to use mf_marked_p.
10612169689Skan	(mf_mark, mf_marked_p): Replacement functions to replace old node
10613169689Skan	marking based on tree flag-bits.
10614169689Skan	(mf_mostly_copy_tree_r): Preserve markedness across copies.
10615169689Skan	* tree-mudflap.h: Add new decls
10616169689Skan	* c-mudflap.c (mx_flag): Remove.  Update callers to use mf_mark.
10617169689Skan
10618169689Skan2003-06-04  Diego Novillo  <dnovillo@redhat.com>
10619169689Skan
10620169689Skan	* tree-dfa.c (add_stmt_operand): Always consider non-scalar types
10621169689Skan	virtual operands.
10622169689Skan
10623169689Skan2003-06-04  Andrew MacLeod  <amacleod@redhat.com>
10624169689Skan
10625169689Skan	* toplev.c (parse_options_and_default_flags): Turn tree_copyprop on by
10626169689Skan	default.
10627169689Skan	* tree-cfg.c (linearize_control_structures, linearize_cond_expr,
10628169689Skan	replace_stmt, merge_tree_blocks, remap_stmts): Fix PROTOS.
10629169689Skan	(find_insert_location): Add additional basic block parameter. Handle
10630169689Skan	switch stmts.
10631169689Skan	(handle_switch_split): New. Split edges to switch labels.
10632169689Skan	(bsi_commit_first_edge_insert): Add extra parameter to
10633169689Skan	find_insert_location call. Fix split block chaining in THEN & ELSE.
10634169689Skan	* tree-ssa-live.c (calculate_live_on_entry): Process all PHI def's
10635169689Skan	after all the arguments have been processed.
10636169689Skan	* tree-ssa.c (struct ssa_stats_d, struct loops *loops, var_is_live,
10637169689Skan	rewrite_into_ssa): Remove old UNSSA code.
10638169689Skan	(rewrite_block): Remove stmt is rewrite_stmt returns 1.
10639169689Skan	(assign_vars): Remove abort and enable overlapping live ranges.
10640169689Skan	(replace_variable): New. Replace SSA name with the partition variable.
10641169689Skan	(rewrite_out_of_ssa): Use replace_variable().
10642169689Skan	(dump_tree_ssa_stats): Remove old UNSSA code.
10643169689Skan	(rewrite_stmt): Return 1 if stmt should be deleted. Remove old
10644169689Skan	UNSSA code.
10645169689Skan
10646169689Skan2003-06-03  Diego Novillo  <dnovillo@redhat.com>
10647169689Skan
10648169689Skan	* gimplify.c (simplify_call_expr): Move code to mark MD builtins
10649169689Skan	non-simplifiable...
10650169689Skan	* tree-simple.c (is_simple_call_expr): ... here.
10651169689Skan
10652169689Skan2003-06-03  Diego Novillo  <dnovillo@redhat.com>
10653169689Skan
10654169689Skan	* c-parse.in: Fix botched merge.
10655169689Skan
10656169689Skan2003-06-03  Diego Novillo  <dnovillo@redhat.com>
10657169689Skan
10658169689Skan	* tree-mudflap.c (MARK_TREE_MUDFLAPPED, TREE_MUDFLAPPED):
10659169689Skan	Use TREE_VISITED instead of TREE_BOUNDED.
10660169689Skan	* c-mudflap.c (TREE_MUDFLAPPED): Likewise.
10661169689Skan	* tree-pretty-print.c (dump_generic_node): Remove
10662169689Skan	references to TYPE_QUAL_BOUNDED.
10663169689Skan
10664169689Skan2003-06-03  Jason Merrill  <jason@redhat.com>
10665169689Skan
10666169689Skan	* gimplify.c (simplify_cond_expr): Call truthvalue_conversion
10667169689Skan	before invert_truthvalue.
10668169689Skan
10669169689Skan2003-06-02  Daniel Berlin  <dberlin@dberlin.org>
10670169689Skan
10671169689Skan	* tree-dfa.c (compute_may_aliases): Call delete_alias_vars whenever we
10672169689Skan	call create_alias_vars.
10673169689Skan
10674169689Skan	* tree-alias-common (ptr_may_alias_var): Cleanup determination of
10675169689Skan	global vars and whatnot.
10676169689Skan
10677169689Skan2003-06-02  Diego Novillo  <dnovillo@redhat.com>
10678169689Skan
10679169689Skan	* Makefile.in (tree-ssa.o, tree-cfg.o): Add dependency on cfgloop.h
10680169689Skan	(tree-optimize.o): Remove dependency on cfgloop.h.
10681169689Skan	* basic-block.h (struct basic_block_def): Fix documentation for
10682169689Skan	field 'loop_father'.
10683169689Skan	* tree-dfa.c (add_referenced_var): Fix type of element
10684169689Skan	pushed into aliased_objects_alias_set.
10685169689Skan	* tree-optimize.c: Don't include cfgloop.h
10686169689Skan	(optimize_function_tree): Move code to initialize loop optimizer...
10687169689Skan	* tree-cfg.c (build_tree_cfg): ... here.
10688169689Skan	* tree-ssa.c: Include cfgloop.h.
10689169689Skan	(loops): New file local variable.
10690169689Skan	(rewrite_into_ssa): Initialize/finalize loop optimizer.
10691169689Skan	(rewrite_stmt): Call var_is_live when processing redundant
10692169689Skan	assignments to the same LHS.
10693169689Skan	(var_is_live): Add heuristic to discover overlapping definitions in
10694169689Skan	loops that do not have PHI nodes for VAR at the loop header.
10695169689Skan
10696169689Skan2003-06-02  Jason Merrill  <jason@redhat.com>
10697169689Skan
10698169689Skan	* gimplify.c (simplify_expr): Only allow a cast from a 'val'.
10699169689Skan	* tree-simple.c (is_simple_cast): Likewise.
10700169689Skan
10701169689Skan2003-06-02  Andrew MacLeod  <amacleod@redhat.com>
10702169689Skan
10703169689Skan	* tree-cfg.c (bsi_insert_before): Update end of block pointer if we
10704169689Skan	inserted before the last stmt in a block. (The container changed).
10705169689Skan	* tree-ssa.c (elim_backward): Inserting copy should be within
10706169689Skan	conditional check.
10707169689Skan	(elim_create): Only select one bit instead of the all.
10708169689Skan
10709169689Skan2003-06-01  Jason Merrill  <jason@redhat.com>
10710169689Skan
10711169689Skan	* Makefile.in: Remove lots of -Wno-error targets.
10712169689Skan
10713169689Skan	* tree-simple.c (recalculate_side_effects): Check TREE_THIS_VOLATILE.
10714169689Skan
10715169689Skan	* gimplify.c (simplify_compound_lval): Call
10716169689Skan	recalculate_side_effects on each of the subexpressions.
10717169689Skan
10718169689Skan	* expr.c (expand_expr) <COND_EXPR>: Use the if-statement code if
10719169689Skan	it's void.
10720169689Skan
10721169689Skan2003-06-01  Daniel Berlin  <dberlin@dberlin.org>
10722169689Skan
10723169689Skan	* tree-alias-common.c: Remove setting of DECL_CONTEXT in temp vars,
10724169689Skan	it's done in create_tmp_alias_var for us.
10725169689Skan	(ptr_may_alias_var): Check if the variables are memory tags, and get
10726169689Skan	the associated pointers if they are.
10727169689Skan
10728169689Skan2003-05-30  Frank Ch. Eigler  <fche@redhat.com>
10729169689Skan
10730169689Skan	* tree-mudflap.c (mudflap_c_function, enqueue_constant, enqueue_decl):
10731169689Skan	Rework dumping logic.
10732169689Skan
10733169689Skan2003-05-27  Jason Merrill  <jason@redhat.com>
10734169689Skan
10735169689Skan	* tree-ssa.c (avail_expr_hash): Simplify by using iterative_hash_expr
10736169689Skan	in more places.
10737169689Skan	* tree.c (iterative_hash_expr): Handle SSA_NAME.
10738169689Skan
10739169689Skan2003-05-29  Jeff Law  <law@redhat.com>
10740169689Skan
10741169689Skan	* tree-ssa.c (rewrite_stmt): Detect and remove redundant
10742169689Skan	memory loads.
10743169689Skan	(avail_expr_hash): Use iterative_hash_expr, not iterative_hash_object
10744169689Skan	as needed.
10745169689Skan
10746169689Skan2003-05-27  Jason Merrill  <jason@redhat.com>
10747169689Skan
10748169689Skan	* gimplify.c (shortcut_cond_expr): Avoid jumps to jumps.
10749169689Skan
10750169689Skan2003-05-26  Jason Merrill  <jason@redhat.com>
10751169689Skan
10752169689Skan	* c-simplify.c (simplify_switch_stmt): A SWITCH_EXPR also gets the
10753169689Skan	source location of its first line.
10754169689Skan
10755169689Skan2003-05-24  Diego Novillo  <dnovillo@redhat.com>
10756169689Skan
10757169689Skan	Do not consider INDIRECT_REF nodes to be variables.
10758169689Skan
10759169689Skan	* gimplify.c (create_tmp_alias_var): Allow temporaries of
10760169689Skan	ARRAY_TYPE to be created.
10761169689Skan	Create new temporaries with function scope.
10762169689Skan	Don't call build_type_variant.
10763169689Skan	Mark the temporary volatile if its type is volatile.
10764169689Skan
10765169689Skan	* tree-dfa.c: Change every function that received a variable and
10766169689Skan	its base symbol to just receive the variable.  Update all callers.
10767169689Skan	(struct alias_set_d): Remove field 'tag_sym'.
10768169689Skan	Add documentation for fields.
10769169689Skan	(struct walk_state): Add field 'is_indirect_ref'.
10770169689Skan	Add documentation for fields.
10771169689Skan	(opf_ignore_bp): Remove.  Update all users.
10772169689Skan	(aliased_objects_base): Remove.  Update all users.
10773169689Skan	(get_stmt_operands): If the statement had virtual operands, do not
10774169689Skan	scan them again.
10775169689Skan	(get_expr_operands): Handle INDIRECT_REF nodes by adding an operand
10776169689Skan	for the memory tag represented and a use for the base pointer.
10777169689Skan	Don't add VUSE operands for pointer arguments to functions.
10778169689Skan	Force a virtual operand when processing ADDR_EXPR nodes.
10779169689Skan	(add_stmt_operand): If the variable is an alias tag, always add it
10780169689Skan	as a virtual operand.
10781169689Skan	Remove code to handle INDIRECT_REF nodes.
10782169689Skan	Move code to determine if a pointer may point to global memory to
10783169689Skan	find_vars_r.
10784169689Skan	Set has_volatile_ops flag in the statement when adding operands for
10785169689Skan	globals and local statics.
10786169689Skan	If the variable is an alias tag, mark the statement as making
10787169689Skan	aliased loads or stores.
10788169689Skan	(set_def): Mark the variable as having real references.
10789169689Skan	(add_use): Likewise.
10790169689Skan	(add_vdef): Remove code to re-add previous virtual operands.
10791169689Skan	If PREV_VOPS is set, don't add a new virtual operand.
10792169689Skan	(add_vuse): Likewise.
10793169689Skan	(dump_variable): Show annotation bitfields 'mem_tag',
10794169689Skan	'occurs_in_abnormal_phi', 'is_alias_tag' and 'is_stored'.
10795169689Skan	(compute_may_aliases): Initialize walk_state.is_indirect_ref to 0.
10796169689Skan	(compute_alias_sets): Don't remove alias sets with exactly one
10797169689Skan	entry.
10798169689Skan	(register_alias_set): Re-implement to support memory tags instead
10799169689Skan	of INDIRECT_REF nodes.  Document algorithm.
10800169689Skan	(find_alias_for): Likewise.
10801169689Skan	(may_alias_p): Likewise.
10802169689Skan	(add_may_alias): Likewise.
10803169689Skan	(find_vars_r): If a pointer assignment is found and the RHS of the
10804169689Skan	assignment may access global memory, mark the pointer as pointing
10805169689Skan	to global memory.
10806169689Skan	Handle INDIRECT_REF nodes by marking the base pointer as
10807169689Skan	dereferenced.
10808169689Skan	Do not share INDIRECT_REF nodes.
10809169689Skan	(add_referenced_var): Don't handle INDIRECT_REF nodes.
10810169689Skan	If called from a store operation, mark the variable as stored.
10811169689Skan	By default mark the variable as not having real references.
10812169689Skan	When processing a pointer that has been dereferenced, create a
10813169689Skan	memory tag for the pointer.
10814169689Skan	(add_indirect_ref_var): Remove.  Update all callers.
10815169689Skan	(get_virtual_var): Don't handle INDIRECT_REF nodes.
10816169689Skan	(find_hidden_use_vars_r):
10817169689Skan
10818169689Skan	* tree-flow-inline.h (get_var_ann): New function.  Change all
10819169689Skan	functions that called var_ann and create_var_ann to call
10820169689Skan	get_var_ann.
10821169689Skan	(get_stmt_ann): Likewise.
10822169689Skan	(set_indirect_ref): Remove.  Update all callers.
10823169689Skan	(indirect_ref): Remove.  Update all callers.
10824169689Skan	(create_indirect_ref): Remove.  Update all callers.
10825169689Skan
10826169689Skan	* tree-flow.h (struct var_ann_d): Remove fields 'is_loaded',
10827169689Skan	'unused' and 'indirect_ref'.
10828169689Skan	Add fields 'mem_tag', 'is_mem_tag', 'is_alias_tag' and
10829169689Skan	'has_real_refs'.
10830169689Skan	(get_var_ann, get_stmt_ann): Declare.
10831169689Skan	(create_indirect_ref, set_indirect_ref, indirect_ref): Remove.
10832169689Skan
10833169689Skan	* tree-pretty-print.c (dump_generic_node): Don't handle
10834169689Skan	INDIRECT_REF nodes inside SSA_NAME nodes.
10835169689Skan
10836169689Skan	* tree-simple.c (get_base_symbol): Don't handle INDIRECT_REF nodes.
10837169689Skan	(is_simple_unary_expr): Don't call STRIP_NOPS.
10838169689Skan
10839169689Skan	* tree-ssa-copyprop.c (get_original): Don't handle INDIRECT_REF
10840169689Skan	nodes.  Allow pointers to be copy propagated.
10841169689Skan
10842169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Don't handle
10843169689Skan	INDIRECT_REF nodes.
10844169689Skan
10845169689Skan	* tree-ssa-live.c (create_ssa_var_map): Only process variables that
10846169689Skan	have real references.
10847169689Skan
10848169689Skan	* tree-ssa.c: Update documentation regarding INDIRECT_REF nodes.
10849169689Skan	(update_indirect_ref_vuses): Remove.  Update all users.
10850169689Skan	(update_pointer_vuses): Remove.  Update all users.
10851169689Skan	(MAY_COPYPROP_P): Remove.  Update all users.
10852169689Skan	(create_temp): Don't handle INDIRECT_REF nodes.
10853169689Skan	(coalesce_ssa_name): Ignore variables that have no real references.
10854169689Skan	(rewrite_stmt): Mark the statement modified if a new copy or
10855169689Skan	constant was propagated into it.
10856169689Skan	Don't special-case pointers.
10857169689Skan	(rewrite_operand): Don't handle INDIRECT_REF nodes.
10858169689Skan	* tree.h (SSA_VAR_P): Remove.  Update all users.
10859169689Skan	(SSA_DECL_P): Rename to SSA_VAR_P.
10860169689Skan
10861169689Skan2003-05-22  Jeff Law  <law@redhat.com>
10862169689Skan
10863169689Skan	* gimplify.c (simplify_expr): Avoid gimplifying expressions which
10864169689Skan	are already in gimple form.
10865169689Skan	* tree-simple.c (is_simple_constructor): No longer treat TREE_STATIC
10866169689Skan	constructors specially.
10867169689Skan	(is_simple_addr_expr_arg): If we're taking the address of a label
10868169689Skan	for the first time, then the ADDR_EXPR is not in gimple form.
10869169689Skan
10870169689Skan2003-05-22  Jason Merrill  <jason@redhat.com>
10871169689Skan
10872169689Skan	* tree-cfg.c (compute_reachable_eh): Don't skip cleanups.
10873169689Skan
10874169689Skan	* tree-dfa.c (add_referenced_var): Read-only INDIRECT_REFs can
10875169689Skan	also be clobbered by function calls.
10876169689Skan
10877169689Skan2003-05-22  Jeff Law  <law@redhat.com>
10878169689Skan
10879169689Skan	* expr.c (convert_move): Avoid making silly copies.
10880169689Skan	(expand_expr, case BIND_EXPR): Correctly determine when the
10881169689Skan	result of the BIND_EXPR will not be used.
10882169689Skan
10883169689Skan2003-05-21  Jason Merrill  <jason@redhat.com>
10884169689Skan
10885169689Skan	* tree-cfg.c (compute_reachable_eh): Handle multiple CATCH_EXPRs.
10886169689Skan
10887169689Skan	* builtins.c (simplify_builtin_next_arg): Split out from...
10888169689Skan	(expand_builtin_next_arg): ...here.
10889169689Skan	(simplify_builtin_va_start): Split out from...
10890169689Skan	(expand_builtin_va_start): ...here.
10891169689Skan	(simplify_builtin): Call it.
10892169689Skan	* gimplify.c (simplify_call_expr): If simplify_builtin worked,
10893169689Skan	just return.
10894169689Skan
10895169689Skan2003-05-20  Jason Merrill  <jason@redhat.com>
10896169689Skan
10897169689Skan	* gimplify.c (shortcut_cond_expr, shortcut_cond_r): Rewrite.
10898169689Skan	(simplify_cond_expr): Also invert ifs with no 'then'.
10899169689Skan	(build_and_jump): New fn, split out from...
10900169689Skan	(gimplify_exit_expr): ...here.  Don't bother gimplifying the
10901169689Skan	condition.
10902169689Skan
10903169689Skan	* gimplify.c (simplify_save_expr): Add post-effects to the
10904169689Skan	postqueue.
10905169689Skan
10906169689Skan	* gimplify.c (mostly_copy_tree_r): Don't unshare constants.
10907169689Skan
10908169689Skan2003-05-20  Jeff Law  <law@redhat.com>
10909169689Skan
10910169689Skan	* expr.c (expand_expr, case COND_EXPR): Avoid useless RTL generation
10911169689Skan	when the THEN or ELSE arm is empty.
10912169689Skan
10913169689Skan	* tree-cfg.c (make_loop_expr_blocks): Do not accept next_block_link
10914169689Skan	as an argument, make it a local variable.  Callers changed.
10915169689Skan
10916169689Skan	* tree-cfg.c (remove_useless_stmts_and_empty_vars): Eliminate
10917169689Skan	GOTO_EXPRs which jump to the next statement occuring in an
10918169689Skan	outer control/block structure nest.
10919169689Skan
10920169689Skan2003-05-20  Diego Novillo  <dnovillo@redhat.com>
10921169689Skan
10922169689Skan	* tree-ssa-ccp.c (set_rhs): Fix typo in handling of
10923169689Skan	RETURN_EXPR nodes.
10924169689Skan
10925169689Skan2003-05-19  Daniel Berlin  <dberlin@dberlin.org>
10926169689Skan
10927169689Skan	* tree-alias-common.c (alias_get_name): Handle unnamed variables once
10928169689Skan	and for all.
10929169689Skan
10930169689Skan2003-05-19  Jeff Law <law@redhat.com>
10931169689Skan
10932169689Skan	* tree-ssa-dce.c (remove_conditional): If the conditional's block
10933169689Skan	has no post dominator in the CFG, then wire it to the exit node.
10934169689Skan	Avoid unnecessary check of bb->succ.
10935169689Skan
10936169689Skan2003-05-17  Daniel Berlin  <dberlin@dberlin.org>
10937169689Skan
10938169689Skan	* tree-pretty-print.c (MASK_POINTER): Parameter is P, not node.
10939169689Skan
10940169689Skan2003-05-17  Daniel Berlin  <dberlin@dberlin.org>
10941169689Skan
10942169689Skan	* tree-alias-common.c (get_alias_var): Handle REFERENCE_EXPR.
10943169689Skan	(find_func_aliases): Ditto.
10944169689Skan	(get_alias_var): Use POINTER_TYPE_P.
10945169689Skan
10946169689Skan2003-05-16  Frank Ch. Eigler  <fche@redhat.com>
10947169689Skan
10948169689Skan	* gcc.c (cc1_options): Correct "-fmudflapth" handling.
10949169689Skan	* tree-mudflap.c (mudflap_c_function, mf_build_check_statement_for):
10950169689Skan	Use locally cached mask/shift values only in single-threaded mode.
10951169689Skan
10952169689Skan2003-05-16  Daniel Berlin  <dberlin@dberlin.org>
10953169689Skan
10954169689Skan	* tree-alias-common.c (ptr_may_alias_var): Fix DECL_CONTEXT
10955169689Skan	checking.
10956169689Skan
10957169689Skan2003-05-16  Andrew MacLeod  <amacleod@redhat.com>
10958169689Skan
10959169689Skan	* tree-flow.h (ssa_make_edge): Remove prototype.
10960169689Skan	* tree-ssa-dce.c (remove_dead_stmt): Change comment about removing
10961169689Skan	conditionals.
10962169689Skan	(remove_conditional): Don't update PHI nodes or call ssa_make_edge.
10963169689Skan	* tree-ssa.c (ssa_make_edge): Remove.
10964169689Skan
10965169689Skan2003-05-16  Jeff Law  <law@redhat.com>
10966169689Skan
10967169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Handle case where
10968169689Skan	both arms of an if-then-else simply jump to the same location.
10969169689Skan
10970169689Skan	* tree-ssa-ccp.c (get_rhs): Correctly handle MODIFY_EXPR embedded in
10971169689Skan	a RETURN_EXPR.
10972169689Skan	(set_rhs): Likewise.
10973169689Skan
10974169689Skan2003-05-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
10975169689Skan
10976169689Skan	* Makefile.in (regmove.o-warn): Change to -Wno-error.
10977169689Skan
10978169689Skan2003-05-15  Andrew MacLeod  <amacleod@redhat.com>
10979169689Skan
10980169689Skan	* tree-cfg.c (enum find_location_action): Enum for find_insert_location.
10981169689Skan	(bsi_insert_before): Handle insert at start of a BB and update pointers
10982169689Skan	from parents if appropriate.
10983169689Skan	(find_insert_location): Handle COND_EXPR properly. Return
10984169689Skan	an enum type indicating what action to take on the returned value.
10985169689Skan	(bsi_commit_first_edge_insert): Use new returned action.
10986169689Skan
10987169689Skan2003-05-15  Jeff Law  <law@redhat.com>
10988169689Skan
10989169689Skan	* tree-cfg.c (make_edges): Factor out loop invariants from
10990169689Skan	code to insert edges from the TRY to the FINALLY block.
10991169689Skan	Avoid creating unnecessary edges from the end of the
10992169689Skan	FINALLY block back to the start of the FINALLY block.
10993169689Skan
10994169689Skan2003-05-15  Diego Novillo  <dnovillo@redhat.com>
10995169689Skan
10996169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Undo previous patch.
10997169689Skan
10998169689Skan2003-05-15  Diego Novillo  <dnovillo@redhat.com>
10999169689Skan
11000169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Don't dump the optimized
11001169689Skan	function after the SSA->normal pass.
11002169689Skan
11003169689Skan2003-05-14  Toon Moene  <toon@moene.indiv.nluug.nl>
11004169689Skan
11005169689Skan	* Makefile.in: Add additional -Wno-error targets for Alpha.
11006169689Skan
11007169689Skan2003-05-13  Jason Merrill  <jason@redhat.com>
11008169689Skan
11009169689Skan	* gdbinit.in (pgs, pge): New macros.
11010169689Skan
11011169689Skan	Implement expression temporary optimization.
11012169689Skan	* gimplify.c (gimplify_ctx): Add temp_htab field.
11013169689Skan	(push_gimplify_context): Initialize it.
11014169689Skan	(pop_gimplify_context): Destroy it.
11015169689Skan	(simplify_expr): If there's no internal postqueue, generate an
11016169689Skan	expression temporary.
11017169689Skan	(gimple_tree_hash, gimple_tree_eq): New fns.
11018169689Skan	(create_tmp_from_val, lookup_tmp_var): New fns.
11019169689Skan	(get_formal_tmp_var): New fn.
11020169689Skan	(internal_get_tmp_var): New fn.
11021169689Skan	(get_initialized_tmp_var): Use it.
11022169689Skan	* tree-simple.h: Declare it.
11023169689Skan
11024169689Skan	* gimplify.c (simplify_cond_expr): Reorganize.
11025169689Skan	(shortcut_cond_expr, shortcut_cond_r): New fns.
11026169689Skan	(build_and_jump): New fn.
11027169689Skan	(gimplify_exit_expr): Use it.
11028169689Skan
11029169689Skan	* gimplify.c (simplify_expr): Do better at stripping unnecessary
11030169689Skan	NOPs.  Tidy GOTO_EXPR handling.  Don't allow NON_LVALUE_EXPR.
11031169689Skan	* tree-simple.c (is_simple_modify_expr): Don't allow NON_LVALUE_EXPR.
11032169689Skan	(is_simple_binary_expr, is_simple_condexpr): Likewise.
11033169689Skan	(is_simple_unary_expr, is_simple_compound_lval): Likewise.
11034169689Skan	(is_simple_id): Likewise.
11035169689Skan
11036169689Skan	* tree-ssa.c (rewrite_stmt): Discard redundant assignments.
11037169689Skan	(avail_expr_eq): Don't test ops1 == ops2.
11038169689Skan	(avail_expr_hash): Use iterative_hash_object.
11039169689Skan
11040169689Skan2003-05-13  Jeff Law  <law@redhat.com>
11041169689Skan
11042169689Skan	* tree-cfg.c (cleanup_tree_cfg): Update comments.   Set repeat
11043169689Skan	anytime we remove a control structure.
11044169689Skan
11045169689Skan	* tree-flow.h (struct var_ann_d): New field occurs_in_abnormal_phi.
11046169689Skan	* tree-ssa.c (MAY_COPYPROP_P): Do not allow copy propagations
11047169689Skan	if either argument occurs in an abnormal phi.
11048169689Skan	* tree-dfa.c (add_phi_arg): Set occurs_in_abrnomal_phi as needed.
11049169689Skan	* tree-ssa-copyprop.c (copyprop_stmt): Do not allow copy
11050169689Skan	propagations if either argument occurs in an abnormal phi.
11051169689Skan	(copyprop_phi): Likewise.
11052169689Skan
11053169689Skan2003-05-12  Diego Novillo  <dnovillo@redhat.com>
11054169689Skan
11055169689Skan	* c-common.h (STATEMENT_CODE_P): Use size_t cast instead
11056169689Skan	of int.
11057169689Skan	(INIT_STATEMENT_CODES): Change type of local variable i to
11058169689Skan	size_t.
11059169689Skan
11060169689Skan2003-05-12  Diego Novillo  <dnovillo@redhat.com>
11061169689Skan
11062169689Skan	* c-pretty-print.c (dump_c_node): Call CONSTRUCTOR_ELTS
11063169689Skan	to access the operand of a CONSTRUCTOR node.
11064169689Skan	* tree-pretty-print.c (dump_generic_node): Likewise.
11065169689Skan
11066169689Skan2003-05-11  Diego Novillo  <dnovillo@redhat.com>
11067169689Skan
11068169689Skan	* c-simplify.c (simplify_if_stmt): Replace calls to
11069169689Skan	warning_with_file_and_line with warning.
11070169689Skan
11071169689Skan2003-05-12  Frank Ch. Eigler  <fche@redhat.com>
11072169689Skan
11073169689Skan	* toplev.c (lang_independent_options): Add "-fmudflapth".
11074169689Skan	* flags.h (flag_mudflap): Document meaning of >1 value.
11075169689Skan	* gcc.c (MFWRAP_SPEC, MFLIB_SPEC): Add -fmudflapth support.
11076169689Skan	(cpp_unique_options, cc1_options): Ditto.
11077169689Skan
11078169689Skan2003-05-10  Sebastian Pop  <s.pop@laposte.net>
11079169689Skan
11080169689Skan	* gimplify.c (simplify_expr): Replace CONST_DECL with its DECL_INITIAL.
11081169689Skan
11082169689Skan2003-05-09  Sebastian Pop  <s.pop@laposte.net>
11083169689Skan
11084169689Skan	* tree-optimize.c (optimize_function_tree): Clarify the use of the
11085169689Skan	loop analyzer.
11086169689Skan
11087169689Skan2003-05-09  Jeff Law  <law@redhat.com>
11088169689Skan
11089169689Skan	* c-simplify.c (simplify_cleanup): Remove code which optimizes
11090169689Skan	TRY_FINALLY and TRY_CATCH.  It doesn't trigger.
11091169689Skan
11092169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Optimize away
11093169689Skan	TRY_CATCH and TRY_FINALLY blocks when possible.
11094169689Skan
11095169689Skan2003-05-09  Diego Novillo  <dnovillo@redhat.com>
11096169689Skan
11097169689Skan	* tree-pretty-print.c (dump_generic_node): CONSTRUCTOR
11098169689Skan	nodes have only one operand now.
11099169689Skan
11100169689Skan2003-05-08  Andrew MacLeod  <amacleod@redhat.com>
11101169689Skan
11102169689Skan	* tree-cfg.c (pdom_info): New file level static.
11103169689Skan	(cleanup_tree_cfg): Free dominance info, if it was used.
11104169689Skan	(bsi_replace): New. Replace a stmt with a new one.
11105169689Skan	(linearize_cond_expr): Use post dominator info to determine is a
11106169689Skan	conditional can be safely removed.
11107169689Skan	(find_insert_location): New. Determine where to insert a new stmt that
11108169689Skan	is placed on a split edge.
11109169689Skan	(bsi_commit_first_edge_insert): Use find_insert_location to determine
11110169689Skan	where to link a stmt when splitting an edge.
11111169689Skan	(merge_tree_blocks): When deleting a basic block, remove it from the
11112169689Skan	dominance structure if it exists.
11113169689Skan	* tree-dfa.c (add_stmt_operand): Don't rename local statics. Treat
11114169689Skan	them just like globals.
11115169689Skan	* tree-flow.h (struct var_ann_d): Add root_var_processed bit and
11116169689Skan	root_index fields.
11117169689Skan	* tree-ssa-dce.c (process_worklist): Mark conditions feeding PHI's as
11118169689Skan	necessary as well.
11119169689Skan	(remove_dead_phis): Add missing debug information.
11120169689Skan	* tree-ssa-live.c (var_union): Handle combining partitions when one
11121169689Skan	has a root_variable as a representative.
11122169689Skan	(compact_var_map): Add comments and use flags.
11123169689Skan	(init_root_var): Use new root_var fields in struct var_ann_d.
11124169689Skan	(dump_root_var): Send output to specified file, not stderr.
11125169689Skan	(dump_var_map): Remove dump_flag parameter & some grotesque debug info.
11126169689Skan	* tree-ssa-live.h (VAR_ANN_ROOT_INDEX): Define.
11127169689Skan	(VARMAP_NORMAL, VARMAP_NO_SINGLE_DEFS): Define flags for compact_var_map.
11128169689Skan	(var_to_partition_to_var): Return NULL if not in a partition.
11129169689Skan	(find_root_var): Use VAR_ANN_ROOT_INDEX.
11130169689Skan	* tree-ssa.c (insert_copy_on_edge): Add listing info.
11131169689Skan	(coalesce_ssa_name): Coalesce live-on-entry variables to their root.
11132169689Skan	Coalesce partitions across abnormal edges.
11133169689Skan	(assign_vars): Remove redundant initialization code. Handle root_vars
11134169689Skan	which have already been coalesced to a partition.
11135169689Skan	(rewrite_out_of_ssa): Add debug info & remove PHI nodes when processed.
11136169689Skan	(rewrite_stmt): Don't redefine redundant expressions.
11137169689Skan
11138169689Skan2003-05-08  Jeff Law  <law@redhat.com>
11139169689Skan
11140169689Skan	* c-simplify.c (simplify_expr_stmt): Make sure to
11141169689Skan	simplify the body of the EXPR_STMT.
11142169689Skan
11143169689Skan	* tree-dfa.c (remove_decl): Accept new argument for the block
11144169689Skan	to start the search.
11145169689Skan	* tree-flow.h (remove_decl): Update prototype.
11146169689Skan	* tree-cfg.c (remove_stmt): Pass the toplevel block to
11147169689Skan	remove_decl.
11148169689Skan
11149169689Skan	* tree-dfa.c (find_hidden_use_vars): No longer returns a value.
11150169689Skan	Callers and prototype updated.  No longer need to look for
11151169689Skan	nested functions, instead just mark any variables and
11152169689Skan	parameters with DECL_NONLOCAL set as having hidden uses.
11153169689Skan
11154169689Skan2003-05-08  Diego Novillo  <dnovillo@redhat.com>
11155169689Skan
11156169689Skan	* version.c (version_string): Change format to show daily
11157169689Skan	datestamp and merged date.
11158169689Skan
11159169689Skan2003-05-07  Jeff Law  <law@redhat.com>
11160169689Skan
11161169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Do not remove
11162169689Skan	the toplevel BIND_EXPR for an inlined function.
11163169689Skan
11164169689Skan	* tree-dfa.c (find_hidden_use_vars): Look at the size of
11165169689Skan	VAR_DECLs, not the size of ARRAY_TYPES.  Also make sure
11166169689Skan	to reset *inside_vla to its original value when done
11167169689Skan	processing any particular VAR_DECL.
11168169689Skan
11169169689Skan2003-05-06  Diego Novillo  <dnovillo@redhat.com>
11170169689Skan
11171169689Skan	* c-simplify.c (simplify_if_stmt): Warn if
11172169689Skan	-Wunreachable-code is given and the conditional is always
11173169689Skan	true or always false.
11174169689Skan
11175169689Skan	* expr.c (expand_expr): Don't try to expand FUNCTION_DECL
11176169689Skan	nodes when processing BIND_EXPR_VARS.
11177169689Skan
11178169689Skan	* varasm.c (output_constant_def_contents): Re-use the
11179169689Skan	label when emitting a label for mudflap.
11180169689Skan
11181169689Skan	Disable the following patch:
11182169689Skan
11183169689Skan	2003-04-30  Steven Bosscher  <steven@gcc.gnu.org>
11184169689Skan
11185169689Skan		* ggc-page.c (TREE_EXP_SIZE): Define.
11186169689Skan		(extra_order_size_table): New entry for expr trees with
11187169689Skan		two operands.
11188169689Skan
11189169689Skan2003-05-06  Jeff Law  <law@redhat.com>
11190169689Skan
11191169689Skan	* tree-cfg.c (make_exit_edges): Fix handling of blocks which
11192169689Skan	end with calls.
11193169689Skan
11194169689Skan	* tree-cfg.c (remove_useless_stmts_and_vars): Remove GOTO_EXPRs
11195169689Skan	to the immediately following tree node.
11196169689Skan
11197169689Skan	* tree-cfg.c (make_goto_expr_edges): Fix typo in comment.
11198169689Skan	(remove_useless_stmts_and_vars): New function.
11199169689Skan	* tree-flow.h (remove_useless_stmts_and_vars): Prototype.
11200169689Skan	* tree-ssa.c (rewrite_out_of_ssa): After returning to normal
11201169689Skan	form, call remove_useless_stmts_and_vars.
11202169689Skan
11203169689Skan2003-05-02  Daniel Berlin  <dberlin@dberlin.org>
11204169689Skan
11205169689Skan	* tree-alias-common.c (alias_get_name): Given unnamed result decls
11206169689Skan	a name.
11207169689Skan	(create_fun_alias_var): Use DECL_RESULT if available.
11208169689Skan
11209169689Skan2003-05-02  Jeff Law  <law@redhat.com>
11210169689Skan
11211169689Skan	* tree-inline.c (expand_call_inline): Avoid creating naked
11212169689Skan	_DECL nodes for inlined functions which had NRV optimizations
11213169689Skan	applied.
11214169689Skan
11215169689Skan2003-05-02  Diego Novillo  <dnovillo@redhat.com>
11216169689Skan
11217169689Skan	* tree-cfg.c (build_tree_cfg): Update comment.
11218169689Skan	(make_blocks): Don't skip over empty statements.
11219169689Skan	Move exception handling code ...
11220169689Skan	(compute_reachable_eh): ... here.
11221169689Skan	(set_parent_stmt): Don't skip over empty statements.
11222169689Skan	(bsi_remove): Don't return early on empty statements.
11223169689Skan	Don't call STRIP_NOPS.
11224169689Skan	(remove_stmt): Don't call STRIP_NOPS.
11225169689Skan	Always compute the block holding the statement.
11226169689Skan	After replacing the statement with an empty statement, add the
11227169689Skan	empty statement to the block.
11228169689Skan	(successor_block): Don't call STRIP_NOPS.
11229169689Skan	(first_exec_stmt): Likewise.
11230169689Skan	(first_exec_block): Don't return early for empty statements.
11231169689Skan	(first_stmt): Don't test for NULL blocks.
11232169689Skan	Reformat to improve legibility.
11233169689Skan	(bsi_next_in_bb): Don't call STRIP_NOPS.
11234169689Skan	Reformat to improve legibility.
11235169689Skan	(set_bb_for_stmt): Don't ignore empty statements.
11236169689Skan
11237169689Skan	* tree-dfa.c (get_stmt_operands): Don't call STRIP_NOPS.
11238169689Skan	(create_stmt_ann): Don't abort on emtpy statements.
11239169689Skan	Don't call STRIP_NOPS.
11240169689Skan	(copy_stmt): Remove unused function.
11241169689Skan	* tree-flow.h (copy_stmt): Remove prototype.
11242169689Skan
11243169689Skan	* tree-flow-inline.h: Don't call STRIP_NOPS.
11244169689Skan	Remove local variable 't'.
11245169689Skan	(bsi_stmt): Don't return NULL_TREE for empty statements.
11246169689Skan	Ignore error_mark_node.
11247169689Skan
11248169689Skan	* tree-iterator.h (tsi_next): Don't call STRIP_NOPS.
11249169689Skan	(tsi_stmt_ptr): Likewise.
11250169689Skan	(tsi_stmt): Likewise.
11251169689Skan	Don't return NULL_TREE for empty statements.
11252169689Skan
11253169689Skan	* tree-pretty-print.c (dump_generic_node): Don't ignore empty
11254169689Skan	statements.
11255169689Skan
11256169689Skan	* tree-ssa-ccp.c (fold_stmt): Don't call STRIP_NOPS.
11257169689Skan	* tree-ssa-dce.c (find_useful_stmts): Likewise.
11258169689Skan	(remove_dead_stmt): Likewise.
11259169689Skan	* tree-ssa.c (mark_def_sites): Likewise.
11260169689Skan	(rewrite_out_of_ssa): Likewise.
11261169689Skan	(rewrite_stmt): Likewise.
11262169689Skan
11263169689Skan	* tree.c (make_ssa_name): Don't ignore empty statements.
11264169689Skan	(body_is_empty): Fix comment.
11265169689Skan
11266169689Skan2003-05-01  Jeff Law  <law@redhat.com>
11267169689Skan
11268169689Skan	* tree-dfa.c (find_hidden_use_vars): Renamed from find_vla_decls.
11269169689Skan	Now returns a value indicating if nested function was found.
11270169689Skan	When nested functions are found, mark suitable variables as
11271169689Skan	having hidden uses.
11272169689Skan	(find_hidden_use_vars_r): Renamed from find_vla_decls_r.
11273169689Skan	(compute_may_alias): Corresponding changes.  Handle
11274169689Skan	multiple BLOCKs at the toplevel of a function.
11275169689Skan
11276169689Skan2003-04-30  Diego Novillo  <dnovillo@redhat.com>
11277169689Skan
11278169689Skan	* tree.c (build_empty_stmt): New function.
11279169689Skan	* tree.h (IS_EMPTY_STMT): Define.
11280169689Skan	(TI_EMPTY_STMT): Remove.
11281169689Skan	(empty_stmt_node): Remove.
11282169689Skan	Replace 'X = empty_stmt_node' with 'X = build_empty_stmt ()',
11283169689Skan	and 'X == empty_stmt_node' with 'IS_EMPTY_STMT (X)' everywhere.
11284169689Skan	(build_empty_stmt): Declare.
11285169689Skan
11286169689Skan	* cp/cp-simplify.c (cp_simplify_stmt): Use IS_EMPTY_STMT.
11287169689Skan
11288169689Skan	* java/java-tree.h (build_java_empty_stmt): Declare.
11289169689Skan	* java/expr.c (build_java_empty_stmt): New function.
11290169689Skan	* java/decl.c (java_init_decl_processing): Don't build empty_stmt_node.
11291169689Skan	Replace 'X = empty_stmt_node' with 'X = build_java_empty_stmt ()',
11292169689Skan	and 'X == empty_stmt_node' with 'IS_EMPTY_STMT (X)' everwhere.
11293169689Skan
11294169689Skan2003-04-30  Jeff Law  <law@redhat.com>
11295169689Skan
11296169689Skan	* tree-dfa.c (get_expr_operands): Do not ignore operands of an
11297169689Skan	an ADDR_EXPR if it is a PARM_DECL or VAR_DECL.
11298169689Skan
11299169689Skan	* tree-dfa.c (get_expr_operands): Look inside operands in
11300169689Skan	a TREE_LIST.
11301169689Skan
11302169689Skan2003-04-29  Diego Novillo  <dnovillo@redhat.com>
11303169689Skan
11304169689Skan	* builtins.def (BUILTIN_CONSTANT_P): Mark as constant.
11305169689Skan
11306169689Skan	* tree-dfa.c (get_expr_operands): Do not add VDEF operands for
11307169689Skan	dereferenced pointers at call sites.
11308169689Skan	* tree-ssa.c (assign_vars): Abort if we couldn't coalesce all the
11309169689Skan	versions together.
11310169689Skan
11311169689Skan2003-04-29  Andrew MacLeod  <amacleod@redhat.com>
11312169689Skan
11313169689Skan	* tree-cfg.c (bsi_start): If there are no stmts in a block, use the
11314169689Skan	context pointer to represent the basic block.
11315169689Skan	(bsi_insert_after): Handle inserting into empty blocks better.
11316169689Skan	(bsi_insert_before): Call bsi_insert_after to handle empty blocks.
11317169689Skan	* tree-ssa.c (elim_create): Clear bitmap after its been processed
11318169689Skan	instead of during loop.
11319169689Skan
11320169689Skan2003-04-27  Diego Novillo  <dnovillo@redhat.com>
11321169689Skan
11322169689Skan	* Makefile.in (tree-mudflap.o): Add dependency on $(TREE_DUMP_H).
11323169689Skan	* c-decl.c (c_expand_body_1): Don't call simplify_function_tree
11324169689Skan	after mudflap_c_function.
11325169689Skan	Move mudflap instrumentation after SSA optimizers.
11326169689Skan	* tree-dump.c (dump_files): Add entry for -fdump-tree-mudflap.
11327169689Skan	* tree.h (enum tree_dump_index): Add TDI_mudflap.
11328169689Skan	* doc/invoke.texi: Document -fdump-tree-mudflap.
11329169689Skan	* tree-mudflap.c: Include tree-dump.h.
11330169689Skan	(dump_file): New local variable.
11331169689Skan	(dump_flags): New local variable.
11332169689Skan	(mudflap_c_function): Call dump_begin, dump_end and dump_function.
11333169689Skan	(mf_decl_cache_locals): Set DECL_CONTEXT for __mf_lookup_shift_l
11334169689Skan	and __mf_lookup_mask_l to current_function_decl.
11335169689Skan	(mf_offset_expr_of_array_ref): Likewise for __mf_index_X.
11336169689Skan	(mf_build_check_statement_for): Re-implement to emit a proper
11337169689Skan	STMT_EXPR.
11338169689Skan	(mx_xfn_indirect_ref): Emit detailed debugging info if
11339169689Skan	-fdump-tree-mudflap-details is given.
11340169689Skan	(mudflap_enqueue_decl): Likewise
11341169689Skan	* tree-optimize.c (optimize_function_tree): Don't check for
11342169689Skan	-fmudflap.
11343169689Skan
11344169689Skan2003-04-26  Diego Novillo  <dnovillo@redhat.com>
11345169689Skan
11346169689Skan	* c-simplify.c (build_bc_goto): If the target label couldn't be
11347169689Skan	found, emit an error message.
11348169689Skan
11349169689Skan2003-04-25  Andrew MacLeod  <amacleod@redhat.com>
11350169689Skan
11351169689Skan	* tree-ssa-live.c (compact_var_map): Add parameter to exclude variables
11352169689Skan	with a single SSA version.
11353169689Skan	(init_root_var): Allow that a var_map might not be compacted yet.
11354169689Skan	* tree-ssa-live.h (compact_var_map): Change Prototype.
11355169689Skan	* tree-ssa.c (rewrite_out_of_ssa): When coalescing, don't include single
11356169689Skan	reference variables during the compaction.
11357169689Skan
11358169689Skan2003-04-25  Jeff Law  <law@redhat.com>
11359169689Skan
11360169689Skan	* tree-optimize.c (optimize_function_tree): Simplify slightly.
11361169689Skan
11362169689Skan2003-04-25  Andrew MacLeod  <amacleod@redhat.com>
11363169689Skan
11364169689Skan	* tree-ssa.c (struct _elim_graph): Change type of fields
11365169689Skan	'pred' and 'succ' to be bitmaps instead of sbitmaps.
11366169689Skan	Update all uses.
11367169689Skan
11368169689Skan2003-04-25  Diego Novillo  <dnovillo@redhat.com>
11369169689Skan
11370169689Skan	* tree-cfg.c (linearize_cond_expr): Reformat.
11371169689Skan	* tree-dfa.c (get_expr_operands): Check for read-only
11372169689Skan	status the dereferenced argument pointer, not the pointer
11373169689Skan	itself.
11374169689Skan	(add_stmt_operand): Always consider global variables as
11375169689Skan	virtual operands.
11376169689Skan
11377169689Skan2003-04-24  Jason Merrill  <jason@redhat.com>
11378169689Skan
11379169689Skan	* gimplify.c (simplify_cond_expr): Avoid redundant gimplification.
11380169689Skan
11381169689Skan	Add TREE_VEC of case labels to the SWITCH_EXPR during gimplification.
11382169689Skan	* tree.def (CASE_LABEL_EXPR): Add an operand for the LABEL_DECL.
11383169689Skan	* tree.h (SWITCH_LABELS, CASE_LABEL): New macros.
11384169689Skan	* c-simplify.c (c_simplify_stmt) <CASE_LABEL>: Create LABEL_DECL here.
11385169689Skan	* expr.c (expand_expr) <CASE_LABEL_EXPR>: Not here.
11386169689Skan	* gimplify.c (gimplify_ctx): Add case_labels field.
11387169689Skan	(gimplify_switch_expr, gimple_add_case_label): New fns.
11388169689Skan	(simplify_expr): Use them.
11389169689Skan
11390169689Skan2003-04-24  Andrew MacLeod  <amacleod@redhat.com>
11391169689Skan
11392169689Skan	* tree-flow.h (processed_out_of_ssa): Rename to out_of_ssa_tag.
11393169689Skan	* tree-ssa-live.c (register_ssa_partition): Add variable to partition.
11394169689Skan	(change_partition_var): Use out_of_ssa_tag.
11395169689Skan	(create_ssa_var_map): Add all uses, defs and PHI elements to partition.
11396169689Skan	(new_tree_live_info): Create a live range info structure.
11397169689Skan	(delete_tree_live_info): Free storage.
11398169689Skan	(live_worklist): Fill in the live range info for a variable for the
11399169689Skan	blocks between the def and all the blocks containing uses.
11400169689Skan	(set_if_valid): Set partition bit if variable is in a partition.
11401169689Skan	(add_livein_if_notdef): Set live on entry bit for a var's partition
11402169689Skan	if a definition has not been seen.
11403169689Skan	(calculate_live_on_entry): Create partition live on entry bitmaps for
11404169689Skan	all basic blocks .
11405169689Skan	(calculate_live_on_exit): Calculate live on exit information for each
11406169689Skan	basic block.
11407169689Skan	(init_root_var): Initialize and fill in a root_var structure.
11408169689Skan	(remove_root_var_partition): remove a partition from a root_var list.
11409169689Skan	(delete_root_var): Free storage.
11410169689Skan	(dump_root_var): Display root_var summary.
11411169689Skan	(dump_var_map): Show extra info for ssa name versions.
11412169689Skan	* tree-ssa-live.h (NO_PARTITION): Define.
11413169689Skan	(register_ssa_partition): Remove.
11414169689Skan	(partition_to_var): Use partition_find after decompressing.
11415169689Skan	(var_to_partition): Return NO_PARTITION if var is not in a partition.
11416169689Skan	(struct tree_live_info_d): Define live range info structure.
11417169689Skan	(partition_is_global): Return 1 if used outside a basic block.
11418169689Skan	(live_entry_blocks): Return bitmap over blocks that partition is live
11419169689Skan	on entry to.
11420169689Skan	(live_on_exit): Return bitmap of partitions live on exit from a block.
11421169689Skan	(struct root_var_d): Define a root_var structure.
11422169689Skan	(ROOT_VAR_NONE): Define.
11423169689Skan	(num_root_vars): Number of variables in root_var object.
11424169689Skan	(root_var): Return variable for a root_var index.
11425169689Skan	(first_root_var_partition): Return first partition for a root_var.
11426169689Skan	(next_root_var_partition): Get next partition for a root_var.
11427169689Skan	(find_root_var): Find root_var index for a specific partition.
11428169689Skan	* tree-ssa.c (eliminate_extraneous_phis): Remove.
11429169689Skan	(set_if_valid): Set partition bit if variable is in a partition.
11430169689Skan	(add_conflicts_if_valid): Add conflict between variable and all
11431169689Skan	related partitions set in a bitvector.
11432169689Skan	(coalesce_ssa_name): Create a conflict graph and coalesce all
11433169689Skan	partitions which don't conflict and are related by the same root_var.
11434169689Skan	(assign_vars): Use a root_var object, and assign different real
11435169689Skan	variables to all partitions.
11436169689Skan	(rewrite_out_of_ssa): Call compact_var_map() once, and don't call
11437169689Skan	eliminate_extraneous_phis.
11438169689Skan
11439169689Skan2003-04-23  Daniel Berlin  <dberlin@dberlin.org>
11440169689Skan
11441169689Skan	* tree-flow.h (create_global_var): Add prototype.
11442169689Skan
11443169689Skan	* tree-dfa.c (create_global_var): Externalize.
11444169689Skan
11445169689Skan	* tree-alias-common.c: Set DECL_CONTEXT on our temp alias vars.
11446169689Skan	(call_may_clobber): Make a copy of this function, since our version
11447169689Skan	will be slightly different soon.
11448169689Skan	(create_alias_vars): We need global_var, so create it if necessary.
11449169689Skan
11450169689Skan2003-04-23  Daniel Berlin  <dberlin@dberlin.org>
11451169689Skan
11452169689Skan	* tree-ssa-pre.c (do_proper_save): Remove old code, since the new
11453169689Skan	insertion code works okay.
11454169689Skan	(pre_expression): Use new_rename_1, it removes a *lot* of useless
11455169689Skan	saves.
11456169689Skan
11457169689Skan2003-04-23  Jeff Law  <law@redhat.com>
11458169689Skan
11459169689Skan	* gimplify.c (simplify_target_expr): Make sure to simplify
11460169689Skan	the cleanup too.
11461169689Skan
11462169689Skan	* tree-ssa.c (struct def_blocks_d): Add new field phi_insertion_points.
11463169689Skan	(compute_global_livein): Accept varray rather than bitmaps.  Callers
11464169689Skan	updated.  Rewrite to compute global life information for all the
11465169689Skan	objects in the varray in parallel.
11466169689Skan	(insert_phis_for_deferred_variables): New function.
11467169689Skan	(insert_phi_nodes_for): New argument DEF_MAPs.  When an object
11468169689Skan	crosses the threshold for using fully pruned PHI insertions,
11469169689Skan	push it on the def_maps varray for deferred processing.
11470169689Skan	(insert_phi_nodes): Initialize def_maps.  Pass it to
11471169689Skan	insert_phi_nodes_for.  Drain the def_maps varray as it grows.
11472169689Skan	Also drain any residual objects in def_maps.  Zero def_maps
11473169689Skan	when complete.
11474169689Skan
11475169689Skan2003-04-21  Jeff Law  <law@redhat.com>
11476169689Skan
11477169689Skan	* tree-cfg.c (find_contained_blocks_and_edge_targets): New function.
11478169689Skan	(try_finallys): New varray used during edge creation.
11479169689Skan	(make_edges): Initialize try_finallys varray.  After creating
11480169689Skan	all the "normal" edges, go back and create the special edges
11481169689Skan	for the try-finally blocks.
11482169689Skan	(make_ctrl_stmt_edges): Create edges for the EH nodes.  Also
11483169689Skan	make sure to build the try-finally stack.
11484169689Skan	(make_exit_edges): Create edges from calls which may throw
11485169689Skan	to any directly reachable exception handlers.
11486169689Skan	(is_ctrl_altering_stmt): Statements which may throw alter
11487169689Skan	flow control.
11488169689Skan
11489169689Skan	* tree-cfg.c: Include except.h.
11490169689Skan	(eh_stack): New file-scoped varray.
11491169689Skan	(build_tree_cfg): Initialize eh_stack.
11492169689Skan	(make_catch_expr_blocks): New function.
11493169689Skan	(make_try_expr_blocks, make_eh_filter_expr_blocks): Likewise.
11494169689Skan	(make_blocks): Call new functions as needed.  When ending a block
11495169689Skan	due to a statement that may throw, compute the reachable exception
11496169689Skan	handlers and store it in the statement's annotation.
11497169689Skan	(is_ctrl_stmt): Handle EH nodes.
11498169689Skan	(stmt_ends_bb_p): Likewise.
11499169689Skan	* tree-flow.h (stmt_ann_d): Add new field reachable_exception_handlers.
11500169689Skan
11501169689Skan	* except.c (check_handled): No longer static.
11502169689Skan	* except.h (check_handled): Prototype.
11503169689Skan
11504169689Skan	* c-simplify.c (c_build_bind_expr): Revert change from earlier today.
11505169689Skan
11506169689Skan	* c-common.h (find_reachable_label): Prototype.
11507169689Skan	* c-semantics.c (find_reachable_label): No longer static.
11508169689Skan	* c-simplify.c (c_build_bind_expr): Avoid creating unnecessary
11509169689Skan	BIND_EXPRs.
11510169689Skan	(simplify_cleanup): Avoid creating unnecessary TRY_CATCH_EXPRs
11511169689Skan	or TRY_FINALLY_EXPRs.
11512169689Skan	(simplify_if_stmt): If the condition is constant and the
11513169689Skan	unexecuted arm has no reachable code, then just emit
11514169689Skan	the executed arm.
11515169689Skan
11516169689Skan2003-04-18  Sebastian Pop  <s.pop@laposte.net>
11517169689Skan
11518169689Skan	* cfghooks.h, cfghooks.c: New files.
11519169689Skan	* Makefile.in (BASIC_BLOCK_H): Depends on cfghooks.h.
11520169689Skan	(OBJS): Add cfghooks.o.
11521169689Skan	(tree-optimize.o): Depends on cfgloop.h.
11522169689Skan	(cfghooks.o): New rule.
11523169689Skan	* basic-block.h (split_edge): Rename to rtl_split_edge.
11524169689Skan	(tree_split_edge): Declare.
11525169689Skan	(create_bb): Declare extern here.
11526169689Skan	(verify_flow_info): Rename to rtl_verify_flow_info.
11527169689Skan	(tree_verify_flow_info): Declare.
11528169689Skan	(cfghooks.h): Included here.
11529169689Skan	* cfgloop.c (tree.h, tree-flow.h): Included.
11530169689Skan	(make_forwarder_block): Renamed to rtl_make_forwarder_block.
11531169689Skan	(tree_make_forwarder_block): New static function.
11532169689Skan	(blocks_headers): Declared static.
11533169689Skan	(HEADER_BLOCK): Use blocks_headers instead of bb's .aux field.
11534169689Skan	(redirect_edge_with_latch_update, make_forwarder_block,
11535169689Skan	canonicalize_loop_headers): Don't allocate .aux, but makes grow
11536169689Skan	the blocks_headers array.
11537169689Skan	(canonicalize_loop_headers): Register tree_make_forwarder_block
11538169689Skan	into the tree_cfg_hooks and rtl_make_forwarder_block into the
11539169689Skan	rtl_cfg_hooks structure.
11540169689Skan	(canonicalize_loop_headers): Initialize/free the blocks_headers
11541169689Skan	array rather than the bb's .aux field.
11542169689Skan	* cfgloopmanip.c (loop_split_edge_with_NULL): New static function.
11543169689Skan	(remove_path, force_single_succ_latches):
11544169689Skan	Call loop_split_edge_with_NULL instead of loop_split_edge_with.
11545169689Skan	* cfgrtl.c (split_block): Update the comment.
11546169689Skan	(split_edge): Renamed rtl_split_edge.
11547169689Skan	(verify_flow_info): Renamed rtl_verify_flow_info.
11548169689Skan	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize):
11549169689Skan	Execute code following the value of cfg_level.
11550169689Skan	* toplev.c (rest_of_compilation): Call rtl_register_cfg_hooks.
11551169689Skan	* tree-cfg.c (create_bb): Declared extern.
11552169689Skan	(build_tree_cfg): Call tree_register_cfg_hooks.
11553169689Skan	(make_edges, make_exit_edges): Remove the use of EDGE_FALLTHRU.
11554169689Skan	(bsi_commit_first_edge_insert): Use split_edge.
11555169689Skan	(tree_split_edge, tree_verify_flow_info): New functions.
11556169689Skan	* tree-optimize.c (cfgloop.h): Included.
11557169689Skan	(optimize_function_tree): Add #if 0'ed calls to
11558169689Skan	loop_optimizer_init and loop_optimizer_finalize.
11559169689Skan
11560169689Skan2003-04-16  Jeff Law  <law@redhat.com>
11561169689Skan
11562169689Skan	* Makefile.in (tree-ssa.o): Depend on langhooks.h.
11563169689Skan	(tree-dfa.o, tree-cfg.o): Likewise.
11564169689Skan	* tree-cfg.c: Include langhooks.h
11565169689Skan	(dump_tree_cfg): Revamp how we get the current function's name
11566169689Skan	to not rely on current_function_name (and implicitly cfun).
11567169689Skan	(dump_cfg_stats, tree_cfg2dot): Likewise.
11568169689Skan	* tree-dfa.c: Include langhooks.h
11569169689Skan	(dump_immediate_uses): Revamp how we get the current function's name
11570169689Skan	to not rely on current_function_name (and implicitly cfun).
11571169689Skan	(dump_dfa_stats, dump_alias_info): Likewise.
11572169689Skan	* tree-ssa.c: Include langhooks.h
11573169689Skan	(dump_tree_ssa): Revamp how we get the current function's name
11574169689Skan	to not rely on current_function_name (and implicitly cfun).
11575169689Skan
11576169689Skan	* tree-cfg.c (make_loop_expr_blocks): When determining the value for
11577169689Skan	NEXT_BLOCK_LINK, correctly handle empty statement nodes at the
11578169689Skan	end of the tree.
11579169689Skan	(make_cond_expr_blocks, make_switch_expr_blocks): Likewise.
11580169689Skan	(make_bind_expr_blocks): Likewise.
11581169689Skan
11582169689Skan	* gimplify.c (keep_function_tree_in_gimple_form): Move check of
11583169689Skan	flag_disable_simple here.  Include flags.h.
11584169689Skan	* Makefile.in (gimplify.o): Depends on flags.h
11585169689Skan	* c-decl.c (c_expand_body_1): No longer check flag_disable_simple.
11586169689Skan	* tree-inline.c (copy_body_r): Avoid creating non-gimple code
11587169689Skan	when inlining a function where the RESULT_DECL's initialization
11588169689Skan	is not on the RETURN_EXPR.
11589169689Skan
11590169689Skan2003-04-15  Jeff Law  <law@redhat.com>
11591169689Skan
11592169689Skan	* tree-flow.h (struct var_ann_d): Renamed is_vla_decl field to
11593169689Skan	has_hidden_use.
11594169689Skan	(has_hidden_use, set_has_hidden_use): Renamed from is_vla_decl
11595169689Skan	and set_vla_decl.
11596169689Skan	* tree-flow-inline.h (has_hidden_use): Renamed from is_vla_decl.
11597169689Skan	Updated to use "has_hidden_use" instead of "is_vla_decl" field.
11598169689Skan	(set_has_hidden_use): Renamed from set_vla_decl.
11599169689Skan	Updated to use "has_hidden_use" instead of "is_vla_decl" field.
11600169689Skan	* tree-dfa.c (dump_variable): Corresponding changes.
11601169689Skan	(find_vla_decls_r): Likewise.
11602169689Skan	* c-simplify.c (simplify_decl_stmt): Likewise.
11603169689Skan	* tree-ssa-dce.c: Likewise.
11604169689Skan
11605169689Skan2003-04-09  Jeff Law  <law@redhat.com>
11606169689Skan
11607169689Skan	* tree-dfa.c (struct alias_set_d, field tag_sym_set): Remove
11608169689Skan	unused field.
11609169689Skan	(register_alias_set): Rework to avoid incorrect coalescing of
11610169689Skan	entries.  Fix memory leak.  No longer set field tag_sym_set.
11611169689Skan	(get_expr_operands): ADDR_EXPR expressions may have interesting
11612169689Skan	operands in some cases.
11613169689Skan
11614169689Skan2003-04-09  Diego Novillo  <dnovillo@redhat.com>
11615169689Skan
11616169689Skan	* gimplify.c (simplify_expr): Handle VECTOR_CST nodes.
11617169689Skan	* tree-cfg.c (make_blocks): Ignore empty statement containers.
11618169689Skan	Create a basic block before processing containers that only have
11619169689Skan	empty statements.
11620169689Skan	(make_loop_expr_blocks): Use the container instead of the statement
11621169689Skan	when setting NEXT_BLOCK_LINK.
11622169689Skan	(make_cond_expr_blocks): Likewise.
11623169689Skan	(make_switch_expr_blocks): Likewise.
11624169689Skan	(make_bind_expr_blocks): Likewise.
11625169689Skan	(successor_block): If the last statement of the block is the empty
11626169689Skan	statement, use its container to get NEXT_BLOCK_LINK.
11627169689Skan	(stmt_starts_bb_p): Return false if the statement is NULL.
11628169689Skan	* tree-pretty-print.c (dump_generic_node): Handle VECTOR_CST nodes.
11629169689Skan	* tree-simple.c (is_simple_const): Accept VECTOR_CST as constants.
11630169689Skan	* objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P):
11631169689Skan	Define.
11632169689Skan
11633169689Skan2003-04-06  Diego Novillo  <dnovillo@redhat.com>
11634169689Skan
11635169689Skan	* tree-cfg.c (remove_bb): Call ssa_remove_edge.
11636169689Skan	(cleanup_cond_expr_graph): Likewise.
11637169689Skan	(cleanup_switch_expr_graph): Likewise.
11638169689Skan	(disconnect_unreachable_case_labels): Likewise.
11639169689Skan	(merge_tree_blocks): Likewise.
11640169689Skan	Update PHI nodes at BB2's successor.
11641169689Skan	(dump_tree_bb): Show PHI nodes in the block.
11642169689Skan	* tree-dfa.c (add_phi_arg): Update comment.
11643169689Skan	(remove_phi_arg_num): New function.
11644169689Skan	(remove_phi_arg): Call it.
11645169689Skan	Move from tree-ssa.c.
11646169689Skan	(remove_phi_node): Move from tree-ssa.c.
11647169689Skan	* tree-flow.h (ssa_make_edge): Declare.
11648169689Skan	(ssa_remove_edge): Declare.
11649169689Skan	* tree-pretty-print.c (dump_generic_node): Show block where PHI
11650169689Skan	arguments are coming from.
11651169689Skan	* tree-ssa-dce.c (pdom_info): New local variable.
11652169689Skan	(remove_dead_stmts): Initialize it and free it at the end.
11653169689Skan	(remove_conditional): New function.
11654169689Skan	(remove_dead_stmt): Call it.
11655169689Skan	* tree-ssa.c (eliminate_phi): If the edge index is -1, abort
11656169689Skan	compilation.
11657169689Skan	(ssa_remove_edge): New function.
11658169689Skan	(ssa_make_edge): New function.
11659169689Skan
11660169689Skan2003-04-06  Andrew MacLeod  <amacleod@redhat.com>
11661169689Skan
11662169689Skan	* tree-cfg.c (push_bsi): New. Push a block_stmt_iterator onto a stack.
11663169689Skan	(pop_bsi): New. Pop a block_stmt_iterator off a stack.
11664169689Skan	* tree-flow-inline.h (struct bsi_list_d): Block iterator stack struct.
11665169689Skan	(new_bsi_list): Start a new bsi stack.
11666169689Skan	(empty_bsi_stack): Is stack empty.
11667169689Skan	(FOR_EACH_BSI_IN_REVERSE): Macro for processing bsi's in reverse.
11668169689Skan	(FOR_EACH_STMT_IN_REVERSE): Macro for processing stmt's in reverse.
11669169689Skan
11670169689Skan2003-04-06  Andreas Jaeger  <aj@suse.de>
11671169689Skan
11672169689Skan	* treelang/treetree.c (tree_code_create_function_initial): Replace
11673169689Skan	calls to non-existent function annotate_with_file_line_column with
11674169689Skan	calls to annotate_with_file_line.
11675169689Skan	(tree_code_create_variable): Likewise.
11676169689Skan
11677169689Skan2003-04-05  Diego Novillo  <dnovillo@redhat.com>
11678169689Skan
11679169689Skan	* tree-dfa.c (get_expr_operands): Do not clobber readonly operands
11680169689Skan	in CALL_EXPRs.
11681169689Skan	(find_vars_r): Likewise.
11682169689Skan	(add_indirect_ref_var): When creating new INDIRECT_REF variables,
11683169689Skan	copy the readonly attribute from the variable's type.
11684169689Skan
11685169689Skan2003-04-05  Diego Novillo  <dnovillo@redhat.com>
11686169689Skan
11687169689Skan	* tree.c (copy_node): Never copy tree annotations.
11688169689Skan
11689169689Skan2003-04-05  Diego Novillo  <dnovillo@redhat.com>
11690169689Skan
11691169689Skan	* tree-ssa-ccp.c (visit_cond_stmt): Don't short circuit evaluation
11692169689Skan	of UNDEFINED conditional expressions.
11693169689Skan
11694169689Skan2003-04-04  Andrew MacLeod  <amacleod@redhat.com>
11695169689Skan
11696169689Skan	* Makefile.in : Add tree-ssa-live.c and tree-ssa-live.h files.
11697169689Skan	* tree-ssa.c (struct _var_map, create_var_map, delete_var_map,
11698169689Skan	var_from_partition, get_var_partition, mapped_var_from_ref,
11699169689Skan	compact_var_map, dump_tree_partition, set_partition_for_var,
11700169689Skan	set_var_mapping, create_var_partition): Remove.
11701169689Skan	(create_temp): Allow temps to be created from SSA_NAME vars as well.
11702169689Skan	(eliminate_name, eliminate_build, elim_backward, elim_create,
11703169689Skan	eliminate_phi): Use new var map interface.
11704169689Skan	(coalesce_ssa_name): New. Coalesce ssa_name ranges together.
11705169689Skan	(assign_vars): Assign real variables to ssa_name partitions.
11706169689Skan	(rewrite_out_of_ssa): Use new varmap partition and routines.
11707169689Skan	* tree-ssa-live.h: New file
11708169689Skan	(var_map): Structure for variable map.
11709169689Skan	(num_var_partitions): Number of partitions.
11710169689Skan	(partition_to_var): Return variable for partition.
11711169689Skan	(var_to_partition): Return partition variable is in.
11712169689Skan	(var_to_partition_to_var): Return variable representing partition
11713169689Skan	another variable is in.
11714169689Skan	(register_ssa_partition): Initialize a partition element as used.
11715169689Skan	* tree-ssa-live.c: New file.
11716169689Skan	(init_var_map): Initialize a var_map.
11717169689Skan	(delete_var_map): Free storage for a var_map.
11718169689Skan	(var_union): Combine 2 partitions.
11719169689Skan	(compact_var_map): Reduce the number of partitions in a var_map.
11720169689Skan	(change_partition_var): Assign a specific var to a partition.
11721169689Skan	(create_ssa_var_map): Initialize a var_map with referenced variables.
11722169689Skan	(dump_var_map): Debug output for a var_map.
11723169689Skan
11724169689Skan2003-04-03  Diego Novillo  <dnovillo@redhat.com>
11725169689Skan
11726169689Skan	* fold-const.c (fold_relational_hi_lo): Add missing comparison when
11727169689Skan	folding comparisons to signed_max+1.
11728169689Skan
11729169689Skan2003-04-02  Jason Merrill  <jason@redhat.com>
11730169689Skan	    Diego Novillo  <dnovillo@redhat.com>
11731169689Skan
11732169689Skan	* tree-inline.c (initialize_inlined_parameters): Cast argument
11733169689Skan	types appropriately when emitting initialization assignments.
11734169689Skan
11735169689Skan2003-04-01  Andrew MacLeod  <amacleod@redhat.com>
11736169689Skan
11737169689Skan	* tree-cfg.c (PENDING_STMT, SET_PENDING_STMT): New Macros.
11738169689Skan	(bsi_insert_on_edge): Rename to bsi_commit_first_edge_insert. Add an
11739169689Skan	empty annotation record to the new basic_block.
11740169689Skan	(bsi_commit_edge_inserts): New. Commit all pending edge inserts.
11741169689Skan	(bsi_insert_on_edge): New. Add stmt to edge's pending insert list.
11742169689Skan	* tree-flow-inline.h (phi_arg_from_edge): Return PHI index for an edge.
11743169689Skan	(phi_element_for_edge): Return PHI element for an edge.
11744169689Skan	* tree-flow.h (struct var_ann_d): Add auxiallary field and new
11745169689Skan	bit 'processed_out_of_ssa'.
11746169689Skan	* tree-ssa.c (_var_map): Structure for variable parition map.
11747169689Skan	(struct _elim_graph): Elimination graph for out-of-ssa pass.
11748169689Skan	(create_var_map): Create a new var_map.
11749169689Skan	(delete_var_map): Delete a var_map.
11750169689Skan	(var_from_parition): Return var for a specified partition.
11751169689Skan	(get_var_partition): Return partition a var belongs to.
11752169689Skan	(mapped_var_from_ref): Get root var for a var's partition.
11753169689Skan	(compact_var_map): Re-map the partitions to make the list dense.
11754169689Skan	(dump_var_parition): Print var_map.
11755169689Skan	(set_partition_for_var): Associate a real var with a partition.
11756169689Skan	(set_var_mapping): Associate an SSA version var with a real var.
11757169689Skan	(create_var_partition): Create a partition for processing.
11758169689Skan	(create_temp): Create a new temp variable for a partition.
11759169689Skan	(insert_copy_on_edge): Insert a copy between variables on an edge.
11760169689Skan	(new_elim_graph): Create a new elimination graph.
11761169689Skan	(clear_elim_graph): clear an elimination graph.
11762169689Skan	(delete_elim_graph): Delete an elimination graph.
11763169689Skan	(eliminate_name, eliminate_build, elim_forward,
11764169689Skan	elim_unvisited_predecessor, elim_backward, elim_create,
11765169689Skan	eliminate_phi): Routines to implement Morgans PHI elimination algorithm.
11766169689Skan	(eliminate_extraneous_phis): Eliminate PHI nodes which will never
11767169689Skan	generate code.
11768169689Skan	(rewrite_out_of_ssa): Use partitions and PHI elimination algorithm.
11769169689Skan
11770169689Skan2003-04-01  Jeff Law  <law@redhat.com>
11771169689Skan
11772169689Skan	* tree-cfg.c (make_blocks): Make sure the BIND_EXPR's subgraph
11773169689Skan	actually ended in a statement before seeing of the statement should
11774169689Skan	end a basic block.
11775169689Skan
11776169689Skan	* tree-cfg.c (dump_tree_cfg): Avoid crashing when cfun is NULL.
11777169689Skan	(tree_cfg2dot): Likewise.
11778169689Skan	* tree-dfa.c (dump_immediate_uses): Likewise.
11779169689Skan	* tree-pretty-print.c (dump_generic_node): Dump the EH_FILTER_FAILURE
11780169689Skan	nodes attached to an EH_FILTER_EXPR.
11781169689Skan
11782169689Skan	* tree-dfa.c (get_stmt_operands): Add cases for TRY_FINALLY_EXPR,
11783169689Skan	TRY_CATCH_EXPR, CATCH_EXPR and EH_FILTER_EXPR.
11784169689Skan	(get_expr_operands): Add case for EXC_PTR_EXPR.
11785169689Skan
11786169689Skan	* tree-dfa.c (compute_may_aliases): Accept FNDECL as an argument.
11787169689Skan	Use FNDECL instead of relying on CURRENT_FUNCTION_DECL.
11788169689Skan	* tree-flow.h (compute_may_aliases): Update prototype.
11789169689Skan	* tree-ssa.c (rewrite_into_ssa): Corresponding changes.
11790169689Skan
11791169689Skan	* tree-inline.c (expand_calls_inline): Correctly handle EH_FILTER_EXPR.
11792169689Skan
11793169689Skan2003-03-31  Diego Novillo  <dnovillo@redhat.com>
11794169689Skan
11795169689Skan	* Makefile.in (STRICT_WARN, STRICT2_WARN): Remove -Wtraditional.
11796169689Skan	* timevar.def (TV_TREE_CLEANUP_CFG): Define.
11797169689Skan	* tree-cfg.c (set_parent_stmt): Add documentation.
11798169689Skan	(replace_stmt): New function.
11799169689Skan	(merge_tree_blocks): New function.
11800169689Skan	(remap_stmts): New function.
11801169689Skan	(linearize_cond_expr): New function.
11802169689Skan	(linearize_control_structures): New function.
11803169689Skan	(cleanup_tree_cfg): Call it.
11804169689Skan	Use new timevar TV_TREE_CLEANUP_CFG.
11805169689Skan	(remove_bb): Update debugging message.
11806169689Skan	Make sure that bb->head_tree_p and bb->end_tree_p exist before
11807169689Skan	resetting their basic blocks.
11808169689Skan	(remove_stmt): When removing a control flow expression, update
11809169689Skan	basic block flags.
11810169689Skan	(cleanup_control_flow): Make sure that the block contains
11811169689Skan	statements.
11812169689Skan	(last_stmt): Reformat for readability.
11813169689Skan	(last_stmt_ptr): Return NULL if the block has no statements.
11814169689Skan	* tree-flow-inline.h (parent_block): Check that the block is not
11815169689Skan	empty.
11816169689Skan	* tree-flow.h (bb_empty_p): Remove.
11817169689Skan	* tree-inline.c (copy_tree_r): Do not copy empty_stmt_node.
11818169689Skan	* tree-ssa-dce.c (tree_ssa_dce): Call cleanup_tree_cfg.
11819169689Skan	* tree.c (body_is_empty): New function.
11820169689Skan	* tree.h (body_is_empty): Declare.
11821169689Skan
11822169689Skan2003-03-31  Jeff Law  <law@redhat.com>
11823169689Skan
11824169689Skan	* tree-ssa-ccp.c (simulate_block): Add abnormal edges out of a
11825169689Skan	block to the edge worklist after simulating a block for the
11826169689Skan	first time.  If the block has a single outgoing normal edge,
11827169689Skan	add that edge to the worklist after simulating the block for
11828169689Skan	the first time.
11829169689Skan
11830169689Skan2003-03-31  Frank Ch. Eigler  <fche@redhat.com>
11831169689Skan
11832169689Skan	* gcc.c (MFLIB_SPEC): Remove -ld.
11833169689Skan	(MFWRAP_SPEC): Remove dlopen wrapping.
11834169689Skan
11835169689Skan2003-03-28  Diego Novillo  <dnovillo@redhat.com>
11836169689Skan
11837169689Skan	* tree-ssa.c (rewrite_block): Add new argument 'eq_expr_value'.
11838169689Skan	Update all users.
11839169689Skan	If 'eq_expr_value' is given, use it to register a new
11840169689Skan	value for the variable given on the LHS.
11841169689Skan	If the block ends in a conditional expression of the form 'X == Y',
11842169689Skan	propagate 'X = Y' into the THEN_CLAUSE.
11843169689Skan	(MAY_COPYPROP_P): Define.
11844169689Skan	(rewrite_stmt): Call it.
11845169689Skan	(register_new_def): Fix comment.
11846169689Skan	(get_eq_expr_value): New function.
11847169689Skan
11848169689Skan2003-03-28  Diego Novillo  <dnovillo@redhat.com>
11849169689Skan
11850169689Skan	* basic-block.h (BB_COMPOUND_ENTRY): Remove.  Update all users
11851169689Skan	everywhere.
11852169689Skan	* tree-cfg.c: Minor fixes to various comments.
11853169689Skan	* tree-optimize.c (optimize_function_tree): Dump optimized function
11854169689Skan	after SSA->normal conversion.
11855169689Skan
11856169689Skan2003-03-26  Daniel Berlin  <dberlin@dberlin.org>
11857169689Skan
11858169689Skan	* tree-ssa-pre.c:  Implement open64 renaming algorithm.
11859169689Skan	(subst_phis): New function.
11860169689Skan	(generate_expr_as_of_bb): Ditto.
11861169689Skan	(new_rename_1): Ditto.
11862169689Skan	(process_delayed_rename): Ditto.
11863169689Skan	(do_proper_save): Use bsi_* functions for insertion, don't remove
11864169689Skan	old code quite yet, haven't fully tested.
11865169689Skan	Also add argument that says whether to insert before use or after use.
11866169689Skan	(defs_y_dom_x): Factor through injuries properly.
11867169689Skan	(defs_match_p): Ditto.
11868169689Skan	(phi_opnd_from_res): Attempt to fix, and remove useless argument.
11869169689Skan	(reset_can_be_avail): Fix broken condition that would cause infinite
11870169689Skan	loop.
11871169689Skan	(update_old_new): #if 0 updating of bb heads.
11872169689Skan	(finalize_1): We occasionally get 5 + a rather than a + 5, so we
11873169689Skan	need to make sure 5 is a DECL before trying to get a reaching def.
11874169689Skan	(repair_use_injury): If we couldn't find a reaching def, we don't need
11875169689Skan	to repair it.
11876169689Skan	(assign_new_class): Only push to stack2 if it exists (so we can
11877169689Skan	share this function in both rename implementations).
11878169689Skan	(create_ephi_node): Add argument that says whether to add ephi
11879169689Skan	to block or not (we create them sometimes for validation only).
11880169689Skan	(tree_perform_ssapre): Skip expressions without any uses.
11881169689Skan
11882169689Skan	* tree.h: Add EREF_DELAYED_RENAME.
11883169689Skan	(struct tree_eref_common): Add delayed_rename bit.
11884169689Skan
11885169689Skan2003-03-25  Diego Novillo  <dnovillo@redhat.com>
11886169689Skan
11887169689Skan	* tree-simple.c: Use tree codes to document grammar for relational
11888169689Skan	operators &&, || and ^.
11889169689Skan
11890169689Skan2003-03-25  Diego Novillo  <dnovillo@redhat.com>
11891169689Skan
11892169689Skan	* cfg.c (dump_edge_info): Add labels for EDGE_TRUE_VALUE,
11893169689Skan	EDGE_FALSE_VALUE and EDGE_EXECUTABLE.
11894169689Skan	* tree-cfg.c (dump_tree_bb): Change formatting.  Show all
11895169689Skan	statements in the block.
11896169689Skan	* tree-simple.c: Update documentation for GIMPLE conditional
11897169689Skan	expressions.
11898169689Skan
11899169689Skan2003-03-24  Diego Novillo  <dnovillo@redhat.com>
11900169689Skan
11901169689Skan	* tree-dfa.c (get_expr_operands): If there are no call clobbered
11902169689Skan	variables, don't create a VDEF for GLOBAL_VAR at clobbering
11903169689Skan	CALL_EXPRS.
11904169689Skan	* tree-flow.h (fold_stmt): Declare.
11905169689Skan	* tree-ssa-ccp.c (fold_stmt): Change to extern declaration.
11906169689Skan	* tree-ssa.c (rewrite_stmt): Call it.
11907169689Skan
11908169689Skan2003-03-22  Diego Novillo  <dnovillo@redhat.com>
11909169689Skan
11910169689Skan	* Makefile.in (gtype-desc.o): Add dependency on $(TREE_FLOW_H).
11911169689Skan
11912169689Skan	* tree-dfa.c (struct alias_set_d): Add field 'num_elements'.
11913169689Skan	(struct walk_state): Move declaration earlier in the file.
11914169689Skan	(create_global_var): New local function.
11915169689Skan	(num_referenced_vars, num_aliased_objects): Change type to
11916169689Skan	'size_t'.  Update all users.
11917169689Skan	(aliased_objects, aliased_objects_base, aliased_objects_aliase_set):
11918169689Skan	Mark for garbage collection.
11919169689Skan	(num_call_clobbered_vars, call_clobbered_vars): New global
11920169689Skan	variable.
11921169689Skan	(get_expr_operands): For CALL_EXPRs, add a VUSE or VDEF reference
11922169689Skan	for every pointer argument.  If the call may clobber, add a VDEF,
11923169689Skan	otherwise add a VUSE.
11924169689Skan	If the call may clobber, add VDEF for GLOBAL_VAR.
11925169689Skan	(dump_variable): Show whether the variable is call clobbered.
11926169689Skan	(dump_dfa_stats): Show call clobbered variables.
11927169689Skan	(compute_may_aliases): Minor formatting changes.
11928169689Skan	(compute_alias_sets): If the function makes clobbering calls, add
11929169689Skan	GLOBAL_VAR as an alias to every call-clobbered variable.
11930169689Skan	Remove alias sets that have exactly one element.
11931169689Skan	(register_alias_set): Set 'num_elements' to zero for every newly
11932169689Skan	created alias set.
11933169689Skan	(find_alias_for): Don't make a second call to add_may_alias to make
11934169689Skan	alias tags alias themselves.  It's redundant.
11935169689Skan	Increment 'num_elements' when adding a new alias to an alias set.
11936169689Skan	(may_alias_p): Don't handle GLOBAL_VAR.
11937169689Skan	Check for structure aliasing when either PTR or VAR are a
11938169689Skan	structure.  Don't do it only when both are structures.
11939169689Skan	(dump_alias_info): Show all aliases of each variable.
11940169689Skan	(find_vars_r): When processing a CALL_EXPR node, set
11941169689Skan	walk_state->is_store if the function may clobber and create a
11942169689Skan	reference to GLOBAL_VAR.
11943169689Skan	(add_indirect_ref_var): Change type of second argument from 'void *'
11944169689Skan	to 'struct walk_state *'.  Update all users.
11945169689Skan	(add_referenced_var): Likewise.  If a potentially aliased variabe
11946169689Skan	is not declared 'const', add it to the list of call clobbered
11947169689Skan	variables.
11948169689Skan
11949169689Skan	* tree-flow.h (struct var_ann_d): Add field 'is_call_clobbered'.
11950169689Skan	Change type of field 'uid' to size_t.  Update all users.
11951169689Skan	(stmt_ann_d): Add field 'makes_clobbering_call'.
11952169689Skan	(next_tree_ref_id): Remove unused variable.
11953169689Skan	(call_clobbered_vars): Declare.
11954169689Skan	(num_call_clobbered_vars): Declare.
11955169689Skan	(call_clobbered_var): New inline function.
11956169689Skan
11957169689Skan	* tree-ssa-ccp.c (visit_phi_node): If the LHS of a PHI node is
11958169689Skan	volatile, mark the PHI node VARYING without checking its arguments.
11959169689Skan	(visit_assignment): Likewise.
11960169689Skan	(set_value): Remove.  Update all users.
11961169689Skan	(likely_value): If the statement makes aliased loads or has
11962169689Skan	volatile operands, consider it VARYING.
11963169689Skan	(get_default_value): If a variable is volatile, consider it
11964169689Skan	VARYING.
11965169689Skan
11966169689Skan	* tree-ssa.c (init_tree_ssa): Initialize num_call_clobbered_vars
11967169689Skan	and call_clobbered_vars.
11968169689Skan	Do not create GLOBAL_VAR.  Set it to NULL_TREE.
11969169689Skan	Increase initial size for various hash tables.
11970169689Skan	(delete_tree_ssa): Reset num_call_clobbered_vars and
11971169689Skan	call_clobbered_vars.
11972169689Skan	(get_reaching_def): Rename from currdef_for.  Update all users.
11973169689Skan	Always create default definitions for variables that need them.
11974169689Skan	Callers that use to call currdef_for with the second argument set
11975169689Skan	to false now call get_value_for.
11976169689Skan	(htab_statistics): New function.
11977169689Skan	(dump_tree_ssa): Call it.
11978169689Skan	(avail_expr_eq): Also compare VUSE operands.
11979169689Skan
11980169689Skan2003-03-21  Jeff Law  <law@redhat.com>
11981169689Skan
11982169689Skan	* tree-dfa.c: Revert vla changes from yesterday.
11983169689Skan	(find_vla_decls_r): Do not look inside TYPE_DECLs.
11984169689Skan
11985169689Skan2003-03-20  Jeff Law  <law@redhat.com>
11986169689Skan
11987169689Skan	* gimplify.c (simplify_return_expr): Tighten condition for
11988169689Skan	converting the RHS of a MODIFY_EXPR in a RETURN_EXPR to a
11989169689Skan	simple_val.  Allow returning a RESULT_DECL directly.
11990169689Skan	* tree-dfa.c (get_expr_operands): A RESULT_DECL can have
11991169689Skan	interesting operands.
11992169689Skan	(clobber_vars_r): Handle RESULT_DECLs.
11993169689Skan	(compute_may_aliases): Initialize and free vla_htab.
11994169689Skan	(find_vla_decls): Pass vla_htab to walk_tree.
11995169689Skan	(find_vla_decls_r): Likewise.
11996169689Skan	* tree.h (SSA_DECL_P): Accept RESULT_DECLs.
11997169689Skan
11998169689Skan2003-03-19  Jeff Law  <law@redhat.com>
11999169689Skan
12000169689Skan	* gimplify.c (simplify_return_expr): Only allow simple values
12001169689Skan	on the RHS of a MODIFY_EXPR appearing in a RETURN_EXPR.
12002169689Skan	* tree-cfg.c (make_exit_edges): We no longer need to look for
12003169689Skan	CALL_EXPRs on the RHS of a MODIFY_EXPR inside RETURN_EXPRs.
12004169689Skan
12005169689Skan2003-03-18  Andrew Macleod  <amacleod@redhat.com>
12006169689Skan
12007169689Skan	* tree-cfg.c (make_blocks): Use append_stmt_to_bb. Check for NULL
12008169689Skan	tsi_stmt when deciding whether to start a new block.
12009169689Skan	(add_stmt_to_bb): Don't update the basic block end pointer.
12010169689Skan	(append_stmt_to_bb): New. Add stmt and update the BB end pointer.
12011169689Skan	(first_stmt): Use only 1 return.
12012169689Skan	(last_stmt): Modified to use bsi_last().
12013169689Skan	(last_stmt_ptr): Modified to use bsi_last().
12014169689Skan	(bsi_last): New. Return an iterator to the last stmt in a block.
12015169689Skan	(bsi_from_tsi): Fix bug which wouldn't set the context properly when
12016169689Skan	within a nested BIND_EXPR.
12017169689Skan	(bsi_update_from_tsi): Insert helper which is more efficient than
12018169689Skan	bsi_from_tsi().
12019169689Skan	(bsi_link_after): link in a new stmt and update the basic block
12020169689Skan	data structures.
12021169689Skan	(bsi_insert_after): Insert a new stmt into a block.
12022169689Skan	(bsi_insert_before): Insert a new stmt into a block.
12023169689Skan	(bsi_insert_on_edge): Insert a new stmt on an edge.
12024169689Skan	* tree-flow-inline.h (is_label_stmt): Return true if stmt can be a
12025169689Skan	target of a control transfer.
12026169689Skan	* tree-flow.h (is_label_stmt, bsi_last): New prototypes.
12027169689Skan
12028169689Skan2003-03-12  Jeff Law  <law@redhat.com>
12029169689Skan
12030169689Skan	* c-simplify.c (simplify_switch_stmt): Save the type of the original
12031169689Skan	condition in TREE_TYPE (SWITCH_EXPR (...)).  Annotate the SWITCH_EXPR
12032169689Skan	with file/line information.
12033169689Skan	* expr.c (expand_expr, case SWITCH_EXPR): Use expand_end_case_type.
12034169689Skan	* tree.def (SWITCH_EXPR): Document meaning of TREE_TYPE field of
12035169689Skan	the SWITCH_EXPR.
12036169689Skan
12037169689Skan	* c-simplify.c (simplify_block): Set the current line number to
12038169689Skan	the line associated with the end of the block.
12039169689Skan
12040169689Skan	* c-decl.c (finish_function): No longer save/restore the
12041169689Skan	current filename or linenumber around simplification.  Instead
12042169689Skan	save/restore it around inlining.
12043169689Skan	(c_expand_body_1): Save/restore current filename and linenumber
12044169689Skan	around expansion of trees into RTL.
12045169689Skan	* gimplify.c (simplify_function_tree): Make the current file/line
12046169689Skan	number match the non-gimple code at the end of a function.
12047169689Skan
12048169689Skan	* tree-cfg.c: Include toplev.h.
12049169689Skan	(remove_bb): Warn about unreachable code.
12050169689Skan
12051169689Skan	* cfgrtl.c (verify_flow_info): Ignore EDGE_EXECUTABLE, it's for
12052169689Skan	the CCP optimizer only.
12053169689Skan
12054169689Skan	* ssa.c (convert_to_ssa): Use last_basic_block, not n_basic_blocks.
12055169689Skan
12056169689Skan2003-03-11  Jeff Law  <law@redhat.com>
12057169689Skan
12058169689Skan	* builtins.c: Fix minor comment typo.
12059169689Skan	(expand_builtin_strcmp, expand_builtin_strncmp): Remove.
12060169689Skan	(expand_builtin_strcat, expand_builtin_strncat): Likewise.
12061169689Skan	(expand_builtin_strspn, expand_builtin_strcspn): Likewise.
12062169689Skan	(expand_builtin_strcopy, expand_builtin_strstr): Likewise.
12063169689Skan	(expand_builtin_strpbrk, expand_builtin_strchr): Likewise.
12064169689Skan	(expand_builtin_strrchr, expand_builtin_fputs): Likewise.
12065169689Skan	(simplify_builtin_memcmp, simplify_builtin_strcmp): New functions.
12066169689Skan	(simplify_builtin_strpbrk, simplify_builtin_strstr): Likewise
12067169689Skan	(simplify_builtin_strchr, simplify_builtin_strrchr): Likewise
12068169689Skan	(simplify_builtin_strcpy, simplify_builtin_strncpy): Likewise
12069169689Skan	(simplify_builtin_strncmp, simplify_builtin_strcat): Likewise
12070169689Skan	(simplify_builtin_strncat, simplify_builtin_strspn): Likewise
12071169689Skan	(simplify_builtin_strcspn, simplify_builtin_fputs): Likewise
12072169689Skan	(expand_builtin_memcmp): Use simplify_builtin_memcmp.
12073169689Skan	(simplify_builtin): New function
12074169689Skan	(expand_builtin): Use simpify_builtin to collapse several common
12075169689Skan	cases together.
12076169689Skan	* gimplify.c (simplify_call_expr): Accept new argument.  All
12077169689Skan	callers updated.  Call simplify_builtin to try and simplify builtin
12078169689Skan	function calls before we simplify their arguments.
12079169689Skan	* tree.h (simplify_builtin): Prototype.
12080169689Skan
12081169689Skan2003-03-11  Jeff Law  <law@redhat.com>
12082169689Skan
12083169689Skan	* timevar.def (TV_TREE_SSA_TO_NORMAL): New timevar.
12084169689Skan	* tree-cfg.c (remove_stmt): Also remove special annotations
12085169689Skan	on RHS of MODIFY_EXPR statements.
12086169689Skan	* tree-dfa.c (create_stmt_ann): Update comments.  Fix formatting.
12087169689Skan	(compute_may_aliases): Make sure timevar encloses entire routine.
12088169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Enclose with a timevar.
12089169689Skan	(remove_annotations_r): Avoid walking into subtrees of anything
12090169689Skan	except container nodes.  Remove the special annotation on the
12091169689Skan	RHS of MODIFY_EXPRs.
12092169689Skan
12093169689Skan2003-03-10  Frank Ch. Eigler  <fche@redhat.com>
12094169689Skan
12095169689Skan	* tree-mudflap.c (mx_xfn_indirect_ref): Allow unfolded "& ptr->field"
12096169689Skan	constructs to pass uninstrumented.  Remove TREE_ADDRESSABLE settings.
12097169689Skan	Keep array accesses to non-ADDRESSABLE objects uninstrumented.  Update
12098169689Skan	__MF_TYPE_* constants for __mf_register calls.
12099169689Skan
12100169689Skan2003-03-10  Jeff Law  <law@redhat.com>
12101169689Skan
12102169689Skan	* c-decl.c (c_expand_body_1): Update comments relating to
12103169689Skan	re-simplification after mudflap instrumentation.  Avoid
12104169689Skan	unnecessary simplification of the function tree.
12105169689Skan	* gimplify.c (keep_function_tree_in_gimple_form): New function.
12106169689Skan	* tree-inline.c: Include tree-iterator.h and tree-simple.h
12107169689Skan	(struct inline_data): Add new TSI field.
12108169689Skan	(copy_body_r): Keep tree in gimple form when transforming a
12109169689Skan	RETURN_EXPR into a MODIFY_EXPR and GOTO_EXPR.
12110169689Skan	(initialize_inlined_parameters): Use MODIFY_EXPR, not INIT_EXPR
12111169689Skan	for initialization of inlined parameters.
12112169689Skan	(expand_call_inline): Save and restore the TSI around the
12113169689Skan	call to expand_calls_inline.  Keep the tree in gimple form
12114169689Skan	when replacing a CALL_EXPR with a BIND_EXPR for the inlined
12115169689Skan	body.
12116169689Skan	(expand_calls_inline): Revamp to provide the current TSI to
12117169689Skan	expand_call_inline when we're working with gimple form.
12118169689Skan	* Makefile.in (tree-inline.o): Update dependencies.
12119169689Skan	* tree.h (keep_function_tree_in_gimple_form): Prototype.
12120169689Skan
12121169689Skan2003-03-10  Andrew MacLeod  <amacleod@redhat.com>
12122169689Skan
12123169689Skan	* Makefile.in (tree.o): Add tree-iterator.h dependancy.
12124169689Skan	* sbitmap.c (sbitmap_realloc): Grow a sbitmap structure.
12125169689Skan	* sbitmap.h (sbitmap_realloc): New Prototype.
12126169689Skan	* tree-cfg.c (remove_bb): Use new format for bsi_remove.
12127169689Skan	(bsi_remove): Update iterator to refer to the next stmt.
12128169689Skan	(bsi_prev): Implement previous stmt routine.
12129169689Skan	(bsi_from_tsi): Create a block iterator from a tree iterator.
12130169689Skan	* tree-flow-inline.h (bsi_prev): Remove.
12131169689Skan	(tsi_from_bsi): Create a tree iterator from a block iterator.
12132169689Skan	* tree-flow.h (bsi_prev,bsi_remove): Update prototypes.
12133169689Skan	(bsi_from_tsi, tsi_from_bsi, bsi_insert_*): New prototypes.
12134169689Skan	(bsi_iterator_update): New enum type.
12135169689Skan	* tree-iterator.h (tree_stmt_anchor, tsi_iterator_update): New type.
12136169689Skan	(tsi_link_before, tsi_link_after, tsi_delink, tsi_new_stmt_list,
12137169689Skan	tsi_stmt_list_head): New prototypes.
12138169689Skan	* tree-ssa-dce.c (remove_dead_stmts): Update removal loop to allow
12139169689Skan	that remove_dead_stmt update's the iterator.
12140169689Skan	(remove_dead_stmt): Use a pointer to the iterator since bsi_remove
12141169689Skan	requires it.
12142169689Skan	* tree.c (tsi_link_before): New function to link a stmt before an
12143169689Skan	iterator.
12144169689Skan	(tsi_link_after): New function links stmt after an iterator.
12145169689Skan	(tsi_delink): Removes a stmt from a list.
12146169689Skan	(tsi_new_stmt_list): New function to begin a new stmt list.
12147169689Skan	(tsi_stmt_list_head): New function to get the first stmt in a list.
12148169689Skan
12149169689Skan2003-03-07  Diego Novillo  <dnovillo@redhat.com>
12150169689Skan
12151169689Skan	* tree-cfg.c (remove_stmt): Don't assume that the statement is in
12152169689Skan	SSA form.
12153169689Skan
12154169689Skan	* tree-flow.h (dump_tree_ssa_stats): Declare.
12155169689Skan	(debug_tree_ssa_stats): Declare.
12156169689Skan	(stmt_ann_d): Add new statement flags 'makes_aliased_loads',
12157169689Skan	'makes_aliased_stores', and 'has_volatile_ops'.
12158169689Skan	* tree-dfa.c (add_stmt_operand): Set new statement flags accordingly.
12159169689Skan
12160169689Skan	* tree-pretty-print.c (dump_generic_node): Various cosmetic changes
12161169689Skan	to the rendering of some expressions.
12162169689Skan
12163169689Skan	* tree-ssa.c (struct var_value_d): Rename from struct currdef_d.
12164169689Skan	Rename field 'currdef' to 'value'.  Update all users.
12165169689Skan	(avail_exprs): New local hash table.
12166169689Skan	(const_and_copies): New local hash table.
12167169689Skan	(struct ssa_stats_d): Declare.
12168169689Skan	(ssa_stats): New local variable.
12169169689Skan	(rewrite_into_ssa): Deallocate avail_exprs and const_and_copies
12170169689Skan	after renaming.
12171169689Skan	Call dump_tree_ssa_stats() if -fdump-tree-ssa-stats is given.
12172169689Skan	(rewrite_block): Document the renaming process.
12173169689Skan	Add new local stack block_avail_exprs to keep track of expressions
12174169689Skan	made available in this block and its children.
12175169689Skan	(rewrite_stmts): Move body inside rewrite_block.
12176169689Skan	(dump_tree_ssa_stats): New function.
12177169689Skan	(debug_tree_ssa_stats): New function.
12178169689Skan	(get_def_blocks): New function.
12179169689Skan	(insert_phi_nodes_for): Call it.
12180169689Skan	(rewrite_stmt): Add support for keeping track of copies, constants
12181169689Skan	and globally redundant expressions.
12182169689Skan	(rewrite_operand): If a pointer has been copy propagated into
12183169689Skan	another one, rewrite INDIRECT_REF nodes of the original pointer to
12184169689Skan	refer to the new one.
12185169689Skan	(register_new_def): Add new argument 'var' indicating which
12186169689Skan	variable is this new definition for.  Update all users.
12187169689Skan	(update_indirect_ref_vuses): New function.
12188169689Skan	(update_pointer_vuses): New function.
12189169689Skan	(init_tree_ssa): Set variable 'ssa_stats' to zero.
12190169689Skan	Allocate memory for 'avail_exprs' and 'const_and_copies'.
12191169689Skan	(currdef_for): Don't mark inline.
12192169689Skan	Call get_value_for and set_value_for.
12193169689Skan	(set_currdef_for): Remove.  Update all users.
12194169689Skan	(var_value_hash): Rename from currdef_hash.  Update all users.
12195169689Skan	(var_value_eq): Rename from currdef_eq.  Update all users.
12196169689Skan	(get_value_for): New function.
12197169689Skan	(set_value_for): New function.
12198169689Skan	(lookup_avail_expr): New function.
12199169689Skan	(avail_expr_hash): New function.
12200169689Skan	(avail_expr_eq): New function.
12201169689Skan	(get_def_blocks_for): New function.
12202169689Skan	(var_is_live): New function.
12203169689Skan
12204169689Skan2003-03-06  Diego Novillo  <dnovillo@redhat.com>
12205169689Skan
12206169689Skan	* tree-ssa-ccp.c (likely_value): Don't assume CONSTANT if the
12207169689Skan	statement has virtual uses.
12208169689Skan
12209169689Skan2003-03-05  Diego Novillo  <dnovillo@redhat.com>
12210169689Skan
12211169689Skan	* tree-dfa.c (opf_none, opf_is_def, opf_force_vop, opf_ignore_bp):
12212169689Skan	New flags to alter the behavior of add_stmt_operand.
12213169689Skan	(get_expr_operands): Change operand IS_DEF with FLAGS.  Update all
12214169689Skan	users.
12215169689Skan	When adding a VUSE for pointer dereferences in function arguments,
12216169689Skan	don't add a superfluous VUSE for the base pointer.
12217169689Skan	(add_stmt_operand): Remove operands IS_DEF and FORCE_VOP.  Add
12218169689Skan	operand FLAGS.  Update all users.
12219169689Skan
12220169689Skan2003-03-05  Jason Merrill  <jason@redhat.com>
12221169689Skan
12222169689Skan	* c-pretty-print.c (do_niy): Only print operands of expressions.
12223169689Skan	* tree-pretty-print.c: Likewise.
12224169689Skan
12225169689Skan	* c-simplify.c (simplify_decl_stmt): Only simplify DECL_SIZE_UNIT.
12226169689Skan	* gimplify.c (simplify_array_ref_to_plus): New fn.
12227169689Skan	(simplify_array_ref): Use it.
12228169689Skan	(build_addr_expr_with_type): Split out from build_addr_expr.
12229169689Skan	(simplify_compound_lval): Break out an ARRAY_REF with non-constant
12230169689Skan	element size.
12231169689Skan
12232169689Skan2003-03-05  Frank Ch. Eigler  <fche@redhat.com>
12233169689Skan
12234169689Skan	* gcc.c (MFWRAP_SPEC): Remove most --wrap entries.
12235169689Skan
12236169689Skan2003-03-03  Daniel Berlin  <dberlin@dberlin.org>
12237169689Skan
12238169689Skan	* tree-ssa-pre.c (is_strred_cand): Temporarily disable strength
12239169689Skan	reduction while working on bootstrapping.
12240169689Skan	(requires_edge_placement): Reenable for now, until an insertion
12241169689Skan	infrastructure exists that can handle critical edges.
12242169689Skan	(count_stmts_in_bb): New function, used for verifying we do
12243169689Skan	insertions properly.
12244169689Skan	(update_old_new): Fix up bb heads as well.
12245169689Skan	(do_proper_save): Handle single statement bb properly.
12246169689Skan	Handle BB's contained in BIND_EXPRS.
12247169689Skan	(code_motion): Count number of statements in bb before and after
12248169689Skan	to make sure we don't screw up boundaries.
12249169689Skan	(finalize_1): Ditto.
12250169689Skan	(rename_2): Fix subtle rename bug.
12251169689Skan	(phi_opnd_from_res): Do this the right way, by cloning the
12252169689Skan	occurrence and modifying it, as every other PRE implementation
12253169689Skan	does.
12254169689Skan	(tree_perform_ssapre): Handle comparisons too (unary exprs
12255169689Skan	currently disabled till load PRE is reimplemented).
12256169689Skan	(reset_can_be_avail): Fix can_be_avail test.
12257169689Skan
12258169689Skan2003-03-01  Diego Novillo  <dnovillo@redhat.com>
12259169689Skan
12260169689Skan	* doc/invoke.texi: Fix typo.
12261169689Skan
12262169689Skan2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
12263169689Skan	    Diego Novillo  <dnovillo@redhat.com>
12264169689Skan
12265169689Skan	* Makefile.in (OBJS): Add tree-ssa-copyprop.o.
12266169689Skan	(tree-ssa-copyprop.o): New rule.
12267169689Skan	(tree-ssa-ccp.o): Add dependency on $(TREE_SIMPLE_H).
12268169689Skan
12269169689Skan	* timevar.def (TV_TREE_COPYPROP): New timevar.
12270169689Skan	* flags.h (flag_tree_copyprop): Declare.
12271169689Skan	* toplev.c (flag_tree_copyprop): Define.
12272169689Skan	(f_options): Add -ftree-copyprop.
12273169689Skan	* tree.h (tree_dump_index): Add TDI_copyprop.
12274169689Skan	* tree-dump.c (dump_files): Add entry for -fdump-tree-copyprop.
12275169689Skan	* doc/invoke.texi: Document -ftree-copyprop and -fdump-tree-copyprop.
12276169689Skan
12277169689Skan	* tree-ssa-copyprop.c: New file.
12278169689Skan	* tree-flow.h (tree_ssa_copyprop): Declare.
12279169689Skan	* tree-optimize.c (optimize_function_tree): Call it.
12280169689Skan	* tree-dfa.c (add_vuse): Make extern.  Update all users.
12281169689Skan
12282169689Skan	* tree-ssa.c (mark_def_sites): VUSEs are stored in a varray of trees.
12283169689Skan
12284169689Skan2003-02-28  Frank Ch. Eigler  <fche@redhat.com>
12285169689Skan
12286169689Skan	* tree-mudflap.c (mudflap_enqueue_decl): Ignore extern artificial
12287169689Skan	variable declarations.
12288169689Skan
12289169689Skan2003-02-27  Diego Novillo  <dnovillo@redhat.com>
12290169689Skan
12291169689Skan	* tree-dfa.c (get_stmt_operands): INIT_EXPR nodes cannot
12292169689Skan	appear in GIMPLE form.  Don't handle them.
12293169689Skan	(get_expr_operands): Likewise.
12294169689Skan	(find_vars_r): Likewise.
12295169689Skan	* tree-ssa-ccp.c (get_rhs): Likewise.
12296169689Skan	(set_rhs): Likewise.
12297169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Likewise.
12298169689Skan
12299169689Skan2003-02-27  Diego Novillo  <dnovillo@redhat.com>
12300169689Skan
12301169689Skan	* tree-ssa-ccp.c (ccp_fold): Fold builtins by replacing and
12302169689Skan	restoring their arguments.
12303169689Skan
12304169689Skan2003-02-27  Jeff Law  <law@redhat.com>
12305169689Skan
12306169689Skan	* tree-dfa.c (find_vars_r): Clear *walk_subtrees appropriately
12307169689Skan	to avoid useless walking of subtrees.
12308169689Skan
12309169689Skan	* fold-const.c (nondestructive_fold_binary_to_constant): Renamed
12310169689Skan	from nondestructive_fold_binary.  Update comments slightly.
12311169689Skan	(nondestructive_fold_unary_to_constant): Similarly.
12312169689Skan	(fold_relational_hi_lo): Corresponding changes.
12313169689Skan	* tree-ssa-ccp.c (ccp_fold): Corresponding changes.
12314169689Skan	* tree.h: Corresponding changes.
12315169689Skan
12316169689Skan2003-02-26  Jeff Law  <law@redhat.com>
12317169689Skan
12318169689Skan	* tree-ssa-ccp.c (ccp_fold): Also handle folding of calls to
12319169689Skan	builtin functions.
12320169689Skan
12321169689Skan	* fold-const.c (nondestructive_fold_binary): Handle truth ops
12322169689Skan	when both arguments are constant (duh!).  Handle CONJ_EXPR.
12323169689Skan
12324169689Skan2003-02-26  Daniel Berlin  <dberlin@dberlin.org>
12325169689Skan
12326169689Skan	* flags.h: Remove flag_ip.
12327169689Skan	* toplev.c: Ditto.
12328169689Skan	* tree-alias-ander.c: s/flag_ip/flag_unit_at_a_time/g.
12329169689Skan	(andersen_cleanup): Set region to null when done.
12330169689Skan	(andersen_function_call): Check DECL_PTA_TYPEVAR, not
12331169689Skan	DECL_SAVED_TREE.
12332169689Skan	* tree-alias-common.c: s/SSA_DECL_P/DECL_P/g.
12333169689Skan	(get_alias_var_decl): Remove dead code, fix bug in what is a
12334169689Skan	local alias var.
12335169689Skan	(find_func_aliases): Use get_alias_var, not create_fun_alias_var.
12336169689Skan	(create_fun_alias_var): Fix to use DECL_PTA_TYPEVAR.
12337169689Skan	Use get_alias_var rather than create_alias_var.
12338169689Skan	(create_fun_alias_var_ptf): Ditto.
12339169689Skan	(create_alias_vars): Ditto.
12340169689Skan	* tree-dfa.c (compute_may_aliases): Fix check for
12341169689Skan	create_alias_vars.
12342169689Skan	Move deletion of alias vars back to here, from tree-ssa.c
12343169689Skan	* tree-ssa.c (delete_tree_ssa): Remove delete_alias_vars call.
12344169689Skan
12345169689Skan2003-02-25  Jeff Law  <law@redhat.com>
12346169689Skan	    Diego Novillo  <dnovillo@redhat.com>
12347169689Skan
12348169689Skan	* tree-ssa-ccp.c (likely_value): If the statement has no
12349169689Skan	use operands, then return CONSTANT.
12350169689Skan
12351169689Skan	* fold-const.c (nondestructive_fold_binary): Handle TRUTH_AND_EXPR
12352169689Skan	and TRUTH_OR_EXPR.  Placeholder for TRUTH_XOR_EXPR.
12353169689Skan	* tree-ssa-ccp.c (ccp_fold): Handle TRUTH_{AND,OR,XOR}_EXPR.
12354169689Skan	(def_to_undefined): Re-enable VARYING->UNDEFINED state transition
12355169689Skan	sanity check.
12356169689Skan
12357169689Skan	* tree-ssa-ccp.c (likely_value): Renamed from may_fold_p.  Now
12358169689Skan	returns a latticevalue indicating the likely value for the
12359169689Skan	the RHS of the statement.
12360169689Skan	(evaluate_stmt): Update to use likely_value instead of may_fold_p.
12361169689Skan	Statements with UNDEFINED operands produce an UNDEFINED result.
12362169689Skan	(set_lattice_value): Reenable VARYING->CONSTANT sanity check.
12363169689Skan
12364169689Skan2003-02-25  Andrew MacLeod  <amacleod@redhat.com>
12365169689Skan
12366169689Skan	* tree-cfg.c (bsi_init): Handle BIND_EXPR nodes inside a basic block.
12367169689Skan	(bsi_next_in_bb): Likewise.
12368169689Skan
12369169689Skan2003-02-25  Diego Novillo  <dnovillo@redhat.com>
12370169689Skan
12371169689Skan	* tree-cfg.c (parent_array): Remove.  Update all users.
12372169689Skan	(struct cfg_stats_d): Add field 'num_failed_bind_expr_merges'.
12373169689Skan	(NEXT_BLOCK_LINK): Define.
12374169689Skan	(build_tree_cfg): Call alloc_aux_for_blocks instead of
12375169689Skan	create_block_annotations.
12376169689Skan	(make_blocks): Rewrite to support basic blocks that can span whole
12377169689Skan	BIND_EXPR bodies and put control statements at the end of blocks.
12378169689Skan	Add arguments 'next_block_link' and 'bb'.  Replace 'parent_block'
12379169689Skan	with 'parent_stmt'.  Update all users.
12380169689Skan	(make_loop_expr_blocks): Replace argument 'parent_block' with 'entry'.
12381169689Skan	Add argument 'next_block_link'.  Update all users.
12382169689Skan	Don't create an empty latch block.
12383169689Skan	(make_cond_expr_blocks): Add argument 'next_block_link'.  Update
12384169689Skan	all users.
12385169689Skan	(make_switch_expr_blocks): Likewise.
12386169689Skan	(make_bind_expr_blocks): Replace 'parent_block' with 'parent_stmt'.
12387169689Skan	Add argument 'next_block_link' and 'entry'.
12388169689Skan	Don't create a new block for the BIND_EXPR node.  Extend the
12389169689Skan	existing block.
12390169689Skan	(add_stmt_to_bb): New function.
12391169689Skan	(create_bb): Remove argument 'parent_block'.  Update all users.
12392169689Skan	(create_block_annotations): Remove.  Update all users.
12393169689Skan	(make_edges): Don't handle BIND_EXPR nodes.
12394169689Skan	(make_ctrl_stmt_edges): Don't create an extra edge to the body of
12395169689Skan	the switch.
12396169689Skan	(make_loop_expr_edges): Only create an edge to the body of the
12397169689Skan	loop.
12398169689Skan	(remove_unreachable_block): Add more documentation for the special
12399169689Skan	case where a control statement entry is unreachable but its body
12400169689Skan	isn't.
12401169689Skan	Remove the basic block annotation from the head and end containers
12402169689Skan	in the block.
12403169689Skan	(disconnect_unreachable_case_labels): Don't keep the edge that goes
12404169689Skan	to the BIND_EXPR at the start of the switch body.
12405169689Skan	(dump_tree_bb): Call is_latch_block_for.
12406169689Skan	(dump_cfg_stats): Show stats about basic blocks that could not span
12407169689Skan	beyond the end of a BIND_EXPR body.
12408169689Skan	(successor_block): Use NEXT_BLOCK_LINK if the block is the last
12409169689Skan	inside a control structure.
12410169689Skan	(is_ctrl_stmt): Update documentation.
12411169689Skan	(stmt_starts_bb_p): Add new argument 'prev_t'.  Update all users.
12412169689Skan	Only labels may start a new basic block.
12413169689Skan	(stmt_ends_bb_p): Add LOOP_EXPR, TRY_FINALLY_EXPR and
12414169689Skan	TRY_CATCH_EXPR to the list.
12415169689Skan	(latch_block): Remove.
12416169689Skan	(is_latch_block_for): New function.
12417169689Skan	(set_bb_for_stmt): Reformat some code.
12418169689Skan
12419169689Skan	* tree-flow-inline.h (set_parent_block): Remove.  Update all users.
12420169689Skan	(parent_stmt): New function.
12421169689Skan	(parent_block): Call it.
12422169689Skan
12423169689Skan	* tree-flow.h (struct stmt_ann_d): Add field 'parent_stmt'.
12424169689Skan	(struct bb_ann_d): Remove block parent_block.
12425169689Skan
12426169689Skan	* tree-pretty-print.c (dump_generic_node): Don't handle empty latch
12427169689Skan	nodes.
12428169689Skan
12429169689Skan	* tree-ssa-ccp.c (def_to_undefined): Temporarily disable check for
12430169689Skan	VARYING->UNDEFINED transitions.
12431169689Skan	(set_lattice_value): Likewise for VARYING->CONSTANT transitions.
12432169689Skan
12433169689Skan	* tree-ssa-dce.c (mark_necessary): Use parent_stmt() to traverse
12434169689Skan	all the control statements that contain the current
12435169689Skan	statement.
12436169689Skan	(makr_control_parent_necessary): Remove.  Update all users.
12437169689Skan	(stmt_useful_p): Add BIND_EXPR to the list of useful
12438169689Skan	statements.
12439169689Skan	(process_worklist): Check that the statement is
12440169689Skan	associated to a basic block.
12441169689Skan	(remove_dead_stmt): Don't assume that the block has a
12442169689Skan	postdominator.
12443169689Skan
12444169689Skan2002-02-20  Daniel Berlin  <dberlin@dberlin.org>
12445169689Skan
12446169689Skan	* tree-alias-ander.c: Store cached ptsets in the typevar, not
12447169689Skan	a seperate hash table.
12448169689Skan	(ptset_map): Removed;
12449169689Skan	(ptset_map_eq): Ditto.
12450169689Skan	(ptset_map_hash): Ditto.
12451169689Skan	(andersen_init): Remove ptset_map.
12452169689Skan	(andersen_cleanup): Ditto.
12453169689Skan	(andersen_add_var): Ditto.
12454169689Skan	(andersen_add_var_asm): Ditto.
12455169689Skan	(andersen_may_alias): Ditto.
12456169689Skan	* tree-alias-common.c: Store typevars for DECL nodes in the tree_decl
12457169689Skan	structure.
12458169689Skan	(get_alias_var_decl): Use DECL_PTA_TYPEVAR for DECL's.
12459169689Skan	(create_alias_var): Ditto.
12460169689Skan	(find_func_aliases): CONST functions don't affect aliasing either.
12461169689Skan	(ptr_may_alias_var): Don't call get_base_symbol.
12462169689Skan	Remove decl_function_context, use DECL_CONTEXT instead.
12463169689Skan	For DECL's, use DECL_PTA_TYPEVAR.
12464169689Skan	* tree-alias-type.c (struct alias_typevar_aterm): Add ptset member.
12465169689Skan	(ALIAS_TVAR_PTSET): New macro.
12466169689Skan	* tree.h (DECL_PTA_TYPEVAR): New macro.
12467169689Skan	(struct tree_decl): Add typevar member.
12468169689Skan
12469169689Skan2003-02-20  Jeff Law  <law@redhat.com>
12470169689Skan
12471169689Skan	* c-simplify.c (simplify_decl_stmt): Call set_vla_decl on the
12472169689Skan	temporary holding the size and unit size for a VLA.  Minor
12473169689Skan	formatting fixes.
12474169689Skan
12475169689Skan	* ssa.c: Revert caching of immediate dominators change made on
12476169689Skan	Jan 28, 2003.
12477169689Skan
12478169689Skan	* tree-dfa.c: Fix comment.
12479169689Skan
12480169689Skan2003-02-20  Jeff Law  <law@redhat.com>
12481169689Skan
12482169689Skan	* tree-cfg.c (remove_bb): Update PHI nodes as edges are removed.
12483169689Skan	(cleanup_cond_expr_graph): Likewise.
12484169689Skan	(cleanup_switch_expr_graph): Likewise.
12485169689Skan	(disconnect_unreachable_case_labels): Likewise.
12486169689Skan
12487169689Skan	* tree-ssa-dce.c (mark_control_parent_necessary): Be much more
12488169689Skan	selective about what statements in the control parents are marked
12489169689Skan	as necessary.
12490169689Skan
12491169689Skan	* tree-dfa.c (INDIRECT_REFs and ADDRESSABLE_VARs varrays): Replace
12492169689Skan	with a single ALIASED_OBJECTs set of varrays.
12493169689Skan	(dump_dfa_stats): Corresponding changes.
12494169689Skan	(compute_may_aliases, dump_alias_info): Likewise.
12495169689Skan	(compute_alias_sets): Likesise.  Update comments.    Register
12496169689Skan	alias sets for all potentially aliased objects which are stored.
12497169689Skan	Check each potentially aliased object with the registered alias
12498169689Skan	sets.
12499169689Skan	(register_alias_set): If DEREF aliases a single registered _DECL,
12500169689Skan	then replace the _DECL's entry with DEREF.
12501169689Skan	(find_alias_for): Update comments.  Do not stop the search when
12502169689Skan	an alias is found.  There may be multiple entries with conflicting
12503169689Skan	alias sets.
12504169689Skan	(struct walk_state): New structure for statement walker callbacks.
12505169689Skan	(find_vars_r): Add logic to track loads and stores of potentially
12506169689Skan	aliased objects separately.  Various changes related to
12507169689Skan	using a single set of varrays for all aliased objects.
12508169689Skan	(add_referenced_var): Record in the var's annotation if the
12509169689Skan	var is read or written.  Various changes related to using a
12510169689Skan	single set of varrays for all the aliased objects.
12511169689Skan	(add_stmt_operand): Only set may_point_to_global_mem for INDIRECT_REFs.
12512169689Skan	* tree-flow.h (struct var_ann_d): Add new fields indicating if
12513169689Skan	the var is loaded or stored.  Explicitly note unused bitfield
12514169689Skan	entries.
12515169689Skan
12516169689Skan2003-02-19  Jeff Law  <law@redhat.com>
12517169689Skan
12518169689Skan	* fold-const.c (fold_negate_const): New function.  Broken out of
12519169689Skan	the generic fold code.
12520169689Skan	(fold_abs_const, fold_relational_const): Likewise.
12521169689Skan	(fold_relational_hi_lo): Likewise.
12522169689Skan	(nondestructive_fold_unary, nondestructive_fold_binary): Likewise.
12523169689Skan	(fold): Use fold_negate_const, fold_abs_const, fold_relational_const,
12524169689Skan	and fold_relational_hi_lo.
12525169689Skan	* tree.h (nondestructive_fold_unary): Declare.
12526169689Skan	(nondestructive_fold_binary): Declare.
12527169689Skan	* tree-ssa-ccp.c (ccp_fold): New function.
12528169689Skan	(add_control_edge): Fix trivial formatting bug.
12529169689Skan	(evaluate_stmt): Rework to use ccp_fold instead of copying
12530169689Skan	statements.
12531169689Skan
12532169689Skan2003-02-18  Jeff Law  <law@redhat.com>
12533169689Skan
12534169689Skan	* tree-ssa-ccp.c (visit_assignment): For simple copies, copy the
12535169689Skan	lattice values.
12536169689Skan	(defs_to_undefined): Add missing abort.
12537169689Skan	(replace_uses_in): Do not do a replacement if it would create
12538169689Skan	non GIMPLE trees.
12539169689Skan
12540169689Skan2002-02-14  Jeff Law  <law@redhat.com>
12541169689Skan
12542169689Skan	* tree-ssa-ccp.c (def_to_undefined): Improve sanity checking code
12543169689Skan	so that it can detect invalid VARYING->UNDEFINED transitions.
12544169689Skan	(set_lattice_value): Improve sanity checking code so that it
12545169689Skan	does not trip on valid VARYING->CONSTANT transitions.
12546169689Skan
12547169689Skan	* tree-flow.h (struct stmt_ann_d): Add new field in_ccp_worklist.
12548169689Skan	* tree-ssa-ccp.c (simulate_stmt): Renamed from simulate_def_use_edges.
12549169689Skan	(add_var_to_ssa_edges_worklist): New function.  Only add statements
12550169689Skan	to the ssa_edges worklist if they are not already on the worklist.
12551169689Skan	(def_to_undefined, def_to_varying, set_lattice_value)
12552169689Skan	(tree_ssa_ccp): Only reevaluate the statement if in_ccp_worklist
12553169689Skan	is set for the element popped off the ssa_edges worklist.
12554169689Skan	(simulate_statement): Simplify now that ssa_edges is a worklist
12555169689Skan	of statements to reevaluate rather than a worklist of defs
12556169689Skan	that need their immediate uses reevaluated.
12557169689Skan	(visit_stmt): Clear in_ccp_worklist.
12558169689Skan
12559169689Skan	* tree-ssa-ccp.c (def_to_undefined): Directly store the new
12560169689Skan	lattice values rather than call set_value.
12561169689Skan	(def_to_varying): Likewise.
12562169689Skan	(set_lattice_value): Likewise.
12563169689Skan
12564169689Skan	* tree-ssa-ccp.c (def_to_undefined): Add some state transition
12565169689Skan	sanity checking.  Avoid calling set_value if nothing changed.
12566169689Skan	(def_to_varying): Avoid calling set_value if nothing changed.
12567169689Skan	(set_lattice_value): Add some state transition sanity checking
12568169689Skan	for transitions into the CONSTANT state.  If the object's
12569169689Skan	"constant" value has changed to a new constant value, then the
12570169689Skan	object has a VARYING value.
12571169689Skan
12572169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Work through the entire
12573169689Skan	ssa_edges worklist each iteration through the main loop.
12574169689Skan
12575169689Skan2002-02-13  Jeff Law  <law@redhat.com>
12576169689Skan
12577169689Skan	* tree-ssa-ccp.c: Fix comment formatting glitches.
12578169689Skan
12579169689Skan	* tree-ssa-ccp.c (may_fold_p): New function.  Returns nonzero if
12580169689Skan	the given statement may fold after replacement of operands with
12581169689Skan	constants.
12582169689Skan	(evaluate_stmt): Only create a copy of the statement if there is
12583169689Skan	a reasonable chance the statement will fold.
12584169689Skan
12585169689Skan2002-02-13  Diego Novillo  <dnovillo@redhat.com>
12586169689Skan
12587169689Skan	* Makefile.in (OBJS): Add tree-ssa-pre.o.
12588169689Skan
12589169689Skan2003-02-13  Daniel Berlin  <dberlin@dberlin.org>
12590169689Skan
12591169689Skan	* tree-dfa.c (create_stmt_ann): Do stmt part of common annotation.
12592169689Skan	* tree-flow-inline.h (tree_stmt): Return statement tree is part of.
12593169689Skan	* tree-flow.h (struct bb_ann_d): Add ephi_nodes.
12594169689Skan	* tree-optimize.c (optimize_tree): Activate SSAPRE again.
12595169689Skan	* tree-pretty-print.c (debug_generic_expr): New function.
12596169689Skan	(debug_generic_stmt): Ditto.
12597169689Skan	(dump_generic_node): Pretty print EUSE's, EREF's,  and EPHI's.
12598169689Skan
12599169689Skan	* tree-ssa-pre.c: Rewrite almost entirely. Now performs more
12600169689Skan	strength reduction, EPHI minimization, and keeps SSA up to date.
12601169689Skan	* tree.c (tree_size): Handle EUSE, EPHI, EREF nodes.
12602169689Skan	(tree_node_structure): Ditto.
12603169689Skan	(ephi_node_elt_check_failed): New function.
12604169689Skan	* tree.def: Add EUSE_NODE, ELEFT_NODE, EKILL_NODE, EPHI_NODE,
12605169689Skan	EEXIT_NODE.
12606169689Skan	* tree.h (EREF_NODE_CHECK): New.
12607169689Skan	(EPHI_NODE_ELT_CHECK): New.
12608169689Skan	(struct tree_eref_common): New.
12609169689Skan	(struct tree_euse_node): New.
12610169689Skan	(struct tree_ephi_node): New.
12611169689Skan	(union tree_node): Add euse, eref, ephi members.
12612169689Skan	(enum tree_node_structure): Add TS_EPHI_NODE, TS_EUSE_NODE,
12613169689Skan	TS_EREF_NODE.
12614169689Skan
12615169689Skan2003-02-13  Daniel Berlin <dberlin@dberlin.org>
12616169689Skan	    Andreas Jaeger  <aj@suse.de>
12617169689Skan
12618169689Skan	* tree-flow.h: Add some garbage collector marks.
12619169689Skan
12620169689Skan2003-02-12  Jeff Law  <law@redhat.com>
12621169689Skan
12622169689Skan	* Makefile.in (ssa.o): Depends on $(TREE_H) and tree-flow.h
12623169689Skan	* ssa.c: Include tree.h and tree-flow.h.
12624169689Skan	(compute_dominance_frontiers_1): Use the sparse bitmap
12625169689Skan	of dominator children from the basic block's annotation
12626169689Skan	if it's available.  Otherwise build the sparse bitmap
12627169689Skan	using the result of get_dominated_by.
12628169689Skan	* tree-ssa.c (rewrite_into_ssa): Reorder things slightly so
12629169689Skan	that we can use the cached dominator children computed
12630169689Skan	by mark_def_sites in compute_dominance_frontiers.
12631169689Skan
12632169689Skan2003-02-12  Andreas Jaeger  <aj@suse.de>
12633169689Skan
12634169689Skan	* tree-dfa.c (dump_alias_info): Cast variable of size_t properly.
12635169689Skan
12636169689Skan2003-02-12  Daniel Berlin  <dberlin@dberlin.org>
12637169689Skan
12638169689Skan	* tree-dfa.c (find_may_aliases_for): Remove
12639169689Skan	(compute_may_aliases): Always call compute_alias_sets.
12640169689Skan
12641169689Skan2003-02-10  Jeff Law <law@redhat.com>
12642169689Skan
12643169689Skan	* ssa.c (compute_dominance_frontiers_1): Use a sparse bitmap
12644169689Skan	for the frontiers.
12645169689Skan	(compute_dominance_frontiers): Corresponding changes.
12646169689Skan	(convert_to_ssa): Similarly.  Convert the sparse bitmap to
12647169689Skan	a simple bitmap to avoid lots of collateral damage.
12648169689Skan	* ssa.h (compute_dominance_frontiers): Update prototype.
12649169689Skan	* tree-ssa.c (added, in_work): Kill, no longer needed.
12650169689Skan	(struct def_blocks_d): Add new bitmap (livein_blocks).
12651169689Skan	(rewrite_into_ssa): Make dominance frontiers be a sparse
12652169689Skan	bitmap instead of a simple bitmap.  Rename the "nonlocals"
12653169689Skan	simple bitmap to "globals".  Pass it into mark_def_sites.
12654169689Skan	(compute_global_livein): New function.
12655169689Skan	(mark_def_sites): Also keep track of variables which are
12656169689Skan	used before they are set.  Allow caller to allocate and
12657169689Skan	pass in a simple bitmap for global variables.  Process
12658169689Skan	items defined in the statement last.
12659169689Skan	(set_def_block): Also allocate bitmap for globals.
12660169689Skan	(set_livein_block): New function.
12661169689Skan	(def_blocks_free): Free def_blocks correctly.  Also free
12662169689Skan	livein_blocks.
12663169689Skan	(debug_def_blocks_r): Also dump the livein_blocks.
12664169689Skan	(insert_phi_nodes): Simplify now that we don't need the
12665169689Skan	added and in_work varrays.  Accept DFS as a sparse bitmap
12666169689Skan	instead of a simple bitmap.
12667169689Skan	(insert_phi_nodes_for): Rework significantly.  Pre-compute all
12668169689Skan	the insertion points for semi-pruned form.  While computing those
12669169689Skan	insertion points keep track of how many phi vector entries
12670169689Skan	would be needed at those insertion points.  When the number of
12671169689Skan	entries gets large (32), compute global life information and
12672169689Skan	use that to further pruned the number of PHI insertion points
12673169689Skan	necessary.
12674169689Skan
12675169689Skan2003-02-09  Diego Novillo  <dnovillo@redhat.com>
12676169689Skan
12677169689Skan	* tree-dfa.c (find_vars_r): Assume that the RHS of an INDIRECT_REF,
12678169689Skan	that is also an SSA variable, is a VAR_DECL.
12679169689Skan	(get_virtual_var): Handle INDIRECT_REF nodes that are not valid SSA
12680169689Skan	variables.
12681169689Skan
12682169689Skan	* tree-ssa-dce.c (stmt_useful_p): Revert kludge in previous commit.
12683169689Skan	VA_ARG_EXPR nodes are not inherently live.
12684169689Skan
12685169689Skan	* tree-ssa.c (mark_def_sites): Don't process the LHS of assignments
12686169689Skan	twice.
12687169689Skan	The operand of a virtual definition constitutes a use of the
12688169689Skan	variable which should be considered a non-local if it had not been
12689169689Skan	killed inside the block.
12690169689Skan
12691169689Skan	* tree.h (SSA_VAR_P): Only return true for INDIRECT_REFs if their
12692169689Skan	operand is a _DECL node.
12693169689Skan
12694169689Skan2003-02-09  Diego Novillo  <dnovillo@redhat.com>
12695169689Skan
12696169689Skan	* config/rs6000/t-rs6000 (simplify-rtx.o): Compile with -Wno-error.
12697169689Skan
12698169689Skan2003-02-08  Diego Novillo  <dnovillo@redhat.com>
12699169689Skan
12700169689Skan	* toplev.c (parse_options_and_default_flags): Enable SSA DCE by
12701169689Skan	default.
12702169689Skan
12703169689Skan	* tree-dfa.c (get_expr_operands): Recurse into LHS of an ARRAY_REF
12704169689Skan	when it's not a regular variable.  Always recurse into the RHS.
12705169689Skan	(add_stmt_operand): Set may_point_to_global_mem for pointers that
12706169689Skan	are assigned expressions that may reference global memory.  Also
12707169689Skan	set its dereference variable to be an alias of global memory.
12708169689Skan	(dump_variable): Show may_point_to_global_mem flag.
12709169689Skan	(compute_alias_sets): Also dump all referenced variables when
12710169689Skan	dumping alias information.
12711169689Skan	(add_may_alias): Check for global memory aliasing.
12712169689Skan	(may_access_global_mem_p): Rename from may_access_global_mem.
12713169689Skan	Return true if the expression is a variable that may point to or
12714169689Skan	alias global memory.
12715169689Skan	(add_referenced_var): Pointer arguments and global pointers may
12716169689Skan	point to global memory.
12717169689Skan	(set_may_alias_global_mem): Move ...
12718169689Skan	* tree-flow-inline.h (set_may_alias_global_mem): ... here.
12719169689Skan	(set_may_point_to_global_mem): New function.
12720169689Skan	(may_point_to_global_mem_p): New function.
12721169689Skan
12722169689Skan	* tree-ssa-dce.c (stmt_useful_p): VA_ARG_EXPRs are inherently live.
12723169689Skan	* tree-ssa.c (rewrite_into_ssa): Don't call dump_referenced_vars.
12724169689Skan
12725169689Skan2003-02-06  Diego Novillo  <dnovillo@redhat.com>
12726169689Skan
12727169689Skan	* tree-dfa.c (struct alias_tags, alias_tags, num_alias_tags):
12728169689Skan	Remove.  Update all users.
12729169689Skan	(struct alias_set_d): New.
12730169689Skan	(alias_sets): New file local variable.
12731169689Skan	(compute_alias_sets): New function.
12732169689Skan	(compute_may_aliases): Call it when not doing points-to analysis.
12733169689Skan	(register_alias_set): New function.
12734169689Skan	(find_alias_for): New function.
12735169689Skan	(may_alias_p): Declare static.
12736169689Skan	Don't assume that VAR may not be aliased if it's a non-addressable
12737169689Skan	_DECL.
12738169689Skan	If VAR and PTR are aggregate types, check if they can have a field
12739169689Skan	that points to the other one.
12740169689Skan	(find_may_aliases_for): Move handling of global memory aliasing ...
12741169689Skan	(add_may_alias): ... here.
12742169689Skan	Also accept the base symbols for the variable and its alias.
12743169689Skan	(register_new_alias): Remove.  Update all users.
12744169689Skan	(find_alias_tag): Remove.  Update all users.
12745169689Skan	(find_vars_r): Update VAR after re-writing *TP when sharing
12746169689Skan	INDIRECT_REF nodes.
12747169689Skan	* tree-flow.h (may_alias_p): Remove declaration.
12748169689Skan
12749169689Skan	* tree-ssa.c (rewrite_into_ssa): Include referenced variables in
12750169689Skan	default debug dumps.
12751169689Skan
12752169689Skan	Support for VLAs.
12753169689Skan
12754169689Skan	* tree-dfa.c (find_vla_decls): New function.
12755169689Skan	(compute_may_aliases): Call it.
12756169689Skan	(find_vla_decls_r): New function.
12757169689Skan	(dump_variable): Show whether the variable is used in a VLA
12758169689Skan	declaration.
12759169689Skan	* tree-flow-inline.h (is_vla_decl): New function.
12760169689Skan	(set_vla_decl): New function.
12761169689Skan	* tree-flow.h (struct var_ann_d): Add bitfield 'is_vla_decl'.
12762169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Return true if SYM is
12763169689Skan	used inside a VLA declaration.
12764169689Skan
12765169689Skan2003-02-05  Andrew MacLeod  <amacleod@redhat.com>
12766169689Skan
12767169689Skan	* Makefile.in : Include new file tree-iterator.h in tree-simple.h
12768169689Skan	* gimplify.c (simplify_cleanup_point_expr): Use tsi_ rather than gsi_.
12769169689Skan	* tree-cfg.c (make_blocks, remove_bb): Use tsi_ not gsi_ routines.
12770169689Skan	(bsi_remove): Renamed from gsi_remove, use bsi_ routines.
12771169689Skan	(successor_block, first_exec_stmt): Use tsi_ not gsi_ routines.
12772169689Skan	(first_stmt, last_stmt, last_stmt_ptr): Use bsi_ not gsi_ routines.
12773169689Skan	(bsi_init): Split out from bsi_start.
12774169689Skan	(bsi_start): Renamed from gsi_start_bb, use bsi_ routines.
12775169689Skan	(bsi_next_in_bb): Moved from tree-flow-inline.h and renamed from
12776169689Skan	gsi_step_in_bb. Also verify BB of new stmt.
12777169689Skan	* tree-dfa.c (compute_immediate_uses, dump_immediate_uses,
12778169689Skan	collect_dfa_stats, compute_may_aliases): Use block_stmt_iterator.
12779169689Skan	* tree-flow-inline.h (gsi_step_in_bb): Moved to tree-cfg.c
12780169689Skan	(bsi_end_p): Renamed from gsi_end_bb_p.
12781169689Skan	(bsi_next): renamed from gsi_step_bb
12782169689Skan	(bsi_prev): New function.
12783169689Skan	(bsi_stmt_ptr): Block version of gsi_stmt_ptr.
12784169689Skan	(bsi_stmt): Block version of gsi_stmt.
12785169689Skan	(bsi_container): Block version of gsi_container.
12786169689Skan	* tree-flow.h (block_stmt_iterator): New iterator type.
12787169689Skan	* tree-iterator.h: New include file for tree_iterator.
12788169689Skan	* tree-simple.h : Include tree-iterator.h
12789169689Skan	(gimple_stmt_iterator, gsi_start, gsi_end_p, gsi_stmt_ptr,
12790169689Skan	gsi_stmt, gsi_container): Move to tree-iterator.h and rename to tsi_.
12791169689Skan	(gsi_step): Move to tree-iterator.h and renamed to tsi_next.
12792169689Skan	* tree-ssa-ccp.c (simulate_block, substitute_and_fold): Use block
12793169689Skan	iterators instead of gimple_stmt_iterator.
12794169689Skan	* tree-ssa-dce.c (mark_control_parent_necessary, find_useful_stmts,
12795169689Skan	remove_dead_stmts, remove_dead_stmt): Use block_stmt_iterator.
12796169689Skan	* tree-ssa.c (mark_def_sites, rewrite_out_of_ssa, rewrite_stmts): Use
12797169689Skan	block_stmt_iterator.
12798169689Skan
12799169689Skan2003-02-04  Daniel Berlin  <dberlin@dberlin.org>
12800169689Skan
12801169689Skan	* tree-alias-common.c (get_alias_var_decl): If it's a global var,
12802169689Skan	make sure it doesn't get added to local_alias_vars.
12803169689Skan	(get_name): Return the right name for FUNCTION_DECL's.
12804169689Skan
12805169689Skan2003-02-04  Diego Novillo  <dnovillo@redhat.com>
12806169689Skan
12807169689Skan	* tree-dfa.c (add_stmt_operand): Do not add a VUSE for a pointer
12808169689Skan	when clobbering its associated INDIRECT_REF variable.
12809169689Skan
12810169689Skan2003-02-04  Diego Novillo  <dnovillo@redhat.com>
12811169689Skan
12812169689Skan	* config/rs6000/t-rs6000 (jump.o, regmove.o, c-typeck.o, cfgrtl.o,
12813169689Skan	combine.o, fold-const.o, ifcvt.o, reload1.o, rtlanal.o,
12814169689Skan	cp/decl2.o, cp/pt.o, f/where.o, java/expr.o, objc/objc-act.o,
12815169689Skan	rs6000.o, insn-emit.o): Compile with -Wno-error.
12816169689Skan
12817169689Skan2003-02-03  Diego Novillo  <dnovillo@redhat.com>
12818169689Skan	    Jeff Law  <law@redhat.com>
12819169689Skan
12820169689Skan	* tree-cfg.c (make_blocks): Don't always start a new block with
12821169689Skan	COND_EXPR and SWITCH_EXPR statements.
12822169689Skan	Call stmt_ends_bb_p to determine if the current statement should be
12823169689Skan	the last in the block.
12824169689Skan	(make_cond_expr_blocks): Second argument is now the entry block
12825169689Skan	to the conditional.
12826169689Skan	(make_switch_expr_blocks): Second argument is now the entry block
12827169689Skan	to the switch.
12828169689Skan	(make_edges, make_ctrl_stmt_edges, make_loop_expr_edges,
12829169689Skan	cleanup_control_flow, cleanup_cond_expr_graph,
12830169689Skan	cleanup_switch_expr_graph, disconnect_unreachable_case_labels,
12831169689Skan	find_taken_edge, successor_block, latch_block, is_latch_block,
12832169689Skan	switch_parent): Work with the last statement of the block, not the
12833169689Skan	first.
12834169689Skan	(is_ctrl_altering_stmt): Pre-compute the code of the statement.
12835169689Skan	(stmt_starts_bb_p): Declare file local.
12836169689Skan	Don't call is_ctrl_stmt.  Check if T is a LOOP_EXPR instead.
12837169689Skan	(stmt_ends_bb_p): New function.
12838169689Skan
12839169689Skan	* tree-flow.h (stmt_starts_bb_p): Remove declaration.
12840169689Skan
12841169689Skan2003-02-03  Diego Novillo  <dnovillo@redhat.com>
12842169689Skan
12843169689Skan	* tree-dfa.c (find_vars_r): Share INDIRECT_REF nodes whose operand
12844169689Skan	is a VAR_DECL.
12845169689Skan	(add_referenced_var): Add additional argument 'sym'.  Update all users.
12846169689Skan	Don't call get_base_symbol.
12847169689Skan	(add_indirect_ref_var): Rename argument 'var' to 'ptr'.
12848169689Skan	(htab_hash_var): Remove.  Update all users to use htab_hash_pointer.
12849169689Skan	(htab_var_eq): Remove.  Update all users to use htab_eq_pointer.
12850169689Skan
12851169689Skan	* tree-flow-inline.h (var_ann): Don't retrieve the annotation of
12852169689Skan	the base pointer for INDIRECT_REF variables.
12853169689Skan	(is_aliased): Remove.  Update all users.
12854169689Skan	(is_dereferenced): Remove.  Update all users.
12855169689Skan	(same_var_p): Remove.  Update all users to use pointer equality.
12856169689Skan
12857169689Skan	* tree-simple.c (get_base_symbol): Convert tail recursion into
12858169689Skan	iteration.
12859169689Skan
12860169689Skan	* tree-ssa.c (rewrite_out_of_ssa): Add FIXME note about overlapping
12861169689Skan	live ranges for different versions of the same variable.
12862169689Skan
12863169689Skan2003-02-03  Jeff Law  <law@redhat.com>
12864169689Skan
12865169689Skan	* tree-dfa.c (add_referenced_var): Annotate each item in the
12866169689Skan	REFERENCED_VARS varray with a unique id.
12867169689Skan	* tree-flow.h (struct var_ann_d): Add new uid field.
12868169689Skan	* tree-ssa.c (mark_def_sites): Compute the set of variables
12869169689Skan	live across basic blocks and return them in an sbitmap.
12870169689Skan	(insert_phi_nodes): Use the set of nonlocal variables computed
12871169689Skan	by mark_def_sites to reduce the number of PHI nodes inserted.
12872169689Skan	(rewrite_into_ssa): Updated to deal with changes in
12873169689Skan	insert_phi_nodes and mark_def_sites.  Free the sbitmap returned
12874169689Skan	by mark_def_sites.
12875169689Skan
12876169689Skan2003-02-03  Diego Novillo  <dnovillo@redhat.com>
12877169689Skan
12878169689Skan	* c-common.h (GOTO_DESTINATION): Remove.  Fix botched
12879169689Skan	merge.
12880169689Skan
12881169689Skan2003-02-03  Diego Novillo  <dnovillo@redhat.com>
12882169689Skan
12883169689Skan	Fix warnings to allow bootstrapping with -Werror.
12884169689Skan
12885169689Skan	* Makefile.in (c-semantics.o-warn): Add -Wno-error.
12886169689Skan	(emit-rtl.o-warn): Likewise.
12887169689Skan	(profile.o-warn): Likewise.
12888169689Skan	(tree.o-warn): Likewise.
12889169689Skan	(OBJS): Remove simple-break-elim.o and simple-goto-elim.o.
12890169689Skan	* c-pretty-print.c (print_function_decl): Remove unused function.
12891169689Skan	* bitmap.c (bitmap_last_set_bit): Initialize variable 'word'.
12892169689Skan	* c-typeck.c (build_binary_op): Initialize variable 'type'.
12893169689Skan	* combine.c (combine_simplify_rtx): Initialize variable 'reversed'.
12894169689Skan	(make_compound_operation): Initialize variable 'i'.
12895169689Skan	* dwarf2out.c (dwarf2out_finish): Initialize variable 'context'.
12896169689Skan	* expr.c (store_constructor): Initialize variables 'lo', 'hi',
12897169689Skan	'startb' and 'endb'.
12898169689Skan	(expand_expr): Initialize variable 'op0'.
12899169689Skan	* fold-const.c (fold): Initialize variable 'tem'.
12900169689Skan	* profile.c (branch_prob): Initialize variable 'prev_file_name'.
12901169689Skan	* reload.c (find_equiv_reg): Initialize variables 'valtry and
12902169689Skan	'valueno'.
12903169689Skan	* rtlanal.c (get_jump_table_offset): Initialize variable 'set'.
12904169689Skan	* ssa-ccp.c (ssa_const_prop): Fix sign mismatch warning.
12905169689Skan	* varasm.c (output_constant_def): Initialize variable 'defstr'.
12906169689Skan	* gimplify.c (simplify_expr): Initialize variables
12907169689Skan	'saved_input_filename' and 'saved_lineno'.
12908169689Skan	(simplify_compound_lval): Initialize variable 'code'.
12909169689Skan	* tree-alias-ander.c (pta_bottom): De-ansify.
12910169689Skan	(andersen_cleanup): Remove unused variables.
12911169689Skan	(andersen_heap_assign): Mark argument lhs ATTRIBUTE_UNUSED.
12912169689Skan	(pta_bottom): Remove unused function.
12913169689Skan	(pta_get_ptsize): Remove unused function.
12914169689Skan
12915169689Skan2003-02-02  Diego Novillo  <dnovillo@redhat.com>
12916169689Skan
12917169689Skan	* tree-dfa.c (get_expr_operands): Add a VUSE for the dereference of
12918169689Skan	every pointer passed in a function call.
12919169689Skan	Move code to add an operand for the base pointer of an
12920169689Skan	INDIRECT_REF ...
12921169689Skan	(add_stmt_operand): ... here.
12922169689Skan	Add a VUSE for the base pointer of every INDIRECT_REF variable.
12923169689Skan	(find_may_aliases_for): Fix starting index for the loop that scans
12924169689Skan	INDIRECT_REFs for aliasing.
12925169689Skan	Factor code that marks two variables aliased into
12926169689Skan	register_new_alias.
12927169689Skan	(register_new_alias): New function.
12928169689Skan	(may_alias_p): Handle aliasing of structure fields.
12929169689Skan	(add_may_alias): Fix documentation.
12930169689Skan	(find_vars_r): Factor code that adds a new referenced variable into
12931169689Skan	add_referenced_var.
12932169689Skan	(add_referenced_var): New function.
12933169689Skan	(add_indirect_ref_var): New function.
12934169689Skan	(get_virtual_var): Handle variables wrapped in SSA_NAMEs.
12935169689Skan	(set_may_alias_global_mem): Move from ...
12936169689Skan	* tree-flow-inline.h: ... here.
12937169689Skan
12938169689Skan	* tree-ssa-dce.c (need_to_preserve_store): CALL_EXPRs are
12939169689Skan	implicitly live.  VA_ARG_EXPRs are not.
12940169689Skan	(stmt_useful_p):
12941169689Skan
12942169689Skan	* tree.h (SSA_NAME_VAR): Rename from SSA_NAME_DECL.  Update all
12943169689Skan	users.
12944169689Skan	(struct tree_ssa_name): Rename field 'decl' to 'var'.  Update all
12945169689Skan	users.
12946169689Skan	(SSA_DECL_P): Accept only VAR_DECLs and PARM_DECLs possibly wrapped
12947169689Skan	inside an SSA_NAME node.
12948169689Skan	(SSA_VAR_P): Also accept SSA_NAME nodes.
12949169689Skan
12950169689Skan2003-02-01  Daniel Berlin  <dberlin@dberlin.org>
12951169689Skan
12952169689Skan	* Makefile.in (tree-ssa-pre2.o): Remove accidental addition.
12953169689Skan
12954169689Skan2003-01-31  Diego Novillo  <dnovillo@redhat.com>
12955169689Skan
12956169689Skan	* tree-cfg.c (find_taken_edge_cond_expr): New function.
12957169689Skan	(find_taken_edge_switch_expr): New function.
12958169689Skan	(value_matches_some_label): New function.
12959169689Skan	(find_taken_edge): Re-structure to use the three new functions.
12960169689Skan
12961169689Skan2003-01-30  Jason Merrill  <jason@redhat.com>
12962169689Skan
12963169689Skan	* gimplify.c (simplify_function_tree): Set TREE_SIDE_EFFECTS on
12964169689Skan	the BIND_EXPR wrapper.
12965169689Skan
12966169689Skan2003-01-30  Diego Novillo  <dnovillo@redhat.com>
12967169689Skan
12968169689Skan	* tree-dfa.c (call_may_clobber): New function.
12969169689Skan	(get_expr_operands): Call it.
12970169689Skan	(find_vars_r): Call it.
12971169689Skan
12972169689Skan2003-01-30  Jeff Law <law@redhat.com>
12973169689Skan
12974169689Skan	* tree-dfa.c (struct alias_tags): New.  Collector for key information
12975169689Skan	regarding alias tags.
12976169689Skan	(indirect_refs_base, indirect_refs_alias_set): New varrays.
12977169689Skan	(addressable_vars_base, addressable_vars_alias_set): Likewise.
12978169689Skan	(compute_may_aliases): Initialize and finalize the new varrays.
12979169689Skan	Update allocation of alias tags information.
12980169689Skan	(find_may_aliases_for): Extract base symbols and alias set
12981169689Skan	information for V1 and V2 from the virtual arrays and store
12982169689Skan	them into local variables.  Pass them as necessary to
12983169689Skan	may_alias_p, may_access_global_mem, find_alias_tag.  Add base
12984169689Skan	symbol and alias set when creating a new alias tag.
12985169689Skan	(find_vars_r): Fill in new varrays as needed.
12986169689Skan	(may_alias_p): Add new arguments for base and alias set of the
12987169689Skan	two origianl incoming arguments.  No longer call get_base_symbol
12988169689Skan	or get_alias_set.
12989169689Skan	(find_alias_tag,  may_access_global_mem): Similarly.
12990169689Skan	(add_stmt_operand): Update to pass additional argument to
12991169689Skan	may_access_global_mem.
12992169689Skan	(dump_alias_info): Update to deal with new alias tag structure.
12993169689Skan	* tree-flow.h (may_alias_p): Update prototype with new arguments.
12994169689Skan	* tree-ssa-pre.c (process_left_occs_and_kills): Update to pass
12995169689Skan	new arguments to may_alias_p.
12996169689Skan
12997169689Skan2003-01-30  Daniel Berlin  <dberlin@dberlin.org>
12998169689Skan
12999169689Skan	Remove all traces of steensgaard's algorithm.
13000169689Skan	* tree-alias-steen.c: Removed.
13001169689Skan	* tree-alias-steen.h: Ditto.
13002169689Skan	* tree-alias-ecr.c: Ditto.
13003169689Skan	* tree-alias-ecr.h: Ditto.
13004169689Skan	* disjoint-set.c: Ditto.
13005169689Skan	* disjoint-set.h: Ditto.
13006169689Skan	* Makefile.in: Remove removed files.
13007169689Skan	* c-config-lang.in: Ditto.
13008169689Skan	* gengtype.c: Ditto.
13009169689Skan	* tree-alias-common.c: Don't use steen_alias_ops anymore.
13010169689Skan	* toplev.c: Remove help text and steen option.
13011169689Skan	* tree-alias-common.h: Remove PTA_STEEN.
13012169689Skan	* tree-alias-type.c: Remove all steensgaard related types and
13013169689Skan	functions.
13014169689Skan	* tree-alias-type.h: Ditto.
13015169689Skan
13016169689Skan2003-01-30  Diego Novillo  <dnovillo@redhat.com>
13017169689Skan
13018169689Skan	* tree-cfg.c (struct cfg_stats_d): New.
13019169689Skan	(cfg_stats): New file local.
13020169689Skan	(build_tree_cfg): Start TV_TREE_CFG timer before allocating memory.
13021169689Skan	Initialize cfg_stats.
13022169689Skan	(make_blocks): Count coalesced label blocks.
13023169689Skan	(dump_tree_cfg): Call dump_cfg_stats if TDF_STATS is enabled.
13024169689Skan	(dump_cfg_stats): New.
13025169689Skan	(debug_cfg_stats): New.
13026169689Skan
13027169689Skan	* tree-dfa.c (SCALE, LABEL, PERCENT): Move ...
13028169689Skan	* tree-flow.h: ... here
13029169689Skan
13030169689Skan2003-01-29  Diego Novillo  <dnovillo@redhat.com>
13031169689Skan
13032169689Skan	* tree-cfg.c (make_blocks): Do not start a new block if the
13033169689Skan	previous statement and the current statement are labels of the same
13034169689Skan	kind.
13035169689Skan
13036169689Skan2003-01-29  Diego Novillo  <dnovillo@redhat.com>
13037169689Skan
13038169689Skan	* tree-cfg.c (parent_array): Make file local.
13039169689Skan	(label_to_block_map): New file local variable.
13040169689Skan	(build_tree_cfg): Initialize label_to_block_map.
13041169689Skan	(make_edges): Don't pre-scan all the blocks looking for blocks with
13042169689Skan	labels.
13043169689Skan	(make_exit_edges): Remove argument label_to_block_map.  Update all
13044169689Skan	callers.
13045169689Skan	(make_goto_expr_edges): Likewise.
13046169689Skan	(dump_tree_bb): Check that the block has a valid annotation.
13047169689Skan	(set_bb_for_stmt): If the statement is a label, add the label to
13048169689Skan	the label_to_block_map.
13049169689Skan
13050169689Skan	* tree-pretty-print.c (dump_vops): Check that the block has a valid
13051169689Skan	annotation.
13052169689Skan
13053169689Skan2003-01-29  Jeff Law <law@redhat.com>
13054169689Skan
13055169689Skan	* tree-dfa.c (find_may_aliases_for): Just accept the index of
13056169689Skan	the current indirect_ref.  Caller updated.
13057169689Skan	(num_indirect_refs, num_addressable_vars): New variables.
13058169689Skan	(indirect_refs, addressable_vars): New varrays.
13059169689Skan	(dump_dfa_status): Dump info on the indirect refs and
13060169689Skan	addressable vars.
13061169689Skan	(dump_alias_info): Similarly.
13062169689Skan	(compute_may_aliases): Initialize and finalize the new virtual
13063169689Skan	arrays and hash tables for indirect refs and addressable vars.
13064169689Skan	Include setup/teardown in the cost for alias analysis.
13065169689Skan	(find_may_aliases_for):  Split main loop into two.  The first
13066169689Skan	walks over the indirect refs and takes advantage of the
13067169689Skan	symmetric properties of the aliasing relationship to avoid
13068169689Skan	useless work.  The second loop iterates over the addressable
13069169689Skan	variables.
13070169689Skan	(find_vars_r): Rework to build all three arrays we need.
13071169689Skan
13072169689Skan2003-01-29  Andreas Jaeger  <aj@suse.de>
13073169689Skan
13074169689Skan	* tree-alias-common.c (find_func_aliases): Remove unused variable.
13075169689Skan	(display_points_to_set_helper): #if 0 function to avoid warning
13076169689Skan	about unused function.
13077169689Skan
13078169689Skan	* tree-alias-ecr.c (ECR_new): Remove ISO C style function
13079169689Skan	definition.
13080169689Skan	* disjoint-set.c (disjoint_set_new): Likewise.
13081169689Skan
13082169689Skan2003-01-29  Frank Ch. Eigler  <fche@redhat.com>
13083169689Skan
13084169689Skan	* tree-mudflap.c (mx_xfn_indirect_ref): Use a stack of flags for
13085169689Skan	tracking pointer dereference reads vs writes.
13086169689Skan	(mf_build_check_statement_for): Pass access-type value to __mf_check.
13087169689Skan	* c-mudflap.c (mflang_register_call): Adapt to mf-runtime.h API change.
13088169689Skan
13089169689Skan2003-01-29  Diego Novillo  <dnovillo@redhat.com>
13090169689Skan
13091169689Skan	* Makefile.in (ssa.o): Add dependency on $(TIMEVAR_H).
13092169689Skan	* timevar.def (TV_DOM_FRONTIERS): Define.
13093169689Skan	* ssa.c (compute_dominance_frontiers): Use.
13094169689Skan
13095169689Skan2003-01-29  Diego Novillo  <dnovillo@redhat.com>
13096169689Skan
13097169689Skan	* tree-ssa-dce.c (remove_dead_stmt): Fix uninitialized use
13098169689Skan	warning.
13099169689Skan
13100169689Skan2003-01-28  Diego Novillo  <dnovillo@redhat.com>
13101169689Skan
13102169689Skan	* timevar.def (TV_TREE_SSA_REWRITE_BLOCKS): Adjust legend.
13103169689Skan	* tree-ssa.c (rewrite_into_ssa): Use TV_TREE_SSA_REWRITE_BLOCKS.
13104169689Skan	(mark_def_sites): Add comment.
13105169689Skan
13106169689Skan2003-01-28  Jeff Law <law@redhat.com>
13107169689Skan
13108169689Skan	* ssa.c (compute_dominance_frontiers_1): Use get_dominated_by
13109169689Skan	to avoid useless walks over all the basic blocks.  Use cache
13110169689Skan	of immediate dominators to avoid silly calls to get_immediate_dominator.
13111169689Skan	Do not clear elements of the frontiers bitmap.
13112169689Skan	(compute_dominance_frontiers): Compute cache of immediate
13113169689Skan	dominators and pass it to compute_dominance_frontiers_1.  Clear
13114169689Skan	the entire vector of frontiers bitmaps.
13115169689Skan
13116169689Skan	* timevar.def (TV_TREE_SSA_REWRITE_BLOCKS): Renamed from
13117169689Skan	TV_TREE_BUILD_SSA.
13118169689Skan	(TV_TREE_SSA_OTHER): New timevar.
13119169689Skan	* tree-ssa.c (rewrite_into_ssa): Updated.  Use new TV_TREE_SSA_OTHER
13120169689Skan	timevar.
13121169689Skan
13122169689Skan	* tree.h (LABEL_DECL_INDEX): Define for use by CFG builder.
13123169689Skan	* tree-cfg.c (make_exit_edges): Accept and pass though label to
13124169689Skan	block mapping array.
13125169689Skan	(make_goto_expr_edges): For simple gotos, lookup the destination
13126169689Skan	in the label to block mapping array.  Zap old slow code to
13127169689Skan	handle simple gotos.
13128169689Skan	(make_edges): Build the label to block mapping array.
13129169689Skan
13130169689Skan	* tree.h (PHI_NODE_ELT_CHECK): Provide version when ENABLE_CHECKING
13131169689Skan	is not defined.
13132169689Skan
13133169689Skan2003-01-28  Diego Novillo  <dnovillo@redhat.com>
13134169689Skan
13135169689Skan	* tree-flow-inline.h (parent_block, set_parent_block, phi_nodes):
13136169689Skan	Assume that blocks always have valid annotations.
13137169689Skan	(add_dom_child): New function.
13138169689Skan	(dominator_children): New function.
13139169689Skan
13140169689Skan	* tree-flow.h (struct bb_ann_d): Add field 'dom_children'.
13141169689Skan
13142169689Skan	* tree-ssa.c (mark_def_sites): Add parameter 'idom'.
13143169689Skan	Add each block BB to the set of dominator children of BB's
13144169689Skan	immediate dominator.
13145169689Skan	(rewrite_block): Remove 'idom' parameter.
13146169689Skan	Recurse into blocks set in the dominator children bitmap.
13147169689Skan
13148169689Skan2003-01-28  Diego Novillo  <dnovillo@redhat.com>
13149169689Skan
13150169689Skan	* flags.h (flag_disable_tree_ssa): New flag.
13151169689Skan	* c-decl.c (c_expand_body): Use it.
13152169689Skan	* toplev.c: Declare it.
13153169689Skan	(f_options): Add help text for -fdisable-tree-ssa.
13154169689Skan	* doc/invoke.texi: Add documentation for -fdisable-tree-ssa.
13155169689Skan
13156169689Skan2003-01-28  Diego Novillo  <dnovillo@redhat.com>
13157169689Skan
13158169689Skan	* Makefile.in (TREE_FLOW_H): Add dependency on $(HASHTAB_H)
13159169689Skan	(OBJS): Temporarily remove tree-ssa-pre.o.
13160169689Skan	(tree-ssa.o, c-decl.o): Add dependency on $(TREE_DUMP_H).
13161169689Skan
13162169689Skan	* c-decl.c: Include tree-dump.h
13163169689Skan
13164169689Skan	* c-pretty-print.c (dump_c_node): Fix rendering of GOTO_STMTs to
13165169689Skan	computed locations.
13166169689Skan	(op_prio): Don't abort on unknown operators.
13167169689Skan
13168169689Skan	* c-simplify.c (mostly_copy_tree_r): Don't copy statement
13169169689Skan	annotations.
13170169689Skan
13171169689Skan	* gimplify.c (simplify_addr_expr): Mark the RHS of the simplified
13172169689Skan	ADDR_EXPR addressable.
13173169689Skan	(mostly_copy_tree_r): Don't copy statement annotations.
13174169689Skan
13175169689Skan	* old-tree-inline.c (walk_tree): Handle SSA_NAME nodes.
13176169689Skan
13177169689Skan	* timevar.def (TV_TREE_RDEFS): Remove.
13178169689Skan	(TV_TREE_BUILD_SSA): Define.
13179169689Skan	(TV_TREE_DFA): Define.
13180169689Skan
13181169689Skan	* tree-cfg.c: Update copyright notices.
13182169689Skan	Remove doxygen markers everywhere.
13183169689Skan	(remove_unreachable_block): New local function
13184169689Skan	(remove_unreachable_blocks): Call it.
13185169689Skan	(remove_bb): Rename from remove_tree_bb.  Update all callers.
13186169689Skan	(validate_loops): Remove unused function.
13187169689Skan	(block_invalidates_loop): Remove unused function.
13188169689Skan	(remove_stmt): Invalidate the defining statement of all the
13189169689Skan	definitions made by the statement.
13190169689Skan	Remove the annotation before replacing the statement with
13191169689Skan	empty_stmt_node.
13192169689Skan
13193169689Skan	* tree-dfa.c: Update copyright notices.
13194169689Skan	Remove doxygen markers everywhere.
13195169689Skan	(struct clobber_data_d): Remove existing fields.  Add fields 'stmt'
13196169689Skan	and 'prev_vops'.  Update all users.
13197169689Skan	(alias_tags): Rename from alias_leaders.
13198169689Skan	(num_alias_tags): Rename from num_alias_leaders.
13199169689Skan	(struct dfa_stats_d): Declare.
13200169689Skan	(struct dfa_counts_d): Remove.  Update all users.
13201169689Skan	(TRM_*): Remove.  Update all users.
13202169689Skan	(find_tree_refs): Remove.  Update all users.
13203169689Skan	(get_stmt_operands): Rename from find_refs_in_stmt.  Update all users.
13204169689Skan	(get_expr_operands): Rename from find_refs_in_expr.  Update all users.
13205169689Skan	(add_stmt_operand): New function.
13206169689Skan	(set_def): New function.
13207169689Skan	(add_use): New function.
13208169689Skan	(add_vdef): New function.
13209169689Skan	(add_vuse): New function.
13210169689Skan	(create_phi_node): New function.
13211169689Skan	(copy_stmt): New function.
13212169689Skan	(compute_immediate_uses): New function.
13213169689Skan	(compute_immediate_uses_for): New function.
13214169689Skan	(compute_reached_uses): New function.
13215169689Skan	(compute_reaching_defs): New function.
13216169689Skan	(add_immediate_use): New function.
13217169689Skan	(create_var_ann): New function.
13218169689Skan	(create_stmt_ann): New function.
13219169689Skan	(dump_immediate_uses): New function.
13220169689Skan	(debug_immediate_uses): New function.
13221169689Skan	(dump_immediate_uses_for): New function.
13222169689Skan	(debug_immediate_uses_for): New function.
13223169689Skan	(create_ref_list, empty_ref_list, add_ref_to_list_begin,
13224169689Skan	add_ref_to_list_end, add_list_to_list_begin, add_list_to_list_end,
13225169689Skan	find_list_node, rli_start, rli_start_last, rli_start_at,
13226169689Skan	rli_delete, add_ref_to_list_after, tree_ref_size, create_ref,
13227169689Skan	add_ephi_arg, add_referenced_var, replace_ref_with,
13228169689Skan	try_replace_ref_with, replace_ref_r, replace_ref_stmt_with,
13229169689Skan	remove_ref, remove_def, reset_def_def_links, replace_phi_arg_with,
13230169689Skan	create_tree_ann, function_may_recurse_p, dump_ref, debug_ref,
13231169689Skan	dump_ref_list, dump_ref_array, debug_ref_list, debug_ref_array,
13232169689Skan	dump_phi_args, dump_if_different, count_tree_refs, ref_type_name,
13233169689Skan	ref_defines, is_killing_def, tree_ref_structure, output_ref):
13234169689Skan	Remove.  Update all users.
13235169689Skan	(dump_referenced_vars): Remove parameter 'details'.  Update all
13236169689Skan	users.
13237169689Skan	(dump_variable): Don't abort if the variable is nil.  Display all
13238169689Skan	the aliases for the variable.
13239169689Skan	(dump_dfa_stats): Handle new counters.
13240169689Skan	(collect_dfa_stats): Likewise.
13241169689Skan	(collect_dfa_stats_r): Likewise.
13242169689Skan	(find_vars_r): New function.
13243169689Skan	(compute_may_aliases): Call it via walk_tree before computing aliases.
13244169689Skan	Only use alias tags if -ftree-points-to is not given.
13245169689Skan	Call add_may_alias.
13246169689Skan	(find_may_aliases_for): Only use alias tags if -ftree-points-to is
13247169689Skan	not given.
13248169689Skan	(add_may_alias): New function.
13249169689Skan	(find_alias_tag): Rename from find_alias_leader.
13250169689Skan	(dump_alias_info): New function.
13251169689Skan	(debug_alias_info): New function.
13252169689Skan	(htab_hash_var): New function.
13253169689Skan	(htab_var_eq): New function.
13254169689Skan	(get_virtual_var): New function.
13255169689Skan
13256169689Skan	* tree-dump.c (struct dump_option_value_info): Rename -block to
13257169689Skan	-blocks.  Add new option -vops.
13258169689Skan	(dump_function): Don't display which pass enabled the dump.
13259169689Skan
13260169689Skan	* tree-flow-inline.h: Update copyright notices.
13261169689Skan	(var_ann): New function.
13262169689Skan	(stmt_ann): New function.
13263169689Skan	(ann_type): New function.
13264169689Skan	(bb_ann): Rename from bb_annotation.
13265169689Skan	(may_aliases): New function.
13266169689Skan	(set_may_alias_global_mem): New function.
13267169689Skan	(may_alias_global_mem_p): New function.
13268169689Skan	(set_indirect_ref): New function.
13269169689Skan	(indirect_ref): New function.
13270169689Skan	(is_dereferenced): New function.
13271169689Skan	(modify_stmt): New function.
13272169689Skan	(unmodify_stmt): New function.
13273169689Skan	(stmt_modified_p): New function.
13274169689Skan	(def_op): New function.
13275169689Skan	(use_ops): New function.
13276169689Skan	(vdef_ops): New function.
13277169689Skan	(vuse_ops): New function.
13278169689Skan	(immediate_uses): New function.
13279169689Skan	(reaching_defs): New function.
13280169689Skan	(phi_nodes): New function.
13281169689Skan	(same_var_p): New function.
13282169689Skan	(gsi_step_in_bb): Re-implement.  Check if the iterator stepped out
13283169689Skan	of the block by calling bb_for_stmt.
13284169689Skan	(gsi_end_bb_p): Rename from gsi_end_bb.  Update all users.
13285169689Skan	Call gsi_stmt to determine if the iterator has reached the end of
13286169689Skan	the block.
13287169689Skan	(ref_id, ref_type, ref_bb, ref_stmt, ref_var, imm_uses,
13288169689Skan	reached_uses, imm_reaching_def, set_imm_reaching_def,
13289169689Skan	set_phi_arg_def, phi_arg_def, set_phi_arg_edge, phi_arg_edge,
13290169689Skan	reaching_defs, phi_args, num_phi_args, phi_arg, set_phi_arg,
13291169689Skan	tree_annotation, tree_refs, add_tree_ref, remove_tree_ref,
13292169689Skan	alias_leader, set_alias_leader, set_tree_flag, clear_tree_flag,
13293169689Skan	reset_tree_flags, tree_flags, indirect_var, set_indirect_var,
13294169689Skan	bb_refs, remove_bb_ref, set_exprref_class, exprref_class,
13295169689Skan	set_exprref_inserted, exprref_inserted, set_exprref_save,
13296169689Skan	exprref_save, set_exprref_reload, exprref_reload,
13297169689Skan	set_exprref_processed, set_exprref_processed2, exprref_processed2i,
13298169689Skan	exprref_uses, set_exprref_uses, set_expruse_def, expruse_def,
13299169689Skan	set_expruse_phiop, expruse_phiop, set_expruse_phi, expruse_phi,
13300169689Skan	set_expruse_has_real_use, expruse_has_real_use,
13301169689Skan	set_exprphi_phi_args, exprphi_phi_args, num_ephi_args, ephi_arg,
13302169689Skan	set_ephi_arg, set_exprphi_downsafe, exprphi_downsafe,
13303169689Skan	set_exprphi_canbeavail, exprphi_canbeavail, set_exprphi_later,
13304169689Skan	exprphi_later, set_exprphi_extraneous, exprphi_extraneous,
13305169689Skan	exprphi_willbeavail, is_assignment_stmt, is_may_ref, is_may_def,
13306169689Skan	is_may_use, is_partial_ref, is_partial_use, is_volatile_ref,
13307169689Skan	is_volatile_def, is_volatile_use, is_clobbering_def,
13308169689Skan	is_relocating_def, is_addressof_use, is_pure_use, is_pure_def,
13309169689Skan	rli_after_end, rli_step, rli_step_rev, rli_ref, get_last_ref,
13310169689Skan	get_first_ref, ref_list_is_empty): Remove.  Update all users.
13311169689Skan
13312169689Skan	* tree-flow.h: Update copyright notices.
13313169689Skan	Remove doxygen markers.
13314169689Skan	Include hashtab.h.
13315169689Skan	(enum tree_ann_type): New.
13316169689Skan	(struct tree_ann_common_d): New.
13317169689Skan	(struct var_ann_d): New.
13318169689Skan	(struct operands_d): New.
13319169689Skan	(struct voperands_d): New.
13320169689Skan	(operands_t): New type.
13321169689Skan	(voperands_t): New type.
13322169689Skan	(struct dataflow_d): New.
13323169689Skan	(dataflow_t): New type.
13324169689Skan	(struct stmt_ann_d): New.
13325169689Skan	(tree_ann): New type.
13326169689Skan	(var_ann_t): New type.
13327169689Skan	(stmt_ann_t): New type.
13328169689Skan	(bb_ann_t): Rename from bb_ann.
13329169689Skan	(enum tree_ref_type, TRM_*, struct ref_list_node, struct
13330169689Skan	ref_list_priv, ref_list, struct tree_ref_common, struct var_ref_d,
13331169689Skan	struct var_def_d, struct var_phi_d, struct var_use_d, struct
13332169689Skan	phi_node_arg_d, phi_node_arg, struct expr_ref_common, struct
13333169689Skan	expr_phi_d, struct expr_use_d, enum tree_ref_structure_enum, union
13334169689Skan	tree_ref_d, tree_ref, struct tree_ann_d, tree_ann, enum tree_flags,
13335169689Skan	struct dfa_counts_d, ref_list_iterator): Remove.  Update all users.
13336169689Skan	(TDFA_USE_OPS): Define.
13337169689Skan	(TDFA_USE_VOPS): Define.
13338169689Skan
13339169689Skan	* tree-inline.c (walk_tree): Handle SSA_NAME nodes.
13340169689Skan
13341169689Skan	* tree-optimize.c: Update copyright notices.
13342169689Skan	Remove doxygen markers.
13343169689Skan	(optimize_function_tree): Temporarily disable call to
13344169689Skan	tree_perform_ssapre.
13345169689Skan	Remove #if0 code.
13346169689Skan
13347169689Skan	* tree-pretty-print.c (MASK_POINTER): Define.
13348169689Skan	(dump_vops): New function.
13349169689Skan	(dump_generic_node): Shorten made-up names for unnamed objects.
13350169689Skan	Hanlde PHI_NODE, VDEF_EXPR and SSA_NAME nodes.
13351169689Skan	Keep track of basic block transitions.
13352169689Skan	Call dump_vops if -vops dump option is given.
13353169689Skan	(op_prio): Don't abort if the operand is nil.
13354169689Skan	(dump_block_info): Don't keep track of basic block transitions.
13355169689Skan
13356169689Skan	* tree-simple.c: Update copyright notices.
13357169689Skan	(get_base_symbol): Call STRIP_NOPS.
13358169689Skan	Handle SSA_NAME nodes.
13359169689Skan
13360169689Skan	* tree-simple.h: Update copyright notices.
13361169689Skan	(gsi_end_p): Rename from gsi_end.  Update all callers.
13362169689Skan
13363169689Skan	* tree-ssa-ccp.c: Update copyright notices.
13364169689Skan	Update code to use the new SSA infrastructure.
13365169689Skan	(const_values): New hash table to keep track of constants.
13366169689Skan	(struct value_map_d): New.
13367169689Skan	(cfg_edges): Rename from edges.  Update all users.
13368169689Skan	(set_value): New function.
13369169689Skan	(get_value): New function.
13370169689Skan	(get_default_value): New function.
13371169689Skan	(value_map_hash): New function.
13372169689Skan	(value_map_eq): New function.
13373169689Skan
13374169689Skan	* tree-ssa-dce.c: Update copyright notice.
13375169689Skan	Update code to use new SSA infrastructure.  Factor some code into
13376169689Skan	new functions.
13377169689Skan	(dom_info): Declare with file scope.
13378169689Skan	(struct stmt_stats): Add fields 'total_phis' and 'removed_phis'.
13379169689Skan	(needed_stmts): New hash table to keep track of needed statements.
13380169689Skan	(stmt_useful_p): New function.
13381169689Skan	(find_useful_stmts): Call it.
13382169689Skan	(remove_dead_stmt, remove_dead_phis): New functions.
13383169689Skan	(remove_dead_stmts): Call them.
13384169689Skan	(need_to_preserve_store): Preserve stores to volatile variables.
13385169689Skan	(tree_ssa_dce): Rename from tree_ssa_eliminate_dead_code.  Update
13386169689Skan	all users.
13387169689Skan
13388169689Skan	* tree-ssa.c: Update copyright notice.
13389169689Skan	Change basic algorithm to rewrite the function into SSA form
13390169689Skan	instead of building factored use-def chains.
13391169689Skan	Include hashtab.h and tree-dump.h
13392169689Skan	(next_ssa_version): New global variable.
13393169689Skan	(def_blocks): New file local variable.
13394169689Skan	(struct def_blocks_d): New.
13395169689Skan	(currdefs): New file local variable.
13396169689Skan	(struct currdef_d): New.
13397169689Skan	(rewrite_into_ssa): Rename from build_tree_ssa.  Update all users.
13398169689Skan	Call compute_may_aliases, mark_def_sites and rewrite_block.
13399169689Skan	(rewrite_block): Rename from search_fud_chains.  Call
13400169689Skan	rewrite_stmts.
13401169689Skan	(mark_def_sites): New function.
13402169689Skan	(set_def_block): New function.
13403169689Skan	(rewrite_stmts): New function.
13404169689Skan	(rewrite_stmt): New function.
13405169689Skan	(rewrite_operand): New function.
13406169689Skan	(rewrite_out_of_ssa): New function.
13407169689Skan	(remove_phi_node): New function.
13408169689Skan	(register_new_def): New function.
13409169689Skan	(def_blocks_free): New function.
13410169689Skan	(def_blocks_hash): New function.
13411169689Skan	(def_blocks_eq): New function.
13412169689Skan	(currdef_hash): New function.
13413169689Skan	(currdef_eq): New function.
13414169689Skan	(debug_def_blocks): New function.
13415169689Skan	(debug_def_blocks_r): New function.
13416169689Skan	(build_fud_chains, compute_reaching_defs, follow_chain,
13417169689Skan	dump_reaching_defs, debug_reaching_defs, set_ssa_links): Remove.
13418169689Skan	(remove_phi_arg): Rename from tree_ssa_remove_phi_alternative.
13419169689Skan	Update all users.
13420169689Skan	(init_tree_ssa): Set next_ssa_version to 1.
13421169689Skan	Create hash tables def_blocks and currdefs.
13422169689Skan	(delete_tree_ssa): Accept a FUNCTION_DECL tree as argument.  Update
13423169689Skan	all users.
13424169689Skan	(currdef_for): Add new parameter 'create_default'.  If nonzero,
13425169689Skan	create a new SSA name if none is found for the variable.
13426169689Skan	(set_currdef_for): Search in the currdefs hash table.
13427169689Skan
13428169689Skan	* tree.c (tree_node_kind): Add new values phi_kind and
13429169689Skan	ssa_name_kind.
13430169689Skan	(tree_node_kind_names): Likewise.
13431169689Skan	(tree_size): Handle PHI_NODE and SSA_NAME nodes.
13432169689Skan	(make_node): Likewise.
13433169689Skan	(tree_node_structure): Likewise.
13434169689Skan	(phi_node_elt_check_failed): New function.
13435169689Skan	(make_phi_node): New function.
13436169689Skan	(make_ssa_name): New function.
13437169689Skan	(build_vdef_expr): New function.
13438169689Skan
13439169689Skan	* tree.def (SSA_NAME): New code.
13440169689Skan	(VDEF_EXPR): New code.
13441169689Skan	(PHI_NODE): New code.
13442169689Skan
13443169689Skan	* tree.h (union tree_ann_d): Forward declare.
13444169689Skan	(struct tree_common): Change type of field 'ann'.
13445169689Skan	(PHI_NODE_ELT_CHECK): Define.
13446169689Skan	(phi_node_elt_check_failed): Declare.
13447169689Skan	(VDEF_RESULT): Define.
13448169689Skan	(VDEF_OP): Define.
13449169689Skan	(SSA_NAME_DECL): Define.
13450169689Skan	(SSA_NAME_DEF_STMT): Define.
13451169689Skan	(SSA_NAME_VERSION): Define.
13452169689Skan	(struct tree_ssa_name): New.
13453169689Skan	(PHI_RESULT): Define.
13454169689Skan	(PHI_NUM_ARGS): Define.
13455169689Skan	(PHI_ARG_CAPACITY): Define.
13456169689Skan	(PHI_ARG_ELT): Define.
13457169689Skan	(PHI_ARG_EDGE): Define.
13458169689Skan	(PHI_ARG_DEF): Define.
13459169689Skan	(struct phi_arg_d): New.
13460169689Skan	(struct tree_phi_node): New.
13461169689Skan	(SSA_DECL_P): Define.
13462169689Skan	(SSA_VAR_P): Define.
13463169689Skan	(enum tree_node_structure_enum): Add values TS_SSA_NAME and
13464169689Skan	TS_PHI_NODE.
13465169689Skan	(union tree_node): Add fields 'ssa_name' and 'phi'.
13466169689Skan	(make_phi_node): Declare.
13467169689Skan	(make_ssa_name): Declare.
13468169689Skan	(build_vdef_expr): Declare.
13469169689Skan	(TDF_BLOCKS): Rename from TDF_BLOCK.
13470169689Skan	(TDF_VOPS): Define.
13471169689Skan
13472169689Skan	* doc/invoke.texi: Document new tree dump option -vops.  Update
13473169689Skan	documentation for switch -blocks.
13474169689Skan
13475169689Skan2003-01-27  Jeff Law <law@redhat.com>
13476169689Skan
13477169689Skan	* gimplify.c (simplify_return_expr): Correctly handle return
13478169689Skan	expressions with side effects in functions returning void.
13479169689Skan
13480169689Skan	* tree-ssa-ccp.c (widen_bitfield): Do not try to widen anything
13481169689Skan	except constant integers.
13482169689Skan
13483169689Skan2003-01-26  Jeff Law <law@redhat.com>
13484169689Skan
13485169689Skan	* c-simplify.c (simplify_decl_stmt): Fix comment typo.
13486169689Skan	Use correct predicate when "simplifying" a static initializer.
13487169689Skan
13488169689Skan2003-01-26  Andreas Jaeger  <aj@suse.de>
13489169689Skan
13490169689Skan	* Makefile.in (gt-dependence.h): New rule.
13491169689Skan
13492169689Skan2003-01-23  Jeff Law <law@redhat.com>
13493169689Skan
13494169689Skan	* c-simplify.c (simplify_decl_stmt): Arrange to examine initializers
13495169689Skan	for static variables.
13496169689Skan	* gimplify.c (simplify_constructor): Kill initial is_simple_constructor
13497169689Skan	check.
13498169689Skan	(simplify_modify_expr): Get the type from the destination rather than
13499169689Skan	the toplevel expression.  Handle case where type is ARRAY_TYPE.  Ignore
13500169689Skan	TREE_STATIC for the RHS.
13501169689Skan
13502169689Skan2003-01-24  Frank Ch. Eigler  <fche@redhat.com>
13503169689Skan
13504169689Skan	* tree-mudflap.c (mf_varname_tree): Check for non-NULL DECL_NAME
13505169689Skan	before trying to cplus_demangle it.
13506169689Skan
13507169689Skan2003-01-23  Jeff Law <law@redhat.com>
13508169689Skan
13509169689Skan	* tree-cfg.c (make_exit_edges): Fix thinkos.
13510169689Skan
13511169689Skan2003-01-22  Jeff Law <law@redhat.com>
13512169689Skan
13513169689Skan	* tree-cfg.c (make_goto_expr_edges): Check the underlying
13514169689Skan	LABEL_DECL, not the LABEL_EXPR for FORCED_LABEL and NONLOCAL_LABEL.
13515169689Skan
13516169689Skan	* gimplify.c (simplify_expr, case GOTO_EXPR): Identify and mark
13517169689Skan	labels which are targets of nonlocal gotos and mark functions which
13518169689Skan	have labels which are targets of nonlocal gotos.
13519169689Skan	(simplify_expr, case LABEL_DECL): New case.  Mark labels which
13520169689Skan	have their address taken.
13521169689Skan	* tree-cfg.c (is_nonlocal_label_block): Remove.  All callers
13522169689Skan	updated.
13523169689Skan	(make_exit_edges, case GOTO_EXPR): Handle computed gotos sanely.
13524169689Skan	(make_exit_edges, case CALL_EXPR): Handle abnormal edges from
13525169689Skan	nonlocal gotos at call sites.
13526169689Skan	(make_exit_edges, case RETURN_EXPR): Likewise.
13527169689Skan	(make_exit_edges, case MODIFY_EXPR): New case to handle abnormal
13528169689Skan	edges from nonlocal gotos as call sites.
13529169689Skan	(make_goto_expr_edges): Handle computed gotos and nonlocal gotos.
13530169689Skan	(is_ctrl_altering_stmt): Handle abnormal edges in CALL_EXPRs
13531169689Skan	functions which receive nonlocal gotos.  Similarly for CALL_EXPRs
13532169689Skan	which occur on the RHS of a MODIFY_EXPR.
13533169689Skan	* tree.h (FORCED_LABEL, NONLOCAL_LABEL): New defines.
13534169689Skan	(FUNCTION_RECEIVES_NONLOCAL_GOTO): Likewise.
13535169689Skan
13536169689Skan2003-01-22  Frank Ch. Eigler  <fche@redhat.com>
13537169689Skan
13538169689Skan	* doc/invoke.texi: Provide some information about -fmudflap.
13539169689Skan
13540169689Skan	* tree-mudflap.c (mf_varname_tree): Conditionally invoke the C++
13541169689Skan	demangler in libiberty.  Reduce function printing verbosity.
13542169689Skan	(mf_file_function_line_tree):  Reduce function printing verbosity.
13543169689Skan	(mudflap_enqueue_decl): Use COMPLETE_TYPE_P to avoid trying to
13544169689Skan	register (get size of) void-typed objects.
13545169689Skan
13546169689Skan2003-01-21  Jose Renau  <renau@uiuc.edu>
13547169689Skan
13548169689Skan	* tree-flow-inline.h (get_lineno): Return -1 for nodes without
13549169689Skan	locus information.
13550169689Skan	(get_filename): Return "???" for nodes without locus information.
13551169689Skan
13552169689Skan2003-01-21  Jeff Law <law@redhat.com>
13553169689Skan
13554169689Skan	* tree-cfg.c (cleanup_switch_expr_graph): Wrap declaration of
13555169689Skan	switch_expr with ENABLE_CHECKING block.
13556169689Skan
13557169689Skan	* c-simplify.c (is_last_stmt_of_scope): Wrap definition and
13558169689Skan	declaration inside and ENABLE_CHECKING block.
13559169689Skan
13560169689Skan2003-01-20  Frank Ch. Eigler  <fche@redhat.com>
13561169689Skan
13562169689Skan	* tree-mudflap.c (mx_xfn_indirect_ref): Use new TREE_LOCUS field
13563169689Skan	as a predicate for finding TREE_FILENAME etc.
13564169689Skan
13565169689Skan2003-01-16  Daniel Berlin  <dan@dberlin.org>
13566169689Skan
13567169689Skan	* Remove dead PRE code.
13568169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Collect left occurrences and
13569169689Skan	kills *after* finishing collecting all expressions.
13570169689Skan
13571169689Skan2003-01-15  Jeff Law <law@redhat.com>
13572169689Skan
13573169689Skan	* Death to WFL nodes.
13574169689Skan	* c-aux-info.c: Replace DECL_SOURCE_FILE and DECL_SOURCE_LINE with
13575169689Skan	TREE_FILENAME and TREE_LINENO respectively when retrieving file
13576169689Skan	and line information.  Use TREE_LOCUS to copy existing information
13577169689Skan	from one node to another.  Use annotate_with_file_line to add or
13578169689Skan	replace location information on a node.  Remove support for
13579169689Skan	EXPR_WITH_FILE_LOCATION nodes.  Remove STRIP_WFL statements.
13580169689Skan	* c-common.c, c-parse.in, c-pretty-print.c, dbxout.c: Likewise.
13581169689Skan	* diagnostic.c, dwarf2out.c, dwarfout.c: Likewise.
13582169689Skan	* except.c, integrate.c, stmt.c, tree-alias-common.c: Likewise.
13583169689Skan	* tree-cfg.c, tree-dfa.c, tree-dump.c, tree-flow-inline.h: Likewise.
13584169689Skan	* tree-mudflap.c, tree-pretty-print.c, tree-simple.c: Likewise.
13585169689Skan	* tree-ssa-ccp.c, tree-ssa-dce.c, tree-ssa-pre.c: Likewise.
13586169689Skan	* varasm.c, xcoffout.c: Likewise.
13587169689Skan	* config/alpha/alpha.c: Likewise.
13588169689Skan	* config/mips/mips.c: Likewise.
13589169689Skan	* c-decl.c: Likewise.
13590169689Skan	(duplicate_decls): Also copy TREE_LOCUS from olddecl to newdecl.
13591169689Skan	(finish_function): Save and restore the current filename and
13592169689Skan	linenumber around genericizing of the function tree.
13593169689Skan	* c-simplify.c (c_simplify_stmt): Use annotate_all_with_file_line
13594169689Skan	instead of wrap_all_with_wfl.  Remove STRIP_WFL statements.
13595169689Skan	* expr.c (expand_expr): Emit line number notes for expressions
13596169689Skan	with attached file/line information.  Remove EXPR_WITH_FILE_LOCATION
13597169689Skan	support.
13598169689Skan	* gimplify.c: Kill STRIP_WFL statements.  Remove EXPR_WITH_FILE_LOCATION
13599169689Skan	support.
13600169689Skan	(simplify_expr_wfl): Kill.
13601169689Skan	(annotate_stmt_with_file_line): Renamed from wrap_with_wfl.
13602169689Skan	(annotate_all_with_file_line): Renamed from wrap_all_with_wfl.
13603169689Skan	(simplify_expr): Save and restore the current file/line around
13604169689Skan	simplification of the given expression.  Add annotation to more
13605169689Skan	nodes created during simplification.
13606169689Skan	(simplify_self_mod_expr): Add file/line location to nodes we create.
13607169689Skan	(get_initialized_tmp_var): Similarly.
13608169689Skan	* old-tree-inline.c (expand_call_inline): Use annotate_with_file_line
13609169689Skan	to add file/line information to nodes instead of wrapping them
13610169689Skan	with EXPR_WITH_FILE_LOCATION nodes.
13611169689Skan	* print-tree.c: Use TREE_FILENAME and TREE_LINENO instead of
13612169689Skan	DECL_SOURCE_FILE and DECL_SOURCE_LINE respectively.  Remove
13613169689Skan	support for EXPR_WITH_FILE_LOCATION nodes.
13614169689Skan	(print_node): Dump any file/line information that is attached to
13615169689Skan	the given node.
13616169689Skan	* tree-inline.c (walk_tree): Set lineno appropriately.
13617169689Skan	* tree-simple.h (annotate_all_with_file_line): Renamed from
13618169689Skan	wrap_all_with_wfl.  Remove STRIP_WFL statements.
13619169689Skan	* tree.c (build_expr_wfl): Kill.
13620169689Skan	(make_node): Use annotate_with_file_line.
13621169689Skan	(annotate_with_file_line): New function.
13622169689Skan	* tree.def: Remove EXPR_WITH_FILE_LOCATION.
13623169689Skan	* tree.h (tree_common): Add locus field.  Remove references to
13624169689Skan	EXPR_WITH_FILE_LOCATION.
13625169689Skan	(tree_decl): Remove locus field.
13626169689Skan	(STRIP_WFL, EXPR_WFL_*): Kill.
13627169689Skan	(DECL_SOURCE_LOCATION, DECL_SOURCE_FILE, DECL_SOURCE_LINE): Kill.
13628169689Skan	(TREE_LOCUS, TREE_FILENAME, TREE_LINENO): new.
13629169689Skan	(annotate_with_file_line): Renamed from build_expr_wfl.
13630169689Skan
13631169689Skan	* objc/objc-act.c: Use TREE_FILENAME and TREE_LINENO to
13632169689Skan	extract file/line information from tree nodes.
13633169689Skan
13634169689Skan2003-01-14  Frank Ch. Eigler  <fche@redhat.com>
13635169689Skan
13636169689Skan	* tree-mudflap.c (mx_xfn_indirect_ref): Handle ARRAY_REF of
13637169689Skan	a COMPONENT_REF specially to avoid unnecessary checks.
13638169689Skan
13639169689Skan2003-01-13  Frank Ch. Eigler  <fche@redhat.com>
13640169689Skan
13641169689Skan	Front-end generalization.
13642169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add c-mudflap.o and dependencies.
13643169689Skan	* tree-mudflap.c: Don't include "c-tree.h" any more.
13644169689Skan	(mf_init_extern_trees): Divert to mflang_lookup_decl().
13645169689Skan	(mf_enqueue_register_call, mf_flush_enqueued_calls): Move and rename
13646169689Skan	these functions.
13647169689Skan	* tree-mudflap.h: Declare new mflang_* routines.
13648169689Skan	* c-mudflap.c: New file with C front-end mflang_* routines.
13649169689Skan	* tree-nomudflap.c (*): Call internal_error instead of abort.
13650169689Skan
13651169689Skan2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
13652169689Skan
13653169689Skan	* Makefile.in (check-g95): New test target.
13654169689Skan	(check-f95): Alias for check-g95.
13655169689Skan
13656169689Skan2003-01-07  Diego Novillo  <dnovillo@redhat.com>
13657169689Skan
13658169689Skan	* tree-dump.c (dump_function_to_file): New function.
13659169689Skan	(dump_function): Call it.
13660169689Skan	Convert argument declaration to K&R format.
13661169689Skan	* tree-dump.h: Include splay-tree.h.
13662169689Skan	(dump_function_to_file): Declare.
13663169689Skan
13664169689Skan	* tree-optimize.c (optimize_function_tree): Remove unused variables
13665169689Skan	dump_file and dump_flags.
13666169689Skan	(dump_current_function): Remove.  Update all users by calling
13667169689Skan	dump_function instead.
13668169689Skan	* tree.h (dump_current_function): Remove declaration.
13669169689Skan
13670169689Skan	* Makefile.in (TREE_DUMP_H): Define.
13671169689Skan	Update targets depending on tree-dump.h to depend on $(TREE_DUMP_H).
13672169689Skan	(tree-ssa-cp.o): Remove unused target.
13673169689Skan	(tree-cfg.o): Add dependency on $(TREE_DUMP_H).
13674169689Skan	(tree-optimize.o): Likewise.
13675169689Skan	(tree-ssa-dce.o): Likewise.
13676169689Skan	(tree-ssa-ccp.o): Likewise.
13677169689Skan	(tree-ssa-pre.o): Likewise.
13678169689Skan
13679169689Skan2003-01-02  Daniel Berlin  <dberlin@dberlin.org>
13680169689Skan
13681169689Skan	* tree-ssa-pre.c (rename_2): Fix a false matching condition.
13682169689Skan	This is actually fallout from is_default_def change.
13683169689Skan
13684169689Skan2003-01-02  Jason Merrill  <jason@redhat.com>
13685169689Skan
13686169689Skan	* c-simplify.c (c_genericize): Dump more info about the function.
13687169689Skan	Use dump_function.
13688169689Skan	* tree-dump.c (dump_function): Move from cp/optimize.c.
13689169689Skan	* tree-dump.h: Declare it.
13690169689Skan
13691169689Skan	* gimplify.c (mostly_copy_tree_r): Remove unnecessary cases.
13692169689Skan	(unshare_expr): New fn.
13693169689Skan	* tree-inline.c (mark_local_for_remap_r, unsave_r): New fns, adapted
13694169689Skan	from C++ versions.
13695169689Skan	(lhd_unsave_expr_now): Likewise.
13696169689Skan	* tree.c (unsave_expr_now): Remove.
13697169689Skan	(unsafe_for_reeval): Labels and BIND_EXPRs are only somewhat unsafe.
13698169689Skan
13699169689Skan	* gimplify.c (simplify_function_tree): Add an outer BIND_EXPR if
13700169689Skan	needed.
13701169689Skan	(voidify_wrapper_expr): Not static.  Abort if we try to voidify an
13702169689Skan	expression with TREE_ADDRESSABLE type.  Be clever with INDIRECT_REFs.
13703169689Skan	(foreach_stmt): Avoid redundant work.
13704169689Skan	(create_tmp_var): Abort if we try to create a temp of ADDRESSABLE type.
13705169689Skan	(simplify_expr): Simplify VTABLE_REF.
13706169689Skan	* c-simplify.c (simplify_decl_stmt): Ignore DECL_EXTERNAL decls.
13707169689Skan	(simplify_stmt_expr): Fix thinko.
13708169689Skan	(simplify_block): Don't ignore partial scopes.
13709169689Skan	(simplify_condition): New fn.
13710169689Skan	(simplify_c_loop, simplify_if_stmt, simplify_switch_stmt): Call it.
13711169689Skan	* expr.c (expand_expr) [BIND_EXPR]: Handle statics better.
13712169689Skan	* tree-inline.c (remap_decl): Remap all decls.
13713169689Skan	(declare_return_variable): Be clever with INDIRECT_REFs.
13714169689Skan	(expand_call_inline): If we have an explicit return slot, the inlined
13715169689Skan	body is void.
13716169689Skan	(walk_tree): Fix type handling.
13717169689Skan	(copy_tree_r): Don't walk into decls.
13718169689Skan	* tree-simple.c (is_simple_unary_expr): Handle VTABLE_REF.
13719169689Skan	(is_simple_id): Allow RESULT_DECL.
13720169689Skan	* tree-simple.h (gsi_stmt): Strip WFLs and NOPs.
13721169689Skan
13722169689Skan	* gimplify.c (simplify_cond_expr): Handle void arms.  Add target parm.
13723169689Skan	(simplify_modify_expr): Pass it.  Add special handling for COND_EXPR
13724169689Skan	and CONSTRUCTOR (from Daniel Berlin).  Add want_value parm.
13725169689Skan	(simplify_expr): Pass new args. Loop sooner if language-specific
13726169689Skan	simplification happened.
13727169689Skan	(simplify_return_expr): Pass the whole MODIFY_EXPR to simplify_expr.
13728169689Skan	(simplify_target_expr): Simplify.
13729169689Skan
13730169689Skan	* tree.def (CATCH_EXPR, EH_FILTER_EXPR): New tree codes.
13731169689Skan	* except.c (expand_eh_handler): New fn.
13732169689Skan	(expand_eh_region_end_allowed): If no types are allowed, hand off to
13733169689Skan	expand_eh_region_end_must_not_throw.
13734169689Skan	* except.h: Declare expand_eh_handler.
13735169689Skan	* expr.c (expand_expr) [TRY_CATCH_EXPR]: Use it.
13736169689Skan	[CATCH_EXPR, EH_FILTER_EXPR]: New cases.
13737169689Skan	* gimplify.c (simplify_expr) [EXC_PTR_EXPR, CATCH_EXPR,
13738169689Skan	EH_FILTER_EXPR]: New cases.
13739169689Skan	(gimple_build_eh_filter): New fn.
13740169689Skan	(maybe_protect_cleanup): New fn.
13741169689Skan	(gimple_push_cleanup): Call it.
13742169689Skan	(simplify_cleanup_point_expr): Fix thinko.
13743169689Skan	* c-simplify.c (simplify_cleanup): Call it.
13744169689Skan	* tree-simple.h: Declare it.
13745169689Skan	* Makefile.in (gimplify.o): Depend on except.h.
13746169689Skan	* tree.h (CATCH_TYPES, CATCH_BODY): New macros.
13747169689Skan	(EH_FILTER_TYPES, EH_FILTER_FAILURE): New macros.
13748169689Skan	* tree-simple.c (is_simple_id): Allow EXC_PTR_EXPR.
13749169689Skan	* c-pretty-print.c (dump_c_node) [CLEANUP_POINT_EXPR]: Support.
13750169689Skan	* tree-pretty-print.c (dump_generic_node): Likewise.
13751169689Skan	[CATCH_EXPR, EH_FILTER_EXPR, EXC_PTR_EXPR]: Support.
13752169689Skan
13753169689Skan	* c-pretty-print.c (NIY): Print operands.
13754169689Skan	(dump_c_tree): Don't look at TREE_CHAIN if it doesn't matter.
13755169689Skan	(dump_c_node) [ARRAY_TYPE]: Handle non-constant array bounds.
13756169689Skan	[CALL_EXPR]: Pass spc down.
13757169689Skan	[VTABLE_REF]: Support.
13758169689Skan	(op_prio) [TARGET_EXPR]: Support.
13759169689Skan	(print_call_name): Handle function pointers.
13760169689Skan	* tree-pretty-print.c: Likewise.
13761169689Skan
13762169689Skan2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
13763169689Skan
13764169689Skan	* gimplify.c (create_tmp_var_noc): Remove unused function.
13765169689Skan	* tree-simple.h: Kill prototype.
13766169689Skan
13767169689Skan2002-12-30  Diego Novillo  <dnovillo@redhat.com>
13768169689Skan
13769169689Skan	* tree-flow.h (tree_find_loops): Remove unused declaration.
13770169689Skan
13771169689Skan2002-12-29  Daniel Berlin  <dberlin@dberlin.org>
13772169689Skan
13773169689Skan	* toplev.c: Add flag_ip, enable by default at -O4+ (This is not
13774169689Skan	set in stone, and thus, not documented).
13775169689Skan	(decode_f_option): Add warning if andersen's PTA is selected but
13776169689Skan	not compiled in.
13777169689Skan
13778169689Skan	* flags.h: Add flag_ip.
13779169689Skan
13780169689Skan	* tree-alias-ander.c: Fix todo.
13781169689Skan	(andersen_function_call): Return 1 if we don't need to process
13782169689Skan	the function.
13783169689Skan	(ptset_map): New map, cache points-to sets.
13784169689Skan	(andersen_op): We can do IP on all statics without help.
13785169689Skan	(andersen_init): Only init once if we are doing ip analysis.
13786169689Skan	(andersen_cleanup): Don't cleanup if we need the info for ip.
13787169689Skan	(andersen_add_var): Clear points-to set if it exists already.
13788169689Skan	(andersen_add_var_same): Ditto.
13789169689Skan	(andersen_function_call): We can do interprocedural analysis on
13790169689Skan	statics.
13791169689Skan	(andersen_may_alias): Cache points-to sets.
13792169689Skan
13793169689Skan	* c-decl.c (c_expand_body): Don't throw away tree if flag_ip is
13794169689Skan	on, even if they are uninlinable, they may be wanted for ip
13795169689Skan	optimizations.
13796169689Skan
13797169689Skan	* tree-alias-common.c (get_values_from_constructor): New
13798169689Skan	function to collect alias_typevars from constructors.
13799169689Skan	(alias_annot): Fix where the GTY is so gengtype picks it up.
13800169689Skan	(intra_function_call): Ignore non-pointers for global var
13801169689Skan	assignment. What arguments point to can now point to a global var
13802169689Skan	as well.
13803169689Skan	(find_func_aliases): We need to handle decl's with initials as
13804169689Skan	well.
13805169689Skan	Only call intra_function_call if we have to.
13806169689Skan	Handle constructors.
13807169689Skan	(create_fun_alias_var): Incoming pointer arguments could be
13808169689Skan	pointing to a global var, unless this is a static function and we
13809169689Skan	are doing interprocedural analysis.
13810169689Skan	(create_alias_vars): Take an fndecl argument, and use it.
13811169689Skan	(init_alias_vars): Handle ip_partial as well.
13812169689Skan	(ptr_may_alias_var): Simplify, fix.
13813169689Skan
13814169689Skan	* tree-alias-common.h (tree_alias_ops): function_call now returns
13815169689Skan	an int, and we have an extra member named ip_partial.
13816169689Skan
13817169689Skan	* tree-alias-steen.c (steen_ops): We can't do ip_partial.
13818169689Skan	(steen_function_call): Update definition and return 1.
13819169689Skan
13820169689Skan	* tree-dfa.c (compute_may_aliases): Call create_alias_vars with
13821169689Skan	current_function_decl.
13822169689Skan
13823169689Skan	* tree-flow.h (create_alias_vars): Remove proto from here, it's
13824169689Skan	in tree-alias-common.h.
13825169689Skan	(tree_perform_ssapre): Take a tree, like the other optimizers.
13826169689Skan
13827169689Skan	* tree-optimize.c (optimize_function_tree): Call
13828169689Skan	tree_perform_ssapre with a tree.
13829169689Skan
13830169689Skan	* tree-ssa-pre.c: Remove dead, #if 0'd code.
13831169689Skan	(tree_perform_ssapre): Use passed in tree.
13832169689Skan
13833169689Skan2002-12-23  Frank Ch. Eigler  <fche@redhat.com>
13834169689Skan
13835169689Skan	* tree-mudflap.c (mf_decl_cache_locals, mf_decl_clear_locals): New
13836169689Skan	functions.
13837169689Skan	(mudflap_c_function): Call them before/after basic transforms.
13838169689Skan	(mf_cache_shift_decl_l, ..._mask_l): New variables to track local
13839169689Skan	VAR_DECL shadows of cache parameters.
13840169689Skan	(mf_build_check_statement_for): Use and update them.
13841169689Skan
13842169689Skan2002-12-23  Frank Ch. Eigler  <fche@redhat.com>
13843169689Skan
13844169689Skan	* tree-mudflap.c (mx_register_decls): Trust incoming TREE_ADDRESSABLE
13845169689Skan	instead of own timetaking analysis.
13846169689Skan	(mf_find_addrof, mx_xfn_find_addrof): Removed functions.
13847169689Skan
13848169689Skan2002-12-23  Steven Bosscher <s.bosscher@student.tudelft.nl>
13849169689Skan
13850169689Skan	* tree-dfa.c: Add doxygen markers in comments.
13851169689Skan
13852169689Skan2002-12-22  Diego Novillo  <dnovillo@redhat.com>
13853169689Skan
13854169689Skan	* gimplify.c: Undo the following change:
13855169689Skan	    2002-12-11  Diego Novillo  <dnovillo@redhat.com>
13856169689Skan		* gimplify.c (simplify_return_expr): return statements should
13857169689Skan		  only have a GIMPLE value as argument.
13858169689Skan
13859169689Skan	* tree-simple.c: Fix grammar for return statements.
13860169689Skan
13861169689Skan2002-12-20  Frank Ch. Eigler  <fche@redhat.com>
13862169689Skan
13863169689Skan	* tree-mudflap.c (mf_init_extern_trees): Rewrite last change
13864169689Skan	without using statement-expressions.
13865169689Skan
13866169689Skan2002-12-19  Diego Novillo  <dnovillo@redhat.com>
13867169689Skan
13868169689Skan	* tree-cfg.c (build_tree_cfg): Make sure that TV_TREE_CFG
13869169689Skan	is popped properly.
13870169689Skan
13871169689Skan2002-12-19  Frank Ch. Eigler  <fche@redhat.com>
13872169689Skan
13873169689Skan	* tree-mudflap.c (mf_init_extern_trees): Abort gracefully if
13874169689Skan	<mf-runtime.h> was not included.
13875169689Skan	(*): Correct some minor compiler warnings elsewhere.
13876169689Skan
13877169689Skan2002-12-18  Diego Novillo  <dnovillo@redhat.com>
13878169689Skan
13879169689Skan	* configure: Regenerate with autoconf 2.13.
13880169689Skan
13881169689Skan2002-12-17  Ben Elliston  <bje@redhat.com>
13882169689Skan
13883169689Skan	* tree-optimize.c (optimize_function_tree): Temporarily
13884169689Skan	disable SSA optimizations if -fmudflap is present.
13885169689Skan
13886169689Skan2002-12-16  Ben Elliston  <bje@redhat.com>
13887169689Skan
13888169689Skan	* tree-mudflap.c (mx_flag): Assert that the tree node is valid.
13889169689Skan
13890169689Skan2002-12-14  Jason Merrill  <jason@redhat.com>
13891169689Skan
13892169689Skan	* tree-dump.c (dump_files): Add .generic.  Move .inlined after it.
13893169689Skan	* tree.h (tree_dump_index): Likewise.
13894169689Skan	* c-simplify.c (c_genericize): Emit original and generic dumps here.
13895169689Skan	* c-decl.c (c_expand_body): Not here.
13896169689Skan
13897169689Skan2002-12-13  Ben Elliston  <bje@redhat.com>
13898169689Skan
13899169689Skan	* tree-dfa.c (find_refs_in_expr): Terminate comment.
13900169689Skan
13901169689Skan2002-12-12  Steven Bosscher <s.bosscher@student.tudelft.nl>
13902169689Skan
13903169689Skan	* tree-cfg.c: Update doxygen documentation.
13904169689Skan	* tree-dfa.c: Add doxygen documentation.
13905169689Skan
13906169689Skan2002-12-11  Steven Bosscher <s.bosscher@student.tudelft.nl>
13907169689Skan
13908169689Skan	* tree-cfg.c: Add doxygen markers in comments.
13909169689Skan	* tree-optimize.c: Likewise.
13910169689Skan	* tree-ssa.c: Likewise.
13911169689Skan
13912169689Skan2002-12-11  Diego Novillo  <dnovillo@redhat.com>
13913169689Skan
13914169689Skan	* gimplify.c (simplify_return_expr): return statements should only
13915169689Skan	have a GIMPLE value as argument.
13916169689Skan	* tree-cfg.c (call_expr_flags): New function.
13917169689Skan	(is_ctrl_altering_stmt): Call it.
13918169689Skan	* tree-flow.h (extern): Declare it.
13919169689Skan
13920169689Skan2002-12-06  Diego Novillo  <dnovillo@redhat.com>
13921169689Skan
13922169689Skan	* tree-cfg.c (make_goto_expr_edges): Temporary hack to prevent
13923169689Skan	removing blocks with nonlocal labels.
13924169689Skan	(is_nonlocal_label_block): Return true if DECL_NONLOCAL is set for
13925169689Skan	the label.
13926169689Skan
13927169689Skan	* tree-dfa.c (alias_leaders): New local array.
13928169689Skan	(num_alias_leaders): New local variable.
13929169689Skan	(find_alias_leader): New local function.
13930169689Skan	(may_access_global_mem): New local function.
13931169689Skan	(find_may_aliases_for): Call them.
13932169689Skan	(compute_may_aliases): Allocate and deallocate alias_leaders.
13933169689Skan	Show alias information if -fdump-tree-...-alias flag is given.
13934169689Skan	(may_alias_p): Return true if both variables are the same.
13935169689Skan	(find_refs_in_expr): Strip WFL and NOPs from the parent statement.
13936169689Skan	If a pointer relocation is due to a function call, assignment from
13937169689Skan	a global or a function argument, mark the pointer as a may-alias
13938169689Skan	for global storage.
13939169689Skan	(dump_referenced_vars): Reformat output.
13940169689Skan	(dump_variable): Likewise.
13941169689Skan
13942169689Skan	* tree-dump.c (dump_option_value_info): Add entry for TDF_ALIAS.
13943169689Skan	* tree.h (TDF_ALIAS): Define.
13944169689Skan	* doc/invoke.texi: Document new flag.
13945169689Skan
13946169689Skan	* tree-flow-inline.h (may_alias_global_mem_p): New function.
13947169689Skan	* tree-flow.h (enum tree_flags): Add value TF_MAY_ALIAS_GLOBAL_MEM.
13948169689Skan	(may_alias_global_mem_p): Declare.
13949169689Skan
13950169689Skan	* tree-simple.c (get_base_symbol): Return NULL_TREE, not NULL.
13951169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Remove unused variable.
13952169689Skan	* tree-ssa-dce.c (need_to_preserve_store): Call
13953169689Skan	decl_function_context instead of DECL_CONTEXT.
13954169689Skan	If the symbol may alias global memory, return nonzero.
13955169689Skan
13956169689Skan	* tree-ssa.c (dump_reaching_defs): Reformat output.
13957169689Skan	(set_currdef_for): Walk the alias leader chain, setting CURRDEF for
13958169689Skan	all the alias sets that may be affected by the definition.
13959169689Skan
13960169689Skan2002-12-06  Daniel Berlin  <dberlin@dberlin.org>
13961169689Skan
13962169689Skan	* tree-dfa.c (may_alias_p): Fix global variables and points-to.
13963169689Skan
13964169689Skan2002-12-03  Daniel Berlin  <dberlin@dberlin.org>
13965169689Skan
13966169689Skan	* tree-ssa.c (delete_tree_ssa):  Move call to delete_alias_vars
13967169689Skan	above resetting num_referenced_vars.
13968169689Skan
13969169689Skan2002-12-03  Diego Novillo  <dnovillo@redhat.com>
13970169689Skan
13971169689Skan	* Makefile.in: Add dependencies on $(TM_H) and coretypes.h for the
13972169689Skan	files mentioned below.
13973169689Skan	* old-tree-inline.c: Include tm.h and coretypes.h.
13974169689Skan	* c-pretty-print.c: Likewise.
13975169689Skan	* disjoint-set.c: Likewise.
13976169689Skan	* tree-alias-ecr.c: Likewise.
13977169689Skan	* tree-alias-type.c: Likewise.
13978169689Skan	* tree-alias-ander.c: Likewise.
13979169689Skan	* tree-alias-steen.c: Likewise.
13980169689Skan	* tree-alias-common.c: Likewise.
13981169689Skan	* tree-ssa.c: Likewise.
13982169689Skan	* tree-ssa-pre.c: Likewise.
13983169689Skan	* tree-cfg.c: Likewise.
13984169689Skan	* tree-dfa.c: Likewise.
13985169689Skan	* tree-optimize.c: Likewise.
13986169689Skan	* c-simplify.c: Likewise.
13987169689Skan	* gimplify.c: Likewise.
13988169689Skan	* tree-browser.c: Likewise.
13989169689Skan	* simple-break-elim.c: Likewise.
13990169689Skan	* simple-goto-elim.c: Likewise.
13991169689Skan	* tree-dchain.c: Likewise.
13992169689Skan	* c-call-graph.c: Likewise.
13993169689Skan	* tree-simple.c: Likewise.
13994169689Skan	* tree-nomudflap.c: Likewise.
13995169689Skan	* tree-pretty-print.c: Likewise.
13996169689Skan	* tree-ssa-dce.c: Likewise.
13997169689Skan	* tree-ssa-ccp.c: Likewise.
13998169689Skan	* dependence.c: Likewise.
13999169689Skan	* tree-mudflap.c: Likewise
14000169689Skan	(mx_xfn_indirect_ref): Use size_type_node instead of c_size_type_node.
14001169689Skan
14002169689Skan2002-12-03  Diego Novillo  <dnovillo@redhat.com>
14003169689Skan
14004169689Skan	* tree-dfa.c: Undo this change that causes bootstrap
14005169689Skan	failures:
14006169689Skan
14007169689Skan	2002-12-02  Diego Novillo  <dnovillo@redhat.com>
14008169689Skan
14009169689Skan		* tree-dfa.c (may_alias_p): Artificial variables
14010169689Skan		can also be aliased.
14011169689Skan
14012169689Skan2002-12-03  Andreas Jaeger  <aj@suse.de>
14013169689Skan
14014169689Skan	* tree-simple.c (right_assocify_expr): Remove unused variable.
14015169689Skan
14016169689Skan2002-12-02  Andrew MacLeod  <amacleod@redhat.com>
14017169689Skan
14018169689Skan	* gimplify.c (simplify_cleanup_point_expr): gsi_stmt can return NULL,
14019169689Skan	use gsi_end.
14020169689Skan	* tree-cfg.c (make_blocks): Use gsi_end, gsi_stmt can return NULL. Set
14021169689Skan	basic_block for empty_stmt_node containers.
14022169689Skan	(make_edges): Stmt's can be NULL.
14023169689Skan	(make_ctrl_stmt_edges, make_exit_edges, make_loop_expr_edges,
14024169689Skan	make_cond_expr_edges, make_goto_expr_edges, is_nonlocal_label_block,
14025169689Skan	block_invalidates_loop, cleanup_control_flow, cleanup_cond_expr_graph,
14026169689Skan	cleanup_switch_expr_graph, disconnect_unreachable_case_labels,
14027169689Skan	find_taken_edge, tree_cfg2dot, successor_block, is_latch_block,
14028169689Skan	switch_parent, first_stmt, last_stmt): Check for first_stmt() or
14029169689Skan	last_stmt() returning NULL.
14030169689Skan	(remove_tree_bb, first_exec_stmt): Use gsi_end.
14031169689Skan	(last_stmt_ptr): Iterate to find last execuatbel stmt_ptr in a block.
14032169689Skan	(gsi_start_bb): Return first non-empty stmt, if there is one.
14033169689Skan	(set_bb_for_stmt): Don't decend into an empty_stmt_node.
14034169689Skan	* tree-dfa.c (find_tree_refs): Use gsi_end.
14035169689Skan	(collect_dfa_stats): Use gsi_end_bb.
14036169689Skan	* tree-flow-inline.h (gsi_step_bb): split.
14037169689Skan	(gsi_step_in_bb): gsi_step with explicit bb specified. Never return
14038169689Skan	empty_stmt_node.
14039169689Skan	(gsi_start_bb): Move to tree-cfg.c.
14040169689Skan	(gsi_end_bb): New. Have we reached the end of a basic block.
14041169689Skan	* tree-flow.h (gsi_start_bb): Make external.
14042169689Skan	(gsi_end_bb, gsi_step_in_bb): New prototypes.
14043169689Skan	* tree-simple.h (gsi_end): renamed from gsi_after_end.
14044169689Skan	(gsi_stmt): Return NULL if stmt is an empty_stmt_node or error mark.
14045169689Skan	* tree-ssa-ccp.c (simulate_block, substitute_and_fold): Use gsi_end.
14046169689Skan	* tree-ssa-dce.c (mark_control_parent_necessary, find_useful_stmts,
14047169689Skan	remove_dead_stmts): Use gsi_end_bb.
14048169689Skan	(process_worklist): Check for NULL last_stmt.
14049169689Skan	* tree-ssa-pre.c (finalize_1): Use gsi_end_bb, gsi_stmt can be NULL.
14050169689Skan
14051169689Skan2002-12-02  Diego Novillo  <dnovillo@redhat.com>
14052169689Skan
14053169689Skan	* tree-dfa.c (dump_ref): Display '<nil>' for NULL references.
14054169689Skan	(dump_phi_args): Handle NULL arguments.
14055169689Skan	(may_alias_p): Artificial variables can also be aliased.
14056169689Skan
14057169689Skan2002-12-02  Daniel Berlin <dberlin@dberlin.org>
14058169689Skan
14059169689Skan	* tree-ssa-pre.c (okay_injuring_def): inj could be null.
14060169689Skan	(get_operand):  Use instead of special casing INDIRECT_REF and
14061169689Skan	COMPONENT_REF everywhere.
14062169689Skan	(names_match_p): Fix.
14063169689Skan	(defs_match_p): Ignore partial uses.
14064169689Skan	(rename_2): Fix non-matching condition.
14065169689Skan	(update_old_new): Update the kills and lefts arrays.
14066169689Skan	(finalize_1): Set the bb for the new statement.
14067169689Skan	(update_ssa_for_new_use): Ditto.
14068169689Skan	(code_motion): Ditto.
14069169689Skan	(call_modifies_slot): Handle function pointers (where we end up
14070169689Skan	with a _DECL as our argument).
14071169689Skan	(pre_part_1_trav): Update the kills and lefts arrays.
14072169689Skan	Just use TREE_TYPE (ei->expr) for type of expression.
14073169689Skan	(add_left_occ): New helper function.
14074169689Skan	(process_left_occs_and_kills): Add other cases we need to handle.
14075169689Skan	(tree_perform_ssapre): Add new processed array, since for left
14076169689Skan	occurrences and kills, we need to process *all* statements, not
14077169689Skan	just ones we might consider candiates for PRE.
14078169689Skan
14079169689Skan2002-12-02  Diego Novillo  <dnovillo@redhat.com>
14080169689Skan
14081169689Skan	* tree-dfa.c (find_refs_in_expr): Look for references in
14082169689Skan	VA_ARG_EXPR nodes.
14083169689Skan
14084169689Skan2002-12-01  Diego Novillo  <dnovillo@redhat.com>
14085169689Skan
14086169689Skan	* tree-optimize.c (optimize_function_tree): Undo
14087169689Skan	inadvertent change in previous commit.
14088169689Skan
14089169689Skan2002-12-01  Diego Novillo  <dnovillo@redhat.com>
14090169689Skan
14091169689Skan	* fold-const.c (operand_equal_p): Check for NULL TREE_TYPEs.
14092169689Skan
14093169689Skan	* tree-cfg.c (remove_stmt): Call remove_ref.
14094169689Skan	(disconnect_unreachable_case_labels): Do not disconnect the edge
14095169689Skan	going to the block holding the BIND_EXPR node for the switch()
14096169689Skan	body.
14097169689Skan	(dump_tree_cfg): Call dump_current_function.
14098169689Skan
14099169689Skan	* Makefile.in (tree-dfa.o): Depend on convert.h.
14100169689Skan	* tree-dfa.c: Include convert.h.
14101169689Skan	(remove_def): New local function.
14102169689Skan	(reset_def_def_links): New local function.
14103169689Skan	(replace_phi_arg_with): New local function.
14104169689Skan	(replace_ref_with): New function.
14105169689Skan	(try_replace_ref_with): Rename from replace_ref_in.
14106169689Skan	Also look for V_USE references on the LHS of assignments.
14107169689Skan	When replacing the callee of a CALL_EXPR, make sure that the type
14108169689Skan	of the new callee is compatible with the old one.
14109169689Skan	(replace_ref_r): Call operand_equal_p.
14110169689Skan	(remove_ref): New function.
14111169689Skan	(same_var_p): New function.
14112169689Skan	(dump_referenced_vars): Add new flag DETAILS.  Update all users.
14113169689Skan	(debug_referenced_vars): Likewise.
14114169689Skan
14115169689Skan	* tree-ssa.c (dump_reaching_defs): Change output format.
14116169689Skan	(set_ssa_links): Don't set def-def links for PHI nodes.
14117169689Skan
14118169689Skan	* tree-ssa-ccp.c (replace_uses_in): Add new argument COMMIT.
14119169689Skan	Update all users.
14120169689Skan
14121169689Skan	* tree-optimize.c (dump_current_function): New function.
14122169689Skan	(optimize_function_tree): Call it.
14123169689Skan	* tree.h (dump_current_function): Declare.
14124169689Skan	* c-decl.c (c_expand_body): Call dump_current_function.
14125169689Skan	* tree-ssa-dce.c (tree_ssa_eliminate_dead_code): Likewise.
14126169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Likewise.
14127169689Skan	* tree-ssa.c (build_tree_ssa): Likewise.
14128169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Likewise.
14129169689Skan	Dump variables and reaching definitions if TDF_DETAILS is set.
14130169689Skan
14131169689Skan	* tree-pretty-print.c (print_call_name): Call dump_generic_node for
14132169689Skan	NOP_EXPR operands.
14133169689Skan
14134169689Skan	* tree-ssa-pre.c: Don't include c-common.h nor c-tree.h
14135169689Skan	Replace calls to build_modify_expr with build everywhere.
14136169689Skan	Replace calls to deep_copy_node with copy_node_r everywhere.
14137169689Skan
14138169689Skan2002-11-29  Andreas Jaeger  <aj@suse.de>
14139169689Skan
14140169689Skan	* c-call-graph.c (construct_call_graph): Fix format.
14141169689Skan
14142169689Skan	* tree-alias-ander.c: Declare print_out_result.
14143169689Skan
14144169689Skan	* tree-ssa-pre.c: Declare is_on_lhs and call_modifies_slot.
14145169689Skan
14146169689Skan	* tree.h: Declare expand_asm_expr and add_var_to_bind_expr.
14147169689Skan
14148169689Skan	* tree-inline.c: Declare remap_decls.
14149169689Skan
14150169689Skan2002-11-28  Daniel Berlin  <dberlin@dberlin.org>
14151169689Skan
14152169689Skan	* tree-alias-common.h: Start adding doxygen docs.
14153169689Skan
14154169689Skan	* tree-alias-common.c: Ditto
14155169689Skan
14156169689Skan2002-11-28  Daniel Berlin  <dberlin@dberlin.org>
14157169689Skan
14158169689Skan	* tree-alias-ander.c: Convert debug defines and ifdefs into
14159169689Skan	dump_file use.
14160169689Skan
14161169689Skan	* tree.h: Add TDI_pta.
14162169689Skan
14163169689Skan	* tree-dump.c: Add dump-tree-pta and TDI_pta.
14164169689Skan
14165169689Skan2002-11-28  Diego Novillo  <dnovillo@redhat.com>
14166169689Skan
14167169689Skan	* Makefile.in (tree-ssa-pre.o, tree-cfg.o, gimplify.o, tree-ssa-dce.o,
14168169689Skan	tree-ssa-ccp.o): Add dependency on $(TIMEVAR_H).
14169169689Skan	* timevar.def (TV_TREE_GIMPLIFY, TV_TREE_MAY_ALIAS,
14170169689Skan	TV_TREE_INSERT_PHI_NODES, TV_TREE_BUILD_FUD_CHAINS, TV_TREE_RDEFS):
14171169689Skan	New timers.
14172169689Skan	(TV_TREE_SSA): Remove.
14173169689Skan	(TV_INTEGRATION, TV_EXPAND): Switch order.
14174169689Skan	* c-decl.c (c_expand_body): Pop TV_EXPAND before running the tree
14175169689Skan	optimizers.
14176169689Skan	* gimplify.c (simplify_function_tree): Push/pop TV_TREE_GIMPLIFY.
14177169689Skan	* tree-cfg.c (build_tree_cfg): Push/pop TV_TREE_CFG.
14178169689Skan	* tree-dfa.c (compute_may_aliases): Push/pop TV_TREE_MAY_ALIAS.
14179169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Push/pop TV_TREE_CCP.
14180169689Skan	* tree-ssa-dce.c (tree_ssa_eliminate_dead_code): Push/pop
14181169689Skan	TV_TREE_DCE.
14182169689Skan	Call compute_reaching_defs.
14183169689Skan	Remove debugging dumps before DCE.
14184169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Push/pop TV_TREE_PRE.
14185169689Skan	* tree-ssa.c (build_tree_ssa): Don't call compute_reaching_defs.
14186169689Skan	Don't call dump_reaching_defs.
14187169689Skan	(insert_phi_nodes): Push/pop TV_TREE_INSERT_PHI_NODES.
14188169689Skan	(build_fud_chains): Push/pop TV_TREE_BUILD_FUD_CHAINS.
14189169689Skan	(compute_reaching_defs): Push/pop TV_TREE_RDEFS.
14190169689Skan	Call dump_reaching_defs.
14191169689Skan	* tree-optimize.c (optimize_function_tree): Remove calls to
14192169689Skan	timevar_push and timevar_pop.
14193169689Skan
14194169689Skan2002-11-28  Diego Novillo  <dnovillo@redhat.com>
14195169689Skan
14196169689Skan	* Makefile.in (tree-ssa.o): Add dependency on $(TIMEVAR_H) and
14197169689Skan	tree-alias-common.h.
14198169689Skan	(tree-dfa.o): Likewise.
14199169689Skan	(tree-optimize.o): Add dependency on $(TIMEVAR_H).
14200169689Skan	* tree-dfa.c (compute_may_aliases): Move call to delete_alias_vars
14201169689Skan	* tree-ssa.c (delete_tree_ssa): ... here.
14202169689Skan
14203169689Skan2002-11-27  Diego Novillo  <dnovillo@redhat.com>
14204169689Skan
14205169689Skan	* tree-dfa.c (add_may_alias): Remove.  Update all users.
14206169689Skan	(get_alias_index): Remove.  Update all users.
14207169689Skan	(dfa_stats_d): Remove fields num_may_alias, max_num_may_alias,
14208169689Skan	num_alias_imm_rdefs and max_num_alias_imm_rdefs.  Update all users.
14209169689Skan	(may_alias_p): Make extern.  Move declaration to tree-flow.h.
14210169689Skan	(TRM_DEFAULT): Remove.  Update all users.  Update values of the
14211169689Skan	other TRM_* constants.
14212169689Skan	(create_ref): Don't initialize the PHI argument array with the
14213169689Skan	number of incoming edges.
14214169689Skan	(collect_dfa_stats): Do not traverse the function body with
14215169689Skan	walk_tree.
14216169689Skan	Free temporary hash table before returning.
14217169689Skan	(compute_may_aliases): Update comment.
14218169689Skan	(may_alias_p): Switch arguments if the first argument is not an
14219169689Skan	INDIRECT_PTR or the artificial global_var.
14220169689Skan	(find_may_aliases_for): If a pointer aliases a variable, set the
14221169689Skan	pointer to be the alias leader for the variable.
14222169689Skan	(ref_defines): Call may_alias_p.
14223169689Skan	(is_killing_def): Return false if the reaching definition is NULL.
14224169689Skan	Don't check for volatile definitions.
14225169689Skan	Change second argument to be a tree.  Update all users.
14226169689Skan
14227169689Skan	* tree-flow-inline.h (alias_imm_reaching_def): Remove.  Update all
14228169689Skan	users.
14229169689Skan	(may_alias): Remove.  Update all users.
14230169689Skan	(set_imm_reaching_def): Check for circularity.
14231169689Skan	(alias_leader): New function.
14232169689Skan	(set_alias_leader): New function.
14233169689Skan	(is_aliased): New function.
14234169689Skan	(is_default_def): Remove.  Update all users.
14235169689Skan
14236169689Skan	* tree-flow.h (struct var_ref_d): Remove field alias_imm_rdefs.
14237169689Skan	Update all users.
14238169689Skan	(struct var_def_d): Remove field m_default.  Update all users.
14239169689Skan	(struct tree_ann_d): Remove field may_aliases.  Update all users.
14240169689Skan	Add field alias_leader.
14241169689Skan	(struct dfa_counts_d): Remove fields num_may_alias and
14242169689Skan	num_may_alias_imm_rdefs.  Update all users.
14243169689Skan
14244169689Skan	* tree-ssa.c: Update documentation on may-alias processing.
14245169689Skan	(set_ssa_links): Remove third argument.  Update all users.
14246169689Skan	(set_alias_imm_reaching_def): Remove.  Update all users.
14247169689Skan	(create_default_def): Likewise.
14248169689Skan	(analyze_rdefs): Likewise.
14249169689Skan	(currdef_for): Move from tree-flow-inline.h
14250169689Skan	(set_currdef_for): Likewise.
14251169689Skan	(compute_reaching_defs): Rename from compute_tree_rdefs.  Update
14252169689Skan	all users.
14253169689Skan	(follow_chain): Call is_killing_def instead of is_partial_def.
14254169689Skan	(tree_ssa_remove_phi_alternative): Remove unused variable ref.
14255169689Skan	(set_ssa_links): When processing V_USE references, make sure that
14256169689Skan	CURRDEF is a definition for the variable or one of its aliases.
14257169689Skan
14258169689Skan2002-11-26  Sebastian Pop  <s.pop@laposte.net>
14259169689Skan
14260169689Skan	* Makefile.in (OBJS): Add tree-browser.o.
14261169689Skan	(tree-browser.o): New dependency.
14262169689Skan	* tree-browser.c: New file.
14263169689Skan	* tree-browser.def: New file.
14264169689Skan
14265169689Skan2002-11-26  Jason Merrill  <jason@redhat.com>
14266169689Skan
14267169689Skan	Gimplify C++ cleanups.
14268169689Skan	* gimplify.c (voidify_wrapper_expr): Split out from...
14269169689Skan	(simplify_bind_expr): ...here.
14270169689Skan	(simplify_cleanup_point_expr): New fn.
14271169689Skan	(simplify_target_expr): New fn.
14272169689Skan	(gimple_conditional_context): New fn.
14273169689Skan	(gimple_push_condition, gimple_pop_condition): New fns.
14274169689Skan	(simplify_expr) [TRY_CATCH_EXPR]: Handle like TRY_FINALLY_EXPR.
14275169689Skan	* c-simplify.c (simplify_cleanup): New fn.
14276169689Skan	(c_simplify_stmt): Call it and lang_simplify_stmt.
14277169689Skan	(simplify_expr_stmt): Wrap the expr in a CLEANUP_POINT_EXPR.
14278169689Skan	(simplify_return_stmt, simplify_decl_stmt): Likewise.
14279169689Skan	(simplify_stmt_expr): Handle the STMT_EXPR_NO_SCOPE case.
14280169689Skan	(is_last_stmt_of_scope): Likewise.
14281169689Skan	* c-common.h: Declare c_genericize, c_simplify_stmt and
14282169689Skan	lang_simplify_stmt.
14283169689Skan	* c-common.c (lang_simplify_stmt): Define.
14284169689Skan
14285169689Skan	Gimplify EXIT_EXPRs.
14286169689Skan	* gimplify.c (gimplify_loop_expr, gimplify_exit_expr): New fns.
14287169689Skan	(simplify_expr): Call them.
14288169689Skan	* expr.c (expand_expr) [LOOP_EXPR]: Pass 1 again for exit_flag.
14289169689Skan
14290169689Skan	* tree-simple.c (right_assocify_expr): Also set TREE_SIDE_EFFECTS.
14291169689Skan
14292169689Skan	* gimplify.c (simplify_expr): Call STRIP_TYPE_NOPS.
14293169689Skan	[REALPART_EXPR]: Don't just return.
14294169689Skan
14295169689Skan	* tree-pretty-print.c (dump_c_node): Handle REFERENCE_TYPE.
14296169689Skan	* c-pretty-print.c (dump_c_node): Likewise.  Handle null FOR_INIT_STMT.
14297169689Skan
14298169689Skan2002-11-25  Daniel Berlin <dberlin@dberlin.org>
14299169689Skan
14300169689Skan	* config.gcc: Try committing the correct version.
14301169689Skan	* tree-alias-ander.c (andersen_may_alias): Add "!= NULL" to make
14302169689Skan	return a bool.
14303169689Skan
14304169689Skan2002-11-24  Daniel Berlin  <dberlin@dberlin.org>
14305169689Skan
14306169689Skan	* configure.in: Add --with-libbanshee, passed to us by toplevel if
14307169689Skan	libbanshee was configured. Substitute appropriate definitions for
14308169689Skan	Makefile (IE disabling tree-alias-ander building) if it wasn't.
14309169689Skan	* config.in: Regenerated.
14310169689Skan	* config.gcc: Rebuild libbanshee with stage1 on darwin to work
14311169689Skan	around system compiler problem.
14312169689Skan	* configure: Regenerated.
14313169689Skan	* Makefile.in: Add banshee stuff.
14314169689Skan	* tree-alias-ander.c: New file.
14315169689Skan	* tree-alias-ander.h: New file.
14316169689Skan	* tree-alias-common.c (get_alias_var): Fix field based stuff.
14317169689Skan	(find_func_aliases): Don't walk subtrees if we processed the tree.
14318169689Skan	(ptr_may_alias_var): Fix both field-based and non-field-based lookup.
14319169689Skan
14320169689Skan2002-11-22  Andrew MacLeod  <amacleod@redhat.com>
14321169689Skan
14322169689Skan	* tree-ssa-dce.c (mark_necessary): Split out mark_tree_necessary. Don't
14323169689Skan	mark if tree is already marked.
14324169689Skan	(mark_tree_necessary): New. Mark tree without processing control parent.
14325169689Skan	(mark_control_parent_necessary): Remove recursion, mark trees directly.
14326169689Skan	(need_to_preserve_store): Can expression/symbol affect external values.
14327169689Skan	(tree_ssa_eliminate_dead_code): Split.
14328169689Skan	(find_useful_stmts): Find initial set of needed statements.
14329169689Skan	(process_worklist): Find statements which calculate needed statements.
14330169689Skan	(remove_dead_stmts): Delete statements which are dead.
14331169689Skan
14332169689Skan2002-11-16  Jason Merrill  <jason@redhat.com>
14333169689Skan
14334169689Skan	Improve tree dumps.
14335169689Skan	* c-pretty-print.c, tree-pretty-print.c (dump_c_node): Handle
14336169689Skan	integers larger than a host word.
14337169689Skan	(op_prio): Handle INIT_EXPR.
14338169689Skan	* gimplify.c (simplify_bind_expr): Set TREE_SIDE_EFFECTS and type
14339169689Skan	of void_type_node on the COMPOUND_EXPRs as we walk.
14340169689Skan	* tree-simple.c (right_assocify_expr): Propagate the type from cur
14341169689Skan	rather than rhs.
14342169689Skan
14343169689Skan	* c-decl.c (finish_function): Call c_genericize instead of
14344169689Skan	simplify_function_tree.
14345169689Skan	* c-simplify.c (c_genericize): New function.
14346169689Skan	(simplify_stmt_expr): Just genericize.
14347169689Skan	(simplify_compound_literal_expr): Likewise.
14348169689Skan	(c_build_bind_expr): Don't build a block for an artificial decl.
14349169689Skan	(simplify_decl_stmt): Add the variable to the temps list iff it's
14350169689Skan	artificial.
14351169689Skan	(c_simplify_expr): Don't call push/pop_context.
14352169689Skan	* c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL.
14353169689Skan	* c-tree.h: Declare c_genericize.
14354169689Skan
14355169689Skan	* c-simplify.c (tree_build_scope): Remove.
14356169689Skan
14357169689Skan	Remove INIT_EXPR from GIMPLE.
14358169689Skan	* c-simplify.c (simplify_decl_stmt): Use MODIFY_EXPR.
14359169689Skan	* gimplify.c (simplify_bind_expr): Likewise.
14360169689Skan	(simplify_modify_expr): Convert INIT_EXPR to MODIFY_EXPR.
14361169689Skan
14362169689Skan	* c-simplify.c (create_tmp_var_1): Drop; change all users to call
14363169689Skan	create_tmp_var.
14364169689Skan	(gimple_add_tmp_var): Now adds to the external temps list if
14365169689Skan	available, or directly to the function otherwise.
14366169689Skan
14367169689Skan	Avoid gratuitous unused warnings.
14368169689Skan	* c-simplify.c (simplify_expr_stmt): Check TREE_SIDE_EFFECTS
14369169689Skan	directly.  Also check for explicit conversions to void.
14370169689Skan	(expr_has_effect): Remove.
14371169689Skan
14372169689Skan	* Makefile.in (OBJS): Remove tree-dchain.o.
14373169689Skan
14374169689Skan	* stor-layout.c (variable_size): We don't care about
14375169689Skan	global_bindings_p if the frontend doesn't want a list of the
14376169689Skan	expressions.
14377169689Skan
14378169689Skan2002-11-13  Diego Novillo  <dnovillo@redhat.com>
14379169689Skan
14380169689Skan	* toplev.c (parse_options_and_default_flags): Enable SSA-CCP by
14381169689Skan	default with optimization >= 1.
14382169689Skan	* tree-dfa.c (find_refs_in_expr): Clobber '*.GLOBAL_VAR', not
14383169689Skan	'GLOBAL_VAR'.
14384169689Skan	(collect_dfa_stats): Collect statistics on '*.GLOBAL_VAR'.
14385169689Skan	(compute_may_aliases): Make sure that variable is an INDIRECT_REF.
14386169689Skan	(may_alias_p): GLOBAL_VAR should alias INDIRECT_REFs.
14387169689Skan	Only check addressability on VAR_DECLs.
14388169689Skan	(find_may_aliases_for): Make sure argument is an INDIRECT_REF.
14389169689Skan	* tree-flow-inline.h (indirect_var): Call DECL_P.
14390169689Skan	(set_indirect_var): Call DECL_P.
14391169689Skan	Create annotation if it doesn't exist.
14392169689Skan	(create_indirect_ref): Move from tree-dfa.c.
14393169689Skan	* tree-flow.h (create_indirect_ref): Declare.
14394169689Skan	* tree-ssa-ccp.c (visit_phi_node): Avoid debugging dump from
14395169689Skan	accessing uninitialized data.
14396169689Skan	* tree-ssa.c (init_tree_ssa): Create an INDIRECT_REF node for
14397169689Skan	.GLOBAL_VAR.
14398169689Skan
14399169689Skan2002-11-12  Diego Novillo  <dnovillo@redhat.com>
14400169689Skan
14401169689Skan	* tree-cfg.c (delete_tree_cfg): Call free_aux_for_blocks.
14402169689Skan	Call free_basic_block_vars.
14403169689Skan
14404169689Skan	* gimplify.c (simplify_expr): VA_ARG_EXPR nodes are in GIMPLE form
14405169689Skan	already.
14406169689Skan	Gimplify BIT_FIELD_REF nodes.
14407169689Skan	(simplify_call_expr): Update comment.
14408169689Skan	* tree-dfa.c (find_refs_in_expr): VA_ARG_EXPR nodes make no
14409169689Skan	data references.
14410169689Skan	Handle BIT_FIELD_REF nodes.
14411169689Skan	* tree-pretty-print.c (op_prio): Don't write an error message if
14412169689Skan	the operand is not recognized.
14413169689Skan	* tree-simple.c (is_simple_unary_expr): Handle BIT_FIELD_REFs.
14414169689Skan	(is_simplifiable_builtin): Only return false for MD builtins.
14415169689Skan
14416169689Skan2002-11-08  Diego Novillo  <dnovillo@redhat.com>
14417169689Skan
14418169689Skan	* tree-cfg.c (cleanup_switch_expr_graph): Handle edges going to
14419169689Skan	EXIT_BLOCK_PTR.
14420169689Skan	(first_stmt): Return NULL for ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR and
14421169689Skan	INVALID_BLOCK.
14422169689Skan	* tree-dfa.c (find_refs_in_expr): Call mark_not_simple.
14423169689Skan
14424169689Skan2002-11-07  Diego Novillo  <dnovillo@redhat.com>
14425169689Skan
14426169689Skan	* Makefile.in (tree-ssa.o, tree-cfg.o, tree-dfa.o): Add dependency
14427169689Skan	on function.h
14428169689Skan	* tree-cfg.c: Include function.h.
14429169689Skan	(build_tree_cfg): Set dump_file to NULL after closing the file.
14430169689Skan	(remove_tree_bb): Don't dump warnings about statements being
14431169689Skan	removed.
14432169689Skan	(dump_tree_cfg): Use current_function_name.
14433169689Skan	Check that the flowgraph is not empty before dumping the function
14434169689Skan	body.
14435169689Skan	(tree_cfg2dot): Use current_function_name.
14436169689Skan	* tree-dfa.c: Include function.h
14437169689Skan	(dump_dfa_stats): Use current_function_name.
14438169689Skan	* tree-optimize.c (optimize_function_tree): Set dump_file to NULL
14439169689Skan	after closing the file.
14440169689Skan	* tree-pretty-print.c (dump_generic_node): Make sure that the
14441169689Skan	flowgraph exists before displaying block boundaries.
14442169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Set dump_file to NULL after
14443169689Skan	closing the file.
14444169689Skan	* tree-ssa.c: Include function.h.
14445169689Skan	(build_tree_ssa): Set tree_ssa_dump_file to NULL after closing the
14446169689Skan	file.
14447169689Skan	(dump_reaching_defs): Use current_function_name.
14448169689Skan	(dump_tree_ssa): Likewise.
14449169689Skan
14450169689Skan2002-11-07  Diego Novillo  <dnovillo@redhat.com>
14451169689Skan
14452169689Skan	* tree-cfg.c (successor_block): Return EXIT_BLOCK_PTR if no
14453169689Skan	successor can be found while walking the nesting chain.
14454169689Skan
14455169689Skan2002-11-07  Diego Novillo  <dnovillo@redhat.com>
14456169689Skan
14457169689Skan	* tree-cfg.c: Fix some formatting in code and comments.
14458169689Skan	(set_bb_for_stmt): Move from tree-flow-inline.h
14459169689Skan	* tree-dfa.c: Fix some formatting in code and comments.
14460169689Skan	* tree-flow-inline.h: Likewise.
14461169689Skan	* tree-flow.h: Likewise.
14462169689Skan	* tree-ssa.c: Likewise.
14463169689Skan
14464169689Skan2002-11-06  Diego Novillo  <dnovillo@redhat.com>
14465169689Skan
14466169689Skan	* Makefile.in (tree-ssa-ccp.o): Add dependency on tree-inline.h
14467169689Skan	* tree-cfg.c (find_taken_edge): New function.
14468169689Skan	(cleanup_cond_expr_graph): Call it.
14469169689Skan	(disconnect_unreachable_case_labels): Call it.
14470169689Skan
14471169689Skan	* tree-dfa.c (struct clobber_data_d): Remove field
14472169689Skan	parent_expr_p.  Update all users.
14473169689Skan	(find_refs_in_expr): Remove argument parent_expr_p.  Update all users.
14474169689Skan	(create_ref): Remove arguments parent_expr_p and operand_p.  Update
14475169689Skan	all users.
14476169689Skan	(replace_ref_in): Rename from replace_ref_operand_with.  Update all
14477169689Skan	users.  Find the operand in the statement and replace it with a new
14478169689Skan	operand.
14479169689Skan	(replace_ref_r): New local function.
14480169689Skan	(is_killing_def): Also handle V_PHI references.
14481169689Skan	(output_ref): Move from tree-flow-inline.h
14482169689Skan
14483169689Skan	* tree-flow-inline.h (ref_expr): Remove.  Update all users.
14484169689Skan	(restore_ref_operand): Remove.  Update all users.
14485169689Skan	(set_output_ref): Remove.  Update all users.
14486169689Skan	(is_assignment_stmt): New function.
14487169689Skan	(is_may_def, is_may_use, is_partial_def, is_partial_use,
14488169689Skan	is_volatile_def, is_volatile_use, is_default_def,
14489169689Skan	is_clobbering_def, is_initializing_def, is_relocating_def,
14490169689Skan	is_addressof_use, is_pure_use): Check reference type first.
14491169689Skan	(is_pure_def): New function.
14492169689Skan
14493169689Skan	* tree-flow.h (struct tree_ref_common): Remove fields expr_p,
14494169689Skan	operand_p and orig_operand.  Update all users.
14495169689Skan	(struct tree_ann_d): Remove field output_ref.  Update all users.
14496169689Skan
14497169689Skan	* tree-ssa-ccp.c: Include tree-inline.h.
14498169689Skan	(simulate_block): Simulate every statement in the block, not its
14499169689Skan	references
14500169689Skan	(simulate_def_use_chains): Simulate statements containing uses
14501169689Skan	reached by the definition.
14502169689Skan	(substitute_and_fold): Traverse statements, not references.
14503169689Skan	Call fold_stmt.
14504169689Skan	(visit_phi_node): If PHI node is marked volatile, assume varying.
14505169689Skan	(visit_stmt): Rename from visit_expression_for.  Work on a
14506169689Skan	statement, not a reference.
14507169689Skan	(visit_assignment): Rename from visit_assignment_for.  Work on a
14508169689Skan	statement, not a reference.
14509169689Skan	(visit_cond_stmt): Rename from visit_condexpr_for.  Work on a
14510169689Skan	statement, not a reference.
14511169689Skan	(evaluate_stmt): Rename from evaluate_expr.  Work on a statement,
14512169689Skan	not a reference.
14513169689Skan	(initialize): Initialize special definitions to varying.
14514169689Skan	(replace_uses_in): Work on a statement, not an expression.
14515169689Skan	(fold_stmt): Rename from ccp_fold.  Work on a statement, not an
14516169689Skan	expression.
14517169689Skan	(get_rhs): New local function.
14518169689Skan	(set_rhs): New local function.
14519169689Skan
14520169689Skan2002-11-06  Daniel Berlin  <dberlin@dberlin.org>
14521169689Skan
14522169689Skan	* tree-flow.h: Prototype set_bb_for_stmt, last_stmt_ptr,
14523169689Skan	add_ephi_arg, num_ephi_args, set_ephi_arg, ephi_arg.
14524169689Skan	(enum tree_ref_type): Add E_LEFT, E_KILL, E_EXIT.
14525169689Skan
14526169689Skan	* tree-cfg.c (set_bb_for_stmt): Move to tree-flow-inline.h.
14527169689Skan	(last_stmt_ptr): New function, gives pointer to last statement in
14528169689Skan	bb.
14529169689Skan
14530169689Skan	* tree-flow-inline.h: Add exprref_processed, exprref_processed2,
14531169689Skan	expruse_phi, num_ephi_args, set_ephi_arg, ephi_arg, add_ephi_arg.
14532169689Skan
14533169689Skan	* tree-dfa.c (tree_ref_structure): Handle E_{LEFT,KILL,EXIT}.
14534169689Skan	(ref_type_name): Ditto.
14535169689Skan	(tree_ref_size): Ditto.
14536169689Skan	(dump_ref): E_PHI's phi_args is now a varray of phi_arg structs.
14537169689Skan	(add_ephi_arg): New function.
14538169689Skan	(remove_ref_from_list): Fix crash when node not found.
14539169689Skan	(compute_may_aliases): Add timing for points-to analysis.
14540169689Skan
14541169689Skan	* timevar.def: Add TV_TREE_PTA.
14542169689Skan
14543169689Skan	* tree-ssa-pre.c: Start of massive cleanup and rewriting (in
14544169689Skan	preparation for load/store PRE). No more uses of ref_expr, proper
14545169689Skan	call handling. Started removing unnecessary structures and lists,
14546169689Skan	started removing redundant and inefficient operations (IE O(n^2)
14547169689Skan	loops to process all phi operands, etc).  Basic load PRE implemented.
14548169689Skan	Code may look ugly due to large pieces commented out waiting for DFA
14549169689Skan	updating of refs to redo.
14550169689Skan
14551169689Skan2002-11-05  Diego Novillo  <dnovillo@redhat.com>
14552169689Skan
14553169689Skan	* tree-cfg.c (create_block_annotations): New local function.
14554169689Skan	(create_bb_ann): Remove.  Update all users.
14555169689Skan	(parent_array): New local variable.
14556169689Skan	(build_tree_cfg): Initialize it.
14557169689Skan	Call create_block_annotations.
14558169689Skan	(create_bb): Call alloc_block instead of ggc_alloc to allocate
14559169689Skan	memory for basic blocks.
14560169689Skan	Don't call set_parent_block.
14561169689Skan	Grow array parent_array.
14562169689Skan	(dump_tree_cfg): Change meaning of second argument.  Make it accept
14563169689Skan	any of the TDF_* flags defined in tree.h.
14564169689Skan	(delete_tree_cfg): Call free_aux_for_blocks.
14565169689Skan	Free array parent_array.
14566169689Skan	* tree-flow-inline.h (get_filename): New function.
14567169689Skan	(is_exec_stmt): return false if T is error_mark_node.
14568169689Skan	* tree-flow.h (struct var_ref_d): Mark alias_imm_rdefs field for
14569169689Skan	garbage collection.
14570169689Skan	(get_filename): Declare.
14571169689Skan	(struct bb_ann_d): Rename from bb_ann_def.
14572169689Skan	Remove garbage collection markers.
14573169689Skan	(referenced_vars): Mark for garbage collection.
14574169689Skan	(global_var): Likewise.
14575169689Skan	(create_bb_ann): Remove.
14576169689Skan	* tree-optimize.c (optimize_function_tree): Remove CFG and SSA
14577169689Skan	after debugging dumps.
14578169689Skan
14579169689Skan	* diagnostic.h (print_generic_stmt): Rename from print_generic_tree.
14580169689Skan	Update all users.
14581169689Skan	(print_generic_expr): Rename from print_generic_node.  Update all
14582169689Skan	users.
14583169689Skan	(PPF_BRIEF): Remove.  Update all users.
14584169689Skan	(PPF_BLOCK): Remove.  Update all users.
14585169689Skan	(PPF_LINENO): Remove.  Update all users.
14586169689Skan	(PPF_IS_STMT): Remove.  Update all users.
14587169689Skan	* flags.h (flag_dump_tree_all_ssa): Remove.  Update all users.
14588169689Skan	* toplev.c (f_options): Remove entry for -fdump-tree-all-ssa.
14589169689Skan	Update all users.
14590169689Skan	* tree-dump.c (dump_enable_all): Rename from dump_enable_all_ssa.
14591169689Skan	Update all users.
14592169689Skan	(dump_files): Add entry for -fdump-tree-all.
14593169689Skan	(dump_option_value_info): Remove entries for TDF_REFS and
14594169689Skan	TDF_RDEFS.
14595169689Skan	Add entry for TDF_BLOCK.
14596169689Skan	(dump_switch_p): If -fdump-tree-all was given, call dump_enable_all.
14597169689Skan	* tree-pretty-print.c (PPF_BRIEF): Remove.  Update all users.
14598169689Skan	(PPF_BLOCK): Remove.  Update all users.
14599169689Skan	(PPF_LINENO): Remove.  Update all users.
14600169689Skan	(PPF_IS_STMT): Remove.  Update all users.
14601169689Skan	(dumping_stmts): New local variable.
14602169689Skan	(print_generic_stmt): Rename from print_generic_tree.  Update all
14603169689Skan	users.
14604169689Skan	Set dumping_stmts to true.
14605169689Skan	(print_generic_expr): Rename from print_generic_node.  Update all
14606169689Skan	users.
14607169689Skan	Set dumping_stmts to false.
14608169689Skan	(maybe_init_pretty_print): Set last_bb to -1.
14609169689Skan	(dump_block_info): If available, dump file and line number
14610169689Skan	information for the first statement in the basic block.
14611169689Skan	* tree-ssa.c (build_tree_ssa): Dump referenced variables and
14612169689Skan	reaching definition information if -details is given.
14613169689Skan	* tree.h (enum tree_dump_index): Rename TDI_all to TDI_tu.  Update
14614169689Skan	all users.
14615169689Skan	Add new index TDI_all.
14616169689Skan	(TDF_DETAILS): Change value.
14617169689Skan	(TDF_REFS): Remove.  Update all users.
14618169689Skan	(TDF_RDEFS): Remove.  Update all users.
14619169689Skan	(TDF_BLOCK): Define.
14620169689Skan	* doc/invoke.texi: Update documentation for -fdump-tree-... flags.
14621169689Skan
14622169689Skan2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
14623169689Skan
14624169689Skan	* tree-mudflap.c (mudflap_enqueue_decl, _constant): Use
14625169689Skan	size_in_bytes, not c_size_in_bytes.
14626169689Skan	(mf_init_extern_trees): Import uintptr_t typedef node from
14627169689Skan	mf-runtime.h.
14628169689Skan
14629169689Skan2002-11-01  Diego Novillo  <dnovillo@redhat.com>
14630169689Skan
14631169689Skan	* tree-cfg.c (remove_tree_bb): Add new argument remove_stmts.
14632169689Skan	Update all callers.
14633169689Skan	(make_ctrl_stmt_edges): Add an edge to the body of a SWITCH_EXPR.
14634169689Skan	(make_cond_expr_edges): Don't try to linearize the if() subgraph.
14635169689Skan	(make_case_label_edges): Don't remove the fallthru edge from the
14636169689Skan	entry block to the switch() subgraph.
14637169689Skan	(cleanup_tree_cfg): Call cleanup_control_flow.
14638169689Skan	(remove_unreachable_blocks): Remove blocks of compound structures
14639169689Skan	before removing the entry block.
14640169689Skan	(remove_blocks): New local function.
14641169689Skan	(blocks_unreachable_p): New local function.
14642169689Skan	(is_nonlocal_label_block): New local function.
14643169689Skan	(find_subblocks): New local function.
14644169689Skan	(is_parent): New local function.
14645169689Skan	(gsi_remove): New function.
14646169689Skan	(remove_stmt): New local function.
14647169689Skan	(cleanup_control_flow): New local function.
14648169689Skan	(cleanup_cond_expr_graph): New local function.
14649169689Skan	(cleanup_switch_expr_graph): New local function.
14650169689Skan	(disconnect_unreachable_case_labels): New local function.
14651169689Skan
14652169689Skan	* tree-dfa.c (remove_decl): New function.
14653169689Skan	(find_decl_location): New function.
14654169689Skan
14655169689Skan	* tree-flow.h (gsi_remove): Declare.
14656169689Skan	(remove_decl): Declare.
14657169689Skan	(find_decl_location): Declare.
14658169689Skan
14659169689Skan	* tree-ssa-ccp.c (optimize_unexecutable_edges): Remove.  Update all
14660169689Skan	users.
14661169689Skan	(ssa_ccp_df_delete_unreachable_insns): Remove.  Update all users.
14662169689Skan	(tree_ssa_ccp): Call print_generic_tree with PPF_BLOCK.
14663169689Skan
14664169689Skan2002-10-31  Diego Novillo  <dnovillo@redhat.com>
14665169689Skan
14666169689Skan	* tree-dfa.c (create_indirect_ref): New local function.
14667169689Skan	(find_refs_in_expr): Call it.
14668169689Skan	(create_ref): Check E_* reference types with == instead of &.
14669169689Skan	(dump_ref): Likewise.
14670169689Skan	(count_tree_refs): Likewise.
14671169689Skan	* tree-ssa.c (set_ssa_links): Update documentation comment for
14672169689Skan	save_chain.
14673169689Skan
14674169689Skan2002-10-31  Diego Novillo  <dnovillo@redhat.com>
14675169689Skan
14676169689Skan	* tree-cfg.c (remove_tree_bb): Don't walk beyond the end of the
14677169689Skan	basic block.
14678169689Skan
14679169689Skan2002-10-26  Daniel Berlin  <dberlin@dberlin.org>
14680169689Skan
14681169689Skan	* flags.h: Remove flag_tree_points_to from here.
14682169689Skan	* toplev.c: Include tree-alias-common.h.
14683169689Skan	(flag_tree_points_to): Now of type enum pta_type, rather than
14684169689Skan	int.
14685169689Skan	(lang_independent_options): Remove flag_tree_points_to.
14686169689Skan	(display_help): Display help for tree-points-to here.
14687169689Skan	(decode_f_option): Allow selecting of points-to algorithm.
14688169689Skan	* tree-alias-common.c (varmap): Removed.
14689169689Skan	(alias_annot): Changed to a hash table.  Update all functions
14690169689Skan	appropriately.
14691169689Skan	(FIELD_BASED): New macro, switches between field-based analysis,
14692169689Skan	and field-independent analysis (field-based isn't quite done yet).
14693169689Skan	(alias_annot_entry): New, used in hash table.
14694169689Skan	(annot_eq): New function.
14695169689Skan	(annot_hash): New function.
14696169689Skan	(find_func_aliases): Handle casts, fix indendation.
14697169689Skan	(splaycount): Removed.
14698169689Skan	(splay_tree_count): Removed.
14699169689Skan	(display_points_to_set): Removed.
14700169689Skan	(splay_tree_size): Removed.
14701169689Skan	(alias_get_name): New function.
14702169689Skan	(ptr_may_alias_var): Globals are a bit funky to handle.
14703169689Skan	* tree-alias-steen.c: Use alias_get_name, rather than
14704169689Skan	print_generic_node.
14705169689Skan	(steen_simple_assign): Handle assignment of PTF's.
14706169689Skan	(test_assign): Remove.
14707169689Skan	* tree-alias-common.h (enum pta_type): New.
14708169689Skan	(alias_get_name): New.
14709169689Skan	(flag_tree_points_to): New.
14710169689Skan
14711169689Skan2002-10-26  Diego Novillo  <dnovillo@redhat.com>
14712169689Skan
14713169689Skan	* tree-cfg.c (cleanup_tree_cfg): Uncomment call to
14714169689Skan	compact_blocks.
14715169689Skan
14716169689Skan2002-10-26  Diego Novillo  <dnovillo@redhat.com>
14717169689Skan
14718169689Skan	* Makefile.in (tree-pretty-print.o): Depend on $(TREE_FLOW_H)
14719169689Skan	* basic-block.h (BB_COMPOUND_ENTRY): Rename from BB_CONTROL_ENTRY.
14720169689Skan	* diagnostic.h (dump_generic_tree): Remove extern declaration.
14721169689Skan	(print_generic_node_brief): Remove.  Update all users.
14722169689Skan	(PPF_BRIEF): Declare.
14723169689Skan	(PPF_BLOCK): Declare.
14724169689Skan	(PPF_LINENO): Declare.
14725169689Skan	(PPF_IS_STMT): Declare.
14726169689Skan	* tree-pretty-print.c (PPF_BRIEF): New constant.
14727169689Skan	(PPF_BLOCK): New constant.
14728169689Skan	(PPF_LINENO): New constant.
14729169689Skan	(PPF_IS_STMT): New constant.
14730169689Skan	(dump_block_info): New local function.
14731169689Skan	(last_bb): New local variable.
14732169689Skan	(dump_generic_tree): Remove unused function.
14733169689Skan	(print_generic_tree): Add third argument 'flags'.  Update all
14734169689Skan	users.
14735169689Skan	(print_generic_node_brief): Remove.  Update all users.
14736169689Skan	(print_generic_node): Add third argument 'flags'.  Update all
14737169689Skan	users.
14738169689Skan	(dump_generic_node): Add third argument 'flags'.  Update all users.
14739169689Skan	If PPF_BLOCK is set, display basic block information at basic block
14740169689Skan	boundaries.
14741169689Skan	If PPF_IS_STMT is set, change the way COMPOUND_EXPR nodes are
14742169689Skan	rendered.
14743169689Skan	If PPF_BRIEF is set, don't show the bodies of control statements.
14744169689Skan	(print_declaration):
14745169689Skan
14746169689Skan	* toplev.c (process_options): Update comment for -fdisable-simple.
14747169689Skan
14748169689Skan	* tree-cfg.c (remove_tree_bb): Rename from tree_delete_bb.
14749169689Skan	(latch_block): Move declaration to tree-flow.h.  Declare extern.
14750169689Skan	(make_blocks): Start a new block after finding a control flow
14751169689Skan	altering statement.
14752169689Skan	(make_loop_expr_blocks): Set the loop entry block to be the parent
14753169689Skan	block for the loop latch block.
14754169689Skan	(cleanup_tree_cfg): Rename from tree_cleanup_cfg.
14755169689Skan	Call compact_blocks.
14756169689Skan	(remove_tree_bb): Rename from tree_delete_bb.  Update all users.
14757169689Skan	(dump_tree_bb): Rename from dump_tree_bb.  Update all users.
14758169689Skan	Dump information about loop latch blocks.
14759169689Skan	(debug_tree_bb): Rename from tree_debug_bb.  Update all users.
14760169689Skan	(debug_tree_cfg): Rename from tree_debug_cfg.  Update all users.
14761169689Skan	(dump_tree_cfg): Rename from tree_dump_cfg.  Update all users.
14762169689Skan	By default, dump the function with markers for basic block
14763169689Skan	boundaries.
14764169689Skan	(successor_block): If we can't find a successor following the
14765169689Skan	parent chain, return the next block in the linked list of blocks.
14766169689Skan	Update documentation comments.
14767169689Skan	(stmt_starts_bb_p): Don't let RETURN_EXPR start a new block.
14768169689Skan	(is_latch_block): New function.
14769169689Skan	(first_exec_stmt): Don't treat BIND_EXPR nodes as a special case.
14770169689Skan	(first_stmt): Return NULL_TREE if the block does not exist.
14771169689Skan	(last_stmt): Likewise.
14772169689Skan
14773169689Skan	* tree-dfa.c (find_tree_refs): Rename from tree_find_refs.  Update
14774169689Skan	all users.
14775169689Skan	(find_refs_in_stmt): Handle BIND_EXPR nodes.
14776169689Skan	(rli_start): Move from tree-flow-inline.h
14777169689Skan	(rli_start_last): Likewise.
14778169689Skan	(rli_start_at): Likewise.
14779169689Skan	(rli_delete): Likewise.
14780169689Skan
14781169689Skan	* tree-flow-inline.h (gsi_start_bb): Handle NULL blocks.
14782169689Skan	(ref_list_is_empty): New function.
14783169689Skan	* tree-flow.h (rli_start): Change declaration to extern.
14784169689Skan	(rli_start_last): Likewise.
14785169689Skan	(rli_start_at): Likewise.
14786169689Skan	(rli_delete): Declare.
14787169689Skan	(latch_block): Declare.
14788169689Skan	(is_latch_block): Declare.
14789169689Skan	(get_last_ref): Change to inline declaration.
14790169689Skan	(get_first_ref): Likewise.
14791169689Skan	(ref_list_empty): Declare.
14792169689Skan
14793169689Skan	* tree-optimize.c (delete_tree_ssa): Remove declaration.
14794169689Skan
14795169689Skan	* tree-ssa-dce.c (mark_control_parent_necessary): Call gsi_step_bb
14796169689Skan	instead of gsi_step.
14797169689Skan	(tree_ssa_eliminate_dead_code): Likewise.
14798169689Skan
14799169689Skan	* tree-ssa.c (compute_tree_rdefs): Rename from compute_tree_rdefs.
14800169689Skan	Update all users.
14801169689Skan
14802169689Skan2002-10-22  Diego Novillo  <dnovillo@redhat.com>
14803169689Skan
14804169689Skan	* tree-dfa.c (struct dfa_stats_d): Add field size_tree_refs.
14805169689Skan	(tree_ref_size): New function.
14806169689Skan	(create_ref): Call it.
14807169689Skan	(dump_dfa_stats): Get total size from dfa_stats.size_tree_refs.
14808169689Skan	(count_tree_refs): Call tree_ref_size.
14809169689Skan	* tree-flow-inline.h (get_last_ref): New function.
14810169689Skan	(get_first_ref): New function.
14811169689Skan	* tree-flow.h (struct var_ref_d): Rename from var_ref.
14812169689Skan	(struct var_def_d): Rename from var_def.
14813169689Skan	(struct var_phi_d): Rename from var_phi.
14814169689Skan	(struct var_use_d): Rename from var_use.
14815169689Skan	(struct expr_phi_d): Rename from expr_phi.
14816169689Skan	(struct expr_use_d): Rename from expr_use.
14817169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Call get_last_ref.
14818169689Skan
14819169689Skan2002-10-21  Daniel Berlin  <dberlin@dberlin.org>
14820169689Skan
14821169689Skan	* timevar.def: Add TV_TREE_{PRE,CCP,DCE,CFG,SSA}} timevars.
14822169689Skan
14823169689Skan	* tree-optimize.c (optimize_function_tree): Push and pop timevars
14824169689Skan	for the tree optimizers.
14825169689Skan
14826169689Skan2002-10-21  Diego Novillo  <dnovillo@redhat.com>
14827169689Skan
14828169689Skan	* Makefile.in (OBJS): Move tree-mudflap.o ...
14829169689Skan	(C_AND_OBJC_OBJS): ... here.
14830169689Skan
14831169689Skan2002-10-21  Diego Novillo  <dnovillo@redhat.com>
14832169689Skan
14833169689Skan	* tree-flow-inline.h (rli_start): New function.
14834169689Skan	(rli_start_rev): New function.
14835169689Skan	(rli_start_at): New function.
14836169689Skan	(rli_after_end): New function.
14837169689Skan	(rli_step): New function.
14838169689Skan	(rli_step_rev): New function.
14839169689Skan	(rli_ref): New function.
14840169689Skan	* tree-flow.h (struct ref_list_iterator): Declare.
14841169689Skan	(FOR_REF_BETWEEN, FOR_EACH_REF, FOR_EACH_REF_REV): Replace with new
14842169689Skan	rli_* iterator functions.  Update all users.
14843169689Skan
14844169689Skan2002-10-21  Frank Ch. Eigler  <fche@redhat.com>
14845169689Skan
14846169689Skan	* tree-cfg.c (make_blocks): Ignore TRY_FINALLY_EXPR and
14847169689Skan	TRY_CATCH_EXPR.
14848169689Skan	* tree-mudflap.c (mx_register_decls): Ignore local decls
14849169689Skan	of extern variables of unknown size.
14850169689Skan
14851169689Skan2002-10-20  Daniel Berlin  <dberlin@dberlin.org>
14852169689Skan
14853169689Skan	* tree-ssa-pre.c (repair_injury): DTRT, rather than abort.
14854169689Skan
14855169689Skan	* tree-dfa.c (ref_type_name): E_* don't have these modifier
14856169689Skan	fields, but may have the same bits set, so don't print the
14857169689Skan	modifiers on them.
14858169689Skan
14859169689Skan	* gimplify.c (create_tmp_var): New function, wraps calls to
14860169689Skan	create_tmp_var_1 with pushing/popping of right context.
14861169689Skan	All internal gimplify.c now use create_tmp_var_1.
14862169689Skan	(create_tmp_var_noc): New function, create the var without
14863169689Skan	pushing/popping, and without exposing internals of create_tmp_var_1.
14864169689Skan	Only one use of this.
14865169689Skan
14866169689Skan	* tree-simple.h (create_tmp_var_noc): New prototype.
14867169689Skan
14868169689Skan	* c-simplify.c (simplify_stmt_expr): create_tmp_var changed to
14869169689Skan	create_tmp_var_noc.
14870169689Skan
14871169689Skan	* tree-ssa-pre.c: Add WAITING_FOR_DFA_UPDATE around code waiting for DFA
14872169689Skan	functions to keep refs up to date.
14873169689Skan	(add_call_to_ei): occurs and occurstmts is now an
14874169689Skan	array of tree pointers, not trees. Update approriately.
14875169689Skan	(insert_occ_in_preorder_dt_order_1): Ditto.
14876169689Skan	(tree_perform_ssapre): Ditto.
14877169689Skan	(find_use_for_var): Removed function.
14878169689Skan	(orig_expr_map): Removed global, removed uses.
14879169689Skan	(struct ei): Added injfixups member.
14880169689Skan	(is_strred_cand): STRIP_WFL the expression.
14881169689Skan	(calculate_increment): Ditto.
14882169689Skan	(is_injuring_def): Ditto.
14883169689Skan	(defs_y_dom_x): Ditto. Also account for fact that y is now a full
14884169689Skan	expression, not just an RHS.
14885169689Skan	(defs_match_p): Ditto (t2 is no longer just an RHS).
14886169689Skan	(finalize_1): Do insertion by replacement.
14887169689Skan	(repair_injury): Clean up, do insertion by replacement.
14888169689Skan	(find_reaching_def_of_var): Do backwards search in a cleaner way.
14889169689Skan	(update_ssa_for_new_use): Change how we do replacement.
14890169689Skan	(code_motion): Insertion by replacement. Print EXPR_WFL_LINENO, not
14891169689Skan	STMT_LINENO.
14892169689Skan	(pre_part_1_trav): Just create_tmp_var will now suffice.
14893169689Skan
14894169689Skan2002-10-18  Diego Novillo  <dnovillo@redhat.com>
14895169689Skan
14896169689Skan	* tree-dfa.c (find_refs_in_expr): Change type of second argument to
14897169689Skan	enum tree_ref_type.  Add third argument ref_mod.  Update all users.
14898169689Skan	(create_ref): Add third argument ref_mod.  Decode bitmask to set
14899169689Skan	the individual bitfields in the new reference.
14900169689Skan	* tree-flow-inline.h (is_may_ref): New function.
14901169689Skan	(is_may_def): New function.
14902169689Skan	(is_may_use): New function.
14903169689Skan	(is_partial_ref): New function.
14904169689Skan	(is_partial_def): New function.
14905169689Skan	(is_partial_use): New function.
14906169689Skan	(is_volatile_ref): New function.
14907169689Skan	(is_volatile_def): New function.
14908169689Skan	(is_volatile_use): New function.
14909169689Skan	(is_default_def): New function.
14910169689Skan	(is_clobbering_def): New function.
14911169689Skan	(is_initializing_def): New function.
14912169689Skan	(is_relocating_def): New function.
14913169689Skan	(is_addressof_use): New function.
14914169689Skan	(is_pure_use): New function.
14915169689Skan	* tree-flow.h (V_DEF, V_USE, V_PHI, E_PHI, E_USE, E_KILL): Redefine
14916169689Skan	inside enum tree_ref_type.  Update all users.
14917169689Skan	(enum tree_ref_type): Define.
14918169689Skan	(TRM_DEFAULT, TRM_CLOBBER, TRM_MAY, TRM_PARTIAL, TRM_INITIAL,
14919169689Skan	TRM_VOLATILE, TRM_RELOCATE): Rename from M_*.  Update all users.
14920169689Skan	(struct tree_ref_common): Change type of field 'type' to enum
14921169689Skan	tree_ref_type.  Update all users.
14922169689Skan	(struct var_ref): Add bitfields 'm_may', 'm_partial' and 'm_volatile'.
14923169689Skan	(struct var_def): Add bitfield 'm_default', 'm_clobber', 'm_initial'
14924169689Skan	and 'm_relocate'.
14925169689Skan	(struct var_use): Add bitfield 'm_addressof'.
14926169689Skan	(ref_type): Change return type to enum tree_ref_type.  Update all
14927169689Skan	users.
14928169689Skan	(create_ref): Add new argument ref_mod.  Update all users.
14929169689Skan	(function_may_recurse_p): Change return type to bool.  Update all
14930169689Skan	users.
14931169689Skan	(ref_type_name): Change argument type to tree_ref.  Update all
14932169689Skan	users.
14933169689Skan	(validate_ref_type): Remove.
14934169689Skan
14935169689Skan2002-10-18  Diego Novillo  <dnovillo@redhat.com>
14936169689Skan
14937169689Skan	* cp/Make-lang.in (CXX_C_OBJS): Remove tree-cfg.o, tree-dfa.o,
14938169689Skan	tree-optimize.o, tree-ssa.o, tree-ssa-pre.o, gimplify.o, tree-simple.o,
14939169689Skan	tree-alias-steen.o, tree-alias-ecr.o, tree-alias-type.o,
14940169689Skan	disjoint-set.o, tree-ssa-ccp.o, tree-dchain.o, tree-alias-common.o,
14941169689Skan	and tree-ssa-dce.o.
14942169689Skan
14943169689Skan2002-10-17  Diego Novillo  <dnovillo@redhat.com>
14944169689Skan
14945169689Skan	* Makefile.in (TREE_FLOW_H): Add bitmap.h, basic-block.h,
14946169689Skan	hard-reg-set.h and tree-simple.h.  Update all users.
14947169689Skan	(C_AND_OBJC_OBJS): Move tree-cfg.o, tree-dfa.o,
14948169689Skan	tree-ssa.o, tree-optimize.o, c-simplify.o, c-call-graph.o,
14949169689Skan	tree-simple.o, simple-break-elim.o, simple-goto-elim.o, tree-dchain.o,
14950169689Skan	tree-ssa-pre.o, tree-alias-type.o, tree-mudflap.o, gimplify.o,
14951169689Skan	tree-alias-ecr.o, tree-alias-common.o, tree-alias-steen.o,
14952169689Skan	disjoint-set.o, tree-ssa-ccp.o and tree-ssa-dce.o ...
14953169689Skan	(OBJS): ... here.
14954169689Skan	(gimplify.o): Add dependency on $(TREE_FLOW_H).
14955169689Skan	(tree-pretty-print.o): New rule.
14956169689Skan	(GTFILES): Add tree-flow.h
14957169689Skan	* c-config-lang.in (gtfiles): Remove tree-flow.h
14958169689Skan	* c-simplify.c (copy_if_shared_r, unmark_visited_r,
14959169689Skan	unshare_all_trees, mark_not_simple): Move ...
14960169689Skan	* gimplify.c: ... here.
14961169689Skan	Include tree-flow.h
14962169689Skan	* tree-flow.h: Include hard-reg-set.h.
14963169689Skan
14964169689Skan	* c-common.h (print_c_tree, print_c_node, print_c_node_brief,
14965169689Skan	debug_c_tree, debug_c_node, debug_c_node_brief): Move declarations
14966169689Skan	from diagnostic.h.
14967169689Skan	* c-call-graph.c (construct_call_graph): Call get_name.
14968169689Skan	(print_callee): Likewise.
14969169689Skan	* c-pretty-print.c (print_declaration): Declare static.
14970169689Skan	(print_function_decl): Likewise.
14971169689Skan	(print_struct_decl): Likewise.
14972169689Skan	(dump_c_tree): Likewise.
14973169689Skan	(dump_c_node): Likewise.
14974169689Skan	* diagnostic.h (dump_generic_tree, dump_generic_node,
14975169689Skan	print_generic_tree, print_generic_node, print_generic_node_brief):
14976169689Skan	Declare.
14977169689Skan	* tree-pretty-print.c: New file.
14978169689Skan	* c-decl.c: Replace calls to print_c_node with print_generic_node.
14979169689Skan	* tree-alias-common.c: Likewise.
14980169689Skan	* tree-alias-steen.c: Likewise.
14981169689Skan	* tree-cfg.c: Likewise.
14982169689Skan	* tree-dfa.c: Likewise.
14983169689Skan	* tree-mudflap.c: Likewise.
14984169689Skan	* tree-optimize.c: Likewise.
14985169689Skan	* tree-ssa-ccp.c: Likewise.
14986169689Skan	* tree-ssa-pre.c: Likewise.
14987169689Skan	* tree-ssa-dce.c: Likewise.
14988169689Skan	Don't include c-common.h nor c-tree.h
14989169689Skan	(tree_ssa_eliminate_dead_code): Don't call COMPOUND_BODY.
14990169689Skan	Replace ASM_STMT with ASM_EXPR.  Don't check for EXPR_STMT.
14991169689Skan
14992169689Skan2002-10-17  Daniel Berlin  <dberlin@dberlin.org>
14993169689Skan	    Diego Novillo  <dnovillo@redhat.com>
14994169689Skan
14995169689Skan	* tree-cfg.c (remove_bb_ann): Remove.  Update all users.
14996169689Skan	(delete_tree_cfg): Set bb->aux to NULL in all basic blocks.
14997169689Skan	* tree-dfa.c: Remove extern declaration for tree_find_refs.
14998169689Skan	(create_ref_list): Allocate new list with ggc_alloc.
14999169689Skan	(empty_ref_list): Just set first and last element to NULL.
15000169689Skan	(delete_ref_list): Remove.  Update all users.
15001169689Skan	(remove_ref_from_list): Don't call free.
15002169689Skan	(add_ref_to_list_begin): Allocate new node with ggc_alloc.
15003169689Skan	(add_ref_to_list_end): Likewise.
15004169689Skan	(add_ref_to_list_after): Likewise.
15005169689Skan	(create_ref): Call BITMAP_GGC_ALLOC.
15006169689Skan	(remove_tree_ann): Remove.  Update all users.
15007169689Skan	(tree_ref_structure): New function.
15008169689Skan	* tree-flow.h (edge, basic_block): Forward declare if necessary.
15009169689Skan	(struct ref_list_node): Mark for garbage collection.
15010169689Skan	(struct ref_list_priv): Likewise.
15011169689Skan	(struct tree_ref_common): Likewise.
15012169689Skan	(struct var_ref): Likewise.
15013169689Skan	(struct var_def): Likewise.
15014169689Skan	(struct var_phi): Likewise.
15015169689Skan	(struct var_use): Likewise.
15016169689Skan	(struct phi_node_arg_d): Likewise.
15017169689Skan	(struct expr_ref_common): Likewise.
15018169689Skan	(struct expr_phi): Likewise.
15019169689Skan	(struct expr_use): Likewise.
15020169689Skan	(union tree_ref_d): Likewise.
15021169689Skan	(struct tree_ann_d): Likewise.
15022169689Skan	(struct bb_ann_def): Likewise.
15023169689Skan	(referenced_vars): Likewise.
15024169689Skan	(global_var): Likewise.
15025169689Skan	(enum tree_ref_structure_enum): New.
15026169689Skan	(call_sites): Remove unused function.
15027169689Skan	* tree-inline.c (copy_tree_r): Copy the 'ann' field from tree_common.
15028169689Skan	* old-tree-inline.c (copy_tree_r): Likewise.
15029169689Skan	* tree-ssa.c (added): Mark for garbage collection.
15030169689Skan	(in_work): Likewise.
15031169689Skan	(work_stack): Likewise.
15032169689Skan	(delete_tree_ssa): Set global_var to NULL_TREE.
15033169689Skan	* tree.h (struct tree_ann_d): Forward declare.
15034169689Skan	(struct tree_common): Rename field 'aux' to 'ann'.  Update all
15035169689Skan	users.  Don't mark it 'skip' for garbage collection.
15036169689Skan
15037169689Skan2002-10-16  Daniel Berlin  <dberlin@dberlin.org>
15038169689Skan
15039169689Skan	* tree-dfa.c (compute_may_aliases): Call create/delete_alias_vars
15040169689Skan	if flag_tree_points_to is on.
15041169689Skan	(may_alias_p): Use points-to info if user asked us to generate it.
15042169689Skan
15043169689Skan	* tree-optimize.c (optimize_function_tree): Don't call
15044169689Skan	create_alias_vars here.
15045169689Skan
15046169689Skan2002-10-16  Diego Novillo  <dnovillo@redhat.com>
15047169689Skan
15048169689Skan	* tree-cfg.c (make_cond_expr_edges): If the conditional has known
15049169689Skan	value, only make the edge to the corresponding branch.
15050169689Skan	(tree_delete_bb): Write a warning to the dump file when removing
15051169689Skan	blocks with executable statements.
15052169689Skan	(first_exec_stmt): Skip over empty BIND_EXPR blocks.
15053169689Skan
15054169689Skan	* tree-dfa.c (find_refs_in_expr): Don't look for references in non
15055169689Skan	GIMPLE statements.
15056169689Skan	(remove_tree_ann): Clear the annotation with memset.
15057169689Skan	(collect_dfa_stats_r): Don't call tree_annotation.
15058169689Skan	(find_may_aliases_for): Avoid adding the same alias more than once.
15059169689Skan	(may_alias_p): Fix comment grammar.
15060169689Skan
15061169689Skan	* tree-flow-inline.h (is_exec_stmt): New function.
15062169689Skan	* tree-flow.h (FOR_EACH_REF): Guard against NULL lists.
15063169689Skan	(FOR_EACH_REF_REV): Likewise.
15064169689Skan	(is_exec_stmt): Declare.
15065169689Skan
15066169689Skan	* tree-ssa-ccp.c (visit_phi_node): Reformat debug dumping output.
15067169689Skan	(visit_expression_for): Move check for clobbering definitions
15068169689Skan	before check for NULL expressions.
15069169689Skan	(visit_condexpr_for): Reformat debug dumping output.
15070169689Skan	(set_lattice_value): Remove stale comments.
15071169689Skan	(replace_uses_in): Don't clear TF_FOLDED flag from expression.
15072169689Skan
15073169689Skan	* tree-ssa.c (add_phi_node): If possible, associate the PHI node to
15074169689Skan	a statement.
15075169689Skan	(create_default_def): Create initial declarations for static
15076169689Skan	variables with DECL_INITIAL set.
15077169689Skan	(delete_tree_ssa): Remove annotations from variables.
15078169689Skan
15079169689Skan2002-10-16  Daniel Berlin  <dberlin@dberlin.org>
15080169689Skan
15081169689Skan	* tree-alias-type.c (alias_tvar_new_with_aterm): New function.
15082169689Skan	Update all allocations to allocate right type, rather than the union.
15083169689Skan	Update to use macros to access members of alias_typevar.
15084169689Skan
15085169689Skan	* tree-alias-type.h: Split alias_typevar into a common, an ECR, and
15086169689Skan	an aterm, update all users.
15087169689Skan	Add macros to access members of union.
15088169689Skan
15089169689Skan	* tree-alias-common.c (create_alias_var): Handle function_decl's
15090169689Skan	properly (needed for proper handling of function pointers).
15091169689Skan	Updates for macros to access typevars.
15092169689Skan	Fix some indentation.
15093169689Skan
15094169689Skan	* tree-alias-steen.c: Updates for macros to access typevars.
15095169689Skan
15096169689Skan2002-10-16  Frank Ch. Eigler  <fche@redhat.com>
15097169689Skan
15098169689Skan	* c-decl.c (c_expand_body): Enable mudflap, only for gimple.
15099169689Skan	* c-pretty-print.c (dump_c_node): Render try/catch/finally exprs.
15100169689Skan	(op_prio): Accept BIND_EXPRs.
15101169689Skan	* gcc.c (cpp_unique_options): Make -fmudflap -include mf-runtime.h.
15102169689Skan	* toplev.c (process_options): Complain on -fmudflap -fdisable-simple.
15103169689Skan	* tree-mudflap.c (*): Reorganize for generic/gimple operation.
15104169689Skan	(mf_init_extern_trees): Extract decl nodes from -include'd file.
15105169689Skan	(mf_external_ref, mf_decl_extern_trees): Removed; updated callers.
15106169689Skan	(mf_offset_expr_of_array_ref): Don't bother store index type as
15107169689Skan	TREE_PURPOSE.
15108169689Skan	(mf_build_check_statement_for): Use GIMPLE tree types and builders.
15109169689Skan	(mx_register_decls): New function, replacing mx_register_decl.
15110169689Skan	(mx_xfn_xform_decls): Support only GIMPLE input tree types.
15111169689Skan	(mf_flush_enqueued_calls): Clean up enqueued call statements.
15112169689Skan
15113169689Skan2002-10-14  Diego Novillo  <dnovillo@redhat.com>
15114169689Skan
15115169689Skan	* toplev.c (parse_options_and_default_flags): Undo local
15116169689Skan	hack that slipped in the previous commit.
15117169689Skan
15118169689Skan2002-10-14  Diego Novillo  <dnovillo@redhat.com>
15119169689Skan
15120169689Skan	* Makefile.in (c-decl.o): Add dependency on diagnostic.h.
15121169689Skan	* c-decl.c: Include diagnostic.h
15122169689Skan	(c_expand_body): Call get_name.
15123169689Skan
15124169689Skan	* basic-block.h (struct basic_block_def): Rename head_tree to
15125169689Skan	head_tree_p and end_tree to end_tree_p.  Change type to tree *.
15126169689Skan	Update all users.
15127169689Skan	(BLOCK_HEAD_TREE): Remove.  Update all users.
15128169689Skan	(BLOCK_END_TREE): Remove.  Update all users.
15129169689Skan	* tree-cfg.c (build_tree_cfg): Return if function body is empty.
15130169689Skan	(make_blocks): Change first argument to tree *.  Update all users.
15131169689Skan	(make_bind_expr_blocks): Likewise.
15132169689Skan	(make_loop_expr_blocks): Likewise.
15133169689Skan	(make_cond_expr_blocks): Likewise.
15134169689Skan	(make_switch_expr_blocks): Likewise.
15135169689Skan	(create_bb): Likewise.
15136169689Skan	(first_exec_block): Likewise.
15137169689Skan	(first_exec_stmt): Likewise.
15138169689Skan	(tree_delete_bb): Use a gimple statement iterator to unmap
15139169689Skan	statements.
15140169689Skan	(insert_stmt_before): Remove empty function.
15141169689Skan	(replace_expr_in_tree): Remove.  Update all users.
15142169689Skan	(find_expr_in_tree_helper): Likewise.
15143169689Skan	(find_expr_in_tree): Likewise.
15144169689Skan	(first_stmt): Call STRIP_NOPS.
15145169689Skan	(last_stmt): Call STRIP_NOPS.
15146169689Skan
15147169689Skan	* tree-dfa.c (struct clobber_data_d): Rename parent_stmt to
15148169689Skan	parent_stmt_p and parent_expr to parent_expr_p.  Change types to
15149169689Skan	tree *.  Update all users.
15150169689Skan	(find_refs_in_stmt): Change first argument type to tree *.  Update
15151169689Skan	all users.
15152169689Skan	(find_refs_in_expr): Chnage arguments parent_stmt and parent_expr
15153169689Skan	to tree *.  Update all users.
15154169689Skan	(create_ref): Don't add the same reference twice on the same list
15155169689Skan	when parent_stmt and parent_expr are the same node.
15156169689Skan	Don't set output_ref when the parent statement is not in GIMPLE
15157169689Skan	form.
15158169689Skan	(replace_ref_operand_with): Move from tree-flow-inline.h
15159169689Skan	(replace_ref_expr_with): New function.
15160169689Skan	(replace_ref_stmt_with): New function.
15161169689Skan	(create_tree_ann): Abort if trying to annotate certain nodes.
15162169689Skan	Don't create an empty ref list.
15163169689Skan	In the presence of WFL or NOPS wrappers, add the annotation to the
15164169689Skan	inner node.
15165169689Skan	(dump_ref): Don't call tree_annotation to access the tree
15166169689Skan	annotation.
15167169689Skan
15168169689Skan	* tree-flow.h (struct tree_ref_common): Rename field stmt to stmt_p
15169169689Skan	and field expr to expr_p.  Change types to tree *.  Update all
15170169689Skan	users.
15171169689Skan	(replace_ref_expr_with): Declare.
15172169689Skan	(replace_ref_stmt_with): Declare.
15173169689Skan	(insert_stmt_before, insert_stmt_after, replace_expr_in_tree,
15174169689Skan	find_expr_in_tree): Remove.
15175169689Skan	* tree-flow-inline.h (ref_expr): Return NULL_TREE if expr_p is
15176169689Skan	NULL.
15177169689Skan	(ref_stmt): Return NULL_TREE if stmt_p is NULL.
15178169689Skan	(tree_annotation): Call STRIP_WFL and STRIP_NOPS before returning
15179169689Skan	the annotation.
15180169689Skan	(add_tree_ref): Remove consistency checks.  Create an empty list
15181169689Skan	the first time.
15182169689Skan	(get_lineno): Return -1 on NULL_TREE.
15183169689Skan	(set_output_ref): Remove consistency.
15184169689Skan	(set_tree_flag): Likewise.
15185169689Skan	(clear_tree_flag): Likewise.
15186169689Skan	(reset_tree_flags): Likewise.
15187169689Skan	* tree-simple.h (gimple_stmt_iterator): Rename ptr to tp.  Change
15188169689Skan	type to tree *.  Update all users.
15189169689Skan	(gsi_start): Change argument type to tree *.  Update all users.
15190169689Skan	(gsi_stmt_ptr): New function.
15191169689Skan	(gsi_container): New function.
15192169689Skan
15193169689Skan	* tree-optimize.c (optimize_function_tree): Don't test fnbody for
15194169689Skan	NULL.
15195169689Skan	Re-enable optimizers.
15196169689Skan	* tree-ssa-ccp.c: Update documentation comments.
15197169689Skan	Don't include c-common.h and c-tree.h.
15198169689Skan	(tree_ssa_ccp): Don't call COMPOUND_BODY.
15199169689Skan	(ccp_fold): New private function.
15200169689Skan	(substitute_and_fold): Call it.
15201169689Skan	Call replace_ref_expr_with.
15202169689Skan	Set TF_FOLDED flag on the statement, not the expression.
15203169689Skan	(visit_assignment_for): Call STRIP_NOPS and STRIP_WFL.
15204169689Skan	(evaluate_expr): Call ccp_fold.  Only use the RHS of the simplified
15205169689Skan	value in the case of MODIFY_EXPR or INIT_EXPR.
15206169689Skan	(restore_expr):
15207169689Skan	* tree-ssa-dce.c (mark_control_parent_necessary): Use a gimple
15208169689Skan	iterator.
15209169689Skan	(tree_ssa_eliminate_dead_code): Likewise.
15210169689Skan	* tree-ssa-pre.c: Disable and add warning comments for out-of-date
15211169689Skan	calls to create_ref, find_refs_in_stmt and replace_expr_in_tree.
15212169689Skan
15213169689Skan2002-10-12  Daniel Berlin  <dberlin@dberlin.org>
15214169689Skan
15215169689Skan	* tree-alias-type.h  (alias_typevar_def): Add struct aterm
15216169689Skan	as a temporary hack for andersen's analysis.
15217169689Skan	* tree-alias-common.c (current_alias_ops): New, use it
15218169689Skan	instead of referring to steen_alias_ops everywhere.
15219169689Skan	(get_alias_var): Use STRIP_WFL.
15220169689Skan	(find_func_aliases): Ditto.
15221169689Skan	(create_alias_vars): Call init function, move deletion to
15222169689Skan	delete_alias_vars.
15223169689Skan	(delete_alias_vars): New function, move deletion code to here.
15224169689Skan	(get_virtual_var): Removed.
15225169689Skan	(ptr_may_alias_var): New function.
15226169689Skan	* tree-alias-common.h (struct tree_alias_ops): Add may_alias
15227169689Skan	function.
15228169689Skan	* tree-alias-steen.c (steen_may_alias): New function.
15229169689Skan
15230169689Skan2002-10-10  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
15231169689Skan
15232169689Skan	* diagnostic.h (dump_c_tree, dump_c_node,
15233169689Skan	print_declaration, print_function_decl,
15234169689Skan	print_struct_decl): Fix argument types.
15235169689Skan
15236169689Skan2002-10-10  Diego Novillo  <dnovillo@redhat.com>
15237169689Skan
15238169689Skan	* tree.h (struct tree_common): Rename field unused_0 to
15239169689Skan	not_gimple_flag.
15240169689Skan	(TREE_NOT_GIMPLE): Define.
15241169689Skan	* c-simplify.c (mark_not_simple_r): Remove.  Update all users.
15242169689Skan	(mark_not_simple): Set TREE_NOT_GIMPLE.
15243169689Skan	* gimplify.c (simplify_call_expr): Enable call to mark_not_simple.
15244169689Skan	* tree-flow.h (TF_NOT_SIMPLE): Remove.  Update all users.
15245169689Skan
15246169689Skan	* tree-cfg.c (build_tree_cfg): Rename from tree_find_basic_blocks.
15247169689Skan	Update all users.
15248169689Skan	Find the first executable statement before starting basic block 0.
15249169689Skan	(make_blocks): Do not accept TRY_FINALLY_EXPR and TRY_CATCH_EXPR
15250169689Skan	nodes.
15251169689Skan	(make_edges): Always create an edge from entry to basic block 0.
15252169689Skan	(delete_tree_cfg): Rename from delete_cfg.  Update all uses.
15253169689Skan	(first_exec_stmt): Return the container for the first statement,
15254169689Skan	not the statement itself.
15255169689Skan
15256169689Skan	* tree-dfa.c (tree_find_refs): Re-implement using a GIMPLE
15257169689Skan	iterator.
15258169689Skan	(find_refs_in_stmt): Handle GIMPLE statements.
15259169689Skan	(find_refs_in_expr): Call flags_from_decl_or_type when handling
15260169689Skan	CALL_EXPR expressions.
15261169689Skan	(create_ref): Call DECL_P.
15262169689Skan	(remove_tree_ann): Call tree_annotation.
15263169689Skan
15264169689Skan	* tree-flow-inline.h (gsi_step_bb): Stop if statement is not inside
15265169689Skan	a basic block.
15266169689Skan
15267169689Skan	* tree-flow.h (build_tree_cfg): Rename from tree_find_basic_blocks.
15268169689Skan	Update all users.
15269169689Skan	(delete_tree_cfg): Rename from delete_cfg.
15270169689Skan	(tree_find_refs): Declare.
15271169689Skan	(build_tree_ssa): Rename from tree_build_ssa.
15272169689Skan	(is_upward_exposed): Remove unused function.
15273169689Skan	* tree-optimize.c (delete_tree_ssa): Remove declaration.
15274169689Skan	(optimize_function_tree): Re-enable SSA builder.
15275169689Skan	* tree-simple.h (gsi_container): New function.
15276169689Skan
15277169689Skan	* Makefile.in (tree-ssa.o): Remove dependencies on c-common.h and
15278169689Skan	c-tree.h.
15279169689Skan	* tree-ssa.c: Don't include c-common.h nor c-tree.h.
15280169689Skan	(tree_find_refs): Remove declaration.
15281169689Skan	(remove_annotations_r): New local function.
15282169689Skan	(build_tree_ssa): Rename from tree_build_ssa.  Update all users.
15283169689Skan	(analyze_rdefs): Don't call prep_stmt.
15284169689Skan	(is_upward_exposed): Remove unused function.
15285169689Skan	(add_phi_node): Don't associate the PHI node to a statement.
15286169689Skan	(delete_tree_ssa): Receive the function body as argument.
15287169689Skan	Walk the function body removing annotations from every tree.
15288169689Skan
15289169689Skan2002-10-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
15290169689Skan
15291169689Skan	* tree-ssa-dce (tree_ssa_eliminate_dead_code): Initialize prev to
15292169689Skan	NULL_TREE.
15293169689Skan	Don't close dump_file until end of function.
15294169689Skan	Dump the tree after DCE for -fdump-tree-dce.
15295169689Skan
15296169689Skan2002-10-08  Richard Henderson  <rth@redhat.com>
15297169689Skan	    Jason Merrill  <jason@redhat.com>
15298169689Skan	    Diego Novillo  <dnovillo@redhat.com>
15299169689Skan
15300169689Skan	* tree-simple.h (gimple_stmt_iterator): New type.
15301169689Skan	(gsi_start): New function.
15302169689Skan	(gsi_after_end): New function.
15303169689Skan	(gsi_step): New function.
15304169689Skan	(gsi_stmt): New function.
15305169689Skan
15306169689Skan2002-10-08  Diego Novillo  <dnovillo@redhat.com>
15307169689Skan
15308169689Skan	* calls.c (flags_from_decl_or_type): Make extern.
15309169689Skan	(ECF_*): Move ...
15310169689Skan	* rtl.h (ECF_*): ... here.
15311169689Skan	(flags_from_decl_or_type): Declare.
15312169689Skan
15313169689Skan	* tree.h (COND_EXPR_COND): Define.
15314169689Skan	(COND_EXPR_THEN): Define.
15315169689Skan	(COND_EXPR_ELSE): Define.
15316169689Skan	(LABEL_EXPR_LABEL): Define.
15317169689Skan	(optimize_function_tree): Declare.
15318169689Skan
15319169689Skan2002-10-08  Diego Novillo  <dnovillo@redhat.com>
15320169689Skan
15321169689Skan	* Makefile.in (TREE_FLOW_H): Define.
15322169689Skan	(c-decl.o): Remove dependency on tree-optimize.h.
15323169689Skan	(tree-alias-steen.o, tree-alias-common.o, tree-ssa.o, tree-ssa-pre.o,
15324169689Skan	 tree-cfg.o, tree-dfa.o, tree-optimize.o, c-simplify.o, c-call-graph.o,
15325169689Skan	 tree-ssa-dce.o, tree-ssa-ccp.o): Depend on $(TREE_FLOW_H).
15326169689Skan	(tree-cfg.o): Remove dependencies on c-tree.h and c-common.h.
15327169689Skan	* c-call-graph.c (construct_call_graph): Disable calls to removed
15328169689Skan	functions.
15329169689Skan	* c-decl.c: Don't include tree-optimize.h.
15330169689Skan	(c_expand_body): Enable calls to optimize_function_tree.
15331169689Skan
15332169689Skan	* c-pretty-print.c (dump_c_node): Fix printf warnings.
15333169689Skan	Only dump the first node of a COMPOUND_EXPR when brief_dump is set.
15334169689Skan	Use COND_EXPR_COND, COND_EXPR_THEN and COND_EXPR_ELSE accessors.
15335169689Skan	Only dump the opening brace of a BIND_EXPR when brief_dump is set.
15336169689Skan
15337169689Skan	* tree-cfg.c: Don't include tree-optimize.h, c-common.h and c-tree.h.
15338169689Skan	(binding_stack, make_for_stmt_blocks, make_if_stmt_blocks,
15339169689Skan	 make_while_stmt_blocks, make_switch_stmt_blocks,
15340169689Skan	 make_do_stmt_blocks, create_maximal_bb, make_for_stmt_edges,
15341169689Skan	 make_while_stmt_edges, make_do_stmt_edges, make_if_stmt_edges,
15342169689Skan	 make_break_stmt_edges, make_continue_stmt_edges, create_loop_hdr,
15343169689Skan	 insert_before_ctrl_stmt, insert_before_normal_stmt,
15344169689Skan	 insert_after_ctrl_stmt, insert_after_normal_stmt,
15345169689Skan	 insert_after_loop_body, tree_split_bb, stmt_ends_bb_p): Remove.
15346169689Skan	Update all users.
15347169689Skan	(STRIP_CONTAINERS): Define.
15348169689Skan	(make_bind_expr_blocks): New local function.
15349169689Skan	(make_cond_expr_blocks): New local function.
15350169689Skan	(make_loop_expr_blocks): New local function.
15351169689Skan	(make_switch_expr_blocks): New local function.
15352169689Skan	(make_loop_expr_edges): New local function.
15353169689Skan	(make_cond_expr_edges): New local function.
15354169689Skan	(make_case_label_edges): New local function.
15355169689Skan	(first_exec_block): New local function.
15356169689Skan	(make_goto_expr_edges): Rename from make_goto_stmt_edges.
15357169689Skan	(make_blocks): Remove arguments COMPOUND_STMT and PREV_CHAIN_P.
15358169689Skan	Use gimple_stmt_iterator to iterate over the statements in the
15359169689Skan	function.  Create maximal basic blocks during traversal.
15360169689Skan	(create_bb): Remove arguments end, prev_chain_p and binding_scope.
15361169689Skan	Rename control_parent to parent_block.
15362169689Skan	(set_bb_for_stmt): Move from tree-flow.h.
15363169689Skan	(make_edges): Don't assume that basic block 0 contains executable
15364169689Skan	statements.
15365169689Skan	Handle BIND_EXPR nodes.
15366169689Skan	(make_ctrl_stmt_edges): Handle LOOP_EXPR, COND_EXPR and
15367169689Skan	SWITCH_EXPR.
15368169689Skan	(make_exit_edges): Handle GOTO_EXPR, CALL_EXPR and RETURN_EXPR.
15369169689Skan	(tree_delete_bb): Call first_stmt and last_stmt.
15370169689Skan	(block_invalidates_loop): Call last_stmt.
15371169689Skan	(replace_expr_in_tree): Don't dump line number information.
15372169689Skan	(find_expr_in_tree_helper): Don't call statement_code_p.
15373169689Skan	(tree_dump_bb): Call get_lineno.
15374169689Skan	(tree_cfg2dot): Ditto.
15375169689Skan	(successor_block): Use a gimple_stmt_iterator to find the first
15376169689Skan	executable block after the current one.
15377169689Skan	(is_ctrl_stmt): Handle COND_EXPR, LOOP_EXPR and SWITCH_EXPR.
15378169689Skan	(is_ctrl_altering_stmt): Call flags_from_decl_or_type to discover
15379169689Skan	non-return functions.
15380169689Skan	(is_loop_stmt): Handle LOOP_EXPR.
15381169689Skan	(is_computed_goto): Handle GOTO_EXPR.
15382169689Skan	(stmt_starts_bb_p): Handle CASE_LABEL_EXPR, LABEL_EXPR, RETURN_EXPR
15383169689Skan	and BIND_EXPR.
15384169689Skan	(first_exec_stmt): Use a gimple_stmt_iterator to traverse the
15385169689Skan	statements.
15386169689Skan	(first_stmt): New function.
15387169689Skan	(last_stmt): New function.
15388169689Skan
15389169689Skan	* tree-dfa.c: Don't include c-common.h, c-tree.h and
15390169689Skan	tree-optimize.h.  Include diagnostic.h.
15391169689Skan	(tree_find_refs): Disable.
15392169689Skan	(find_refs_in_stmt): Disable.
15393169689Skan	(find_refs_in_expr): Don't call prep_stmt.
15394169689Skan	(tree_ann): Don't annotate empty_stmt_node.
15395169689Skan	(find_declaration): Remove.  Update all users.
15396169689Skan	(dump_ref): Call get_lineno.
15397169689Skan	(is_visible_to): Always return true.
15398169689Skan
15399169689Skan	* tree-flow.h: Include tree-flow-inline.h, basic-block.h and
15400169689Skan	tree-simple.h.
15401169689Skan	(tree_ann_d): Remove compound_parent field.
15402169689Skan	(set_bb_for_stmt): Declare extern.
15403169689Skan	(compound_parent, set_compound_parent, struct for_header_blocks,
15404169689Skan	union header_blocks, prev_chain_p, set_prev_chain_p, binding_scope,
15405169689Skan	set_binding_scope, loop_hdr, for_init_bb, set_for_init_bb,
15406169689Skan	for_cond_bb, set_for_cond_bb, for_expr_bb, set_for_expr_bb,
15407169689Skan	end_while_bb, set_end_while_bb, do_cond_bb, set_cond_bb,
15408169689Skan	stmt_ends_bb_p, loop_parent, latch_block, switch_parent,
15409169689Skan	first_exec_stmt, last_exec_stmt, is_exec_stmt,
15410169689Skan	is_statement_expression, first_non_decl_stmt, first_decl_stmt,
15411169689Skan	first_non_label_in_bb, tree_split_bb, find_declaration): Remove.
15412169689Skan	Update all users.
15413169689Skan	(get_lineno): New function.
15414169689Skan	(struct bb_ann_def): Rename field parent to parent_block.  Update
15415169689Skan	all users.
15416169689Skan	Remove fields prev_chain_p, loop_hdr and binding_scope.  Update all
15417169689Skan	users.
15418169689Skan	(parent_block): Rename from bb_parent.
15419169689Skan	(set_parent_block): Rename from set_bb_parent.
15420169689Skan	(prev_chain_p): Remove
15421169689Skan	(bb_empty_p): Return true if block only contains empty_stmt_node.
15422169689Skan	(gsi_step_bb): New function.
15423169689Skan	(gsi_start_bb): New function.
15424169689Skan	(gsi_insert_before, gsi_insert_after, gsi_delete, gsi_replace):
15425169689Skan	Declare.
15426169689Skan	(insert_stmt_before): Rename from insert_stmt_tree_before.
15427169689Skan	(insert_stmt_after): Rename from insert_stmt_tree_after.
15428169689Skan	(first_stmt): Declare.
15429169689Skan	(last_stmt): Declare.
15430169689Skan	(tree_perform_ssapre, tree_ssa_ccp,
15431169689Skan	tree_ssa_eliminate_dead_code): Move declaration from tree-optimize.h.
15432169689Skan	* tree-flow-inline.h: New file for all the inline functions
15433169689Skan	declared in tree-flow.h
15434169689Skan
15435169689Skan	* tree-optimize.c: Don't include tree-optimize.h, c-common.h and
15436169689Skan	c-tree.h.
15437169689Skan	(optimize_function_tree): Disable call to double_chain_stmts.
15438169689Skan	Call init_flow.
15439169689Skan	Call tree_find_basic_blocks.
15440169689Skan	Disable calls to tree_build_ssa and optimizers.
15441169689Skan	(build_tree_ssa): Remove.  Update all users.
15442169689Skan	* tree-optimize.h: Remove.
15443169689Skan	* tree-ssa-ccp.c: Don't include tree-optimize.h
15444169689Skan	* tree-ssa-dce.c: Don't include tree-optimize.h.
15445169689Skan	Include diagnostic.h
15446169689Skan	* tree-ssa-pre.c: Don't include tree-optimize.h.
15447169689Skan	(requires_edge_placement): Disable unused function.
15448169689Skan	(set_need_repair): Disable unused function.
15449169689Skan	(finalize_1): Disable calls to insert_stmt_tree_before and
15450169689Skan	insert_stmt_tree_after.
15451169689Skan	(repair_injury): Ditto.
15452169689Skan	(code_motion): Ditto.
15453169689Skan	* tree-ssa.c: Don't include tree-optimize.h.
15454169689Skan	(insert_phi_nodes_for): Remove unused variable.
15455169689Skan	(add_phi_node): Don't call statement_code_p.
15456169689Skan	* cp/optimize.c: Don't include tree-optimize.h
15457169689Skan	* tree-alias-common.c: Don't include tree-optimize.h.
15458169689Skan	(find_func_decls): Disable.
15459169689Skan	(display_points_to_set): Disable.
15460169689Skan	* tree-alias-steen.c: Don't include tree-optimize.h.
15461169689Skan
15462169689Skan2002-10-04  Jason Merrill  <jason@redhat.com>
15463169689Skan
15464169689Skan	* gimplify.c (declare_tmp_vars): Don't add temps to block vars.
15465169689Skan	* tree-inline.c (remap_decls): Split out from remap_block.
15466169689Skan	(copy_bind_expr): Remap BIND_EXPR_VARS separately from block vars.
15467169689Skan
15468169689Skan	* c-simplify.c (simplify_expr_stmt): Call set_file_and_line_for_stmt.
15469169689Skan
15470169689Skan	* gimplify.c: New file.
15471169689Skan	(push_gimplify_context, pop_gimplify_context): New fns.
15472169689Skan	(gimple_push_bind_expr, gimple_pop_bind_expr): New fns.
15473169689Skan	(simplify_bind_expr): Use them.
15474169689Skan	(gimple_current_bind_expr, gimple_add_tmp_var): New fn.
15475169689Skan	(foreach_stmt): Recurse if necessary.
15476169689Skan	(various): Use generic interfaces instead of c-specific ones.
15477169689Skan	* c-simplify.c: Move language-independent code to gimplify.c.
15478169689Skan	(simplify_c_loop): Use add_tree instead of add_stmt_to_compound.
15479169689Skan	(various): Use new *_bind_expr interfaces.
15480169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add gimplify.o.
15481169689Skan	(gimplify.o): New rule.
15482169689Skan
15483169689Skan	* c-decl.c (c_expand_body): Dump trees here.
15484169689Skan	* c-simplify.c (simplify_function_body): Not here.
15485169689Skan
15486169689Skan2002-10-03  Frank Ch. Eigler  <fche@redhat.com>
15487169689Skan
15488169689Skan	* tree-mudflap.c (mf_offset_expr_of_array_ref): Don't emit
15489169689Skan	intermediate variables for constant index values.
15490169689Skan	(mx_xfn_indirect_ref): For constant valid index values and
15491169689Skan	known valid array sizes, omit bounds checks.
15492169689Skan
15493169689Skan2002-10-03  Jason Merrill  <jason@ariel.home>
15494169689Skan
15495169689Skan	* c-simplify.c (simplify_bind_expr): Don't clear TREE_SIDE_EFFECTS
15496169689Skan	if we have a block.
15497169689Skan
15498169689Skan	* c-simplify.c (simplify_expr) [TRY_FINALLY_EXPR]: New case.
15499169689Skan
15500169689Skan	* tree-inline.c (copy_body_r) [RETURN_EXPR]: Don't make an extra
15501169689Skan	copy of the MODIFY_EXPR.  Mark the return label used.
15502169689Skan	(expand_call_inline): Don't push/pop_srcloc.  Only emit the return
15503169689Skan	label if it was used.
15504169689Skan
15505169689Skan	* tree-simple.c (right_assocify_expr): Split out from
15506169689Skan	rationalize_compound_expr.  Don't move non-matching op0's.
15507169689Skan	* tree-simple.h: Declare it.
15508169689Skan	* c-simplify.c (simplify_boolean_expr): Call it.
15509169689Skan	(simplify_cond_expr): Reorganize.  Optimize if (a&&b).
15510169689Skan
15511169689Skan	* c-simplify.c (wrap_with_wfl): Drop special loop handling.
15512169689Skan	(simplify_c_loop): Wrap loop contents in wfls.
15513169689Skan
15514169689Skan	* c-simplify.c (STRIP_WFL): Move...
15515169689Skan	* tree.h: ...here.
15516169689Skan
15517169689Skan	* c-common.c (c_walk_subtrees): Don't walk TREE_CHAIN.
15518169689Skan	* tree-inline.c (walk_tree): Call langhook walk_subtrees first.
15519169689Skan	For expressions, walk TREE_CHAIN if it matters.
15520169689Skan
15521169689Skan2002-10-01  Frank Ch. Eigler  <fche@redhat.com>
15522169689Skan
15523169689Skan	* builtins.c (expand_builtin_alloca): Disable if -fmudflap.
15524169689Skan	* tree-mudflap.c (mudflap_enqueue_decl): Tweak logic to include
15525169689Skan	more globals.
15526169689Skan	(mx_xfn_indirect_ref): Handle bitfield COMPONENT_REFs; instrument
15527169689Skan	BIT_FIELD_REF/INDIRECT_REFs.
15528169689Skan
15529169689Skan2002-10-01  Jason Merrill  <jason@redhat.com>
15530169689Skan
15531169689Skan	* c-decl.c (poplevel): Only add undeclared labels to the toplevel
15532169689Skan	block.
15533169689Skan	* c-parse.in (label_decl): Push the declared label.
15534169689Skan
15535169689Skan	* c-decl.c (c_expand_body): If we've been simplified, use
15536169689Skan	expand_expr_stmt_value instead.
15537169689Skan
15538169689Skan	* c-decl.c (c_expand_decl): Rename from c_expand_decl_stmt.
15539169689Skan	Handle all C-specific expansion semantics.
15540169689Skan	* c-tree.h: Change prototype.
15541169689Skan	* langhooks.h (struct lang_hooks): Add expand_decl hook.
15542169689Skan	* langhooks.c (lhd_expand_decl): Default version.
15543169689Skan	* langhooks-def.h (LANG_HOOKS_EXPAND_DECL): Provide default.
15544169689Skan	* c-lang.c (LANG_HOOKS_EXPAND_DECL): Define.
15545169689Skan	* c-semantics.c (lang_expand_decl_stmt): Remove.
15546169689Skan	(genrtl_decl_stmt): Use lang_hooks.expand_decl.
15547169689Skan	* Makefile.in (c-semantics.o): Depend on langhooks.h.
15548169689Skan	* c-objc-common.c (c_objc_common_init): Don't set
15549169689Skan	lang_expand_decl_stmt.
15550169689Skan
15551169689Skan	* c-common.def (ASM_STMT): Only 4 operands.
15552169689Skan	* c-common.h (ASM_CV_QUAL): Remove.
15553169689Skan	(genrtl_asm_stmt): Adjust prototype.
15554169689Skan	* c-typeck.c (build_asm_stmt): Adjust.
15555169689Skan	* c-semantics.c (genrtl_asm_stmt): Change cv_qualifier parm to
15556169689Skan	volatile_p.
15557169689Skan	(expand_stmt): Adjust.
15558169689Skan
15559169689Skan	* c-common.h (SWITCH_COND, SWITCH_BODY, CASE_LOW, CASE_HIGH,
15560169689Skan	CASE_LABEL_DECL, GOTO_DESTINATION, ASM_STRING, ASM_OUTPUTS,
15561169689Skan	ASM_INPUTS, ASM_CLOBBERS, ASM_VOLATILE_P, ASM_INPUT_P): Move to tree.h.
15562169689Skan
15563169689Skan	* c-pretty-print.c (newline_and_indent): New fn.
15564169689Skan	(dump_c_tree, dump_c_node): Make spc a plain int.
15565169689Skan	(dump_c_node): Use output_add_identifier.
15566169689Skan	Reorganize for bnw-simple; indent in the enclosing node rather
15567169689Skan	than the subexpression.
15568169689Skan	[FUNCTION_DECL]: Just print the name for now.
15569169689Skan	[COMPOUND_EXPR, COND_EXPR]: Handle use as statements.
15570169689Skan	[BIND_EXPR, GOTO_EXPR, EXIT_EXPR, LOOP_EXPR, LABELED_BLOCK_EXPR,
15571169689Skan	EXIT_BLOCK_EXPR, RETURN_EXPR, SWITCH_EXPR, ASM_EXPR,
15572169689Skan	CASE_LABEL_EXPR]: Implement.
15573169689Skan	(print_declaration): Print 'static'.
15574169689Skan	* c-tree.h: Move c-pretty-print decls to diagnostic.h.
15575169689Skan
15576169689Skan	* expr.c (store_field): Don't always pass want_value==0 to store_expr.
15577169689Skan
15578169689Skan	* expr.c (expand_expr) [EXIT_EXPR]: Handle EXIT_EXPR_IS_LOOP_COND.
15579169689Skan
15580169689Skan	* expr.c (expand_expr) [LOOP_EXPR]: Pass exit_flag==0 to
15581169689Skan	exand_start_loop.
15582169689Skan	[BIND_EXPR]: Adjust for functions-as-trees mode.
15583169689Skan	[COMPOUND_EXPR]: Avoid recursion if possible.
15584169689Skan	[SWITCH_EXPR, LABEL_EXPR]: Move handling from java/expr.c.
15585169689Skan	[CASE_LABEL_EXPR, ASM_EXPR]: New handling.
15586169689Skan
15587169689Skan	* tree.h (struct tree_common): Add visited flag.
15588169689Skan	(TREE_VISITED): New macro.
15589169689Skan	* tree.c (copy_node): Clear TREE_VISITED.
15590169689Skan	* print-tree.c (print_node): Print visted.
15591169689Skan
15592169689Skan	* stmt.c (expand_asm_expr): New fn.
15593169689Skan
15594169689Skan	* tree.c (build1): Always set TREE_SIDE_EFFECTS for 's' codes.
15595169689Skan
15596169689Skan	* tree.h (enum tree_index): Add TI_EMPTY_STMT.
15597169689Skan	(empty_stmt_node): New macro.
15598169689Skan	* tree.c (build_common_tree_nodes_2): Initialize it.
15599169689Skan
15600169689Skan	* tree.def: Change some codes from 'e' to 's'.
15601169689Skan	(CASE_LABEL_EXPR, ASM_EXPR): New codes.
15602169689Skan
15603169689Skan	* tree.def (SWITCH_EXPR): Now has three operands.
15604169689Skan
15605169689Skan	* tree-inline.c: Retarget to generic trees.  FIXME FIXME.
15606169689Skan	* old-tree-inline.c: Old C/Java-specific inliner.
15607169689Skan	* Makefile.in (old-tree-inline.o): New rule.
15608169689Skan	* c-common.c (c_walk_subtrees): New fn.
15609169689Skan	(c_tree_chain_matters_p): New fn.
15610169689Skan	* c-lang.c: Use them for LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
15611169689Skan	and LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P.
15612169689Skan	* c-common.h: Declare them.
15613169689Skan	(DECL_NUM_STMTS): Move to tree.h.
15614169689Skan	* c-decl.c (finish_function): Simplify the function trees.
15615169689Skan	* c-objc-common.c (inline_forbidden_p): Look inside BIND_EXPRs
15616169689Skan	for nested functions.  Don't inline a function with _STMT trees.
15617169689Skan
15618169689Skan	* basic-block.h: Include hard-reg-set.h.
15619169689Skan
15620169689Skan	* c-decl.c (start_function): Don't call make_decl_rtl.
15621169689Skan	(c_expand_body): Call it here instead.
15622169689Skan
15623169689Skan	* Makefile.in (explow.o): Depend on langhooks.h.
15624169689Skan
15625169689Skan	* unroll.c (copy_loop_body): Don't copy NOTE_INSN_DELETED_LABELs
15626169689Skan	between copy_notes_from and loop_end, either.
15627169689Skan
15628169689Skan2002-09-30  Daniel Berlin  <dberlin@dberlin.org>
15629169689Skan
15630169689Skan	* tree-ssa-pre.c (repair_injury): Start work on updating SSA
15631169689Skan	representation for strength reduction injuries.
15632169689Skan	Print a new line after outputting tree node in debug statements.
15633169689Skan	Fix strength reduction of a candidate with two variables (IE a *
15634169689Skan	c).
15635169689Skan	Put the repair after the injuring statement, not at the end of the
15636169689Skan	block.
15637169689Skan	Break the RHS use lookup if it's defined by a phi.
15638169689Skan	(calculate_increment): Ditto on node printing.
15639169689Skan	(code_motion): Ditto on updating SSA rep for strength reduction
15640169689Skan	injuries.
15641169689Skan	(find_rhs_use_for_var): Rewrite to use maybe_find_rhs_use_for_var.
15642169689Skan	(maybe_find_rhs_use_for_var): Rename from find_rhs_use_for_var,
15643169689Skan	don't abort, return NULL.
15644169689Skan	(set_var_phis): Simplify break condition.
15645169689Skan	Make sure RHS *has* a use before we go and get it.
15646169689Skan	(rename2): Ditto on RHS checking.
15647169689Skan	When looking up injuring defs, break on phis.
15648169689Skan	(phi_opnd_from_res): Ditto.
15649169689Skan	(defs_y_dom_x): Ditto.
15650169689Skan	(TODO List): Add new TODO to fix the remapping crud.
15651169689Skan
15652169689Skan2002-09-27  Daniel Berlin  <dberlin@dberlin.org>
15653169689Skan
15654169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Move insertion into
15655169689Skan	splay tree inside the is_simple_modify_expr block, to prevent
15656169689Skan	tree check failure.
15657169689Skan
15658169689Skan2002-09-26  Daniel Berlin  <dberlin@dberlin.org>
15659169689Skan
15660169689Skan	* tree-ssa-pre.c (update_phis_in_list): New function.
15661169689Skan	(update_ssa_for_new_use): New function.
15662169689Skan	(code_motion): Start working on code to update SSA representation.
15663169689Skan	(find_reaching_def_of_var): New function.
15664169689Skan
15665169689Skan2002-09-25  Steven Bosscher  <s.bosscher@student.tudelft.nl>
15666169689Skan
15667169689Skan	* Makefile.in (tree): Add dependency on c-tree.h
15668169689Skan	* tree-optimize.c: Include c-tree.h
15669169689Skan	(optimize_function_tree): React to -fdump-tree-optimized.
15670169689Skan
15671169689Skan2002-09-25  Daniel Berlin  <dberlin@dberlin.org>
15672169689Skan
15673169689Skan	* tree-dfa.c (add_list_to_ref_list_end): New function.
15674169689Skan	(add_list_to_ref_list_begin): Ditto.
15675169689Skan	(find_list_node): Handle searching in empty lists.
15676169689Skan	(find_refs_in_stmt): De-staticify.
15677169689Skan
15678169689Skan	* tree-flow.h (add_list_to_ref_list_end): New declaration.
15679169689Skan	(add_list_to_ref_list_begin): Ditto.
15680169689Skan	(find_refs_in_stmt): Add prototype.
15681169689Skan
15682169689Skan2002-09-25  Diego Novillo  <dnovillo@redhat.com>
15683169689Skan
15684169689Skan	* Makefile.in (tree-dfa.o): Depend on flags.h
15685169689Skan	* tree-cfg.c (tree_dump_cfg): Alter output format slightly.
15686169689Skan	(block_invalidates_loop): Look for clobbering definitions of
15687169689Skan	GLOBAL_VARIABLE.
15688169689Skan	* tree-simple.c (get_base_symbol): Handle EXPR_WITH_FILE_LOCATION
15689169689Skan	nodes.
15690169689Skan	* tree-optimize.c (init_tree_flow): Remove.  Update all users.
15691169689Skan	(build_tree_ssa): Don't call tree_find_refs.
15692169689Skan	Don't call tree_compute_rdefs.
15693169689Skan
15694169689Skan	* tree-dfa.c: Include flags.h
15695169689Skan	(dump_file): Remove.
15696169689Skan	(dump_flags): Remove.
15697169689Skan	(pointer_refs): Remove.
15698169689Skan	(struct dfa_stats_d): Add fields max_num_phi_args, num_may_alias,
15699169689Skan	max_num_may_alias, num_alias_imm_rdefs and max_num_alias_imm_rdefs.
15700169689Skan	Remove field num_fcalls.
15701169689Skan	(dfa_counts): Declare.
15702169689Skan	(tree_find_refs): Declare.
15703169689Skan	(tree_ssa_dump_file): Declare.
15704169689Skan	(tree_ssa_dump_flags): Declare.
15705169689Skan	(dump_if_different): New function.
15706169689Skan	(add_default_defs): Remove.  Update all users.
15707169689Skan	(add_call_site_clobbers): Remove.  Update all users.
15708169689Skan	(add_ptr_may_refs): Remove.  Update all users.
15709169689Skan	(compute_may_aliases): New function.
15710169689Skan	(find_may_aliases_for): New function.
15711169689Skan	(add_may_alias): New function.
15712169689Skan	(may_alias_p): New function.
15713169689Skan	(is_visible_to): New function.
15714169689Skan	(get_alias_index): New function.
15715169689Skan	(call_sites): Remove.  Update all users.
15716169689Skan	(global_var): Declare.
15717169689Skan	(E_FCALL): Remove.  Adjust other constants.
15718169689Skan	(M_INDIRECT): Remove.  Update all users.
15719169689Skan	(M_RELOCATE): Declare.
15720169689Skan	(tree_find_refs): Move debugging dumps to tree_build_ssa.
15721169689Skan	Move initialization code to init_tree_ssa.
15722169689Skan	Call compute_may_aliases.
15723169689Skan	(find_refs_in_expr): For INDIRECT_REF nodes create a reference to
15724169689Skan	the canonical INDIRECT_REF node associated with the pointer symbol.
15725169689Skan	Given a pointer p, clobber the canonical INDIRECT_REF of p after
15726169689Skan	creating a V_DEF for p.
15727169689Skan	For CALL_EXPR nodes, if the called function is not pure nor
15728169689Skan	const, create a use and a clobbering definition to GLOBAL_VAR.
15729169689Skan	(create_ref): Allow INDIRECT_REF variables.
15730169689Skan	(add_phi_arg): Keep track of number of PHI arguments created.
15731169689Skan	(function_may_recurse_p): Look for clobbering definitions to
15732169689Skan	GLOBAL_VAR.
15733169689Skan	(get_fcalls): Remove unused function.
15734169689Skan	(is_pure_fcall): Remove unused function.
15735169689Skan	(fcall_takes_ref_args): Remove unused function.
15736169689Skan	(find_declaration): Stop iterating at ENTRY_BLOCK_PTR.
15737169689Skan	(debug_variable): New function.
15738169689Skan	(dump_variable): New function.
15739169689Skan	(dump_referenced_vars): Call it.
15740169689Skan	(dump_phi_args): Don't dump NULL arguments.
15741169689Skan	(PERCENT): Define.
15742169689Skan	(dump_dfa_stats): Re-format output.
15743169689Skan	Add new counters.
15744169689Skan	Call dump_if_different.
15745169689Skan	(collect_dfa_stats): Also recurse into GLOBAL_VAR.
15746169689Skan	(collect_dfa_stats_r): Collect may-alias information.
15747169689Skan	(count_tree_refs): Collect information about def-def links for
15748169689Skan	aliases.
15749169689Skan	Keep track of maximum values for number of PHI arguments, aliases
15750169689Skan	and def-def links.
15751169689Skan	(ref_type_name): Handle M_RELOCATE.
15752169689Skan	(validate_ref_type): Ditto.
15753169689Skan
15754169689Skan	* tree-ssa.c: Add more documentation.
15755169689Skan	(tree_ssa_dump_file): Rename from dump_file.  Declare extern.
15756169689Skan	(tree_ssa_dump_flags): Rename from dump_flags.  Declare extern.
15757169689Skan	(added): New local varray.
15758169689Skan	(in_work): New local varray.
15759169689Skan	(work_stack): New local varray.
15760169689Skan	(dfa_counts): Declare.
15761169689Skan	(insert_phi_nodes_for): New local function.
15762169689Skan	(add_phi_node): New local function.
15763169689Skan	(set_ssa_links): New local function.
15764169689Skan	(set_alias_imm_reaching_def): New local function.
15765169689Skan	(create_default_def): New local function.
15766169689Skan	(init_tree_ssa): New local function.
15767169689Skan	(tree_find_refs): Relocate declaration from tree-flow.h
15768169689Skan	(tree_build_ssa): Call init_tree_ssa.
15769169689Skan	Call tree_find_refs.
15770169689Skan	Process all SSA-related dump options.
15771169689Skan	(insert_phi_nodes): Rename from insert_phi_terms.  Update all
15772169689Skan	users.
15773169689Skan	Call insert_phi_nodes_for.
15774169689Skan	(build_fud_chains): Add more documentation.
15775169689Skan	Initialize save_chain to 0.
15776169689Skan	(search_fud_chains): Add more documentation.
15777169689Skan	Call set_ssa_links.
15778169689Skan	Call create_default_def.
15779169689Skan	(tree_compute_rdefs): Initialize array marked to 0.
15780169689Skan	(follow_chain): Follow def-def chains for non-killing definitions
15781169689Skan	for aliases.
15782169689Skan	(dump_reaching_defs): Call dump_variable.
15783169689Skan
15784169689Skan	* tree-flow.h (E_FCALL): Remove.  Update all users.
15785169689Skan	(M_INDIRECT): Remove.  Update all users.
15786169689Skan	(M_RELOCATE): Declare.
15787169689Skan	(struct var_ref): Add field alias_imm_rdefs.
15788169689Skan	(alias_imm_reaching_def): New inline function.
15789169689Skan	(struct tree_ann_d): Add field indirect_var.
15790169689Skan	Add field may_aliases.
15791169689Skan	(enum tree_flags): Relocate.
15792169689Skan	(indirect_var): New inline function.
15793169689Skan	(set_indirect_var): New inline function.
15794169689Skan	(may_alias): New inline function.
15795169689Skan	(num_may_alias): New inline function.
15796169689Skan	(struct dfa_counts_d): Declare.
15797169689Skan	(global_var): Declare.
15798169689Skan	(FCALL_NON_PURE, FCALL_PURE, FCALL_BUILT_IN): Remove.
15799169689Skan	(tree_find_refs): Move to tree-ssa.c.
15800169689Skan	(dump_variable): Declare.
15801169689Skan	(debug_variable): Declare.
15802169689Skan	(get_fcalls): Remove.
15803169689Skan	(is_pure_fcall): Remove.
15804169689Skan	(fcall_takes_ref_args): Remove.
15805169689Skan	(ref_defines): Declare.
15806169689Skan	(is_killing_def): Declare.
15807169689Skan	(get_alias_index): Declare.
15808169689Skan	(delete_tree_ssa): Rename from delete_ssa.  Update all users.
15809169689Skan	(set_currdef_for): Allow INDIRECT_REF nodes.
15810169689Skan	(bb_annotation): Don't create a new one if the block didn't have an
15811169689Skan	annotation already.
15812169689Skan
15813169689Skan	* tree-ssa-ccp.c (substitute_and_fold): Rename from
15814169689Skan	ssa_ccp_substitute_constants.  Update all users.
15815169689Skan	Call replace_uses_in.
15816169689Skan	(replace_uses_in): New local function.
15817169689Skan	(evaluate_expr): Call it.
15818169689Skan	(initialize): Call get_base_symbol.
15819169689Skan
15820169689Skan	* tree-ssa-dce.c (tree_ssa_eliminate_dead_code): Don't handle
15821169689Skan	E_FCALL.
15822169689Skan
15823169689Skan2002-09-22  Diego Novillo  <dnovillo@redhat.com>
15824169689Skan
15825169689Skan	* Makefile.in (tree-dfa.o): Depend on hashtab.h.
15826169689Skan	* c-simplify.c (get_name): Declare extern.
15827169689Skan	* tree-cfg.c (tree_dump_cfg): Call it.
15828169689Skan	(tree_cfg2dot): Call it.
15829169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Call get_name.
15830169689Skan	* tree-ssa-dce.c (tree_ssa_eliminate_dead_code): Call get_name.
15831169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Call get_name.
15832169689Skan	* tree-ssa.c (analyze_rdefs): Call get_name.
15833169689Skan	(dump_reaching_defs): Call get_name.
15834169689Skan	(dump_tree_ssa): Call get_name.
15835169689Skan	* tree.h (get_name): Declare.
15836169689Skan
15837169689Skan	* tree-dfa.c: Include "hashtab.h"
15838169689Skan	(struct dfa_stats_d): New.
15839169689Skan	(collect_dfa_stats): New local function.
15840169689Skan	(collect_dfa_stats_r): New local function.
15841169689Skan	(count_tree_refs): New local function.
15842169689Skan	(count_ref_list_nodes): New local function.
15843169689Skan	(tree_find_refs): Call dump_begin on entry to the function.
15844169689Skan	(dump_referenced_vars): Call get_name.
15845169689Skan	(SCALE): Declare.
15846169689Skan	(LABEL): Declare.
15847169689Skan	(dump_dfa_stats): New function.
15848169689Skan	(debug_dfa_stats): New function.
15849169689Skan	* tree-dump.c (struct dump_option_value_info): Add entry for TDF_STATS.
15850169689Skan	* tree-flow.h (has_annotation): Remove.  Update all users.
15851169689Skan	(dump_dfa_stats): Declare.
15852169689Skan	(debug_dfa_stats): Declare.
15853169689Skan	(tree_annotation): Don't create one if the tree doesn't have one
15854169689Skan	already.  Update all users to new semantics.
15855169689Skan	* tree-ssa-dce.c (print_stats): Dump if dump_flags has TDF_STATS bit
15856169689Skan	set.
15857169689Skan	* tree-ssa.c (tree_build_ssa): Open dump file on entry.
15858169689Skan	Call dump_dfa_stats if dump_flags has TDF_STATS bit set.
15859169689Skan	Call dump_tree_ssa if dump_flags has TDF_DETAILS bit set.
15860169689Skan	* tree.h (TDF_STATS): Define.
15861169689Skan	* doc/invoke.texi: Document 'stats' flag for -fdump-tree.
15862169689Skan
15863169689Skan	* tree-dfa.c (next_tree_ref_id): Change type to unsigned long.
15864169689Skan	Update all users.
15865169689Skan	tree-flow.h (tree_ref_common): Change type of field 'id' to
15866169689Skan	unsigned long.  Update all users.
15867169689Skan	(ref_id): Change return type to unsigned long.  Update all users.
15868169689Skan
15869169689Skan2002-09-21  Daniel Berlin  <dberlin@dberlin.org>
15870169689Skan
15871169689Skan	* tree-ssa-pre.c (struct expr_info): Add repaired member.
15872169689Skan	(repair_injury): Track which injuries we repaired, so we don't
15873169689Skan	repair them > 1 time.
15874169689Skan
15875169689Skan2002-09-20  Diego Novillo  <dnovillo@redhat.com>
15876169689Skan
15877169689Skan	* c-pretty-print.c (dump_c_node): Fix call to REAL_VALUE_TO_DECIMAL.
15878169689Skan
15879169689Skan2002-09-20  Diego Novillo  <dnovillo@redhat.com>
15880169689Skan
15881169689Skan	* tree-dfa.c (find_refs_in_stmt): Fix botched call to
15882169689Skan	clobber_vars_r with CLEANUP_STMT nodes.
15883169689Skan
15884169689Skan2002-09-20  Diego Novillo  <dnovillo@redhat.com>
15885169689Skan
15886169689Skan	* toplev.c (flag_tree_ssa): Remove.  Update all users.
15887169689Skan
15888169689Skan2002-09-20  Frank Ch. Eigler  <fche@redhat.com>
15889169689Skan
15890169689Skan	* gcc.c (cc1_options): Make -fmudflap imply -fno-merge-constants.
15891169689Skan	* varasm.c (categorize_decl_for_section): Likewise, for strings.
15892169689Skan	* tree-mudflap.c (mudflap_enqueue_decl): Don't be interested
15893169689Skan	in !TREE_USED decls.  Fix minor type warning.
15894169689Skan	(mf_offset_expr_of_array_ref): Create explicit temporary variables
15895169689Skan	for array index expressions instead of SAVE_EXPRs.  Update callers.
15896169689Skan	(mf_build_check_statement_for): Insert temp variables.
15897169689Skan	(mx_xfn_indirect_ref): Correct recursion-protection checking
15898169689Skan	sequence.  Tweak array check-base calculation back to "&array[0]".
15899169689Skan	(*): Use build_function_type_list instead of build_function_type.
15900169689Skan	(mx_external_ref): Remove unused parameter.  Update callers.
15901169689Skan
15902169689Skan2002-09-19  Diego Novillo  <dnovillo@redhat.com>
15903169689Skan
15904169689Skan	* c-decl.c (c_expand_body): Invoke tree optimizers with -O1 and
15905169689Skan	above.
15906169689Skan	* flags.h (flag_tree_ssa): Remove.
15907169689Skan	* tree-cfg.c (find_expr_in_tree_helper): Change last argument type
15908169689Skan	to int.
15909169689Skan	* tree-dfa.c (create_ref): Ditto.
15910169689Skan	* tree-flow.h (num_referenced_vars): Change type to unsigned long.
15911169689Skan	* doc/invoke.texi (-ftree-ssa): Remove.
15912169689Skan	(-fdump-tree-{pre,ccp,dce}): Add to the summary section.
15913169689Skan	(-fdump-tree-xxx-details): Update documentation.
15914169689Skan	(-fdump-tree-ccp): Document.
15915169689Skan	(-fdump-tree-simple): Move elsewhere.
15916169689Skan
15917169689Skan2002-09-19  Richard Henderson  <rth@redhat.com>
15918169689Skan
15919169689Skan	* function.c (insns_for_mem_hash): Cast to size_t first.
15920169689Skan	* tree-dfa.c (num_referenced_vars): Unsigned long, not size_t.
15921169689Skan	(dump_referenced_vars): Use %lu for it.
15922169689Skan	(dump_ref): Use HOST_WIDE_INT_PRINT_DEC.
15923169689Skan	* tree-nomudflap.c (mudflap_c_function): Use ATTRIBUTE_UNUSED.
15924169689Skan	(mudflap_enqueue_decl, mudflap_enqueue_constant): Likewise.
15925169689Skan	* tree-ssa-pre.c (compute_idfs): Cast to size_t first.
15926169689Skan
15927169689Skan	* tree-optimize.c (optimize_function_tree): Fix missed renamings.
15928169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Likewise.
15929169689Skan
15930169689Skan2002-09-19  Jeff Law <law@redhat.com>
15931169689Skan
15932169689Skan	* tree-dfa.c (find_refs_in_stmt): Search for references in the call
15933169689Skan	address of a CALL_EXPR.
15934169689Skan
15935169689Skan2002-09-19  Daniel Berlin <dberlin@dberlin.org>
15936169689Skan
15937169689Skan	* toplev.c: tree-ssa-* -> tree-*.
15938169689Skan
15939169689Skan	* doc/invoke.texi: Ditto.
15940169689Skan
15941169689Skan2002-09-19  Daniel Berlin <dberlin@dberlin.org>
15942169689Skan
15943169689Skan	* flags.h: flag_tree_ssa_* -> flag_tree_*.
15944169689Skan
15945169689Skan	* toplev.c: Ditto.
15946169689Skan
15947169689Skan	* tree-optimize.c: Ditto.
15948169689Skan
15949169689Skan	* tree-dump.c: dump-tree-ssa-* -> dump-tree-*.
15950169689Skan	TDI_ssa_* -> TDI_*.
15951169689Skan
15952169689Skan	* tree.h: Ditto
15953169689Skan
15954169689Skan	* tree-ssa-dce.c (tree_ssa_eliminate_dead_code): Fix dump handling.
15955169689Skan
15956169689Skan2002-09-18  Daniel Berlin <dberlin@dberlin.org>
15957169689Skan
15958169689Skan	* tree-dump.c (dump_files): Use dump-tree-ssa-??? for the option names
15959169689Skan	and "ssa-???" for the dump files.
15960169689Skan
15961169689Skan	* tree.h: TDI_ccp and TDI_dce -> TDI_ssa_ccp and TDI_ssa_dce.
15962169689Skan
15963169689Skan	* tree-ssa-ccp.c: TDI_ccp->TDI_ssa_ccp.
15964169689Skan
15965169689Skan2002-09-18  Daniel Berlin <dberlin@dberlin.org>
15966169689Skan
15967169689Skan	* tree-dump.c: Fix order of dump files
15968169689Skan
15969169689Skan2002-09-17  Daniel Berlin <dberlin@dberlin.org>
15970169689Skan
15971169689Skan	* tree-ssa-pre.c: Remove a lot of finding refs in statements junk.
15972169689Skan	Start on strength reduction.
15973169689Skan	Only generate simple statements.
15974169689Skan	Remove EXPR* macros in favor of inline functions.
15975169689Skan	Update comparisons and sets to 1 and 0 to true and false where
15976169689Skan	approriate.
15977169689Skan	(toplevel): Add DEBUGGING_STRRED define (temporary, for
15978169689Skan	implementation debugging, *not* useful as a dump option).
15979169689Skan	Add TODO notes.
15980169689Skan	Add global avdefs, orig_expr_map, need_repair_map,
15981169689Skan	strred_candidate.
15982169689Skan	(set_var_phis): Add struct expr_info * argument.
15983169689Skan	Update to handle injuring definitions.
15984169689Skan	(defs_y_dom_x): Ditto.
15985169689Skan	(phi_opnd_from_res): Ditto.
15986169689Skan	(phi_for_operand): Remove extra \.
15987169689Skan	(find_tree_ref_for_var): Renamed to find_use_for_var. Update all
15988169689Skan	callers.
15989169689Skan	Use orig_expr_map to lookup original expression, remove statement
15990169689Skan	searching gunk.
15991169689Skan	(find_rhs_use_for_var): New function.
15992169689Skan	(is_strred_cand): New function.
15993169689Skan	(is_injuring_def): New function.
15994169689Skan	(calculate_increment): New function.
15995169689Skan	(repair_injury): New function.
15996169689Skan	(set_need_repair): New function.
15997169689Skan	(struct expr_info): Add strred_cand member.
15998169689Skan	(rename_2): Update to handle injuring definitions.
15999169689Skan	(expr_phi_insertion): Ditto.
16000169689Skan	(code_motion): Update to repair injuries.
16001169689Skan	Only insert SIMPLE statements.
16002169689Skan	Free avdefs here now.
16003169689Skan	(finalize_1): Don't free avdefs anymore here.
16004169689Skan	(tree_perform_ssapre): Record original expresion for
16005169689Skan	find_use_for_var's benefit.
16006169689Skan	Determine strength reduction candidates.
16007169689Skan
16008169689Skan	* tree-flow.h: Remove EXPR* macros in favor of inline functions.
16009169689Skan	Remove E_INJ.
16010169689Skan
16011169689Skan	* tree-dfa.c: Change EXPR* macros to the new functions.
16012169689Skan	Remove E_INJ.
16013169689Skan
16014169689Skan2002-09-18  Diego Novillo  <dnovillo@redhat.com>
16015169689Skan
16016169689Skan	* tree-dfa.c (M_ADDRESSOF): Define.
16017169689Skan	(find_refs_in_expr): Create addressof-use references for ADDR_EXPR
16018169689Skan	nodes.
16019169689Skan	Don't create references for FUNCTION_DECL nodes.
16020169689Skan	(ref_type_name): Handle M_ADDRESSOF.
16021169689Skan	(validate_ref_type): Ditto.
16022169689Skan	(clobber_vars_r): Don't clobber FUNCTION_DECL nodes.
16023169689Skan	* tree-flow.h (M_ADDRESSOF): Declare.
16024169689Skan
16025169689Skan2002-09-17  Diego Novillo  <dnovillo@redhat.com>
16026169689Skan
16027169689Skan	* doc/invoke.texi: Document -ftree-ssa-dce and -fdump-tree-dce.
16028169689Skan	* cp/Make-lang.in (CXX_C_OBJS): Add tree-ssa-dce.o.
16029169689Skan
16030169689Skan2002-09-17  Ben Elliston  <bje@redhat.com>
16031169689Skan
16032169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add tree-ssa-dce.o.
16033169689Skan	tree-ssa-dce.o): New target.
16034169689Skan	* tree-ssa-dce.c: New file.
16035169689Skan	* flags.h (flag_tree_ssa_dce): Declare flag.
16036169689Skan	* tree.h (tree_dump_index): Add TDI_dce.
16037169689Skan	* toplev.c (flag_tree_ssa_dce): New flag.
16038169689Skan	(f_options): Add "dump-tree-all-ssa" option.
16039169689Skan	* tree-flow.h (enum tree_flags): Add TF_NECESSARY.
16040169689Skan	* tree-dump.c (dump_files): Add dump-tree-dce option.
16041169689Skan	(dump_enable_all_ssa): Enable it when dumping all.
16042169689Skan	* tree-optimize.h (tree_ssa_eliminate_dead_code): Declare.
16043169689Skan	* tree-optimize.c (optimize_function_tree): Invoke the
16044169689Skan	optimisation pass if flag_tree_ssa_dce is set.
16045169689Skan
16046169689Skan2002-09-17  Diego Novillo  <dnovillo@redhat.com>
16047169689Skan
16048169689Skan	* Makefile.in (tree-ssa.o): Add dependency on c-tree.h
16049169689Skan	* c-simplify.c (mark_not_simple_r): Don't mark IDENTIFIER_NODEs.
16050169689Skan	* tree-dfa.c (function_may_recurse_p): Fix comment.
16051169689Skan	(dump_ref): Don't dump immediate uses for PHI nodes more than once.
16052169689Skan	(dump_referenced_vars): Unparse the name of the variable.
16053169689Skan	* tree-flow.h (dump_tree_ssa): Declare.
16054169689Skan	(debug_tree_ssa): Declare.
16055169689Skan	(replace_ref_operand_with): Check if OPERAND_P is NULL.
16056169689Skan	(restore_ref_operand): Ditto.
16057169689Skan	(tree_annotation): Check that constants, types and IDENTIFIER_NODEs
16058169689Skan	are not being annotated.
16059169689Skan	* tree-ssa.c: Include c-tree.h.
16060169689Skan	(dump_reaching_defs): Unparse the variable name.
16061169689Skan	(dump_tree_ssa): New function.
16062169689Skan	(tree_build_ssa): Call it.
16063169689Skan	(debug_tree_ssa): New function.
16064169689Skan
16065169689Skan2002-09-14  Steven Bosscher <s.bosscher@student.tudelft.nl>
16066169689Skan
16067169689Skan	* dwarf2out.c (is_fortran): Return true for
16068169689Skan	DW_LANG_Fortran95.
16069169689Skan	(gen_compile_unit_die): Return DW_LANG_Fortran95 if
16070169689Skan	language is "GNU F95".
16071169689Skan
16072169689Skan2002-09-13  Daniel Berlin  <dberlin@dberlin.org>
16073169689Skan
16074169689Skan	* tree-dump.c (dump_switch_p): Get longest match, not first one.
16075169689Skan
16076169689Skan	* tree.h: Put TDI_* back in order, now that we do longest match
16077169689Skan	matching.
16078169689Skan
16079169689Skan2002-09-13  Diego Novillo  <dnovillo@redhat.com>
16080169689Skan
16081169689Skan	* tree-dfa.c (add_call_site_clobbers): Call decl_function_context
16082169689Skan	instead of DECL_CONTEXT.
16083169689Skan	* tree-ssa-ccp.c (initialize): Ditto.
16084169689Skan	* tree-ssa.c (analyze_rdefs): Ditto.
16085169689Skan
16086169689Skan2002-09-11  Diego Novillo  <dnovillo@redhat.com>
16087169689Skan
16088169689Skan	* tree-dfa.c (find_refs_in_stmt): Call clobber_vars_r to clobber
16089169689Skan	CLEANUP_STMT nodes.
16090169689Skan	(create_ref): Only add _DECL nodes to the list of referenced
16091169689Skan	variables.
16092169689Skan	(clobber_vars_r): Create a may-use reference prior to clobbering
16093169689Skan	the variable.
16094169689Skan	(add_call_site_clobbers): Ditto.
16095169689Skan	(add_ptr_may_refs): Move call to find_list_node where it's actually
16096169689Skan	needed.
16097169689Skan	* tree-flow.h: Update documentation on M_CLOBBER.
16098169689Skan
16099169689Skan2002-09-10  Daniel Berlin  <dberlin@dberlin.org>
16100169689Skan
16101169689Skan	* tree-ssa-pre.c (defs_match_p): Fix typo ( | -> || ).
16102169689Skan
16103169689Skan2002-09-10  Diego Novillo  <dnovillo@redhat.com>
16104169689Skan
16105169689Skan	* tree-dfa.c (V_PHI_ARG): Remove.  Adjust related constants.
16106169689Skan	Update all users.
16107169689Skan	(add_ref_to_list_after): Don't allocate memory for the
16108169689Skan	node when adding to the beginning or the end of the list.
16109169689Skan	(add_phi_arg): Don't call create_ref to add a new argument.
16110169689Skan	(debug_phi_args): New function.
16111169689Skan	(dump_phi_args): New function.
16112169689Skan	(dump_ref): Call it.
16113169689Skan	(dump_referenced_vars): Use 'file' instead of 'dump_file'.
16114169689Skan
16115169689Skan	* tree-flow.h (V_PHI_ARG): Remove.  Update all users.
16116169689Skan	(struct var_ref): Move fields used in distinct
16117169689Skan	reference types to other structures.  Update all users.
16118169689Skan	(struct var_def): New.
16119169689Skan	(struct var_phi): New.
16120169689Skan	(struct var_use): New.
16121169689Skan	(union tree_ref_d): Add members vdef, vphi, vuse and vphi_arg.
16122169689Skan	Update all users.
16123169689Skan	(save_chain): Remove.  Update all users.
16124169689Skan	(set_save_chain): Remove.  Update all users.
16125169689Skan	(marked_with): Remove.  Update all users.
16126169689Skan	(mark_def_with): Remove.  Update all users.
16127169689Skan	(dump_reaching_defs): Declare.
16128169689Skan	(debug_reaching_defs): Declare.
16129169689Skan
16130169689Skan	(struct phi_node_arg_d): New structure.
16131169689Skan	(phi_node_arg): New type.
16132169689Skan	(phi_arg): Change return type to phi_node_arg.
16133169689Skan	(imm_reaching_def_edge): Rename to phi_arg_edge.
16134169689Skan	(set_imm_reaching_def_edge): Rename to set_phi_arg_edge.
16135169689Skan	(phi_arg_def): New inline function.
16136169689Skan	(set_phi_arg_def): New inline function.
16137169689Skan	(debug_phi_args): Declare.
16138169689Skan	(dump_phi_args): Declare.
16139169689Skan
16140169689Skan	* tree-ssa-ccp.c: Use new phi_node_arg type when examining PHI node
16141169689Skan	arguments.
16142169689Skan
16143169689Skan	* tree-ssa-pre.c: Ditto.
16144169689Skan
16145169689Skan	* tree-ssa.c (save_chain): New local variable.
16146169689Skan	(build_fud_chains, search_fud_chains): Use it.
16147169689Skan	(marked): New local variable.
16148169689Skan	(tree_compute_rdefs, follow_chain): Use it.
16149169689Skan	(dump_reaching_defs): New function.
16150169689Skan	(debug_reaching_defs): New function.
16151169689Skan
16152169689Skan2002-09-09  Daniel Berlin <dberlin@dberlin.org>
16153169689Skan
16154169689Skan	* Makefile.in (tree-alias-steen.o): Remove gt-tree-alias-steen.h
16155169689Skan	(tree-alias-common.o): Add dependency on c-common.h
16156169689Skan
16157169689Skan	* tree-ssa-pre.c: Fix PRE now that V_USE's expr's are the entire
16158169689Skan	assignment, rather than just the right hand side.
16159169689Skan	Stop generating our own call clobbers
16160169689Skan
16161169689Skan	* tree-dfa.c (create_ref): Make sure var is not null before checking
16162169689Skan	TREE_THIS_VOLATILE.
16163169689Skan
16164169689Skan	* tree.h: Reorder TDI_* so ssapre comes before ssa.
16165169689Skan
16166169689Skan	* tree-dump.c: dump-tree-ssapre has to come before dump-tree-ssa
16167169689Skan	in the table, or else it'll never match.
16168169689Skan
16169169689Skan2002-09-09  Frank Ch. Eigler  <fche@redhat.com>
16170169689Skan
16171169689Skan	* tree-mudflap.c (mf_offset_expr_of_array_ref): Fold constants along
16172169689Skan	the way.
16173169689Skan	(mf_build_check_statement_for): Ditto.  Flag new COMPONENT_REFs.
16174169689Skan	(mx_xfn_indirect_ref): Instrument COMPONENT_REFs specially.  Tweak
16175169689Skan	ARRAY_REF instrumentation to reduce need of copying and recursion.
16176169689Skan
16177169689Skan2002-09-09  Diego Novillo  <dnovillo@redhat.com>
16178169689Skan
16179169689Skan	* tree-ssa.c (analyze_rdefs): Disable uninitialized variable warnings.
16180169689Skan
16181169689Skan2002-09-09  Diego Novillo  <dnovillo@redhat.com>
16182169689Skan
16183169689Skan	* Makefile.in (tree-ssa.o): Add dependency on tree-simple.h.
16184169689Skan	(tree-dfa.o): Add dependency on tree-simple.h and tree-inline.h.
16185169689Skan	(tree-alias-steen.o): Add dependency on c-common.h.
16186169689Skan	(tree-optimize.o): Add dependency on c-common.h.
16187169689Skan
16188169689Skan	* c-simplify.c (deep_copy_node): Call walk_tree with mostly_copy_tree_r.
16189169689Skan	(mostly_copy_tree_r): Also copy flags from original tree.
16190169689Skan	(mark_not_simple_r): Call set_tree_flag.
16191169689Skan
16192169689Skan	* tree-alias-steen.c: Include c-common.h.
16193169689Skan
16194169689Skan	* tree-cfg.c (map_stmt_to_bb): Remove.
16195169689Skan	(block_invalidates_loop): Change return type to bool.
16196169689Skan	(create_loop_hdr): New function.
16197169689Skan	(create_bb): Call it.
16198169689Skan	(create_bb_ann): Return newly created annotation object.
16199169689Skan	(remove_bb_ann): Nullify loop_hdr annotation, if there is one.
16200169689Skan	(tree_delete_bb): Only remove basic block annotation from
16201169689Skan	executables statements.
16202169689Skan	(is_computed_goto): New function.
16203169689Skan
16204169689Skan	* tree-dfa.c (pointer_refs): New file local variable.
16205169689Skan	(call_sites): New global variable.
16206169689Skan	(V_DEF, V_USE, V_PHI, V_PHI_ARG, E_FCALL, E_PHI, E_USE, E_KILL,
16207169689Skan	E_INJ): New global constants.
16208169689Skan	(M_DEFAULT, M_CLOBBER, M_MAY, M_PARTIAL, M_INITIAL, M_INDIRECT,
16209169689Skan	M_VOLATILE): New global constants.
16210169689Skan	(num_referenced_vars): New global variable.
16211169689Skan	(referenced_vars): Rename from referenced_symbols.  Update all
16212169689Skan	users.
16213169689Skan	(clobber_vars_r): New function.
16214169689Skan	(add_default_defs): New function.
16215169689Skan	(add_call_site_clobbers): New function.
16216169689Skan	(add_ptr_may_refs): New function.
16217169689Skan	(add_phi_arg): New function.
16218169689Skan	(find_list_node): New function.
16219169689Skan	(remove_ref_from_list): Call it.
16220169689Skan	(add_ref_to_list_after): New function.
16221169689Skan	(is_pure_fcall): New function.
16222169689Skan	(fcall_takes_ref_args): New function.
16223169689Skan	(dump_referenced_vars): New function.
16224169689Skan	(debug_referenced_vars): New function.
16225169689Skan	(ref_type_name): New function.
16226169689Skan	(validate_ref_type): New function.
16227169689Skan	(debug_phi_args): Remove.
16228169689Skan	(dump_phi_args): Remove.
16229169689Skan	(add_referenced_var): Rename from add_ref_symbol.  Update all
16230169689Skan	users.
16231169689Skan	(dump_ref): Rename from dump_varref.  Update all users.
16232169689Skan	(debug_ref): Rename from debug_varref.  Update all users.
16233169689Skan	(dump_ref_list): Rename from dump_varref_list.  Update all users.
16234169689Skan	(dump_ref_array): Rename from dump_varref_array.  Update all users.
16235169689Skan	(next_tree_ref_id): Rename from next_varref_id.  Update all users.
16236169689Skan
16237169689Skan	(tree_find_refs): Rename from tree_find_varrefs.  Update all users.
16238169689Skan	Call add_default_defs.
16239169689Skan	Call add_call_site_clobbers.
16240169689Skan	Call add_ptr_may_refs.
16241169689Skan	Call dump_referenced_vars.
16242169689Skan	Create and destroy pointer_refs list.
16243169689Skan
16244169689Skan	(find_refs_in_stmt): Set reference type to clobbering definition
16245169689Skan	for the ASM_OUTPUTS and ASM_CLOBBERS expressions of an ASM_STMT.
16246169689Skan	Set reference type to initial definition for the DECL_INITIAL node
16247169689Skan	of a DECL_STMT.
16248169689Skan	Clobber everything in CLEANUP_STMT nodes.
16249169689Skan
16250169689Skan	(find_refs_in_expr): Re-write.
16251169689Skan	Recursively clobber every VAR_DECL contained in non SIMPLE nodes.
16252169689Skan	Mark indirect pointer references with M_INDIRECT flag.
16253169689Skan	Add pointer references to pointer_refs list.
16254169689Skan	Glob references to arrays and structures.
16255169689Skan	Add function call expressions to call_sites list.
16256169689Skan
16257169689Skan	(empty_ref_list): Do nothing if the list is empty already.
16258169689Skan	(delete_ref_list): Ditto.
16259169689Skan	(create_ref): Add new argument ADD_TO_BB.
16260169689Skan	Set M_VOLATILE modifier if this is a reference to a volatile
16261169689Skan	variable.
16262169689Skan	Count number of incoming edges for V_PHI references before
16263169689Skan	initializing the V_PHI_ARG array.
16264169689Skan	Only add reference to basic block if ADD_TO_BB is true.
16265169689Skan	Set output reference for the parent expression for V_DEF
16266169689Skan	references.
16267169689Skan	(remove_tree_ann): Do nothing if the tree didn't have an
16268169689Skan	annotation.
16269169689Skan
16270169689Skan	* tree-flow.h (enum treeref_type): Remove.  Update all users.
16271169689Skan	(union varref_def): Ditto.
16272169689Skan	(tree_ref): Rename from varref.  Update all users.
16273169689Skan	(V_DEF): Declare.
16274169689Skan	(V_USE): Declare.
16275169689Skan	(V_PHI): Declare.
16276169689Skan	(V_PHI_ARG): Declare.
16277169689Skan	(E_FCALL): Declare.
16278169689Skan	(E_PHI): Declare.
16279169689Skan	(E_USE): Declare.
16280169689Skan	(E_KILL): Declare.
16281169689Skan	(E_INJ): Declare.
16282169689Skan	(M_DEFAULT): Declare.
16283169689Skan	(M_CLOBBER): Declare.
16284169689Skan	(M_MAY): Declare.
16285169689Skan	(M_PARTIAL): Declare.
16286169689Skan	(M_INITIAL): Declare.
16287169689Skan	(M_INDIRECT): Declare.
16288169689Skan	(M_VOLATILE): Declare.
16289169689Skan	(struct tree_ref_common): Rename from treeref_common.  Update all
16290169689Skan	users.
16291169689Skan	Change type of field 'type' to HOST_WIDE_INT.
16292169689Skan	Rename field 'sym' to 'var'.
16293169689Skan	(struct var_ref): Rename from varref.  Update all users.
16294169689Skan	Join the structures varuse
16295169689Skan	and vardef into a single structure.
16296169689Skan	(struct expr_ref_common): Rename from exprref_common.  Update all
16297169689Skan	users.
16298169689Skan	(struct expr_use): Rename from expruse.  Update all users.
16299169689Skan	(struct expr_phi): Rename from exprphi.  Update all users.
16300169689Skan	(union tree_ref_d): Rename from varref_def.  Update all users.
16301169689Skan	(EXPRPHI_PHI_ARGS): Rename from EXPRPHI_PHI_CHAIN.  Update all
16302169689Skan	users.
16303169689Skan	(struct tree_ann_d): Rename field 'compound_stmt' to
16304169689Skan	'compound_parent'.
16305169689Skan	Add field 'output_ref'.
16306169689Skan	(enum tree_flags): New enum.
16307169689Skan	(TF_REFERENCED): New flag.
16308169689Skan	(phi_arg): Remove.
16309169689Skan	(get_num_phi_args): Remove.
16310169689Skan	(get_phi_arg): Remove.
16311169689Skan
16312169689Skan	(struct vardef): Remove.  Update all users.
16313169689Skan	(VARDEF_IMM_USES): Ditto.
16314169689Skan	(VARDEF_SAVE_CHAIN): Ditto.
16315169689Skan	(VARDEF_RUSES): Ditto.
16316169689Skan	(VARDEF_MARKED): Ditto.
16317169689Skan	(VARDEF_PHI_ARGS): Ditto.
16318169689Skan	(struct varuse): Ditto.
16319169689Skan	(VARUSE_IMM_RDEF): Ditto.
16320169689Skan	(VARUSE_RDEFS): Ditto.
16321169689Skan	(VARREF_ID): Ditto.
16322169689Skan	(VARREF_TYPE): Ditto.
16323169689Skan	(VARREF_BB): Ditto.
16324169689Skan	(VARREF_EXPR): Ditto.
16325169689Skan	(VARREF_OPERAND_P): Ditto.
16326169689Skan	(VARREF_STMT): Ditto.
16327169689Skan	(VARREF_SYM): Ditto.
16328169689Skan	(IS_DEFAULT_DEF): Ditto.
16329169689Skan	(IS_ARTIFICIAL_REF): Ditto.
16330169689Skan	(TREE_ANN): Ditto.
16331169689Skan	(BB_FOR_STMT): Ditto.
16332169689Skan	(TREE_CURRDEF): Ditto.
16333169689Skan	(TREE_REFS): Ditto.
16334169689Skan	(TREE_COMPOUND_STMT): Ditto.
16335169689Skan	(TREE_FLAGS): Ditto.
16336169689Skan	(BB_ANN): Ditto.
16337169689Skan	(BB_PARENT): Ditto.
16338169689Skan	(BB_REFS): Ditto.
16339169689Skan	(BB_PREV_CHAIN_P): Ditto.
16340169689Skan	(BB_BINDING_SCOPE): Ditto.
16341169689Skan	(BB_LOOP_HDR): Ditto.
16342169689Skan	(FOR_INIT_STMT_BB): Ditto.
16343169689Skan	(FOR_COND_BB): Ditto.
16344169689Skan	(FOR_EXPR_BB): Ditto.
16345169689Skan	(END_WHILE_BB): Ditto.
16346169689Skan	(DO_COND_BB): Ditto.
16347169689Skan	(BB_EMPTY_P): Ditto.
16348169689Skan
16349169689Skan	(ref_type): New inline function.
16350169689Skan	(ref_var): New inline function.
16351169689Skan	(ref_stmt): New inline function.
16352169689Skan	(ref_expr): New inline function.
16353169689Skan	(ref_bb): New inline function.
16354169689Skan	(ref_id): New inline function.
16355169689Skan	(replace_ref_operand_with): New inline function.
16356169689Skan	(restore_ref_operand): New inline function.
16357169689Skan	(imm_uses): New inline function.
16358169689Skan	(save_chain): New inline function.
16359169689Skan	(set_save_chain): New inline function.
16360169689Skan	(reached_uses): New inline function.
16361169689Skan	(marked_with): New inline function.
16362169689Skan	(mark_def_with): New inline function.
16363169689Skan	(phi_args): New inline function.
16364169689Skan	(num_phi_args): New inline function.
16365169689Skan	(phi_arg): New inline function.
16366169689Skan	(imm_reaching_def): New inline function.
16367169689Skan	(set_imm_reaching_def): New inline function.
16368169689Skan	(imm_reaching_def_edge): New inline function.
16369169689Skan	(set_imm_reaching_def_edge): New inline function.
16370169689Skan	(reaching_defs): New inline function.
16371169689Skan	(tree_annotation): New inline function.
16372169689Skan	(has_annotation): New inline function.
16373169689Skan	(bb_for_stmt): New inline function.
16374169689Skan	(set_bb_for_stmt): New inline function.
16375169689Skan	(currdef_for): New inline function.
16376169689Skan	(set_currdef_for): New inline function.
16377169689Skan	(tree_refs): New inline function.
16378169689Skan	(add_tree_ref): New inline function.
16379169689Skan	(remove_tree_ref): New inline function.
16380169689Skan	(compound_parent): New inline function.
16381169689Skan	(set_compound_parent): New inline function.
16382169689Skan	(set_tree_flag): New inline function.
16383169689Skan	(clear_tree_flag): New inline function.
16384169689Skan	(tree_flags): New inline function.
16385169689Skan	(reset_tree_flags): New inline function.
16386169689Skan	(output_ref): New inline function.
16387169689Skan	(set_output_ref): New inline function.
16388169689Skan	(bb_annotation): New inline function.
16389169689Skan	(bb_parent): New inline function.
16390169689Skan	(set_bb_parent): New inline function.
16391169689Skan	(bb_refs): New inline function.
16392169689Skan	(remove_bb_ref): New inline function.
16393169689Skan	(prev_chain_p): New inline function.
16394169689Skan	(set_prev_chain_p): New inline function.
16395169689Skan	(binding_scope): New inline function.
16396169689Skan	(set_binding_scope): New inline function.
16397169689Skan	(header_blocks): New inline function.
16398169689Skan	(for_init_bb): New inline function.
16399169689Skan	(set_for_init_bb): New inline function.
16400169689Skan	(for_cond_bb): New inline function.
16401169689Skan	(set_for_cond_bb): New inline function.
16402169689Skan	(for_expr_bb): New inline function.
16403169689Skan	(set_for_expr_bb): New inline function.
16404169689Skan	(end_while_bb): New inline function.
16405169689Skan	(set_end_while_bb): New inline function.
16406169689Skan	(do_cond_bb): New inline function.
16407169689Skan	(set_do_cond_bb): New inline function.
16408169689Skan	(bb_empty_p): New inline function.
16409169689Skan
16410169689Skan	(referenced_vars): Rename from referenced_symbols.  Update all
16411169689Skan	users.
16412169689Skan	(num_referenced_vars): Declare.
16413169689Skan	(NREF_SYMBOLS): Remove.  Update all users.
16414169689Skan	(REF_SYMBOL): Ditto.
16415169689Skan	(ADD_REF_SYMBOL): Ditto.
16416169689Skan	(referenced_var): New inline function.
16417169689Skan	(call_sites): Declare.
16418169689Skan	(next_tree_ref_id): Rename from next_varref_id.  Update all users.
16419169689Skan	(is_computed_goto): Declare.
16420169689Skan	(is_pure_fcall): Declare.
16421169689Skan	(fcall_takes_ref_args): Declare.
16422169689Skan	(add_ref_to_list_after): Declare.
16423169689Skan	(find_list_node): Declare.
16424169689Skan	(ref_type_name): Declare.
16425169689Skan	(validate_ref_type): Declare.
16426169689Skan
16427169689Skan	* tree-optimize.c: Include c-common.h.
16428169689Skan	(optimize_function_tree): Store DECL_SAVED_TREE in a local
16429169689Skan	variable.
16430169689Skan
16431169689Skan	* tree-ssa-ccp.c (cp_lattice_meet): New function.
16432169689Skan	(visit_phi_node): Call it.
16433169689Skan	(add_outgoing_control_edges): New function.
16434169689Skan	(visit_expression_for): Call it.
16435169689Skan	Don't handle static initializers.
16436169689Skan	Handle computed gotos.
16437169689Skan	(add_control_edge): New function.
16438169689Skan	(visit_condexpr_for, simulate_block, add_outgoing_control_edges): Call
16439169689Skan	it.
16440169689Skan	(simulate_def_use_chains): Only look at unmodified V_USE references.
16441169689Skan	(ssa_ccp_substitute_constants): Ditto.
16442169689Skan	(evaluate_expr): Ditto.
16443169689Skan	(initialize): Set initial value for incoming parameters and globals
16444169689Skan	to VARYING.
16445169689Skan	Set initial value for initialized static variables to VARYING,
16446169689Skan	unless the variable is read-only.
16447169689Skan	(set_lattice_value): Don't special case globals, volatiles and
16448169689Skan	variables with their address taken.
16449169689Skan
16450169689Skan	* tree-ssa.c: Include tree-simple.h.
16451169689Skan	(tree_build_ssa): Don't add default definitions.
16452169689Skan	(insert_phi_terms): Add new PHI nodes at the beginning of the list
16453169689Skan	of references for the basic block.
16454169689Skan	(search_fud_chains): Add def-def chains for non-killing
16455169689Skan	definitions.
16456169689Skan	(delete_ssa): Remove list call_sites.
16457169689Skan	Set num_referenced_vars to 0.
16458169689Skan	Set referenced_vars to NULL.
16459169689Skan	(follow_chain): Follow def-def chains for non-killing definitions.
16460169689Skan	(is_upward_exposed): Change return type to bool.
16461169689Skan	(add_phi_arg): Remove.
16462169689Skan
16463169689Skan2002-09-06  Frank Ch. Eigler  <fche@redhat.com>
16464169689Skan
16465169689Skan	* tree-mudflap.c (deferred_static_decl*): Correct GTY markup.
16466169689Skan	(mudflap_enqueue_decl): Correct iteration bounds.
16467169689Skan	(mf_init_extern_trees): Add more constness to mf_cache_structptr_type.
16468169689Skan	(mf_offset_expr_of_array_ref): Remove excess mx_flagging.  save_expr
16469169689Skan	array subscripts.
16470169689Skan	(mf_build_check_statement_for): Reorganize to take explicit
16471169689Skan	check-base/size arguments, in addition to value argument.  save_expr
16472169689Skan	array subscripts.  Copy value/base/size subtrees.
16473169689Skan	(mx_xfn_indirect_ref): Support marking of subtrees for nontraversal.
16474169689Skan	Track source line numbers more aggressively.  For arrays, check bounds
16475169689Skan	from base through indexed element, not just the indexed element.
16476169689Skan	Use nontraversal flagging to eliminate some excess instrumentation.
16477169689Skan	(mf_xform_derefs): Support nontraversal by a hash table.
16478169689Skan	(*): Remove "{{{"/"}}}" folding marks.
16479169689Skan
16480169689Skan2002-09-02  Daniel Berlin  <dberlin@dberlin.org>
16481169689Skan
16482169689Skan	* tree-alias-common.[ch]: New files.
16483169689Skan	* tree-alias-steen.[ch]: Split out common stuff into
16484169689Skan	tree-alias-common.[ch].
16485169689Skan	* c-config-lang.in: Modify to use tree-alias-common.[ch] instead of
16486169689Skan	tree-alias-steen, since this is where the GTY'd stuff is now.
16487169689Skan	* Makefile.in: Add dependencies for tree-alias-common.[ch].
16488169689Skan
16489169689Skan2002-09-03  Diego Novillo  <dnovillo@redhat.com>
16490169689Skan
16491169689Skan	* c-simplify.c (simplify_goto_stmt): New function.
16492169689Skan	(simplify_stmt): Call it.
16493169689Skan	* tree-simple.c: Document grammar for GOTO_STMT nodes.
16494169689Skan	(rationalize_compound_expr): Wrap it with #if 0/#endif.
16495169689Skan	(get_base_symbol): Minor comment fixup.
16496169689Skan
16497169689Skan2002-09-03  Frank Ch. Eigler  <fche@redhat.com>
16498169689Skan
16499169689Skan	* gcc.c (MFWRAP_SPEC): Add --wrap=alloca.
16500169689Skan
16501169689Skan2002-09-01  Diego Novillo  <dnovillo@redhat.com>
16502169689Skan
16503169689Skan	* c-simplify.c (simplify_stmt): Mark CLEANUP_STMTs and ASM_STMTs
16504169689Skan	not SIMPLE.
16505169689Skan	(simplify_for_stmt): Do not allow expression sequences in
16506169689Skan	FOR_INIT_STMT and FOR_EXPR nodes.
16507169689Skan	* tree-simple.c: Document difference with original SIMPLE grammar.
16508169689Skan
16509169689Skan2002-08-31  Frank Ch. Eigler  <fche@redhat.com>
16510169689Skan
16511169689Skan	* tree-mudflap.c (mf_build_check_statement_for): Tolerate dereference
16512169689Skan	of void pointers.
16513169689Skan	(mx_register_decl): Correct typo in below patch.
16514169689Skan
16515169689Skan2002-08-30  Graydon Hoare  <graydon@redhat.com>
16516169689Skan
16517169689Skan	* tree-mudflap.c (mx_register_decl): Mark declarations as
16518169689Skan	TREE_ADDRESSABLE when mudflap decides to register them.
16519169689Skan
16520169689Skan2002-08-29  Graydon Hoare  <graydon@redhat.com>
16521169689Skan
16522169689Skan	* tree-mudflap.c (mx_xfn_indirect_ref): Rewrite array references as
16523169689Skan	pointer dereferences.
16524169689Skan	(struct mf_xform_decls_data): New member: param_decls.
16525169689Skan	(mx_register_decl): New function.
16526169689Skan	(mx_xfn_xform_decls): Factor code out into mx_register_decl.
16527169689Skan	Register live parameters with mudflap.
16528169689Skan	(mx_xfn_find_addrof): Notice references to fields of structures
16529169689Skan	and function parameters.
16530169689Skan
16531169689Skan2002-08-29  Frank Ch. Eigler  <fche@redhat.com>
16532169689Skan
16533169689Skan	* c-pretty-print.c (dump_c_tree): Detect loops in statement chains
16534169689Skan	using a hash table to track visited status.
16535169689Skan	* Makefile.in: Add hashtab.h dependency.
16536169689Skan
16537169689Skan2002-08-28  Frank Ch. Eigler  <fche@redhat.com>
16538169689Skan
16539169689Skan	* tree-mudflap.c (mudflap_enqueue_constant): Register non-string
16540169689Skan	constants also.
16541169689Skan	(mf_build_check_statement_for): Include pushlevel/pushdecl/poplevel
16542169689Skan	for local variables.
16543169689Skan
16544169689Skan2002-08-27  Frank Ch. Eigler  <fche@redhat.com>
16545169689Skan
16546169689Skan	Better static registration:
16547169689Skan	* varasm.c (make_decl_rtl): Handle DECL_RTL_SET_P case for
16548169689Skan	mudflap static registration.
16549169689Skan	* tree-mudflap.c (mudflap_enqueue_decl): Rewrite to handle
16550169689Skan	deferred statics.
16551169689Skan	(mudflap_finish_file): Call above fn back for deferred statics.
16552169689Skan
16553169689Skan	Cleanup:
16554169689Skan	* tree-mudflap.c (mf_varname_tree, mf_file_function_line_tree):
16555169689Skan	Reorganize output_buffer reuse mechanism.
16556169689Skan	(mf_build_check_statement_for): Set TREE_SIDE_EFFECTS.
16557169689Skan	(mx_xfn_indirect_ref): Correct file/line collection tests.
16558169689Skan
16559169689Skan	Dynamic linking support:
16560169689Skan	* gcc.c (MFWRAP_SPEC): Make conditional on -static.  Add the
16561169689Skan	newer wrapped functions dlopen/mmap/munmap.
16562169689Skan	(MFLIB_SPEC): Be sensitive to -static.  Partial support for
16563169689Skan	dynamic linking.
16564169689Skan
16565169689Skan2002-08-26  Diego Novillo  <dnovillo@redhat.com>
16566169689Skan
16567169689Skan	* Makefile.in (tree-ssa.o): Add dependency on ggc.h
16568169689Skan	(c-simplify.o): Add dependency on langhooks-def.h
16569169689Skan	* c-simplify.c: Include langhooks-def.h
16570169689Skan	(simplify_function_tree): Do nothing if the front end does not
16571169689Skan	support simplification.
16572169689Skan
16573169689Skan	* tree-flow.h (struct vardef): Remove fields 'phi_chain' and
16574169689Skan	'phi_chain_bb'.
16575169689Skan	Add field 'phi_args'.
16576169689Skan	(VARDEF_PHI_CHAIN): Remove.  Update all users.
16577169689Skan	(VARDEF_PHI_CHAIN_BB): Remove.  Update all users.
16578169689Skan	(VARDEF_PHI_ARGS): Define.
16579169689Skan	(struct varuse): Rename field 'chain' to 'imm_rdef'.  Update all
16580169689Skan	users.
16581169689Skan	(VARUSE_IMM_RDEF):  Rename from VARUSE_CHAIN.  Update all users.
16582169689Skan	(phi_arg): New structure.
16583169689Skan	(get_num_phi_args): New function.
16584169689Skan	(get_phi_arg): New function.
16585169689Skan	(set_phi_arg): New function.
16586169689Skan	(add_phi_arg): New function.
16587169689Skan	(debug_phi_args): Declare.
16588169689Skan	(dump_phi_args): Declare.
16589169689Skan	* tree-dfa.c (create_ref): Remove initialization of
16590169689Skan	VARDEF_PHI_CHAIN and VARDEF_PHI_CHAIN_BB.
16591169689Skan	Initialize array VARDEF_PHI_ARGS.
16592169689Skan	(dump_varref): Call dump_phi_args.
16593169689Skan	(dump_phi_args): New function.
16594169689Skan	(debug_phi_args): New function.
16595169689Skan	* tree-ssa-ccp.c (PHI_PARMS): Remove.
16596169689Skan	(EIE): Remove.
16597169689Skan	(visit_phi_node): Get the argument's edge directly from the
16598169689Skan	argument instead of calling find_edge.
16599169689Skan	(initialize): Cast call to NUM_EDGES to unsigned.
16600169689Skan	* tree-ssa-pre.c: Update uses of VARDEF_PHI_CHAIN,
16601169689Skan	VARDEF_PHI_CHAIN_BB and VARUSE_CHAIN everywhere.
16602169689Skan	* tree-ssa.c: Ditto.
16603169689Skan	Include ggc.h.
16604169689Skan	(search_fud_chains): Call add_phi_arg to add arguments to each PHI
16605169689Skan	node.
16606169689Skan	(tree_ssa_remove_phi_alternative): Call set_phi_arg to switch the
16607169689Skan	last element with the element being removed.
16608169689Skan
16609169689Skan2002-08-26  Diego Novillo  <dnovillo@redhat.com>
16610169689Skan
16611169689Skan	* c-simplify.c (mostly_copy_tree_r): Unshare STMT_EXPR
16612169689Skan	nodes.
16613169689Skan
16614169689Skan2002-08-25  Diego Novillo  <dnovillo@redhat.com>
16615169689Skan
16616169689Skan	* tree-dfa.c (find_refs_in_stmt): Replace calls to
16617169689Skan	RETURN_EXPR with RETURN_STMT_EXPR.
16618169689Skan	* c-simplify.c (simplify_return_stmt): Ditto.
16619169689Skan	(deep_copy_node): Ditto.
16620169689Skan	* c-pretty-print.c (dump_c_node): Ditto.
16621169689Skan
16622169689Skan2002-08-24  Diego Novillo  <dnovillo@redhat.com>
16623169689Skan
16624169689Skan	* c-pretty-print.c: Add `break' after calls to NIY in
16625169689Skan	switch statements.
16626169689Skan
16627169689Skan2002-08-23  Jeffrey A Law  (law@redhat.com)
16628169689Skan
16629169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Remove #if 0 that accidentally
16630169689Skan	got checked in.  Cleanup the cfg to remove unreachable blocks
16631169689Skan	discovered by CCP.
16632169689Skan
16633169689Skan	* basic-block.h (EDGE_EXECUTABLE): New edge flag.
16634169689Skan
16635169689Skan	* cfganal.c (find_edge): New function.
16636169689Skan
16637169689Skan	* ssa-ccp.c: Convert to use EDGE_EXECUTABLE bit in the
16638169689Skan	edge flags rather than a bitmap.  Convert edge worklist
16639169689Skan	into a varray.  Avoids expensive find_index_edge calls.
16640169689Skan	* tree-ssa-ccp.c: Likewise.
16641169689Skan
16642169689Skan	* tree-flow.h (tree_ssa_remove_phi_alternative): Declare.
16643169689Skan	* tree-ssa.c (tree_ssa_remove_phi_alternative): New function.
16644169689Skan	* tree-ssa-ccp.c (optimize_unexecutable_edges): Remove
16645169689Skan	PHI alternatives for unexecutable edges.  Also remove
16646169689Skan	unexecutable edges from the CFG.
16647169689Skan
16648169689Skan2002-08-22  Jeffrey A Law  (law@redhat.com)
16649169689Skan
16650169689Skan	* Makefile.in (tree-optimize.o): Depend on tree-dchain.o
16651169689Skan	* tree-optimize.c: Include tree-dchain.h.
16652169689Skan	(optimize_function_tree): Unconditionally build and tear down
16653169689Skan	the backpointers for the statement chain.
16654169689Skan
16655169689Skan2002-08-22  Diego Novillo  <dnovillo@redhat.com>
16656169689Skan
16657169689Skan	* tree-dfa.c (find_refs_in_stmt): Look for VARUSE references in
16658169689Skan	initialization expressions.
16659169689Skan	(find_refs_in_expr): Reformat.
16660169689Skan	(remove_ref_from_list): Optimize for the common case of removing
16661169689Skan	the head or the tail of the list.
16662169689Skan	(add_ref_to_list_end): Reformat comment.
16663169689Skan	(create_ref): Store the reference to LHS of assignment expressions.
16664169689Skan	(dump_varref): Also dump immediate uses of PHI nodes.
16665169689Skan	* tree-flow.h (IS_GHOST_DEF): Rename to IS_DEFAULT_DEF.  Update all
16666169689Skan	callers everywhere.
16667169689Skan	(struct tree_ann_def): Update comments for field 'currdef'.
16668169689Skan	* tree-ssa-ccp.c (ssa_edges): Change type to ref_list.
16669169689Skan	(SSA_NAME): Remove.
16670169689Skan	(initialize): New function
16671169689Skan	(finalize): New function.
16672169689Skan	(visit_expression): Rename to visit_expression_for.  Update all
16673169689Skan	callers.
16674169689Skan	(visit_condexpr_for): New function.
16675169689Skan	(visit_assignment): Rename to visit_assignment_for.  Update all
16676169689Skan	callers.
16677169689Skan	(examine_flow_edges): Rename to simulate_block.  Update all
16678169689Skan	callers.
16679169689Skan	(follow_def_use_chains): Rename to simulate_def_use_chains.  Update
16680169689Skan	all callers.
16681169689Skan	(evaluate_expr_for): Rename to evaluate_expr.  Change argument to
16682169689Skan	'tree'.
16683169689Skan	(set_lattice_value): New function.
16684169689Skan	(tree_ssa_ccp): Change main loop to visit flow_edges and ssa_edges
16685169689Skan	alternately.
16686169689Skan	(visit_phi_node): Do not set the lattice value to UNDEFINED when we
16687169689Skan	find a non-executable edge.
16688169689Skan	(visit_expression_for): Default definitions for PARM_DECLs are
16689169689Skan	assigned a VARYING value.
16690169689Skan	Default definitions for any other local variables are assigned an
16691169689Skan	UNDEFINED value.
16692169689Skan	Clobber VARDEFs that are not the LHS of an assignment.
16693169689Skan	Clobber VARDEFs that initialize non-const static variables.
16694169689Skan	* tree-ssa.c (search_fud_chains): Set up def-use edges for PHI
16695169689Skan	nodes and regular definitions.
16696169689Skan
16697169689Skan	* tree.c (simple_cst_equal): Call simple_cst_list_equal to compare
16698169689Skan	CONSTRUCTOR_ELTS pointers.
16699169689Skan
16700169689Skan2002-08-22  Diego Novillo  <dnovillo@redhat.com>
16701169689Skan
16702169689Skan	* c-pretty-print.c (buffer): New file local variable.
16703169689Skan	(initialized): New file local variable.
16704169689Skan	(print_c_tree): Don't call init_output_buffer.  Call
16705169689Skan	maybe_init_pretty_print.
16706169689Skan	(print_c_node): Ditto.
16707169689Skan	(print_c_node_brief): Ditto.
16708169689Skan	(maybe_init_pretty_print): New function.
16709169689Skan	* tree-mudflap.c (mf_varname_tree): Only call init_output_buffer
16710169689Skan	once.  Call output_clear_message_text before returning.
16711169689Skan
16712169689Skan2002-08-21  Frank Ch. Eigler  <fche@redhat.com>
16713169689Skan
16714169689Skan	Support source-file/line coordinates in check/violation messages.
16715169689Skan	* tree-mudflap.c (mf_init_extern_trees): Add new "location" formal
16716169689Skan	arg to __mf_check.
16717169689Skan	(mf_file_function_line_tree): New function to build an actual location
16718169689Skan	string.
16719169689Skan	(build_check_statement_for): Call it / pass it.
16720169689Skan	(mx_xfn_indirect_ref): Track source file/line location via
16721169689Skan	STMT_LINENO, FILE_STMT, EXPR_WITH_FILE_LOCATION traversal memos.
16722169689Skan
16723169689Skan2002-08-21  Daniel Berlin  <dberlin@dberlin.org>
16724169689Skan
16725169689Skan	* dominance.c: Cache immediate dominators.
16726169689Skan
16727169689Skan2002-08-20  Daniel Berlin  <dberlin@dberlin.org>
16728169689Skan
16729169689Skan	* tree-alias-steen.h (struct tree_alias_ops): Add flag for
16730169689Skan	interprocedural.
16731169689Skan
16732169689Skan	* tree-alias-steen.c (steen_alias_ops): Set interprocedural to 0
16733169689Skan	for now.
16734169689Skan	(intra_function_call): New function to handle intraprocedural calling.
16735169689Skan	(finc_func_aliases): Use it.
16736169689Skan	Handle *x = *y, *x = &y, and *x = (cast) y.
16737169689Skan	(display_points_to_set_helper): New function, split from ...
16738169689Skan	(display_points_to_set): Here.
16739169689Skan	(create_alias_vars): Try to print all alias vars we find in the
16740169689Skan	alias_vars array, rather than just those that are linked directly to
16741169689Skan	trees.
16742169689Skan	Clear arrays when we finish if we aren't interprocedural.
16743169689Skan
16744169689Skan2002-08-20  Frank Ch. Eigler  <fche@redhat.com>
16745169689Skan
16746169689Skan	static object registration support:
16747169689Skan	* tree-mudflap.c (mudflap_enqueue_decl, mudflap_enqueue_constant):
16748169689Skan	Replace stubs with real code.
16749169689Skan	(mf_enqueue_register_call): New function to generate asm-object
16750169689Skan	call to __mf_register.
16751169689Skan	(mf_flush_enqueued_calls): New function to emit global ctor function
16752169689Skan	with enqueued __mf_register calls.
16753169689Skan	(mf_varname_tree): Tolerate being called from non-function context.
16754169689Skan	* c-objc-common.c: #include <tree-mudflap.h>.
16755169689Skan
16756169689Skan	gengtypes support for mudflap:
16757169689Skan	* Makefile.in (GTFILES): Include tree-mudflap.c.
16758169689Skan	(gt-tree-mudflap.h): New target.
16759169689Skan	* tree-mudflap.c: Annotate global tree nodes with GTY(()).
16760169689Skan	* tree-nomudflap.c: Add dummy ggc root table.
16761169689Skan
16762169689Skan2002-08-19  Diego Novillo  <dnovillo@redhat.com>
16763169689Skan
16764169689Skan	* tree-dfa.c (find_refs_in_expr): If the current sub-expression is
16765169689Skan	not SIMPLE, mark its parent.
16766169689Skan	(create_ref): If the parent expression is not SIMPLE, create
16767169689Skan	VARDEFs regardless of the original reference type.
16768169689Skan
16769169689Skan	* tree-ssa-ccp.c (widen_bitfield): New function.
16770169689Skan	(evaluate_expr_for): Call it.
16771169689Skan
16772169689Skan2002-08-18  Diego Novillo  <dnovillo@redhat.com>
16773169689Skan
16774169689Skan	* tree-ssa-ccp.c (evaluate_expr_for): Fix thinko in
16775169689Skan	2002-08-17 patch.
16776169689Skan
16777169689Skan2002-08-17  Diego Novillo  <dnovillo@redhat.com>
16778169689Skan
16779169689Skan	* tree-ssa-ccp.c (evaluate_expr_for): keep VARREF_SYM in a local
16780169689Skan	variable.
16781169689Skan
16782169689Skan2002-08-16  Diego Novillo  <dnovillo@redhat.com>
16783169689Skan
16784169689Skan	* basic-block.h (BB_CONTROL_EXPR): Update value.
16785169689Skan	(BB_LOOP_CONTROL_EXPR): Define.
16786169689Skan	(BB_CONTROL_ENTRY): Update value.
16787169689Skan	* tree-cfg.c (make_for_stmt_blocks): Flag header blocks withh
16788169689Skan	BB_LOOP_CONTROL_EXPR.
16789169689Skan	(make_while_stmt_blocks): Ditto.
16790169689Skan	(make_do_stmt_blocks): Ditto.
16791169689Skan	(tree_delete_bb): Update annotations in the loop entry block when
16792169689Skan	removing one of the loop expression blocks.
16793169689Skan
16794169689Skan	* tree-dfa.c (tree_find_varrefs): Disregard empty blocks.
16795169689Skan	(find_refs_in_stmt): Handle all the loop expression blocks in
16796169689Skan	FOR_STMT and DO_STMT nodes.
16797169689Skan	(find_refs_in_expr): Change first argument to tree *.  Update all
16798169689Skan	callers.
16799169689Skan	Force all references to be definitions when the expression is not
16800169689Skan	in SIMPLE form.
16801169689Skan	Also create references for compound variables and array references.
16802169689Skan	Not just their individual components.
16803169689Skan	Always use the original parent expression when making recursive
16804169689Skan	calls.
16805169689Skan	(create_ref): Add new argument operand_p.  Update all callers.
16806169689Skan	(remove_tree_ann): New function.
16807169689Skan	(dump_varref): Don't assume that the referenced symbol is a _DECL
16808169689Skan	node.
16809169689Skan	* tree-flow.h (treeref_common): Add field operand_p.
16810169689Skan	(VARREF_OPERAND_P): Define.
16811169689Skan	(BB_EMPTY_P): Define.
16812169689Skan	(remove_tree_ann): Declare.
16813169689Skan	(create_ref): Add new argument operand_p.
16814169689Skan	* tree-simple.c (get_base_symbol): New function.
16815169689Skan	* tree-simple.h (get_base_symbol): Declare.
16816169689Skan	* tree-ssa-ccp.c (visit_assignment): Call it.
16817169689Skan	(ssa_ccp_substitute_constants): Use VARREF_OPERAND_P to replace
16818169689Skan	values into the expression.
16819169689Skan	(evaluate_expr_for): Ditto.
16820169689Skan	Do not try to evaluate the expression if the reference is not of
16821169689Skan	the same type as the expression.
16822169689Skan	After evaluation, restore the expression to its original form.
16823169689Skan	* tree-ssa-pre.c (insert_occ_in_preorder_dt_order_): Update calls
16824169689Skan	to create_ref.
16825169689Skan	(finalize_): Ditto.
16826169689Skan	(expr_phi_insertion): Ditto.
16827169689Skan	* tree-ssa.c (tree_build_ssa): Ditto.
16828169689Skan	(insert_phi_terms): Ditto.
16829169689Skan	(delete_ssa): Call remove_tree_ann.
16830169689Skan
16831169689Skan2002-08-15  Diego Novillo  <dnovillo@redhat.com>
16832169689Skan
16833169689Skan	* c-pretty-print.c: Move extern definitions to diagnostic.h.
16834169689Skan	(print_c_node_brief): New function.
16835169689Skan	(debug_c_node_brief): New function.
16836169689Skan	(debug_c_node): Add option for showing brief versions of statement
16837169689Skan	nodes.  Update all callers.
16838169689Skan	(print_declaration): Ditto.
16839169689Skan	* c-simplify.c (simplify_function_tree): Add newline to debug
16840169689Skan	output.
16841169689Skan	* c-tree.h (print_c_node_brief): Declare.
16842169689Skan	(debug_c_node_brief): Declare.
16843169689Skan	* tree-cfg.c: Call print_c_node_brief in debugging otuput.
16844169689Skan	* tree-mudflap.c (dump_c_node): Remove extern declaration.
16845169689Skan	(mf_varname_tree): Update call to dump_c_node.
16846169689Skan
16847169689Skan2002-08-15  Daniel Berlin  <dberlin@dberlin.org>
16848169689Skan
16849169689Skan	* tree-cfg.c (find_expr_in_tree_helper): Renamed from find_expr_in_tree.
16850169689Skan	(find_expr_in_tree): Redone.
16851169689Skan
16852169689Skan2002-08-15  Daniel Berlin  <dberlin@dberlin.org>
16853169689Skan
16854169689Skan	* tree-cfg.c (insert_before_ctrl_stmt): Fix insertion for various
16855169689Skan	parts of for loop.
16856169689Skan
16857169689Skan	* tree-ssa-pre.c (finalize_1): Set EXPR_STMT type to type of
16858169689Skan	expression in it.
16859169689Skan
16860169689Skan2002-08-14  Frank Ch. Eigler  <fche@redhat.com>
16861169689Skan
16862169689Skan	* gcc.c (LINK_COMMAND_SPEC): Tweak placement of %(mflib).
16863169689Skan
16864169689Skan2002-08-14  Diego Novillo  <dnovillo@redhat.com>
16865169689Skan
16866169689Skan	* tree-simple.h (is_simple_decl_stmt): Declare.
16867169689Skan
16868169689Skan2002-08-13  Frank Ch. Eigler  <fche@redhat.com>
16869169689Skan
16870169689Skan	* gcc.c (MFWRAP_SPEC, MFLIB_SPEC): New macros, splitting MFLIB_SPEC.
16871169689Skan	(mfwrap_spec, mflib_spec): Define corresponding vars.
16872169689Skan	(static_specs): Define correponding spec aliases.
16873169689Skan	(LINK_COMMAND_SPEC): Include -fmudflap refs to new spec aliases.
16874169689Skan	(cpp_unique_options): Move -fmudflap MFCPP_SPEC clause here.
16875169689Skan	(cc1_options): Move -fmudflap MFCC1_SPEC clause here.
16876169689Skan	(MFCC1_SPEC, MFCPP_SPEC, MFLIB_SPEC): Remove macros and uses.
16877169689Skan
16878169689Skan2002-08-13  Graydon Hoare  <graydon@redhat.com>
16879169689Skan
16880169689Skan	* tree-mudflap.c (mf_build_check_statement_for): Factor code out of
16881169689Skan	mx_xfn_indirect_ref for use in ARRAY_REF case.
16882169689Skan	(mf_build_check_statement_for): Check size of underlying object
16883169689Skan	rather than size of pointer.
16884169689Skan	(mx_xfn_indirect_ref): Check ARRAY_REF expressions.
16885169689Skan	(mf_offset_expr_of_array_ref): New function to calculate array ref
16886169689Skan	offsets.
16887169689Skan
16888169689Skan2002-08-13  Diego Novillo  <dnovillo@redhat.com>
16889169689Skan
16890169689Skan	* tree-simple.c (is_simple_condexpr): Update comment.
16891169689Skan	* tree-ssa-ccp.c (ssa_ccp_substitute_constants): Add debugging code.
16892169689Skan
16893169689Skan2002-08-12  Jason Merrill  <jason@redhat.com>
16894169689Skan
16895169689Skan	* c-typeck.c (build_component_ref): Don't add a NON_LVALUE_EXPR
16896169689Skan	in C99 mode.
16897169689Skan
16898169689Skan	* c-simplify.c (simplify_expr): Always simplify.  Loop if *expr_p
16899169689Skan	changed.
16900169689Skan	(simplify_addr_expr): Just replace *expr_p if we have a '&*'.
16901169689Skan	* tree-simple.c (is_simplifiable_builtin): Add more tree codes.
16902169689Skan
16903169689Skan2002-08-11  Diego Novillo  <dnovillo@redhat.com>
16904169689Skan
16905169689Skan	* c-simplify.c: Fix typo.  Substitute CHECKING with ENABLE_CHECKING.
16906169689Skan	* tree-cfg.c: Ditto.
16907169689Skan	* tree-dfa.c: Ditto.
16908169689Skan	* tree-ssa-ccp.c: Ditto.
16909169689Skan	* tree-ssa.c: Ditto.
16910169689Skan
16911169689Skan2002-08-11  Diego Novillo  <dnovillo@redhat.com>
16912169689Skan
16913169689Skan	* tree-dfa.c (find_refs_in_expr): Use the given ref_type for some unary
16914169689Skan	expressions.
16915169689Skan	(create_ref): Insert ghost definitions at the beginning of the
16916169689Skan	basic block.
16917169689Skan	(find_expr_in_tree): Ignore IDENTIFIER_NODE.
16918169689Skan	* tree-flow.h (treeref_common): Move the id field to the end of the
16919169689Skan	structure.
16920169689Skan	(IS_GHOST_DEF): Redefine to return non zero for definitions
16921169689Skan	without an associated expression in basic block 0.
16922169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Use last_basic_block to allocate
16923169689Skan	executable_blocks.
16924169689Skan	(visit_expression): Set the lattice value for ghost definitions to
16925169689Skan	VARYING.
16926169689Skan	(examine_flow_edges): Update comments.
16927169689Skan	* tree-ssa.c (tree_build_ssa): Create ghost definitions in basic
16928169689Skan	block 0.
16929169689Skan	(insert_phi_terms): Don't ignore ghost definitions.
16930169689Skan
16931169689Skan	* c-simplify.c (simplify_function_tree): Return 0 if the function's
16932169689Skan	body is not a COMPOUND_STMT.
16933169689Skan	Return 0 if simplification failed.
16934169689Skan	(simplify_expr): Change to return int.  Return non zero if
16935169689Skan	simplification was successful.
16936169689Skan	(c_simplify_expr): Add default case to avoid compile time warnings.
16937169689Skan	(create_tmp_alias_var): Reformat comment.
16938169689Skan	* tree-simple.h (simplify_expr): Change return type to int.
16939169689Skan
16940169689Skan	* c-simplify.c: Guard consistency checks with #if defined CHECKING
16941169689Skan	everywhere.
16942169689Skan	* tree-cfg.c: Ditto.
16943169689Skan	* tree-dfa.c: Ditto.
16944169689Skan	* tree-ssa-ccp.c: Ditto.
16945169689Skan	* tree-ssa.c: Ditto.
16946169689Skan
16947169689Skan	* c-simplify.c: Include hard-reg-set.h, basic-block.h and
16948169689Skan	tree-flow.h.
16949169689Skan	(mark_not_simple_r): New function.
16950169689Skan	(simplify_expr): Temporarily mark VA_ARG_EXPR and BIT_FIELD_REF
16951169689Skan	trees as not simplifiable.
16952169689Skan	(simplify_call_expr): If the builtin cannot be simplified, flag it.
16953169689Skan	* Makefile.in (c-simplify.o): Update dependencies.
16954169689Skan	* tree-dfa.c (create_ref): Variable references inside
16955169689Skan	non-simplifiable expressions are always considered definitions.
16956169689Skan	* tree-flow.h (TF_NOT_SIMPLE): New flag.
16957169689Skan	* tree-simple.c (is_simplifiable_builtin): Update comments.
16958169689Skan
16959169689Skan	* c-pretty-print.c (dump_c_node): Unparse anonymous structures and
16960169689Skan	unions.
16961169689Skan	Change rendering for SAVE_EXPR and BIT_FIELD_REF.
16962169689Skan
16963169689Skan	* Makefile.in (tree-mudflap.o, tree-nomudflap.o): Add.
16964169689Skan
16965169689Skan2002-08-11  Frank Ch. Eigler  <fche@redhat.com>
16966169689Skan
16967169689Skan	Prototype -fmudflap support.
16968169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add tree-mudflap.o.
16969169689Skan	(OBJS): Add tree-nomudflap.o.
16970169689Skan	* flags.h (flag_mudflap): New flag.
16971169689Skan	* toplev.c: Map "-fmudflap" to that flag.
16972169689Skan	* c-decl.c (c_expand_body): Call mudflap_c_function if flag_mudflap.
16973169689Skan	* c-objc-common.c (c_objc_common_finish_file): Add mudflap hook.
16974169689Skan	* varasm.c (make_decl_rtl): Add mudflap hook.
16975169689Skan	(output_constant_def_contents): Ditto.
16976169689Skan	* tree-mudflap.c: New file: implement mudflap instrumentation.
16977169689Skan	* tree-nomudflap.c: New file: stub functions for non-C frontends.
16978169689Skan	* tree-mudflap.h: New file: define exported functions.
16979169689Skan	* gcc.c (MFLIB_SPEC, MFCC1_SPEC, MFCPP_SPEC): Add general
16980169689Skan	-fmudflap spec mappings.
16981169689Skan	* c-simplify.c (simplify_stmt): Stub: handle CLEANUP_STMT nodes.
16982169689Skan	* tree-dfa.c (find_refs_in_stmt): Ditto.
16983169689Skan	* c-pretty-print.c (dump_c_node): Ditto.
16984169689Skan	(print_declaration): Handle "extern" decls.  Handle arrays with
16985169689Skan	indefinite sizes.
16986169689Skan	* tree-simple.h (is_simple_stmt, is_simple_compstmt): Remove decls.
16987169689Skan
16988169689Skan2002-08-11  Jason Merrill  <jason@redhat.com>
16989169689Skan
16990169689Skan	* c-simplify.c (simplify_self_mod_expr): Unshare the lhs before
16991169689Skan	using it again.
16992169689Skan	(simplify_compound_lval): Don't unshare.
16993169689Skan
16994169689Skan	* c-simplify.c (c_simplify_expr): Check statement_code_p.
16995169689Skan
16996169689Skan	* c-simplify.c (maybe_fixup_loop_cond): Move to cp/cp-simplify.c.
16997169689Skan	(simplify_for_stmt): Don't call it.
16998169689Skan	(simplify_while_stmt): Don't call it.
16999169689Skan
17000169689Skan2002-08-11  Diego Novillo  <dnovillo@redhat.com>
17001169689Skan
17002169689Skan	* c-simplify.c (simplify_compound_lval): Use mostly_copy_tree_r.
17003169689Skan
17004169689Skan2002-08-09  Jason Merrill  <jason@redhat.com>
17005169689Skan
17006169689Skan	* langhooks-def.h: Replace the simplify_function_tree hook
17007169689Skan	with a simplify_expr hook.
17008169689Skan	* langhooks.h: Likewise.
17009169689Skan	* langhooks.c: Replace lhd_simplify_function_tree with
17010169689Skan	lhd_simplify_expr.
17011169689Skan	* c-lang.c (LANG_HOOKS_SIMPLIFY_FUNCTION_TREE): Don't define.
17012169689Skan	(LANG_HOOKS_SIMPLIFY_EXPR): Define.
17013169689Skan	* c-decl.c (c_expand_body): De-hook simplify_function_tree.
17014169689Skan	* c-common.h: Declare c_simplify_expr.
17015169689Skan	* c-simplify.c (simplify_function_tree): Rename from
17016169689Skan	c_simplify_function_tree.  Call simplify_expr instead of
17017169689Skan	simplify_stmt.
17018169689Skan	(c_simplify_expr): Split out from...
17019169689Skan	(simplify_expr): ...here.  No longer static.  Call langhook.
17020169689Skan	(is_simple_decl_stmt): Move here from tree-simple.c.
17021169689Skan	* tree-simple.c: Don't include c-tree.h.
17022169689Skan	(is_simple_stmt, is_simple_compstmt): Remove.
17023169689Skan	(is_simple_decl_stmt): Move to c-simplify.c.
17024169689Skan	* tree.h: Declare simplify_function_tree.
17025169689Skan	* tree-simple.h: Declare simplify_expr, add_tree.
17026169689Skan
17027169689Skan	* tree-simple.c (rationalize_compound_expr): New fn.
17028169689Skan
17029169689Skan2002-08-07  Diego Novillo  <dnovillo@redhat.com>
17030169689Skan
17031169689Skan	* basic-block.h (EDGE_TRUE_VALUE): Define.
17032169689Skan	(EDGE_FALSE_VALUE): Define.
17033169689Skan	* tree-cfg.c: Include c-tree.h.
17034169689Skan	(make_for_stmt_edges): Call simple_cst_equal to determine infinite
17035169689Skan	and zero iteration loops.
17036169689Skan	Set EDGE_TRUE_VALUE and EDGE_FALSE_VALUE to edges coming out of
17037169689Skan	predicate block.
17038169689Skan	(make_while_stmt_edges): Ditto.
17039169689Skan	(make_do_stmt_edges): Ditto.
17040169689Skan	(make_if_stmt_edges): Set EDGE_TRUE_VALUE and EDGE_FALSE_VALUE to
17041169689Skan	edges coming out of predicate block.
17042169689Skan
17043169689Skan	* c-simplify.c (simplify_compound_lval): Unshare the compound
17044169689Skan	reference before simplification.
17045169689Skan
17046169689Skan	* tree-cfg.c (insert_before_ctrl_stmt): Call print_c_node instead of
17047169689Skan	print_node_brief.
17048169689Skan	(insert_before_normal_stmt): Ditto.
17049169689Skan	(insert_after_ctrl_stmt): Ditto.
17050169689Skan	(insert_after_normal_stmt): Ditto.
17051169689Skan	(insert_after_loop_body): Ditto.
17052169689Skan	(replace_expr_in_tree): Ditto.
17053169689Skan	(tree_dump_bb): Ditto.
17054169689Skan
17055169689Skan	* tree-dfa.c: Include c-tree.h
17056169689Skan	(next_varref_id): New global variable.
17057169689Skan	(tree_find_varrefs): Initialize it to 0.
17058169689Skan	(create_ref): Increment it after creating a new reference.  Store
17059169689Skan	it in ref.common.id.
17060169689Skan	Add the new reference to the list of references for the containing
17061169689Skan	expression.
17062169689Skan	(dump_varref): Show the reference ID.
17063169689Skan	* tree-flow.h (treeref_common): Add field 'id'.
17064169689Skan	(VARREF_ID): Define.
17065169689Skan
17066169689Skan	* tree-dump.c (dump_files): Re-order dump files.
17067169689Skan	* tree.h (tree_dump_index): Ditto.
17068169689Skan
17069169689Skan	* tree-optimize.c (optimize_function_tree): Remove blank lines.
17070169689Skan
17071169689Skan	* tree-simple.c: Remove unary operator '!' from grammar.
17072169689Skan
17073169689Skan	* tree-flow.h (tree_ann_def): Add field 'flags'.
17074169689Skan	(TF_FOLD): Define.
17075169689Skan	(TREE_ANN): Re-define into an lvalue.
17076169689Skan	(BB_FOR_STMT): Ditto.
17077169689Skan	(TREE_CURRDEF): Ditto.
17078169689Skan	(next_varref_id): Declare.
17079169689Skan	* tree-ssa-ccp.c: Include tree-simple.h
17080169689Skan	(ssa_edges): Convert sbitmap into varray_type.  Update all uses.
17081169689Skan	(decl_map): Remove.
17082169689Skan	(SSA_NAME): Use VARREF_ID instead of DECL_UID.
17083169689Skan	(visit_assignment): New function.
17084169689Skan	(evaluate_expr_for): New function.
17085169689Skan	(dump_lattice_value): New function.
17086169689Skan	(tree_ssa_ccp): Add debugging dumps.
17087169689Skan	Remove #if 0 code everywhere.
17088169689Skan	(visit_phi_node): Add debugging dumps.
17089169689Skan	Also visit PHI arguments.
17090169689Skan	Remove basic block argument
17091169689Skan	(visit_expression): Re-implement.
17092169689Skan	(examine_flow_edges): Add debugging dumps.
17093169689Skan	(ssa_ccp_substitute_constants): Add debugging dumps.
17094169689Skan	Update comments.
17095169689Skan	Mark and fold expressions with substituted constants.
17096169689Skan	* tree-ssa.c (search_fud_chains): Don't check if BB_REFS(bb) is
17097169689Skan	empty before iterating.
17098169689Skan	Add comment explaining how we chain PHI node arguments to their
17099169689Skan	originating basic block.
17100169689Skan
17101169689Skan	* Makefile.in (tree-cfg.o, tree-dfa.o, tree-ssa-ccp.o): Update
17102169689Skan	dependencies.
17103169689Skan
17104169689Skan2002-07-29  Daniel Berlin  <dberlin@dberlin.org>
17105169689Skan
17106169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Ben forgot to add a
17107169689Skan	dump_begin call when he removed the before dump.
17108169689Skan
17109169689Skan2002-07-24  Daniel Berlin  <dberlin@dberlin.org>
17110169689Skan
17111169689Skan	* tree-alias-ecr.c (ECR_new_with_type): Use correct number in mapping.
17112169689Skan
17113169689Skan2002-07-23  Daniel Berlin  <dberlin@dberlin.org>
17114169689Skan
17115169689Skan	* c-simplify.c (simplify_for_stmt): Deep copy the result of the
17116169689Skan	tail_expression, so it's unshared.
17117169689Skan
17118169689Skan2002-07-23  Daniel Berlin  <dberlin@dberlin.org>
17119169689Skan
17120169689Skan	* tree-flow.h: Add prototype for create_alias_vars.
17121169689Skan
17122169689Skan	* tree-alias-steen.c (display_points_to_set): New function.
17123169689Skan	(init_alias_vars): Display points to sets when we are done.
17124169689Skan
17125169689Skan	* disjoint-set.h (disjoint_set_def): ptr_alias to ECR_def so that
17126169689Skan	we mark parent properly.
17127169689Skan
17128169689Skan2002-07-24  Diego Novillo  <dnovillo@redhat.com>
17129169689Skan
17130169689Skan	* Makefile.in (GTFILES): Move tree-alias-type.[ch],
17131169689Skan	tree-alias-ecr.[ch], tree-alias-steen.[ch] from ...
17132169689Skan	* c-config-lang.in (gtfiles): ... here.
17133169689Skan
17134169689Skan	* tree-simple.c (is_simplifiable_builtin): Replace
17135169689Skan	BUILT_IN_VARARGS_START with BUILT_IN_VA_START.
17136169689Skan
17137169689Skan2002-07-23  Andreas Jaeger  <aj@suse.de>
17138169689Skan
17139169689Skan	* tree-ssa-pre.c (hash_expr_tree): Remove.
17140169689Skan
17141169689Skan	* c-call-graph.c (write_dtd): Remove.
17142169689Skan
17143169689Skan	* tree-ssa.c (delete_refs): Remove.
17144169689Skan
17145169689Skan2002-07-23  Andreas Jaeger  <aj@suse.de>
17146169689Skan
17147169689Skan	* gengtype.c (open_base_files): Add tree.h.
17148169689Skan
17149169689Skan	* tree-alias-type.h: Remove inclusion of tree.h.
17150169689Skan
17151169689Skan	* tree-alias-steen.c: Include tree.h.
17152169689Skan	Add prototype for create_fun_alias_var_ptf.
17153169689Skan
17154169689Skan	* tree-alias-ecr.c: Add prototype for ECR_add_pending.
17155169689Skan
17156169689Skan	* tree-ssa-pre.c (calculate_preorder): Remove unused variables.
17157169689Skan
17158169689Skan	* tree-simple.c: Include expr.h and rtl.h for prototypes.
17159169689Skan
17160169689Skan	* tree-optimize.c: Include tree-alias-steen.h for prototypes.
17161169689Skan
17162169689Skan	* Makefile.in (tree-optimize.o): Add tree-alias-steen.h.
17163169689Skan	(tree-simple.o): Add expr.h and rtl.h.
17164169689Skan	(tree-alias-steen.o): Add tree.h.
17165169689Skan
17166169689Skan	* diagnostic.h: Add declaration of debug_output_buffer.
17167169689Skan
17168169689Skan	* c-call-graph.c (construct_call_graph): Make static to follow
17169169689Skan	declaration.
17170169689Skan	(construct_call_graph): Use #if 0 instead of C++ comments to
17171169689Skan	disable code.
17172169689Skan
17173169689Skan2002-07-20  Andreas Jaeger  <aj@suse.de>
17174169689Skan
17175169689Skan	* doc/invoke.texi (Option Summary): Fix syntax.
17176169689Skan
17177169689Skan2002-07-19  Jason Merrill  <jason@redhat.com>
17178169689Skan
17179169689Skan	* c-simplify.c (simplify_return_stmt): Do simplify a returned
17180169689Skan	expression in a void function.
17181169689Skan
17182169689Skan	* c-simplify.c (simplify_stmt_expr): Handle C++ return semantics.
17183169689Skan
17184169689Skan2002-07-19  Jason Merrill  <jason@redhat.com>
17185169689Skan
17186169689Skan	* c-pretty-print.c (dump_c_node) [TARGET_EXPR]: Handle.
17187169689Skan	[COND_EXPR]: Print a returned expression in a void function.
17188169689Skan
17189169689Skan2002-07-19  Ben Elliston  <bje@redhat.com>
17190169689Skan
17191169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Don't dump the original
17192169689Skan	tree before applying this optimisation.
17193169689Skan
17194169689Skan	* flags.h (flag_dump_tree_all_ssa): New flag.
17195169689Skan	* toplev.c (flag_dump_tree_all_ssa): New flag.
17196169689Skan	(f_options): Add "dump-tree-all-ssa" option.
17197169689Skan	(process_options): Process flag_dump_tree_all_ssa.
17198169689Skan	* tree.h (dump_enable_all_ssa): Declare.
17199169689Skan	* tree-dump.c (dump_enable_all_ssa): New function.
17200169689Skan	* doc/invoke.texi (Option Summary): Add -fdump-tree-all-ssa and
17201169689Skan	-fdump-tree-ssapre options.
17202169689Skan	(Debugging Options): Describe in more detail.
17203169689Skan	* c-simplify.c (c_simplify_function_tree): Dump the original tree
17204169689Skan	only if a TDI_original dump is requested, rather than TDI_simple.
17205169689Skan
17206169689Skan	* tree-dump.c (dump_begin): Include phase number in dump filename.
17207169689Skan
17208169689Skan2002-07-18  Ben Elliston  <bje@redhat.com>
17209169689Skan
17210169689Skan	* tree-dump.c (dump_files): Rename "unparse" to "raw".
17211169689Skan	* tree.h (TDF_UNPARSE): Rename from this ..
17212169689Skan	(TDF_RAW): .. to this.
17213169689Skan	* tree-ssa-pre.c (tree_perform_ssapre): Use TDF_RAW and invert the
17214169689Skan	logical sense of this flag.
17215169689Skan	* tree-ssa-ccp.c (tree_ssa_ccp): Likewise.
17216169689Skan	* c-simplify.c (c_simplify_function_tree): Likewise.
17217169689Skan
17218169689Skan2002-07-18  Daniel Berlin  <dberlin@dberlin.org>
17219169689Skan
17220169689Skan	* tree-ssa-pre.c (calculate_preorder): New function.
17221169689Skan	(tree_perform_ssapre): Use it, rather than
17222169689Skan	flow_compute_preorder_tranversal, which seems to not do
17223169689Skan	what we want.
17224169689Skan
17225169689Skan2002-07-18  Daniel Berlin <dberlin@dberlin.org>
17226169689Skan
17227169689Skan	* tree-alias-type.c: Move gt-tree-alias-type include to end of file.
17228169689Skan
17229169689Skan	* tree-alias-steen.c: Move gt-tree-alias-steen include to end of file.
17230169689Skan
17231169689Skan2002-07-18  Daniel Berlin  <dberlin@dberlin.org>
17232169689Skan
17233169689Skan	* gengtype.c (get_base_file_bitmap): Mark tree-alias-* and
17234169689Skan	disjoint-set* as c/c++/objc files only.
17235169689Skan
17236169689Skan	* Makefile.in (gt-tree-alias-type.h): Add.
17237169689Skan	(tree-alias-type.o): Add dependency on gt-tree-alias-type.h.
17238169689Skan
17239169689Skan	* tree-alias-type.c: Include gt-tree-alias-type.h.
17240169689Skan	(alias_bottom): Add a GTY marked version of alias_bottom here.
17241169689Skan
17242169689Skan	* tree-alias-type.h: Remove the GTY marker from alias_bottom.
17243169689Skan
17244169689Skan2002-07-17  Daniel Berlin  <dberlin@dberlin.org>
17245169689Skan
17246169689Skan	* tree-alias-ecr.c (ECR_union_pending_sets): Only clear bitmap if
17247169689Skan	it's not NULL.
17248169689Skan
17249169689Skan2002-07-16  Jason Merrill  <jason@redhat.com>
17250169689Skan
17251169689Skan	* c-simplify.c (add_tree): Build an EXPR_STMT immediately.
17252169689Skan	(convert_to_stmt_chain): Remove.
17253169689Skan	(simplify_stmt, simplify_for_stmt, simplify_while_stmt,
17254169689Skan	simplify_do_stmt, simplify_expr_wfl, tail_expression): Adjust.
17255169689Skan
17256169689Skan2002-07-17  Daniel Berlin  <dberlin@dberlin.org>
17257169689Skan
17258169689Skan	* tree-alias-ecr.c: New file. Equivalence Class Representation.
17259169689Skan
17260169689Skan	* tree-alias-steen.c: New file. Steengaard Alias Analysis.
17261169689Skan
17262169689Skan	* disjoint-set.c: New file. Disjoint set data structure.
17263169689Skan
17264169689Skan	* tree-alias-type.c: New file. Alias types.
17265169689Skan
17266169689Skan	* c-simplify.c (create_tmp_alias_var): New function, like
17267169689Skan	create_tmp_var, but doesn't add it to the current binding.
17268169689Skan
17269169689Skan	* tree-simple.h: Prototype for create_tmp_alias_var.
17270169689Skan
17271169689Skan	* tree-optimize.c (build_tree_ssa): Create alias variables, if
17272169689Skan	requested.
17273169689Skan
17274169689Skan	* flags.h: Add flag_tree_points_to.
17275169689Skan
17276169689Skan	* toplev.c: Ditto.
17277169689Skan
17278169689Skan	* gengtype.c (open_base_files): Add disjoint-set.h,
17279169689Skan	tree-alias-ecr.h, tree-alias-type.h, tree-flow.h.
17280169689Skan
17281169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add disjoint-set.o,
17282169689Skan	tree-alias-ecr.o, tree-alias-type.o, tree-alias-steen.o.
17283169689Skan	(tree-alias-steen.o): Add dependencies.
17284169689Skan	(tree-alias-ecr.o): Ditto.
17285169689Skan	(tree-alias-type.o): Ditto.
17286169689Skan	(disjoint-set.o): Ditto.
17287169689Skan
17288169689Skan2002-07-10  Daniel Berlin  <dberlin@dberlin.org>
17289169689Skan	    Diego Novillo  <dnovillo@redhat.com>
17290169689Skan
17291169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add tree-ssa-ccp.o
17292169689Skan	* flags.h (flag_tree_ssa_ccp): Declare.
17293169689Skan	* fold-const.c (eval_subst): Make extern.
17294169689Skan	* toplev.c (flag_tree_ssa_ccp): Define.
17295169689Skan	(f_options): Document -ftree-ssa-ccp.
17296169689Skan	* tree-dump.c (dump_files): Add -fdump-tree-ccp.
17297169689Skan	* tree-flow.h (tree_perform_ssapre): Move declaration ...
17298169689Skan	* tree-optimize.h: ... here.
17299169689Skan	(tree_ssa_ccp): Declare.
17300169689Skan	* tree-optimize.c (optimize_function_tree): Call tree_ssa_ccp.
17301169689Skan	* tree-ssa-ccp.c: New file.
17302169689Skan	* tree.c (next_decl_uid): Remove static declaration.
17303169689Skan	* tree.h (next_decl_uid): Declare.
17304169689Skan	(tree_dump_index): Add TDI_ccp.
17305169689Skan	* cp/Make-lang.in (CXX_C_OBJS): Add tree-ssa-ccp.o.
17306169689Skan	* doc/invoke.texi: Document -ftree-ssa-pre and -ftree-ssa-ccp.
17307169689Skan
17308169689Skan2002-07-09  Daniel Berlin  <dberlin@dberlin.org>
17309169689Skan
17310169689Skan	s/varrays of refs/ref_list of refs/g
17311169689Skan
17312169689Skan	* tree-flow.h: Add ref_list structure.
17313169689Skan	Add prototypes for ref_list functions.
17314169689Skan	(FOR_EACH_REF, FOR_EACH_REF_REV): New macros to iterate through
17315169689Skan	ref lists.
17316169689Skan	* tree-cfg.c, tree-ssa.c, tree-ssa-pre.c: Update all uses.
17317169689Skan
17318169689Skan	* tree-dfa.c (create_ref_list): New function.
17319169689Skan	(delete_ref_list): Ditto.
17320169689Skan	(empty_ref_list): Ditto.
17321169689Skan	(add_ref_to_list_end): Ditto.
17322169689Skan	(add_ref_to_list_begin): Ditto.
17323169689Skan	(remove_ref_from_list): Ditto.
17324169689Skan
17325169689Skan2002-07-04  Diego Novillo  <dnovillo@redhat.com>
17326169689Skan
17327169689Skan	* tree-simple.c (is_simplifiable_builtin): Don't simplify target
17328169689Skan	builtins.
17329169689Skan
17330169689Skan2002-07-03  Diego Novillo  <dnovillo@redhat.com>
17331169689Skan
17332169689Skan	* c-simplify.c (simplify_decl_stmt): Unshare the
17333169689Skan	initializer nodes before simplification.
17334169689Skan
17335169689Skan2002-06-29  Aldy Hernandez  <aldyh@quesejoda.com>
17336169689Skan	    Diego Novillo  <dnovillo@redhat.com>
17337169689Skan
17338169689Skan	* c-simplify.c (simplify_call_expr): Do not bail on all builtins.
17339169689Skan	(is_simple_call_expr): Same.
17340169689Skan	(simplify_addr_expr): New function.
17341169689Skan	(simplify_expr): Call it.
17342169689Skan
17343169689Skan	* tree-simple.c (is_simplifiable_builtin): New.
17344169689Skan	(is_simple_compound_lval): Do not bail on INDIRECT_REF.
17345169689Skan
17346169689Skan	* tree-simple.h: New prototype for is_simplifiable_builtin.
17347169689Skan
17348169689Skan2002-06-26  Daniel Berlin  <dberlin@dberlin.org>
17349169689Skan
17350169689Skan	* tree-ssa.c (tree_build_ssa): Call free_dominance_info, not
17351169689Skan	free, on idom.
17352169689Skan
17353169689Skan	* tree-ssa-pre.c (compute_domchildren): Update to use new
17354169689Skan	dominance_info structure, rather than idom array.
17355169689Skan	(tree_perform_ssapre): Don't forget to free the dominance info.
17356169689Skan
17357169689Skan	s/VARRAY_FREE/VARRAY_CLEAR/g now that VARRAY's are ggc allocated.
17358169689Skan
17359169689Skan2002-06-24  Diego Novillo  <dnovillo@redhat.com>
17360169689Skan
17361169689Skan	* tree-ssa.c (build_fud_chains): Use dominance_info instead of int *.
17362169689Skan	(search_fud_chains): Ditto.
17363169689Skan	Call get_immediate_dominator.
17364169689Skan	* tree-ssa-pre.c (a_dom_b): Call dominated_by_p.
17365169689Skan	(pre_idom): Change type to dominance_info.  Update all uses.
17366169689Skan	(pre_doms): Remove.  Update all uses.
17367169689Skan
17368169689Skan2002-06-20  Jason Merrill  <jason@redhat.com>
17369169689Skan
17370169689Skan	Simplify DECL_STMT, CONSTRUCTOR and COMPOUND_LITERAL_EXPR.
17371169689Skan	* tree-simple.c (is_simple_decl_stmt): New fn.
17372169689Skan	(is_simple_constructor, is_simple_constructor_elt): New fns.
17373169689Skan	(is_simple_stmt, is_simple_unary_expr): Use them.
17374169689Skan	(is_simple_modify_expr): Accept an INIT_EXPR.
17375169689Skan	(is_simple_id): Don't allow a COMPOUND_LITERAL_EXPR.
17376169689Skan	(is_simple_unary_expr): Here either.
17377169689Skan	* c-simplify.c (simplify_decl_stmt, simplify_constructor): New fns.
17378169689Skan	(simplify_compound_literal_expr): New fn.
17379169689Skan	(simplify_stmt, simplify_expr): Use them.
17380169689Skan	(get_initialized_tmp_var): Use an INIT_EXPR.
17381169689Skan	(simplify_modify_expr): Accept an INIT_EXPR.
17382169689Skan	(simplify_for_stmt): Call simplify_decl_stmt.
17383169689Skan	(get_name): Don't crash if the decl is anonymous.
17384169689Skan	(tail_expression): New fn.
17385169689Skan	* tree-simple.h: Declare new fns.
17386169689Skan	* c-pretty-print.c (dump_c_node) [INIT_EXPR]: Print like MODIFY_EXPR.
17387169689Skan	(dump_c_node, op_prio): Handle COMPOUND_LITERAL_EXPR.
17388169689Skan	* c-simplify.c (simplify_expr_wfl): Only wrap pre and post stuff
17389169689Skan	that came from our subexpression.
17390169689Skan	(simplify_stmt): Restore stmts_are_full_exprs_p.
17391169689Skan
17392169689Skan	* c-simplify.c (simplify_expr_wfl): Bracket substatements with
17393169689Skan	FILE_STMTs rather than wrapping them in EXPR_WITH_FILE_LOCATION.
17394169689Skan	(simplify_stmt): Update lineno and input_filename from stmts.
17395169689Skan	(simplify_expr et al): Don't copy lineno between stmts.  Don't pass
17396169689Skan	enclosing stmt down.
17397169689Skan	(update_line_number): Remove.
17398169689Skan
17399169689Skan	* c-simplify.c (simplify_expr_stmt): Don't check
17400169689Skan	is_last_stmt_of_scope.
17401169689Skan	(simplify_stmt_expr): Check it here.  Set *expr_p to void_zero_node
17402169689Skan	instead of NULL_TREE.
17403169689Skan	(expr_has_effect): No need to deal with NULL exprs now.
17404169689Skan	(simplify_expr_wfl): Likewise.
17405169689Skan
17406169689Skan2002-06-18  Diego Novillo  <dnovillo@redhat.com>
17407169689Skan
17408169689Skan	* c-simplify.c (strip_off_ending): Rename to remove_suffix.
17409169689Skan	Update callers.
17410169689Skan	(is_last_stmt_of_scope): New function.
17411169689Skan	(simplify_expr_stmt): Call it.
17412169689Skan	(stmt_has_effect): Ditto.
17413169689Skan	(c_simplify_function_tree): Update comment.
17414169689Skan
17415169689Skan2002-06-18  Jason Merrill  <jason@redhat.com>
17416169689Skan
17417169689Skan	* c-simplify.c (maybe_fixup_loop_cond): New fn for C++ conditions.
17418169689Skan	(simplify_for_stmt, simplify_while_stmt): Use it.
17419169689Skan
17420169689Skan	* c-pretty-print.c (dump_c_node) [COMPONENT_REF]: Print "->" if
17421169689Skan	appropriate.
17422169689Skan
17423169689Skan2002-06-19  Jason Merrill  <jason@redhat.com>
17424169689Skan
17425169689Skan	* c-simplify.c (simplify_stmt_expr): New fn.
17426169689Skan	(simplify_expr): Call it.
17427169689Skan	(stmt_expr_level): Remove.
17428169689Skan	(stmt_has_effect, c_simplify_function_tree): Remove refs.
17429169689Skan	(expr_has_effect): Deal with null expression.
17430169689Skan	(simplify_expr_wfl): If the subexpression is simplified away, drop
17431169689Skan	this one, too.  Don't wrap statements.
17432169689Skan	* tree-simple.c (is_simple_unary_expr): Don't allow a STMT_EXPR.
17433169689Skan	* tree-inline.c (copy_tree_r): Clear the aux field in the copies.
17434169689Skan
17435169689Skan2002-06-17  Frank Ch. Eigler  <fche@redhat.com>
17436169689Skan
17437169689Skan	* c-pretty-print.c (dump_c_node): Print pointer-type
17438169689Skan	integer constants as raw numbers with a "B" (bytes) suffix.
17439169689Skan
17440169689Skan2002-06-17  Jason Merrill  <jason@redhat.com>
17441169689Skan
17442169689Skan	* c-simplify.c (simplify_stmt): Take a tree *.
17443169689Skan	(various): Adjust.
17444169689Skan
17445169689Skan2002-06-16  Daniel Berlin  <dberlin@dberlin.org>
17446169689Skan
17447169689Skan	* c-simplify.c (get_name): New function.
17448169689Skan	(get_initialized_tmp_var): Use it to try to get a prefix for
17449169689Skan	create_tmp_var from the value we are initializing to.
17450169689Skan	(simplify_cond_expr): Add prefix for create_tmp_var.
17451169689Skan	(create_tmp_var): Add prefix argument.
17452169689Skan
17453169689Skan	* tree-simple.h: Change create_tmp_var prototype to match.
17454169689Skan
17455169689Skan	* tree-ssa-pre.c: Change create_tmp_var call.
17456169689Skan
17457169689Skan2002-06-15  Diego Novillo  <dnovillo@redhat.com>
17458169689Skan
17459169689Skan	* Makefile.in (c-decl.o): Add dependency on langhooks.h
17460169689Skan	(c-simplify.o): Add dependency on flags.h, langhooks.h, toplev.h
17461169689Skan	and rtl.h.
17462169689Skan	* c-decl.c: Include langhooks.h.
17463169689Skan	(c_expand_body): Simplify the function.  If it succeeds and
17464169689Skan	-ftree-ssa is enabled, call optimize_function_tree.
17465169689Skan	* c-simplify.c: Include flags.h, rtl.h and toplev.h.
17466169689Skan	(simplify_expr_stmt): New function.
17467169689Skan	(simplify_stmt): Call it.
17468169689Skan	* tree-optimize.c: Don't include langhooks.h.
17469169689Skan	(optimize_function_tree): Don't call lang_hooks.simplify_function_tree.
17470169689Skan
17471169689Skan	* c-decl.c (c_expand_body): Do not simplify nor optimize the
17472169689Skan	function if -fdisable-simple is given.
17473169689Skan	* c-simplify.c (simplify_expr): Use is_simple_addr_expr_arg when
17474169689Skan	simplifying ADDR_EXPR nodes.
17475169689Skan	* flags.h (flag_disable_simple): Declare.
17476169689Skan	* toplev.c (flag_disable_simple): Define.
17477169689Skan	(f_options): Document -fdisable-simple.
17478169689Skan	(process_options): Warn if -fdisable-simple is used with
17479169689Skan	optimization enabled.
17480169689Skan	* tree-simple.c (is_simple_addr_expr_arg): New function.
17481169689Skan	(is_simple_unary_expr): Call it.
17482169689Skan	* tree-simple.h (is_simple_addr_expr_arg): Declare.
17483169689Skan	* doc/invoke.texi: Document -fdisable-simple.
17484169689Skan
17485169689Skan	* c-pretty-print.c (dump_c_node): Handle DECL_STMT nodes inside
17486169689Skan	FOR_INIT_STMT.
17487169689Skan	* c-simplify.c (c_simplify_function_tree): Don't do anything if the
17488169689Skan	program had errors.
17489169689Skan	(simplify_stmt): Skip DECL_STMTs.
17490169689Skan	(simplify_for_stmt): Handle DECL_STMT nodes inside FOR_INIT_STMT.
17491169689Skan	(simplify_save_expr): New function.
17492169689Skan	(simplify_expr): Call it.
17493169689Skan	(tree_last_decl): Handle cases where DECL_STMTs are found before
17494169689Skan	the body of the function.
17495169689Skan	* tree-simple.c (is_simple_stmt): Handle DECL_STMT nodes inside
17496169689Skan	FOR_INIT_STMT.
17497169689Skan	(is_simple_compound_lval): Handle nodes wrapped in NON_LVALUE_EXPR.
17498169689Skan
17499169689Skan2002-06-14  Frank Ch. Eigler  <fche@redhat.com>
17500169689Skan
17501169689Skan	* c-pretty-print.c (dump_c_node): Print more type qualifiers,
17502169689Skan	especially for pointers.
17503169689Skan
17504169689Skan2002-06-11  Diego Novillo  <dnovillo@redhat.com>
17505169689Skan
17506169689Skan	* c-simplify.c: Remove folding markers.
17507169689Skan	(insert_before_first): Remove unused function.
17508169689Skan	* tree-cfg.c: Remove folding markers.
17509169689Skan	* tree-dfa.c: Ditto.
17510169689Skan	* tree-flow.h: Ditto.
17511169689Skan	* tree-optimize.c: Ditto.
17512169689Skan	* tree-optimize.h: Ditto.
17513169689Skan	* tree-simple.c: Ditto.
17514169689Skan	* tree-ssa.c: Ditto.
17515169689Skan
17516169689Skan2002-06-11  Jason Merrill  <jason@redhat.com>
17517169689Skan
17518169689Skan	* c-simplify.c (add_tree): Don't deep-copy expressions.
17519169689Skan	(simplify_for_stmt): Only deep-copy pre_cond_s the first time.
17520169689Skan	Don't deep copy expr_chain.
17521169689Skan
17522169689Skan2002-06-10  Diego Novillo  <dnovillo@redhat.com>
17523169689Skan
17524169689Skan	* tree-cfg.c (remove_bb_ann): Don't call VARRAY_FREE.
17525169689Skan	* tree-dfa.c (create_ref): Use sizeof (ref) instead of
17526169689Skan	refs->element_size.
17527169689Skan	* tree.h (struct tree_common): Skip field 'aux' from GC type
17528169689Skan	information.
17529169689Skan	* tree-optimize.c (optimize_function_tree): Don't call
17530169689Skan	VARRAY_REF.
17531169689Skan	* tree-ssa.c (insert_phi_terms): Ditto.
17532169689Skan	(delete_refs): Ditto.
17533169689Skan	* c-simplify.c (simplify_array_ref): Ditto.
17534169689Skan	* simple-break-elim.c: Disable whole file.
17535169689Skan	* simple-goto-elim.c: Disable whole file.
17536169689Skan
17537169689Skan2002-06-10  Jason Merrill  <jason@redhat.com>
17538169689Skan
17539169689Skan	* c-simplify.c (simplify_switch_stmt): Let simplify_expr handle
17540169689Skan	post-effects.  Reorder.
17541169689Skan	(simplify_if_stmt): Likewise.  Don't build redundant comparison.
17542169689Skan	(simplify_do_stmt, simplify_while_stmt): Likewise.
17543169689Skan	(simplify_for_stmt): Likewise.  Remove POST_P parm.
17544169689Skan	(simplify_stmt): Adjust.
17545169689Skan	(insert_before_first): #if 0, no longer used.
17546169689Skan
17547169689Skan	* c-pretty-print.c (dump_c_node): Print FIX_TRUNC_EXPR, FLOAT_EXPR
17548169689Skan	et al as casts.  Add parens as needed.
17549169689Skan
17550169689Skan	* tree-simple.c (is_union_based_ref): New fn.
17551169689Skan	(is_simple_min_lval): Use it.  Rename from is_simple_arraybase.
17552169689Skan	(is_simple_arrayref): Adjust.  Use loop instead of recursion.
17553169689Skan	(is_simple_compref): Likewise.
17554169689Skan	(is_simple_compref_lhs): Remove.
17555169689Skan	* tree-simple.h: Adjust.
17556169689Skan	* c-simplify.c (simplify_array_ref): Adjust.
17557169689Skan	(simplify_component_ref): Adjust.
17558169689Skan
17559169689Skan	* c-simplify.c (simplify_expr_common): Tweak ordering.
17560169689Skan	(get_initialized_tmp_var): Let simplify_expr handle post-effects.
17561169689Skan	* tree-simple.c (is_simple_stmt): Accept an rhs for a return expr.
17562169689Skan
17563169689Skan	* c-simplify.c (simplify_boolean_expr): Avoid redundant tests.
17564169689Skan	Give the temp the appropriate type for a boolean value, and
17565169689Skan	reconvert at the end.
17566169689Skan
17567169689Skan	* c-simplify.c (simplify_self_mod_expr): Don't duplicate side-effects.
17568169689Skan
17569169689Skan	* c-simplify.c (simplify_return_stmt): Accept a SIMPLE rhs.
17570169689Skan	Just hand off to simplify_expr.
17571169689Skan
17572169689Skan	* c-simplify.c (get_initialized_tmp_var): New fn.
17573169689Skan	(simplify_expr_common): Use it.  Handle post-effects internally if
17574169689Skan	POST_P is NULL.
17575169689Skan	(is_simple_tmp_var): Rename from simple_tmp_var_p.
17576169689Skan	* tree-simple.h: Adjust.
17577169689Skan
17578169689Skan2002-06-09  Diego Novillo  <dnovillo@redhat.com>
17579169689Skan
17580169689Skan	* c-simplify.c (simplify_return_stmt): Update folding markers.
17581169689Skan	(build_addr_expr): Ditto.
17582169689Skan	* langhooks.h (struct langhooks): Document simplify_function_tree
17583169689Skan	hook.
17584169689Skan
17585169689Skan2002-06-09  Jason Merrill  <jason@redhat.com>
17586169689Skan
17587169689Skan	* c-simplify.c (simplify_expr_common): Handle creating both lvalue
17588169689Skan	and rvalue temps.  Add new parameter to specify which.
17589169689Skan	(simplify_expr): Now just a wrapper.
17590169689Skan	(simplify_lvalue_expr): Likewise.
17591169689Skan	(simplify_expr_either): New wrapper.
17592169689Skan	(simplify_component_ref): Use it instead of simplify_lvalue_expr.
17593169689Skan
17594169689Skan	* c-pretty-print.c (debug_c_tree): Add a trailing newline.
17595169689Skan	(debug_c_node): Likewise.
17596169689Skan	* gdbinit.in (pct): New macro, calls debug_c_tree.
17597169689Skan
17598169689Skan2002-06-08  Jason Merrill  <jason@redhat.com>
17599169689Skan
17600169689Skan	* tree-simple.c (is_simple_unary_expr): Only allow the address of
17601169689Skan	a varname.
17602169689Skan	(is_simple_id): Allow STRING_CST.
17603169689Skan	* c-simplify.c (simplify_expr_common): Split out from simplify_expr.
17604169689Skan	Do simplify ADDR_EXPR.
17605169689Skan	(simplify_lvalue_expr): Use it and build_addr_expr.  Take
17606169689Skan	simple_test_f.
17607169689Skan	(simplify_modify_expr): Adjust.
17608169689Skan	(build_addr_expr): New fn.
17609169689Skan	(simplify_array_ref): Use simplify_lvalue_expr.
17610169689Skan	(simplify_component_ref): Likewise.
17611169689Skan
17612169689Skan	* tree-simple.c (is_simple_rhs): Remove condexpr rule.
17613169689Skan	(is_simple_compref_lhs): Remove &ID.idlist rule.
17614169689Skan	(is_simple_relop): New fn.
17615169689Skan	(is_simple_binary_expr, is_simple_condexpr): Use it.
17616169689Skan	* tree-simple.h: Declare it.
17617169689Skan
17618169689Skan	* c-simplify.c (create_tmp_var): Refuse to create an array temp.
17619169689Skan	(simple_tmp_var_p): New fn.
17620169689Skan	(simplify_lvalue_expr): Use it; make sure we don't return a temp.
17621169689Skan	* tree-simple.h: Declare it.
17622169689Skan
17623169689Skan	* c-pretty-print.c (dump_c_node) [ARRAY_REF]: Wrap array in parens
17624169689Skan	as needed.
17625169689Skan	[COMPONENT_REF]: Likewise.
17626169689Skan	[POINTER_TYPE]: Fix pointer-to-function handling.
17627169689Skan	[ARRAY_TYPE]: Don't try to print an unknown dimension.
17628169689Skan
17629169689Skan	* tree-simple.c (is_simple_arraybase): New function.
17630169689Skan	(is_simple_arrayref): Use it to check the array base again.
17631169689Skan	* tree-simple.h: Add declaration.
17632169689Skan	* c-simplify.c (simplify_array_ref): Do simplify the base.
17633169689Skan	* expr.c (expand_expr): First make sure the type has a size.
17634169689Skan
17635169689Skan2002-06-07  Jason Merrill  <jason@redhat.com>
17636169689Skan
17637169689Skan	* cppexp.c (num_equality_op): Use a temporary variable to work
17638169689Skan	around gcc 3.0.4 bug.
17639169689Skan
17640169689Skan2002-06-05  Diego Novillo  <dnovillo@redhat.com>
17641169689Skan
17642169689Skan	* Makefile.in (BOOT_CFLAGS): Remove -ftree-ssa.
17643169689Skan	* c-decl.c (c_expand_body): Call optimize_function_tree if tree SSA
17644169689Skan	is enabled.
17645169689Skan	* c-lang.c (LANG_HOOKS_SIMPLIFY_FUNCTION_TREE): Define.
17646169689Skan	* c-simplify.c (simplify_tree): Rename to c_simplify_function_tree.
17647169689Skan	Update all callers.
17648169689Skan	Dump function body before and after simplification if
17649169689Skan	-fdump-tree-simple is used.
17650169689Skan	(simplify_expr): Document FIXME for simplification of BIT_FIELD_REF
17651169689Skan	nodes.
17652169689Skan	* c-tree.h (simplify_tree): Rename to c_simplify_function_tree.
17653169689Skan	* langhooks-def.h (LANG_HOOKS_SIMPLIFY_FUNCTION_TREE): Define
17654169689Skan	(LANGHOOKS_INITIALIZER): Add LANG_HOOKS_SIMPLIFY_FUNCTION_TREE.
17655169689Skan	(lhd_simplify_function_tree): Declare.
17656169689Skan	* langhooks.c (lhd_simplify_function_tree): New function.
17657169689Skan	* langhooks.h (lang_hooks): Add simplify_function_tree function
17658169689Skan	pointer.
17659169689Skan	* toplev.c (parse_options_and_default_flags): Set flag_tree_ssa to
17660169689Skan	1 at optimization levels >= 1.
17661169689Skan	Revert to default warning when -Wuninitialized is used without -O.
17662169689Skan	* tree-cfg.c (tree_find_basic_blocks): Rename argument 't' to
17663169689Skan	'fnbody'.
17664169689Skan	* tree-optimize.c: Include langhooks.h.
17665169689Skan	(optimize_tree): Rename to optimize_function_tree.  Update all
17666169689Skan	users.
17667169689Skan	Rename argument 't' to 'fndecl'.
17668169689Skan	Call simplify langhook before building SSA.
17669169689Skan	(build_tree_ssa): Rename argument 't' to 'fndecl'.
17670169689Skan	Adjust call to tree_find_basic_blocks to pass body of the function.
17671169689Skan	* tree-optimize.h (optimize_tree): Rename to
17672169689Skan	optimize_function_tree.
17673169689Skan	* tree-simple.c (is_simple_unary_expr): Document FIXME on
17674169689Skan	BIT_FIELD_REF nodes.
17675169689Skan	* tree-ssa.c: Add whitespace.
17676169689Skan	* testsuite/lib/c-torture.exp: Remove -ftree-ssa flag.
17677169689Skan
17678169689Skan2002-06-03  Daniel Berlin  <dberlin@dberlin.org>
17679169689Skan
17680169689Skan	* tree-cfg.c (insert_before_*):  For insertion into FOR_INIT's, if
17681169689Skan	we have an expression statement, transform into a compound
17682169689Skan	expression.
17683169689Skan	Pick the right place to insert a statement by iterating until we
17684169689Skan	have a first_exec_stmt (first_non_decl_stmt) that is really the
17685169689Skan	first executable non decl statement.
17686169689Skan	(insert_after_*): Ditto.
17687169689Skan
17688169689Skan2002-06-03  Daniel Berlin  <dberlin@dberlin.org>
17689169689Skan
17690169689Skan	* tree-ssa-pre.c: Update BB stuff to new basic block structure.
17691169689Skan	Add some comments throughout (more coming, particularly describing
17692169689Skan	the algorithm, rather than the implementation).
17693169689Skan	(free_expr_info): Free refs as well.
17694169689Skan	(defs_y_dom_x): Handle unary expressions as well.
17695169689Skan	(insert_euse_in_preorder_dt_order_1): Use block of ref, not block
17696169689Skan	of statement.
17697169689Skan	Don't insert exit blocks if we hit them before hitting an
17698169689Skan	occurrence (it's pointless).
17699169689Skan	(rename_2): Return set of phi operands we touched, don't forget to
17700169689Skan	free VARRAY's we allocated.
17701169689Skan	(rename_1): Correct downsafety computation. Now get exact same
17702169689Skan	results as Open64.
17703169689Skan	Correct setting of has_real_use.
17704169689Skan	(finalize_1): Fix up insertion.
17705169689Skan	(code_motion): Fix up insertion.
17706169689Skan
17707169689Skan	* tree-dfa.c (dump_varref):  Improve dumping of expression
17708169689Skan	references.
17709169689Skan
17710169689Skan2002-06-03  Diego Novillo  <dnovillo@redhat.com>
17711169689Skan
17712169689Skan	* tree-cfg.c (delete_bb): Rename to tree_delete_bb.  Update callers.
17713169689Skan	(tree_find_basic_blocks): Initializer last_basic_block.
17714169689Skan	(create_bb): Update last_basic_block after creating a new block.
17715169689Skan	(tree_cleanup_cfg): Delete unreachable blocks by traversing the
17716169689Skan	linked list, not the array.  Update comments.
17717169689Skan	(delete_bb): Update comments.
17718169689Skan	(tree_dump_cfg): Also show last_basic_block.
17719169689Skan	* tree-ssa.c (tree_build_ssa): Use last_basic_block instead of
17720169689Skan	n_basic_blocks to allocate dominator arrays.
17721169689Skan	(insert_phi_terms): Ditto.
17722169689Skan	(search_fud_chains): User FOR_EACH_BB to look for dominator
17723169689Skan	children.
17724169689Skan
17725169689Skan2002-05-29  Diego Novillo  <dnovillo@redhat.com>
17726169689Skan
17727169689Skan	* tree-cfg.c (tree_find_basic_blocks): Set next_bb and prev_bb for
17728169689Skan	ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR.
17729169689Skan	(create_bb): Set flag BB_NEW for every newly created block.
17730169689Skan	Call link_block to add the new block to the linked list.
17731169689Skan	(tree_split_bb): Traverse basic blocks using FOR_EACH_BB.
17732169689Skan	(make_goto_stmt_edges): Ditto.
17733169689Skan	(remove_unreachable_blocks): Add reminder comment to stop
17734169689Skan	compacting the basic block array every time a block is deleted.
17735169689Skan	(delete_cfg): Traverse basic blocks using FOR_EACH_BB.
17736169689Skan	(tree_dump_bb): Ditto.
17737169689Skan	(tree_dump_cfg): Ditto.
17738169689Skan	(tree_cfg2dot): Ditto.
17739169689Skan	* tree-dfa.c (tree_find_varrefs): Ditto.
17740169689Skan	(create_tree_ann): Ditto.
17741169689Skan	(get_fcalls): Ditto.
17742169689Skan	(find_declaration): Ditto.
17743169689Skan	* tree-ssa.c (tree_build_ssa): Ditto.
17744169689Skan
17745169689Skan2002-05-28  Diego Novillo  <dnovillo@redhat.com>
17746169689Skan
17747169689Skan	* Makefile.in: Add -ftree-ssa to BOOT_CFLAGS.
17748169689Skan
17749169689Skan2002-05-27  Diego Novillo  <dnovillo@redhat.com>
17750169689Skan
17751169689Skan	* c-decl.c (c_expand_body): Close dump file before simplifying the
17752169689Skan	function.
17753169689Skan	* c-pretty-print.c (dump_c_node): Handle COMPLEX_CST,
17754169689Skan	BIT_FIELD_REF, COMPLEX_EXPR, CONJ_EXPR, REALPART_EXPR,
17755169689Skan	IMAGPART_EXPR and VA_ARG_EXPR nodes.
17756169689Skan	Display all type casts, not just pointer casts.
17757169689Skan	(op_prio): Handle LROTATE_EXPR, RROTATE_EXPR, REALPART_EXPR and
17758169689Skan	IMAGPART_EXPR.
17759169689Skan	* c-simplify.c: Include "tree-inline.h"
17760169689Skan	(dump_file): New local variable.
17761169689Skan	(dump_flags): New local variable.
17762169689Skan	(stmt_expr_level): New local variable.
17763169689Skan	(simplify_tree): Open and close dump file if
17764169689Skan	-fdump-tree-simple-details is given.
17765169689Skan	Initialize stmt_expr_level.
17766169689Skan	(simplify_stmt): Dump statement before and after simplification if
17767169689Skan	-fdump-tree-simple-detail is given.
17768169689Skan	Unshare the expression of an EXPR_STMT before simplifying it.
17769169689Skan	Call simplify_return_stmt to handle RETURN_STMT nodes.
17770169689Skan	Do not simplify DECL_STMT nodes.
17771169689Skan	Call stmt_has_effect before re-chaining side effects.
17772169689Skan	(simplify_for_stmt): Do not return the simplified statement.
17773169689Skan	Update all callers.
17774169689Skan	Simplify FOR_BODY after the headers.
17775169689Skan	Unshare loop header expressions before simplification.
17776169689Skan	(simplify_while_stmt): Do not return the simplified statement.
17777169689Skan	Update all callers.
17778169689Skan	Simplify WHILE_BODY after the headers.
17779169689Skan	Unshare the loop header expression before simplification.
17780169689Skan	(simplify_do_stmt): Do not return the simplified statement.  Update
17781169689Skan	all callers.
17782169689Skan	Unshare the loop header expression before simplification.
17783169689Skan	(simplify_if_stmt): Do not return the simplified statement.  Update
17784169689Skan	all callers.
17785169689Skan	Simplify the condition expression before the clauses.
17786169689Skan	Unshare the condition expression before simplification.
17787169689Skan	(simplify_switch_stmt): Do not return the simplified statement.
17788169689Skan	Update all callers.
17789169689Skan	Simplify the switch expression before the body.
17790169689Skan	Unshare the switch expression before simplification.
17791169689Skan	(simplify_decl_stmt): Remove.
17792169689Skan	(simplify_expr): Remove argument 'needs_lvalue'.
17793169689Skan	Add argument 'stmt'.
17794169689Skan	Replace first argument 'expr' with a pointer to the
17795169689Skan	expression 'expr_p'.
17796169689Skan	Do not return the simplified expression.
17797169689Skan	Update all callers and uses.
17798169689Skan	Handle TRUTH_NOT_EXPR nodes.  Simplify SAVE_EXPR nodes into a
17799169689Skan	SIMPLE id and remove the SAVE_EXPR node.
17800169689Skan	Do not simplify BIT_FIELD_REF nodes.
17801169689Skan	Remove code that tried to create new lvalues.
17802169689Skan	(simplify_array_ref): Replace first argument 'expr' with a pointer
17803169689Skan	to the expression 'expr_p'.
17804169689Skan	Do not return the simplified expression.
17805169689Skan	Add argument 'stmt'.
17806169689Skan	Update all callers and uses.
17807169689Skan	(simplify_self_mod_expr): Replace first argument 'expr' with a
17808169689Skan	pointer to the expression 'expr_p'.
17809169689Skan	Do not return the simplified expression.
17810169689Skan	Add argument 'stmt'.
17811169689Skan	Update all callers and uses.
17812169689Skan	Call simplify_lvalue_expr to simplify a copy of the LHS into an
17813169689Skan	lvalue for the new assignment.
17814169689Skan	Simplify the new binary expression.
17815169689Skan	(simplify_component_ref): Replace first argument 'expr' with a
17816169689Skan	pointer to the expression 'expr_p'.
17817169689Skan	Do not return the simplified expression.
17818169689Skan	Add argument 'stmt'.
17819169689Skan	Update all callers and uses.
17820169689Skan	(simplify_call_expr): Ditto.
17821169689Skan	(simplify_tree_list): Ditto.
17822169689Skan	(simplify_cond_expr): Ditto.
17823169689Skan	Build a replacement IF_STMT and call simplify_if_stmt() to process
17824169689Skan	it.  Set the line number of the new statement from the statement
17825169689Skan	containing the original expression.
17826169689Skan	(simplify_modify_expr): Replace first argument 'expr' with a
17827169689Skan	pointer to the expression 'expr_p'.
17828169689Skan	Do not return the simplified expression.
17829169689Skan	Add argument 'stmt'.
17830169689Skan	Update all callers.
17831169689Skan	Call simplify_lvalue_expr to simplify the LHS of the assignment.
17832169689Skan	(simplify_boolean_expr): Replace first argument 'expr' with a
17833169689Skan	pointer to the expression 'expr_p'.
17834169689Skan	Do not return the simplified expression.
17835169689Skan	Add argument 'stmt'.
17836169689Skan	Update all callers.
17837169689Skan	Build a new IF_STMT and simplify it all at once by calling
17838169689Skan	simplify_if_stmt.
17839169689Skan	(simplify_compound_expr): Replace first argument 'expr' with a
17840169689Skan	pointer to the expression 'expr_p'.
17841169689Skan	Do not return the simplified expression.
17842169689Skan	Add argument 'stmt'.
17843169689Skan	Update all callers.
17844169689Skan	(simplify_expr_wfl): Ditto.
17845169689Skan	(simplify_lvalue_expr): New function.
17846169689Skan	(add_tree): Create a copy of each expression before adding it to
17847169689Skan	the list.
17848169689Skan	(deep_copy_node): Call copy_tree_r to copy expression nodes.
17849169689Skan	(stmt_has_effect): Return nonzero if the statement may be the last
17850169689Skan	statement of a statement expression body.
17851169689Skan	(mostly_copy_tree_r): New function.
17852169689Skan	* tree-dump.c (dump_options): Add 'details'.
17853169689Skan	* tree-simple.c: Update documentation about ADDRESSOF expressions.
17854169689Skan	(is_simple_stmt): Test for SIMPLE values when checking return
17855169689Skan	statements.
17856169689Skan	Accept all DECL_STMT nodes.
17857169689Skan	(is_simple_compstmt): Return nonzero if T is NULL.  Do not test
17858169689Skan	DECL_STMT nodes
17859169689Skan	(is_simple_expr): Return nonzero if T is NULL.
17860169689Skan	(is_simple_rhs): Ditto.
17861169689Skan	(is_simple_modify_expr): Ditto.
17862169689Skan	(is_simple_modify_expr_lhs): Ditto.
17863169689Skan	(is_simple_binary_expr): Ditto.
17864169689Skan	(is_simple_cond_expr): Ditto.
17865169689Skan	(is_simple_unary_expr): Call STRIP_NOPS before testing T.
17866169689Skan	Always accept ADDR_EXPR nodes.
17867169689Skan	Always accept BIT_FIELD_REF nodes.
17868169689Skan	(is_simple_call_expr): Return nonzero if T is NULL.
17869169689Skan	(is_simple_const): Ditto.
17870169689Skan	(is_simple_val): Ditto.
17871169689Skan	(is_simple_compref): Ditto.
17872169689Skan	(is_simple_compref_lhs): Ditto.
17873169689Skan	(is_simple_cast): Ditto.
17874169689Skan	(is_simple_cast_op): Ditto.
17875169689Skan	(is_simple_id): Return nonzero if T is NULL.  Allow identifiers
17876169689Skan	wrapped inside NON_LVALUE_EXPR and EXPR_WITH_FILE_LOCATION nodes.
17877169689Skan	Allow real and imaginary parts of a complex variable.
17878169689Skan	Allow compound literals.
17879169689Skan	(is_simple_arrayref): Allow arrays of complex types.
17880169689Skan	* tree.h (TDF_DETAILS): Define.
17881169689Skan	* cp/pt.c (tsubst_template_parms): Check that 'parms' is non-NULL
17882169689Skan	before calling TMPL_PARMS_DEPTH.
17883169689Skan	* doc/invoke.texi: Document -fdump-tree-simple-details.
17884169689Skan
17885169689Skan2002-05-10  Daniel Berlin  <dberlin@dberlin.org>
17886169689Skan
17887169689Skan	* c-pretty-print.c (dump_c_node): Print "<unnamed whatever>" for
17888169689Skan	types, variables, etc that have no name, rather than printing
17889169689Skan	nothing.
17890169689Skan	Handle PMF's properly.
17891169689Skan	Print out structure initializers in a somewhat sensible way.
17892169689Skan	Print SAVE_EXPR () around SAVE_EXPRs.
17893169689Skan	(print_call_name): Handle EXPR_WITH_FILE_LOCATION.
17894169689Skan
17895169689Skan2002-05-09  Daniel Berlin  <dberlin@dberlin.org>
17896169689Skan
17897169689Skan	* tree-dfa.c (dump_varref): Tree inlining generates variables with
17898169689Skan	no name. Don't crash on dumping varref's of them.
17899169689Skan
17900169689Skan	* tree-inline.c (expand_call_inline): Generate a proper STMT_EXPR
17901169689Skan	(it was missing COMPOUND_STMT).
17902169689Skan
17903169689Skan2002-05-08  Daniel Berlin  <dberlin@dberlin.org>
17904169689Skan
17905169689Skan	s/varref_type/treeref_type/g
17906169689Skan	s/create_varref/create_ref/g
17907169689Skan
17908169689Skan	* tree-flow.h: Add EXPRPHI, EXPRUSE, EXPRKILL, EXPRINJ.
17909169689Skan	Add structures and macros for each.
17910169689Skan	Add tree_perform_ssapre prototype.
17911169689Skan
17912169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add tree-ssa-pre.o
17913169689Skan	(tree-ssa-pre.o): Add dependencies for tree-ssa-pre.o
17914169689Skan
17915169689Skan	* cp/Make-lang.in: Add tree-ssa-pre.o
17916169689Skan
17917169689Skan	* flags.h: Add flag_tree_ssa_pre.
17918169689Skan
17919169689Skan	* tree-ssa-pre.c: New file, SSA-PRE.
17920169689Skan
17921169689Skan	* toplev.c: Add flag_tree_ssa_pre.
17922169689Skan	(lang_independent_options): Add tree-ssa-pre.
17923169689Skan
17924169689Skan	* tree-dump.c (dump_files): Add ssapre dump.
17925169689Skan
17926169689Skan	* tree-optimize.c (optimize_tree): Do SSAPRE if requested.
17927169689Skan
17928169689Skan	* tree.h (dump_index): Add TDI_ssa_pre.
17929169689Skan
17930169689Skan	* tree-dfa.c (create_ref): Add support for creating the EXPR*'s refs.
17931169689Skan	(dump_varref): Add support for dumping EXPR* refs.
17932169689Skan
17933169689Skan	* tree-ssa.c (search_fud_chains): Add BB to VARDEF_PHI_CHAIN_BB.
17934169689Skan
17935169689Skan2002-05-07  Diego Novillo  <dnovillo@redhat.com>
17936169689Skan
17937169689Skan	* c-pretty-print.c (op_prio): Handle ABS_EXPR.
17938169689Skan	Don't abort when the operand is not recognized.
17939169689Skan	(op_symbol): Don't abort when the operand is not recognized.
17940169689Skan	* c-simplify.c (simplify_expr): Remove 'const' qualifier from first
17941169689Skan	argument.
17942169689Skan	Do not copy incoming expression.
17943169689Skan	Exclude handling of MODIFY_EXPR, INIT_EXPR, SAVE_EXPR and binary
17944169689Skan	expression nodes.
17945169689Skan	(simplify_array_ref): Remove 'const' qualifier from first argument.
17946169689Skan	Do not copy the incoming expression.
17947169689Skan	(simplify_self_mod_expr): Ditto.
17948169689Skan	Do not simplify the first operand twice.
17949169689Skan	(simplify_component_ref): Remove 'const' qualifier from first
17950169689Skan	argument.  Do not copy the incoming expression.
17951169689Skan	(simplify_call_expr): Ditto.
17952169689Skan	(simplify_tree_list): Ditto.
17953169689Skan	(simplify_cond_expr): Ditto.
17954169689Skan	(simplify_modify_expr): Ditto.
17955169689Skan	(simplify_boolean_expr): Ditto.
17956169689Skan	(simplify_compound_expr): Ditto.
17957169689Skan	(simplify_save_expr): Ditto.
17958169689Skan	(simplify_expr_wfl): Ditto.
17959169689Skan	(tree_build_scope): Re-write.  Do nothing if block already contains
17960169689Skan	a scope.  Use chainon to chain the body with the scope closing
17961169689Skan	node.
17962169689Skan	(deep_copy_node): Do not check for NULL nodes.  Do not deep copy
17963169689Skan	declarations, types and constants.
17964169689Skan
17965169689Skan2002-05-06  Daniel Berlin  <dberlin@dberlin.org>
17966169689Skan
17967169689Skan	* c-simplify.c (deep_copy_node): Don't copy DECL_STMT_DECL's.
17968169689Skan
17969169689Skan2002-05-06  Daniel Berlin  <dberlin@dberlin.org>
17970169689Skan
17971169689Skan	* tree-simple.c (is_simple_compstmt): Don't post-initialize
17972169689Skan	statics or aggregate initializers.
17973169689Skan
17974169689Skan	* c-simplify.c (simplify_decl_stmt): Ditto.
17975169689Skan
17976169689Skan2002-05-06  Sebastian Pop  <s.pop@laposte.net>
17977169689Skan
17978169689Skan	* Makefile.in (simple-break-elim.o, simple-goto-elim.o, tree-dchain.o):
17979169689Skan	Added.
17980169689Skan	* c-decl.c: Include tree-dchain.h
17981169689Skan	(c_expand_body): Add entry point to the goto, break elimination
17982169689Skan	after the simplification pass.
17983169689Skan	* simple-break-elim.c: New file.
17984169689Skan	* simple-goto-elim.c: New file.
17985169689Skan	* tree-dchain.h: New file.
17986169689Skan	* tree-dchain.c: New file.
17987169689Skan
17988169689Skan2002-05-02  Diego Novillo  <dnovillo@redhat.com>
17989169689Skan
17990169689Skan	* c-simplify.c (simplify_expr): Constify first argument.
17991169689Skan	Always work on a copy of the input expression.
17992169689Skan	Do not simplify COMPOUND_LITERAL_EXPR nor CONSTRUCTOR nodes.
17993169689Skan	(simplify_array_ref): Constify first argument.  Always work on a
17994169689Skan	copy of the input expression.
17995169689Skan	(simplify_self_mod_expr): Ditto.
17996169689Skan	(simplify_component_ref): Ditto.
17997169689Skan	(simplify_call_expr): Ditto.
17998169689Skan	(simplify_tree_list): Ditto.
17999169689Skan	(simplify_cond_expr): Ditto.
18000169689Skan	When building the THEN_CLAUSE and ELSE_CLAUSE for the new IF_STMT,
18001169689Skan	create a scope for them and simplify the scope, not the expression.
18002169689Skan	(simplify_modify_expr): Constify first argument.  Always work on a
18003169689Skan	copy of the input expression.
18004169689Skan	(simplify_boolean_expr): Ditto.
18005169689Skan	(simplify_compound_expr): Ditto.
18006169689Skan	(simplify_save_expr): Ditto.
18007169689Skan	(simplify_expr_wfl): Ditto.
18008169689Skan	* tree-cfg.c (tree_find_basic_blocks): Update comments for
18009169689Skan	-fdump-tree-dot.
18010169689Skan	(tree_dump_cfg): Ditto.
18011169689Skan	* tree-dump.c (dump_files): Rename -fdump-tree-graphviz to
18012169689Skan	-fdump-tree-dot.
18013169689Skan	* tree-simple.c (is_simple_unary_expr): Do not handle &CONST
18014169689Skan	expressions.
18015169689Skan	Handle COMPOUND_LITERAL_EXPR and CONSTRUCTOR nodes.
18016169689Skan	(is_simple_const): Strip NOPS and handle &CONST expressions.
18017169689Skan	* tree.h (enum tree_dump_index): Remove references to GraphViz.
18018169689Skan	* doc/invoke.texi: Update documentation for -fdump-tree-dot.
18019169689Skan
18020169689Skan2002-05-02  Sebastian Pop  <s.pop@laposte.net>
18021169689Skan
18022169689Skan	* c-pretty-print.c (dump_c_node): Don't print declarations
18023169689Skan	from the SCOPE_STMT_BLOCK, use the DECL_STMT instead.
18024169689Skan
18025169689Skan2002-04-30  Diego Novillo  <dnovillo@redhat.com>
18026169689Skan
18027169689Skan	* c-pretty-print.c (NIY): Display an error string instead of aborting.
18028169689Skan	(op_prio): Add support for COMPOUND_EXPR, TRUTH_XOR_EXPR, MIN_EXPR,
18029169689Skan	MAX_EXPR and NON_LVALUE_EXPR.
18030169689Skan	For EXPR_WITH_FILE_LOCATION nodes, return the priority of
18031169689Skan	the internal node.
18032169689Skan	(op_symbol): Add support for TRUTH_XOR_EXPR.
18033169689Skan	* c-simplify.c (simplify_stmt): Only remove null statements that
18034169689Skan	have been nullified by simplification.
18035169689Skan	Call debug_tree() dump unhandled tree nodes.
18036169689Skan	(simplify_for_stmt): Always deep-copy PRE_COND_S before adding it
18037169689Skan	to PRE_P.
18038169689Skan	(simplify_expr): When simplifying a MODIFY_EXPR node into an
18039169689Skan	rvalue, return operand 0.
18040169689Skan	Handle VA_ARG_EXPR, BIT_FIELD_REF and NON_LVALUE_EXPR nodes.
18041169689Skan	Treat TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR nodes as
18042169689Skan	regular binary expressions.
18043169689Skan	Call debug_tree() to dump an unhandled expression.
18044169689Skan	(simplify_array_ref): Do not simplify the base of an array.
18045169689Skan	(simplify_call_expr): Do not simplify calls to builtins.
18046169689Skan	(simplify_cond_expr): Handle conditional expressions of type void.
18047169689Skan	(simplify_boolean_expr): Return 'T != 0' instead of 'T'.
18048169689Skan	(simplify_save_expr): Do not wrap statement trees inside SAVE_EXPR
18049169689Skan	nodes.
18050169689Skan	(tree_last_decl): Ignore FILE_STMT nodes preceding a SCOPE_STMT.
18051169689Skan	* tree-simple.c: Update grammar to accept any valid C array as the
18052169689Skan	array base.
18053169689Skan	(is_simple_compstmt): Accept DECL_INITIAL expressions for read-only
18054169689Skan	variables.
18055169689Skan	(is_simple_expr): Do not abort if the incoming tree is NULL.
18056169689Skan	(is_simple_modify_expr): Allow SAVE_EXPR, EXPR_WITH_FILE_LOCATION
18057169689Skan	and NON_LVALUE_EXPR wrappers.
18058169689Skan	(is_simple_binary_expr): Ditto.
18059169689Skan	(is_simple_condexpr): Ditto.
18060169689Skan	Accept TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR.
18061169689Skan	(is_simple_unary_expr): Do not abort it the incoming tree is NULL.
18062169689Skan	Allow SAVE_EXPR, EXPR_WITH_FILE_LOCATION and NON_LVALUE_EXPR
18063169689Skan	wrappers.
18064169689Skan	Handle BIT_FIELD_REF and VA_ARG_EXPR nodes.
18065169689Skan	(is_simple_call_expr): Always return 1 for builtin calls.
18066169689Skan	(is_simple_arrayref): Do not check the array base.
18067169689Skan
18068169689Skan2002-04-30  Daniel Berlin  <dberlin@dberlin.org>
18069169689Skan
18070169689Skan	* c-simplify.c (simplify_call_expr): Don't try to simplify
18071169689Skan	call_expr arglist if it's not there.
18072169689Skan
18073169689Skan2002-04-27  Diego Novillo  <dnovillo@redhat.com>
18074169689Skan
18075169689Skan	* c-decl.c (c_expand_body): Call simplify_tree to simplify a
18076169689Skan	FUNCTION_DECL node.
18077169689Skan	* c-simplify.c (simplify_tree): New function.
18078169689Skan	(simplify_stmt): Remove variable 'new_vars'.  Update all called
18079169689Skan	functions.
18080169689Skan	Remove argument 'scope'.  Update all callers.
18081169689Skan	Do not keep track of new scope statements as they are entered.
18082169689Skan	Do not call declare_tmp_vars().
18083169689Skan	(simplify_for_stmt): Remove argument new_vars_p.  Update all callers.
18084169689Skan	(simplify_while_stmt): Ditto.
18085169689Skan	(simplify_do_stmt): Ditto.
18086169689Skan	(simplify_if_stmt): Ditto.
18087169689Skan	(simplify_switch_stmt): Ditto.
18088169689Skan	(simplify_decl_stmt): Reformat comments.
18089169689Skan	(simplify_expr): Remove argument new_vars_p.  Update all callers.
18090169689Skan	Call simplify_save_expr() to simplify SAVE_EXPR nodes.
18091169689Skan	Call simplify_expr_wfl() to simplify EXPR_WITH_FILE_LOCATION nodes.
18092169689Skan	Do not call is_unop() and is_binop() when checking for unary and
18093169689Skan	binary operators.
18094169689Skan	Do not return early after simplify statement-expressions.
18095169689Skan	Do not call add_modify_stmt() to create assignment expressions.
18096169689Skan	(simplify_array_ref): Remove argument new_vars_p.  Update all callers.
18097169689Skan	(simplify_self_mod_expr): Ditto.
18098169689Skan	(simplify_component_ref): Ditto.
18099169689Skan	(simplify_call_expr): Ditto.
18100169689Skan	(simplify_tree_list): Ditto.
18101169689Skan	(simplify_cond_expr): Ditto.
18102169689Skan	(simplify_modify_expr): Ditto.
18103169689Skan	(simplify_boolean_expr): Ditto.
18104169689Skan	(simplify_compound_expr): Ditto.
18105169689Skan	(simplify_save_expr): New function.
18106169689Skan	(simplify_expr_wfl): New function.
18107169689Skan	(tree_build_scope): Reformat.
18108169689Skan	(add_tree): Call stmt_has_effect() and expr_has_effect() to decide
18109169689Skan	whether or not to add a new tree to the list.
18110169689Skan	(add_modify_stmt): Remove.
18111169689Skan	(create_tmp_var): Remove 'new_vars_p' argument.
18112169689Skan	Call pushdecl() to insert the newly created variable in the current
18113169689Skan	binding scope.
18114169689Skan	(declare_tmp_vars): Do not create a BLOCK_VARS for the scope.
18115169689Skan	(is_binop): Remove.
18116169689Skan	(is_unop): Remove.
18117169689Skan	(expr_has_effect): New function.
18118169689Skan	* c-tree.h (simplify_tree): Remove second argument.
18119169689Skan	* stmt.c (warn_if_unused_value): Check operand 0 of SAVE_EXPR
18120169689Skan	nodes.
18121169689Skan	* tree-dfa.c (find_refs_in_expr): Call find_refs_in_expr() to look
18122169689Skan	inside an EXPR_WITH_FILE_LOCATION node.
18123169689Skan	* tree-simple.c (is_simple_stmt): Add a case for SCOPE_STMT nodes.
18124169689Skan	(is_simple_compstmt): Assume that T is the first tree in the
18125169689Skan	compound statement's body.
18126169689Skan	Stop when a scope ending SCOPE_STMT node is found.
18127169689Skan	(is_simple_binary_expr): Don't call is_simple_binop().
18128169689Skan	(is_simple_condexpr): Don't call is_simple_relop().
18129169689Skan	(is_simple_binop): Remove.
18130169689Skan	(is_simple_relop): Remove.
18131169689Skan	(is_simple_unary_expr): Accept any operator with tree code class
18132169689Skan	'1' followed by a simple value.
18133169689Skan	Accept simple unary expressions wrapped inside SAVE_EXPR,
18134169689Skan	EXPR_WITH_FILE_LOCATION and NON_LVALUE_EXPR nodes.
18135169689Skan	(is_simple_id): Accept simple identifiers wrapped inside SAVE_EXPR,
18136169689Skan	EXPR_WITH_FILE_LOCATION and NON_LVALUE_EXPR nodes.
18137169689Skan	* tree-simple.h (create_tmp_var): Remove second argument.
18138169689Skan	(is_simple_binop): Remove.
18139169689Skan	(is_simple_relop): Remove.
18140169689Skan
18141169689Skan2002-04-22  Diego Novillo  <dnovillo@redhat.com>
18142169689Skan
18143169689Skan	* c-simplify.c (stmt_has_effect): New function.
18144169689Skan	(simplify_stmt): Fix example code in comment.
18145169689Skan	Use EXPR_STMT_EXPR to access the expression in an expression
18146169689Skan	statement.
18147169689Skan	Call debug_c_node to display unhandled statements.
18148169689Skan	Call stmt_has_effect to determine whether the statement has been
18149169689Skan	nullified by the simplification process.
18150169689Skan	(simplify_for_stmt): Do not simplify the initialization expression
18151169689Skan	if it's NULL.
18152169689Skan	Do not convert post_cond_s into a statement chain.
18153169689Skan	Do not simplify the expression if it's NULL.
18154169689Skan	(simplify_switch_stmt): initialize post_cond_s to NULL before
18155169689Skan	simplifying the expression.
18156169689Skan	(simplify_expr): Rename argument IS_LHS to NEEDS_LVALUE.  Update
18157169689Skan	all uses.
18158169689Skan	When simplifying assignments, return the LHS of the assignment if
18159169689Skan	the caller wants to use the assignment as an rvalue.
18160169689Skan	Do not simplify ADDR_EXPR nodes.
18161169689Skan	Handle NOP_EXPR, CONVERT_EXPR, FIX_TRUNC_EXPR, FIX_CEIL_EXPR,
18162169689Skan	FIX_ROUND_EXPR, INDIRECT_REF, NEGATE_EXPR, INTEGER_CST, STRING_CST,
18163169689Skan	COMPLEX_CST.
18164169689Skan	Abort if the expression has not been simplified and cannot be used
18165169689Skan	as an rvalue to assign it to a temporary.
18166169689Skan	When creating a new temporary to hold an lvalue, if the expression
18167169689Skan	is an indirect reference, use the address of the referenced object.
18168169689Skan	When creating an indirect reference, use the pointed-to type as the
18169169689Skan	type of the reference.
18170169689Skan	(simplify_self_mod_expr): If the LHS operand needs to be
18171169689Skan	simplified, simplify twice.  Once to produce an lvalue and another
18172169689Skan	to produce a simple value.
18173169689Skan	(simplify_modify_expr): Break assignment chains (a = b = c = ...)
18174169689Skan	into individual assignments.
18175169689Skan	(simplify_compound_expr):
18176169689Skan	(create_tmp_var): If the type is an array, use TYPE_POINTER_TO as
18177169689Skan	the pointer type.
18178169689Skan	(update_line_number): Fix typo in comment.
18179169689Skan	(is_unop): Ditto.
18180169689Skan	(convert_to_stmt_chain): Only add statements that comply with
18181169689Skan	stmt_has_effect().
18182169689Skan	* tree-dfa.c (find_declaration): Fix typo in comment.
18183169689Skan	(debug_varref): Ditto.
18184169689Skan	* tree-flow.h: Ditto.
18185169689Skan	* tree-simple.c (is_simple_stmt): New function.
18186169689Skan	(is_simple_compstmt): New function.
18187169689Skan	(is_simple_expr): Fix typo in comment.
18188169689Skan	(is_simple_rhs): Allow conditional expressions.
18189169689Skan	(is_simple_modify_expr): Fix typo in comment.
18190169689Skan	(is_simple_modify_expr_lhs): Ditto.
18191169689Skan	(is_simple_binary_expr): Ditto.
18192169689Skan	(is_simple_condexpr): Ditto.
18193169689Skan	(is_simple_relop): Ditto.
18194169689Skan	(is_simple_unary_expr): Ditto.
18195169689Skan	Allow taking the address of a constant (for strings).
18196169689Skan	(is_simple_call_expr): Fix typo in comment.
18197169689Skan	Call is_simple_id to determine if the first operand is a SIMPLE
18198169689Skan	function identifier.
18199169689Skan	(is_simple_arglist): Fix typo in comment.
18200169689Skan	(is_simple_varname): Ditto.
18201169689Skan	(is_simple_const): Don't accept casts of SIMPLE constants.
18202169689Skan	(is_simple_id): Don't accept casts of SIMPLE identifiers.
18203169689Skan	(is_simple_val): Fix typo in comment.
18204169689Skan	(is_simple_arrayref): Ditto.
18205169689Skan	(is_simple_compref): Ditto.
18206169689Skan	(is_simple_compref_lhs): Ditto.
18207169689Skan	(is_simple_cast_op): Ditto.
18208169689Skan	(is_simple_exprseq): Allow NULL expression sequences.
18209169689Skan	* tree-simple.h (is_simple_stmt): Declare
18210169689Skan	(is_simple_compstmt): Declare.
18211169689Skan	* tree-ssa.c (follow_chain): Fix typo in comment.
18212169689Skan
18213169689Skan2002-04-22  Diego Novillo  <dnovillo@redhat.com>
18214169689Skan
18215169689Skan	* c-pretty-print.c (dump_c_node): Don't print function
18216169689Skan	bodies of FUNCTION_DECL nodes.
18217169689Skan
18218169689Skan2002-04-19  Andreas Jaeger  <aj@suse.de>
18219169689Skan
18220169689Skan	* Makefile.in (c-call-graph.o): New.
18221169689Skan
18222169689Skan2002-04-18  Sebastian Pop  <s.pop@laposte.net>
18223169689Skan
18224169689Skan	* c-pretty-print.c (PRINT_FUNCTION_NAME): Define.
18225169689Skan	(dump_c_node): Call pretty_print_string to print string.
18226169689Skan	Call print_call_name to print function names.
18227169689Skan	(pretty_print_string): New function.
18228169689Skan	(print_call_name): New function.
18229169689Skan
18230169689Skan2002-04-17  Diego Novillo  <dnovillo@redhat.com>
18231169689Skan
18232169689Skan	* c-simplify.c (simplify_do_stmt): Call is_simple_condexpr to test
18233169689Skan	if the conditional is in SIMPLE form.
18234169689Skan	(simplify_if_stmt): Ditto.
18235169689Skan
18236169689Skan2002-04-17  Diego Novillo  <dnovillo@redhat.com>
18237169689Skan
18238169689Skan	* c-pretty-print.c (dump_c_node): Handle escape sequences in strings.
18239169689Skan	(op_symbol): Handle TRUTH_NOT_EXPR.
18240169689Skan	* c-simplify.c: Rename 'after' with 'post' and 'before' with 'pre'
18241169689Skan	everywhere.
18242169689Skan	Re-group some functions and add comments.
18243169689Skan	(simplify_stmt): Update calls to simplify_for_stmt,
18244169689Skan	simplify_while_stmt, simplify_do_stmt and simplify_switch_stmt.
18245169689Skan	Call simplify_if_stmt.
18246169689Skan	Do not test if expression is in SIMPLE form before calling
18247169689Skan	simplify_expr.
18248169689Skan	Call convert_to_stmt_chain to emit statement trees for side effects
18249169689Skan	found while simplifying.
18250169689Skan	(simplify_for_stmt): Re-implement.  Do not change structure of the
18251169689Skan	statement.  Simplify each header expression and emit side effects
18252169689Skan	at sequence points.
18253169689Skan	(simplify_while_stmt): Ditto.
18254169689Skan	(simplify_do_stmt): Ditto.
18255169689Skan	(simplify_switch_stmt): Ditto.
18256169689Skan	(new_simplified_if): Rename to simplify_if_stmt.
18257169689Skan	Call simplify_expr to simplify the conditional.
18258169689Skan	(simplify_if_stmt): New name for new_simplified_if.
18259169689Skan	(simplify_expr): Do not default simple_test_f to is_simple_expr.
18260169689Skan	If simple_test_f is not set, abort.
18261169689Skan	Handle COMPOUND_EXPR, MODIFY_EXPR, TRUTH_ANDIF_EXPR,
18262169689Skan	TRUTH_ORIF_EXPR, SAVE_EXPR and EXPR_WITH_FILE_LOCATION.
18263169689Skan	(simplify_arglist): Rename to simplify_tree_list.
18264169689Skan	(simplify_tree_list): New name for simplify_arglist.
18265169689Skan	(simplify_boolean_expr): New function.
18266169689Skan	(simplify_compound_expr): New function.
18267169689Skan	(tree_build_scope): Use SCOPE_BEGIN_P instead of TREE_LANG_FLAG_0
18268169689Skan	to access scope operands.  Use COMPOUND_BODY instead of
18269169689Skan	TREE_OPERAND to access the body of the compound statement.
18270169689Skan	(add_tree): Use a TREE_LIST container instead of directly chaining the
18271169689Skan	trees.
18272169689Skan	(add_assignment_tree): Rename to add_modify_stmt.  Update all
18273169689Skan	callers.
18274169689Skan	(add_modify_stmt): New name for add_assignment_tree.
18275169689Skan	(insert_before_continue_end): Do nothing it the tree to insert is
18276169689Skan	NULL.
18277169689Skan	(copy_stmt_chain): Rename to deep_copy_list.  Update all callers.
18278169689Skan	(deep_copy_list): New name for copy_stmt_chain.
18279169689Skan	(copy_stmt): Rename to deep_copy_node.  Update all callers.
18280169689Skan	(deep_copy_node): New name for copy_stmt.  Handle TREE_LIST
18281169689Skan	trees.
18282169689Skan	(insert_before_first): New function.
18283169689Skan	(is_binop): Add COMPOUND_EXPR.
18284169689Skan	(convert_to_stmt_chain): New function.
18285169689Skan	* tree-cfg.c (make_for_stmt_blocks): Fix comment.
18286169689Skan	* tree-simple.c (is_simple_condexpr): New function.
18287169689Skan	(is_simple_const): Allow casts of SIMPLE constants.
18288169689Skan	(is_simple_id): Allow casts of SIMPLE identifiers.
18289169689Skan	(is_simple_cast): Call is_simple_cast_op.
18290169689Skan	(is_simple_cast_op): New function.
18291169689Skan	(is_simple_exprseq): New function.
18292169689Skan	* tree-simple.h (deep_copy_list): Declare.
18293169689Skan	(deep_copy_node): Declare.
18294169689Skan	(is_simple_cast_op): Declare.
18295169689Skan	(is_simple_exprseq): Declare.
18296169689Skan
18297169689Skan2002-04-03  Diego Novillo  <dnovillo@redhat.com>
18298169689Skan
18299169689Skan	* c-simplify.c (simplify_expr): Add arguments simple_tree_f and
18300169689Skan	is_lhs.  Update all callers.
18301169689Skan	Call simplify_call_expr, simplify_cond_expr, simplify_arglist and
18302169689Skan	simplify_modify_expr.
18303169689Skan	Call is_unop and is_binop to check for unary and binary operators.
18304169689Skan	(simplify_binary_expr): Remove.
18305169689Skan	(simplify_call_expr): New function.
18306169689Skan	(simplify_arglist): New function.
18307169689Skan	(simplify_cond_expr): New function.
18308169689Skan	(simplify_modify_expr): New function.
18309169689Skan	(keep_stmt_p): Remove.
18310169689Skan	(is_binop): New function.
18311169689Skan	(is_unop): New function.
18312169689Skan	(simplify_stmt): Don't call keep_stmt_p.
18313169689Skan	(simplify_decl_stmt): Call add_assignment_tree.
18314169689Skan	* tree-simple.c: Include c-tree.h
18315169689Skan	Add expression-statements to the SIMPLE grammar.
18316169689Skan	(is_simple_modify_expr_lhs): New function.
18317169689Skan	(is_simple_modify_expr): Call it.
18318169689Skan	(is_simple_relop): Update comment.
18319169689Skan	(is_simple_unary_expr): Allow expression-statements.
18320169689Skan	(is_simple_arglist): New function.
18321169689Skan	(is_simple_call_expr): Call it.
18322169689Skan	(is_simple_id): Accept expressions taking the address of a
18323169689Skan	function.
18324169689Skan	* tree-simple.h (is_simple_modify_expr_lhs): Declare.
18325169689Skan	(is_simple_arglist): Declare.
18326169689Skan
18327169689Skan2002-03-21  Diego Novillo  <dnovillo@redhat.com>
18328169689Skan
18329169689Skan	* Makefile.in (c-simplify.o): Add dependency on varray.h.
18330169689Skan	* c-simplify.c: Include varray.h.
18331169689Skan	Remove comments with SIMPLE grammar.
18332169689Skan	(simplify_array_ref): New.
18333169689Skan	(simplify_self_mod_expr): New.
18334169689Skan	(simplify_component_ref): New.
18335169689Skan	(add_assignment_tree): New.
18336169689Skan	(simplify_expr): Call simplify_array_ref to simplify array
18337169689Skan	references.
18338169689Skan	Call simplify_self_mod_expr to simplify ++, --, += and -=
18339169689Skan	expressions.
18340169689Skan	Call simplify_component_ref to simplify references to structures.
18341169689Skan	(simplify_binary_expr): Do not check whether the expression is
18342169689Skan	already in SIMPLE form.
18343169689Skan	* tree-simple.c: Document changes from original SIMPLE grammar.
18344169689Skan	(is_simple_unary_expr): Add check for *ID.
18345169689Skan	(is_simple_call_expr): Update comments.
18346169689Skan	(is_simple_const): Ditto.
18347169689Skan	(is_simple_id): Do not accept *ID expressions.
18348169689Skan	(is_simple_val): Update comments.
18349169689Skan	(is_simple_arrayref): Accept any variable name as the base address.
18350169689Skan	(is_simple_compref_lhs): New.
18351169689Skan	(is_simple_compref): Call it.
18352169689Skan	* tree-simple.h (is_simple_compref_lhs): Declare.
18353169689Skan
18354169689Skan2002-03-18  Diego Novillo  <dnovillo@redhat.com>
18355169689Skan
18356169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add tree-simple.o
18357169689Skan	(tree-simple.o): New rule.
18358169689Skan	* c-simplify.c (simplified_p): Remove.
18359169689Skan	(simplified_rec_p): Remove.
18360169689Skan	(simplified_condition_p): Remove.
18361169689Skan	(simplify_for_stmt): Call is_simple_expr instead of
18362169689Skan	simplified_condition_p.
18363169689Skan	(simplify_while_stmt): Ditto.
18364169689Skan	(simplify_do_stmt): Call is_simple_expr instead of simplified_p.
18365169689Skan	(new_simplified_if): Call is_simple_expr instead of
18366169689Skan	simplified_rec_p.
18367169689Skan	(simplify_decl_stmt): Update comment.
18368169689Skan	(simplify_expr): Return the original expression if it's already
18369169689Skan	in SIMPLE form.
18370169689Skan	Do not special case most binary and unary expressions.
18371169689Skan	When simplifying array references, create temporary variables to
18372169689Skan	hold the base address for the array.
18373169689Skan	Simplify COMPONENT_REF expressions separately.
18374169689Skan	Call simplify_binary_expr to handle most binary expressions.
18375169689Skan	(simplify_binary_expr): New function.
18376169689Skan	(keep_stmt_p): Call is_simple_unary_expr to determine whether the
18377169689Skan	statement should be kept or not.
18378169689Skan	* tree-simple.c: New file.
18379169689Skan	* tree-simple.h (is_simple_expr): Declare.
18380169689Skan	(is_simple_rhs): Declare.
18381169689Skan	(is_simple_modify_expr): Declare.
18382169689Skan	(is_simple_binary_expr): Declare.
18383169689Skan	(is_simple_binop): Declare.
18384169689Skan	(is_simple_relop): Declare.
18385169689Skan	(is_simple_unary_expr): Declare.
18386169689Skan	(is_simple_call_expr): Declare.
18387169689Skan	(is_simple_const): Declare.
18388169689Skan	(is_simple_id): Declare.
18389169689Skan	(is_simple_varname): Declare.
18390169689Skan	(is_simple_val): Declare.
18391169689Skan	(is_simple_arrayref): Declare.
18392169689Skan	(is_simple_compref): Declare.
18393169689Skan	(is_simple_cast): Declare.
18394169689Skan	* cp/Make-lang.in (CXX_C_OBJS): Add tree-simple.o
18395169689Skan
18396169689Skan2002-03-18  Diego Novillo  <dnovillo@redhat.com>
18397169689Skan
18398169689Skan	* tree-simple.h: New file.
18399169689Skan	* Makefile.in (c-simplify.o): Add dependency on tree-simple.h
18400169689Skan	* c-simplify.c: Reformat some comments.
18401169689Skan	(tree_last_decl): Declare.
18402169689Skan
18403169689Skan2002-03-18  Sebastian Pop  <s.pop@laposte.net>
18404169689Skan
18405169689Skan	* c-simplify.c (insert_stmt_chain): Delete.
18406169689Skan	(simplified_condition_p, insert_after_case_labels): New.
18407169689Skan	(simplify_stmt, simplify_for_stmt, simplify_while_stmt,
18408169689Skan	simplify_do_stmt, new_simplified_if, simplify_switch_stmt):
18409169689Skan	Returns a single node, generate a chain of statements to be executed
18410169689Skan	before the if, and a list of new variables.
18411169689Skan	(new_simplified_if): Simplify clauses.
18412169689Skan	(simplify_expr): Remove unused parameter scope.
18413169689Skan
18414169689Skan2002-03-14  Sebastian Pop  <s.pop@laposte.net>
18415169689Skan
18416169689Skan	* c-simplify.c (simplify_switch_stmt, simplify_expr): Add scope
18417169689Skan	parameter.
18418169689Skan	(simplify_while_stmt, simplify_do_stmt, simplify_for_stmt): Avoid
18419169689Skan	negating loop condition during simplification.
18420169689Skan	(new_simplified_if): Don't simplify the IF_BODY.
18421169689Skan	(copy_stmt_chain): Use copy_stmt.
18422169689Skan	(copy_stmt): New function.
18423169689Skan
18424169689Skan2002-02-28  Sebastian Pop  <s.pop@laposte.net>
18425169689Skan
18426169689Skan	* tree-dfa.c (find_refs_in_stmt): Changed if/else statements in
18427169689Skan	a switch.
18428169689Skan
18429169689Skan2002-02-28  Sebastian Pop  <s.pop@laposte.net>
18430169689Skan
18431169689Skan	* c-simplify.c (simplify_if_stmt): Deleted.
18432169689Skan	(new_simplified_if): New function.
18433169689Skan	(make_type_writable): New function.
18434169689Skan	(insert_before_continue_end): New function.
18435169689Skan	(insert_before_continue): New function.
18436169689Skan	(copy_stmt_chain): New function.
18437169689Skan	(insert_stmt_chain): New function.
18438169689Skan	(update_line_number): New function.
18439169689Skan	(simplified_p): New function.
18440169689Skan	(simplified_rec_p) New function.
18441169689Skan	(simplify_stmt): Modify the way to call simplification
18442169689Skan	of COMPOUND_STMT, FOR_STMT, WHILE_STMT, DO_STMT, IF_STMT,
18443169689Skan	and SCOPE_STMT in order to avoid to execute the code after
18444169689Skan	the switch.  Add FILE_STMT, LABEL_STMT, GOTO_STMT, ASM_STMT cases.
18445169689Skan	Simplified a little the code after the switch.
18446169689Skan	(simplify_for_stmt): Change functions parameters.
18447169689Skan	Add code to simplify the FOR_INIT_STMT, FOR_COND, FOR_EXPR.
18448169689Skan	(simplify_while_stmt): Change functions parameters.
18449169689Skan	Add code to simplify the WHILE_COND.
18450169689Skan	(simplify_do_stmt): Change functions parameters.
18451169689Skan	Add code to simplify the DO_COND.
18452169689Skan	(simplify_switch_stmt): Change functions parameters.
18453169689Skan	(simplify_expr): Remove scope parameter.
18454169689Skan	Avoid to introduce a new temporary variable for an expression
18455169689Skan	that is already simplified.
18456169689Skan	([ARRAY|COMPONENT]_REF, COND_EXPR): Handle them apart.
18457169689Skan	(TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR): Avoid to evaluate the second
18458169689Skan	operand if the value can be deduced from the first one.
18459169689Skan	(keep_stmt_p): Add some other cases in which we don't need to keep
18460169689Skan	a statement after its simplification.
18461169689Skan
18462169689Skan2002-02-28  Sebastian Pop  <s.pop@laposte.net>
18463169689Skan
18464169689Skan	* Makefile.in: Add c-call-graph.o dependence.
18465169689Skan	* c-call-graph.c: New file.
18466169689Skan	* c-decl.c (c_expand_body): Add an entry point for call-graph.
18467169689Skan	* tree-dump.c (dump_files): Add the flag dump-call-graph.
18468169689Skan	* tree.h (tree_dump_index): Add TDI_xml.
18469169689Skan
18470169689Skan2002-02-28  Sebastian Pop  <s.pop@laposte.net>
18471169689Skan
18472169689Skan	* c-pretty-print.c (dump_c_tree): Declare it extern.
18473169689Skan	(dump_c_node): Declare it extern.
18474169689Skan	(dump_c_scope_vars): Deleted, some code moved in print_declaration ().
18475169689Skan	(print_declaration): New function.
18476169689Skan	(print_function_decl): New function.
18477169689Skan	(print_struct_decl): New function.
18478169689Skan	(INDENT_PRINT_C_NODE): Deleted.
18479169689Skan	(INDENT): New macro.
18480169689Skan	(NIY): Define the macro body in a block.
18481169689Skan	(dump_c_node): Add dumping for TREE_PURPOSE operand in TREE_LIST.
18482169689Skan	[VOID|INTEGER|REAL|COMPLEX|VECTOR|ENUMERAL|BOOLEAN|CHAR]_TYPE nodes:
18483169689Skan	insert some code from print-tree.c:print_node_brief () in order to
18484169689Skan	stabilise the type printing.
18485169689Skan	[RECORD|UNION]_TYPE nodes: Don't print their contents by default,
18486169689Skan	move the existing code in print_struct_decl ().
18487169689Skan	[POSTDECREMENT|POSTINCREMENT]_EXPR: Print the operand in post postion.
18488169689Skan	[MIN|MAX|ABS]_EXPR: New code for printing these nodes.
18489169689Skan	FOR_STMT: Don't print the FOR_BODY if it is not present.
18490169689Skan	RETURN_STMT: Don't print the return expression for a void function.
18491169689Skan	ASM_STMT: New code for printing this node.
18492169689Skan	SCOPE_STMT: Use print_declaration instead of dump_c_scope_vars.
18493169689Skan	COMPOUND_LITERAL_EXPR: Add the node as not implemented yet.
18494169689Skan	(op_prio): Fix switch indent.
18495169689Skan	Add node EXPR_WITH_FILE_LOCATION with priority 16.
18496169689Skan	(op_symbol): Fix switch indent.
18497169689Skan
18498169689Skan2002-01-25  Diego Novillo  <dnovillo@redhat.com>
18499169689Skan
18500169689Skan	* Makefile.in (c-pretty-print.o): Add dependency on errors.h.
18501169689Skan	* c-decl.c (c_expand_body): React to -ftree-dump-simple.
18502169689Skan	* c-pretty-print.c: Fix typo in header comment.
18503169689Skan	(NYI): Flush output buffer, dump the tree and abort.
18504169689Skan	(dump_c_node): Add unparsing code for ERROR_MARK, IDENTIFIER_NODE,
18505169689Skan	ARRAY_TYPE, UNION_TYPE, STRING_CST, CEIL_DIV_EXPR, FLOOR_DIV_EXPR,
18506169689Skan	ROUND_DIV_EXPR, TRUNC_MOD_EXPR, FLOOR_MOD_EXPR, ROUND_MOD_EXPR,
18507169689Skan	RDIV_EXPR, EXACT_DIV_EXPR, LROTATE_EXPR, RROTATE_EXPR,
18508169689Skan	BIT_ANDTC_EXPR, BIT_NOT_EXPR, UNORDERED_EXPR, SAVE_EXPR and
18509169689Skan	EXPR_WITH_FILE_LOCATION.
18510169689Skan	Unify unparsing code for common binary and unary expressions.
18511169689Skan	Handle indirect references like any other unary expression.
18512169689Skan	(dump_c_scope_vars): Remove unused variable 'context'.
18513169689Skan	Call dump_c_node to print the type.
18514169689Skan	(dump_c_indirect_ref): Remove.
18515169689Skan	(op_prio): New function.
18516169689Skan	(op_symbol): New function.
18517169689Skan	* c-simplify.c (simplify_stmt): Do not simplify a return
18518169689Skan	expression, only its second operand.
18519169689Skan	Fix capitalization in error message.
18520169689Skan	(simplify_expr): Add documentation.
18521169689Skan	Fix capitalization in error message.
18522169689Skan	* tree-dump.c (dump_files): Add entry for -fdump-tree-simple.
18523169689Skan	(dump_options): Add entry for -unparse.
18524169689Skan	* tree.h (TDI_simple): Define.
18525169689Skan	(TDF_UNPARSE): Define.
18526169689Skan	* doc/invoke.texi: Document -fdump-tree-simple.
18527169689Skan
18528169689Skan2002-01-23  Sebastian Pop  <s.pop@laposte.net>
18529169689Skan
18530169689Skan	* c-pretty-print.c: Clean C++ comments.
18531169689Skan	(debug_output_buffer): Remove declaration and definition.
18532169689Skan	* diagnostic.h (debug_output_buffer): Add declaration.
18533169689Skan	* diagnostic.c (debug_output_buffer): Add definition.
18534169689Skan
18535169689Skan2002-01-21  Diego Novillo  <dnovillo@redhat.com>
18536169689Skan
18537169689Skan	* tree-dfa.c (find_refs_in_stmt): Fix capitalization in error
18538169689Skan	message.
18539169689Skan	(find_refs_in_expr): Ditto.
18540169689Skan
18541169689Skan2002-01-20  Diego Novillo  <dnovillo@redhat.com>
18542169689Skan	    Sebastian Pop  <s.pop@laposte.net>
18543169689Skan
18544169689Skan	* Makefile.in: Add c-simplify.o.
18545169689Skan	* cp/Make-lang.in: Ditto.
18546169689Skan	* c-decl.c (c_expand_body): Call simplify_stmt() before
18547169689Skan	calling optimize_tree().
18548169689Skan	* c-simplify.c: New file.
18549169689Skan	* c-tree.h (simplify_stmt): Declare.
18550169689Skan	(print_c_tree)
18551169689Skan	* tree-dfa.c (find_refs_in_stmt): Fix error message for unhandled
18552169689Skan	statement codes.
18553169689Skan
18554169689Skan2002-01-20  Sebastian Pop  <s.pop@laposte.net>
18555169689Skan
18556169689Skan	* Makefile.in: Add c-pretty-print.o.
18557169689Skan	* cp/Make-lang.in: Ditto.
18558169689Skan	* c-pretty-print.c: New file.
18559169689Skan	* c-tree.h (print_c_tree): Declare.
18560169689Skan	(print_c_node): Declare.
18561169689Skan	(debug_c_tree): Declare.
18562169689Skan	(debug_c_node): Declare.
18563169689Skan
18564169689Skan2001-12-29  Diego Novillo  <dnovillo@redhat.com>
18565169689Skan
18566169689Skan	* c-lang.c (c_post_options): Move code to enable tree-ssa
18567169689Skan	if -Wuninitialized is used ...
18568169689Skan	* c-common.c (c_common_post_options): ... here.
18569169689Skan
18570169689Skan2001-12-29  Diego Novillo  <dnovillo@redhat.com>
18571169689Skan
18572169689Skan	* Makefile.in (tree-optimize.o): Don't depend on c-common.h
18573169689Skan	* tree-cfg.c: Don't include c-tree.h.  Explain why we need to
18574169689Skan	include c-common.h.
18575169689Skan	* tree-dfa.c: Explain why we need to include c-common.h.
18576169689Skan	* tree-ssa.c: Ditto.
18577169689Skan	* tree-optimize.c: Don't include c-common.h
18578169689Skan
18579169689Skan2001-12-21  Nathan Sidwell  <nathan@codesourcery.com>
18580169689Skan
18581169689Skan	Revert my patch of 2001-07-23 for the moment.
18582169689Skan
18583169689Skan2001-10-15  Diego Novillo  <dnovillo@redhat.com>
18584169689Skan
18585169689Skan	* tree-dfa.c (create_varref): If the new reference is inside a
18586169689Skan	statement, add it to the list of references for that statement.
18587169689Skan
18588169689Skan2001-10-14  Diego Novillo  <dnovillo@redhat.com>
18589169689Skan
18590169689Skan	* Merge from mainline:
18591169689Skan
18592169689Skan	Tue Sep 11 11:37:52 CEST 2001  Jan Hubicka  <jh@suse.cz>
18593169689Skan
18594169689Skan		* basic-block.h (cached_make_edge): New.
18595169689Skan		(make_edge): Remove first parameter.
18596169689Skan		* flow.c (cached_make_edge): Rename from make_edge; return
18597169689Skan		newly created edge; use obstack allocation.
18598169689Skan		(make_edge): New.
18599169689Skan		(flow_call_edges_add): Updaet make_edge call.
18600169689Skan		(add_noreturn_fake_exit_edges): Likewise.
18601169689Skan		(connect_infinite_loops_to_exit): Liekwise.
18602169689Skan		(make_label_edge, make_edges, find_sub_basic_blocks): Use
18603169689Skan		cached_make_edge.
18604169689Skan		* profile.c (branch_prob): Update make_edge call.
18605169689Skan		* ssa-dce.c (ssa_eliminate_dead_code): Likewise.
18606169689Skan
18607169689Skan2001-10-14  Diego Novillo  <dnovillo@redhat.com>
18608169689Skan
18609169689Skan	* Makefile.in (tree-ssa.o): Remove dependency on flags.h.
18610169689Skan	(tree-optimize.o): Add dependency on flags.h.
18611169689Skan	* bb-reorder.c (fixup_reorder_chain): Update call to make_edge.
18612169689Skan	* c-lang.c (c_post_options): Set flag_tree_ssa if -Wuninitialized
18613169689Skan	is given.
18614169689Skan	* ifcvt.c (find_if_case_1): Update call to make_edge.
18615169689Skan	* toplev.c (toplev_main): Do not warn about -Wuninitialized without
18616169689Skan	-O if -ftree-ssa is used.
18617169689Skan	* tree-cfg.c (dot_dump_file): Remove.
18618169689Skan	(dot_dump_flags): Remove.
18619169689Skan	(cfg_dump_file): Rename to dump_file.
18620169689Skan	(cfg_dump_flags): Rename to dump_flags.
18621169689Skan	(remove_bb_ann): New function.
18622169689Skan	(tree_find_basic_blocks): Do not open dump files at the beginning
18623169689Skan	of the function.
18624169689Skan	Do not call delete_cfg.
18625169689Skan	Create annotations for ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR.
18626169689Skan	(make_for_stmt_blocks): Update FOR_INIT_STMT_BB and FOR_COND_BB
18627169689Skan	when creating the header blocks.
18628169689Skan	Create the blocks for the loop body before the expression block.
18629169689Skan	(make_while_stmt_blocks): Update END_WHILE_BB when creating the
18630169689Skan	header blocks.
18631169689Skan	Create the blocks for the loop body before the end-while block.
18632169689Skan	(make_do_stmt_blocks): Update DO_COND_BB when creating header
18633169689Skan	blocks.
18634169689Skan	Create the blocks for the loop body before the block for DO_COND.
18635169689Skan	(create_bb): When creating loop header blocks, allocate space for
18636169689Skan	the header_blocks union.
18637169689Skan	Call create_bb_ann to create a new annotation.
18638169689Skan	(remove_bb_ann): New function.
18639169689Skan	(tree_split_bb): New function.
18640169689Skan	(make_edges): Remove first argument from call to make_edge,
18641169689Skan	make_ctrl_stmt_edges, make_exit_edges, make_for_stmt_edges,
18642169689Skan	make_while_stmt_edges, make_do_stmt_edges, make_if_stmt_edges,
18643169689Skan	make_goto_stmt_edges, make_break_stmt_edges and
18644169689Skan	make_continue_stmt_edges.
18645169689Skan	When creating edges for the default label, remove the fallthru edge
18646169689Skan	that was created for the associated SWITCH_STMT entry block.
18647169689Skan	Do not call delete_unreachable_blocks.
18648169689Skan	Call tree_cleanup_cfg.
18649169689Skan	(make_ctrl_stmt_edges): Remove first argument.
18650169689Skan	(make_exit_edges): Remove first argument.
18651169689Skan	If the last element of the block is an EXPR_STMT, assume that it is
18652169689Skan	the call to a non-returning function and make an edge to the exit
18653169689Skan	block.
18654169689Skan	Do not call make_return_stmt_edges.  Call make_edge directly.
18655169689Skan	(make_for_stmt_edges): Remove first argument.
18656169689Skan	Simplify the graph for infinite and zero-iteration loops.
18657169689Skan	(make_while_stmt_edges): Remove first argument.
18658169689Skan	Simplify the graph for infinite and zero-iteration loops.
18659169689Skan	(make_do_stmt_edges): Remove first argument.
18660169689Skan	Simplify the graph for infinite and one-iteration loops.
18661169689Skan	(make_if_stmt_edges): Remove first argument.
18662169689Skan	Simplify the graph for always-true and always-false conditionals.
18663169689Skan	(make_goto_stmt_edges): Remove first argument.
18664169689Skan	(make_break_stmt_edges): Remove first argument.
18665169689Skan	(make_continue_stmt_edges): Remove first argument.
18666169689Skan	(make_return_stmt_edges): Remove.
18667169689Skan	(tree_cleanup_cfg): New function.
18668169689Skan	(delete_unreachable_blocks): Do not react to -Wunreachable-code.
18669169689Skan	Write to dump file blocks that have been removed.
18670169689Skan	Call remove_edge.
18671169689Skan	(is_ctrl_altering_stmt): If the statement contains a call to a
18672169689Skan	non-returning function, return 1.
18673169689Skan	(delete_cfg): Call remove_bb_ann.  Also remove annotations for
18674169689Skan	ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR.
18675169689Skan	(latch_block): Use WHILE_COND_BB instead of END_WHILE_BB.
18676169689Skan	(insert_stmt_tree_before): Use cfg_dump_file instead of dump_file.
18677169689Skan	(insert_before_ctrl_stmt): Ditto.
18678169689Skan	(insert_before_normal_stmt): Ditto.
18679169689Skan	(insert_stmt_tree_after): Ditto.
18680169689Skan	(insert_after_ctrl_stmt): Ditto.
18681169689Skan	(insert_after_normal_stmt): Ditto.
18682169689Skan	(replace_expr_in_tree): Ditto.
18683169689Skan	(insert_bb_before): Ditto.
18684169689Skan	* tree-dfa.c (tree_find_varrefs): Call find_refs_in_expr when the
18685169689Skan	tree is not a statement.
18686169689Skan	(find_refs_in_stmt): Update comments.
18687169689Skan	Do not deal with FOR_STMT and DO_STMT trees separately.
18688169689Skan	When processing VAR_DECLs, call find_refs_in_expr with the
18689169689Skan	declaration, not its initial value.
18690169689Skan	(find_refs_in_expr): When processing COMPONENT_REFs and ARRAY_REFs,
18691169689Skan	recurse using the same reference type that was given by the
18692169689Skan	original caller.
18693169689Skan	(create_varref): Insert new PHI terms at the beginning of the
18694169689Skan	BB_REFS array, not the end.
18695169689Skan	* tree-flow.h (struct for_header_blocks): Declare.
18696169689Skan	(union header_blocks): Declare.
18697169689Skan	(struct bb_ann_def): Add new field 'loop_hdr'.
18698169689Skan	(BB_ANN): Re-define so that it can be used as an lvalue.
18699169689Skan	(BB_PARENT): Ditto.
18700169689Skan	(BB_REFS): Ditto.
18701169689Skan	(BB_PREV_CHAIN): Ditto.
18702169689Skan	(BB_BINDING_SCOPE): Ditto.
18703169689Skan	(BB_LOOP_HDR): Define.
18704169689Skan	(FOR_INIT_STMT_BB): Redefine using BB_LOOP_HDR.
18705169689Skan	(FOR_COND_BB): Ditto.
18706169689Skan	(FOR_EXPR_BB): Ditto.
18707169689Skan	(DO_COND_BB): Ditto.
18708169689Skan	(END_WHILE_BB): New name for WHILE_COND_BB.
18709169689Skan	(tree_warn_uninitialized): Declare.
18710169689Skan	(tree_cleanup_cfg): Declare.
18711169689Skan	(tree_split_bb): Declare.
18712169689Skan	* tree-optimize.c: Include flags.h.
18713169689Skan	(init_tree_flow): New function.
18714169689Skan	(optimize_tree): Call build_tree_ssa instead of building SSA
18715169689Skan	in-place.
18716169689Skan	(build_tree_ssa): New function.
18717169689Skan	* tree-optimize.h (build_tree_ssa): Declare.
18718169689Skan	* tree-ssa.c: Don't include toplev.h
18719169689Skan	(tree_warn_uninitialized): Define.
18720169689Skan	(tree_compute_rdefs): Do not call is_upward_exposed.  Instead
18721169689Skan	traverse all the uses of each variable and warn if the use is
18722169689Skan	reached by the ghost definition.
18723169689Skan
18724169689Skan2001-10-10  Graham Stott  <grahams@redhat.com>
18725169689Skan
18726169689Skan	* tree-cfg.c (create_bb): Add new binding_scope parameter which allows
18727169689Skan	the binding scope either to be explicitly specified if non-zero.
18728169689Skan	(make_blocks): Update call to create_bb.
18729169689Skan	(make_for_stmt_blocks): Ditto.
18730169689Skan	(make_while_stmt_blocks): Ditto.
18731169689Skan	(make_do_stmt_blocks): Ditto.
18732169689Skan	(make_if_stmt_blocks): Ditto.
18733169689Skan	(make_switch_stmt_blocks): Ditto.
18734169689Skan	(create_maximal_bb): Ditto.
18735169689Skan	(make_edges): If a statement expression is in the last basic
18736169689Skan	block create an edge to EXIT_BLOCK_PTR and not the next block.
18737169689Skan	(insert_before_normal_stmt): Pass the appropriate binding scope to
18738169689Skan	create_bb.
18739169689Skan
18740169689Skan2001-10-01  Graham Stott  <grahams@redhat.com>
18741169689Skan	    Diego Novillo  <dnovillo@redhat.com>
18742169689Skan
18743169689Skan	* tree-optimize.c (optimize_tree): Early return if the program has
18744169689Skan	errors.
18745169689Skan
18746169689Skan2001-09-30  Diego Novillo  <dnovillo@redhat.com>
18747169689Skan
18748169689Skan	* tree-optimize.c (optimize_tree): Compute reaching definitions
18749169689Skan	after building SSA.
18750169689Skan
18751169689Skan2001-09-30  Diego Novillo  <dnovillo@redhat.com>
18752169689Skan
18753169689Skan	* tree-cfg.c (insert_after_ctrl_stmt): Remove unused argument.
18754169689Skan	(make_blocks): Pop top element from scope binding stack when an end
18755169689Skan	of scope statement is found.
18756169689Skan	(create_bb): Remove code for popping top element from scope binding
18757169689Skan	stack.
18758169689Skan	Do not push basic block 0 to initialize scope binding stack.
18759169689Skan	(insert_stmt_tree_after): Remove unused argument from call to
18760169689Skan	insert_after_ctrl_stmt.
18761169689Skan	(tree_dump_bb): Dump BB_BINDING_SCOPE if defined.
18762169689Skan	* doc/invoke.texi: Document debugging option -ftree-dump-ssa-rdefs.
18763169689Skan
18764169689Skan2001-09-29  Diego Novillo  <dnovillo@redhat.com>
18765169689Skan
18766169689Skan	* Makefile.in (tree-ssa.o): Update dependencies.
18767169689Skan	(tree-cfg.o): Ditto.
18768169689Skan	(tree-optimize.o): Ditto.
18769169689Skan	* basic-block.h (BB_CONTROL_EXPR): Define.
18770169689Skan	(BB_CONTROL_ENTRY): Define.
18771169689Skan	* c-common.h (TDF_RDEFS): Define.
18772169689Skan	* c-dump.c (dump_option_value_in): Add entry for TDF_RDEFS.
18773169689Skan	* tree-cfg.c: Include flags.h and c-tree.h
18774169689Skan	(binding_stack): New local variable.
18775169689Skan	(delete_block): Rename to delete_bb.
18776169689Skan	(tree_find_basic_blocks): Initialize varray 'binding_stack'.
18777169689Skan	Call make_blocks with an additional argument.
18778169689Skan	Adjust size of varray 'basic_block_info' after building CFG.
18779169689Skan	(make_blocks): Add new argument prev_chain_p.
18780169689Skan	Update all callers and callees.
18781169689Skan	Create sub-graphs for statement-expressions.
18782169689Skan	Update prev_chain_p when accessing the next tree in the chain.
18783169689Skan	(make_for_stmt_blocks): Add new argument prev_chain_p.
18784169689Skan	Update all callers and callees.
18785169689Skan	Update flags for control header blocks with BB_CONTROL_ENTRY and/or
18786169689Skan	BB_CONTROL_EXPR.
18787169689Skan	(make_while_stmt_blocks): Ditto.
18788169689Skan	(make_do_stmt_blocks): Ditto.
18789169689Skan	(make_if_stmt_blocks): Ditto.
18790169689Skan	(make_switch_stmt_blocks): Ditto.
18791169689Skan	(create_maximal_bb): Add new argument prev_chain_p.
18792169689Skan	Update all callers and callees.
18793169689Skan	(create_bb): Add new argument prev_chain_p.
18794169689Skan	Push basic block 0 the first time into the binding scope stack.
18795169689Skan	Associate the new basic block to the binding scope at the top of
18796169689Skan	the binding stack.
18797169689Skan	Push new binding scopes when a SCOPE_BEGIN statement is found.
18798169689Skan	Pop the top binding scope when a SCOPE_END statement is found.
18799169689Skan	(make_edges): Handle statement expressions.
18800169689Skan	Handle case labels preceded by scope statements in switch
18801169689Skan	statements.
18802169689Skan	(make_for_stmt_edges): Use FOR_INIT_STMT_BB, FOR_COND_BB and
18803169689Skan	FOR_EXPR_BB to access the header basic blocks.
18804169689Skan	(delete_unreachable_blocks): Call delete_bb instead of
18805169689Skan	delete_block.
18806169689Skan	(delete_block): Rename to delete_bb.
18807169689Skan	(block_invalidates_loop): Use data references to find calls to
18808169689Skan	non-pure functions.
18809169689Skan	(is_ctrl_stmt): Reformat.
18810169689Skan	(loop_body): New function.
18811169689Skan	(set_loop_body): New function.
18812169689Skan	(stmt_starts_bb_p): Statement expression trees also start a new
18813169689Skan	basic block.
18814169689Skan	(delete_cfg): Call VARRAY_FREE to delete all the references in each
18815169689Skan	basic block.
18816169689Skan	(latch_block): Use FOR_EXPR_BB, WHILE_COND_BB and DO_COND_BB to
18817169689Skan	find out the latch block for the loop.
18818169689Skan	(last_exec_stmt): New function.
18819169689Skan	(is_exec_stmt): Scope statements that begin a scope are also
18820169689Skan	considered executables.
18821169689Skan	(is_statement_expression): New function.
18822169689Skan	(first_non_decl_stmt): New function.
18823169689Skan	(first_decl_stmt): New function.
18824169689Skan	(first_non_label_in_bb): New function.
18825169689Skan	(insert_stmt_tree_before): New function.
18826169689Skan	(insert_before_ctrl_stmt): New function.
18827169689Skan	(insert_before_normal_stmt): New function.
18828169689Skan	(insert_stmt_tree_after): New function.
18829169689Skan	(insert_after_ctrl_stmt): New function.
18830169689Skan	(insert_after_normal_stmt): New function.
18831169689Skan	(insert_after_loop_body): New function.
18832169689Skan	(replace_expr_in_tree): New function.
18833169689Skan	(find_expr_in_tree): New function.
18834169689Skan	(insert_bb_before): New function.
18835169689Skan	(tree_dump_bb): Display the contents of BB_PREV_CHAIN_P.
18836169689Skan	* tree-dfa.c (tree_find_varrefs): Use accessor macros for array
18837169689Skan	'referenced_symbols'.
18838169689Skan	(find_refs_in_stmt): Do not process error_mark_node trees.
18839169689Skan	Handle statement-expression nodes as any other statement tree.
18840169689Skan	Do not call find_refs_in_stmt_expr.
18841169689Skan	(find_refs_in_stmt_expr): Remove.
18842169689Skan	(add_ref_to_sym): Remove.
18843169689Skan	(add_ref_to_bb): Remove.
18844169689Skan	(find_refs_in_expr): Do not process error_mark_node trees.
18845169689Skan	ADDR_EXPR trees are not variable references except if used in a
18846169689Skan	CALL_EXPR node.
18847169689Skan	Handle EXPR_WITH_FILE_LOCATION nodes.
18848169689Skan	(create_varref): Remove variable 'is_new'.
18849169689Skan	Initialize data-flow arrays VARDEF_IMM_USES, VARDEF_RUSES,
18850169689Skan	VARDEF_PHI_CHAIN and VARUSE_RDEFS.
18851169689Skan	Do not call add_ref_to_sym and add_ref_to_bb.
18852169689Skan	(add_ref_symbol): Use accessor macros for varray
18853169689Skan	'referenced_symbols'.
18854169689Skan	(function_may_recurse_p): New function.
18855169689Skan	(get_fcalls): New function.
18856169689Skan	(find_declaration): New function.
18857169689Skan	(dump_varref): Handle NULL values of VARREF_EXPR.
18858169689Skan	Use VARDEF_PHI_CHAIN instead of VARPHI_CHAIN.
18859169689Skan	(dump_varref_list): Check if the list is NULL before traversing it.
18860169689Skan	* tree-flow.h (struct vardef): Add fields 'ruses', 'marked' and
18861169689Skan	'phi_chain'.
18862169689Skan	(VARDEF_RUSES): Define.
18863169689Skan	(VARDEF_MARKED): Define.
18864169689Skan	(VARDEF_PHI_CHAIN): Define.
18865169689Skan	(VARPHI_CHAIN): Remove.
18866169689Skan	(struct varphi): Remove.
18867169689Skan	(struct varuse): Add field 'rdefs'.
18868169689Skan	(VARUSE_RDEFS): Define.
18869169689Skan	(union varref_def): Remove field 'phi'.
18870169689Skan	(IS_GHOST_DEF): Define.
18871169689Skan	(IS_ARTIFICIAL_REF): Define.
18872169689Skan	(struct bb_ann_def): Add fields 'prev_chain_p' and 'binding_scope'.
18873169689Skan	(BB_PREV_CHAIN_P): Define.
18874169689Skan	(BB_BINDING_SCOPE): Define.
18875169689Skan	(FOR_INIT_STMT_BB): Define.
18876169689Skan	(FOR_COND_BB): Define.
18877169689Skan	(FOR_EXPR_BB): Define.
18878169689Skan	(WHILE_COND_BB): Define.
18879169689Skan	(DO_COND_BB): Define.
18880169689Skan	(IF_COND_BB): Define.
18881169689Skan	(CASE_COND_BB): Define.
18882169689Skan	(NREF_SYMBOLS): Define.
18883169689Skan	(REF_SYMBOL): Define.
18884169689Skan	(ADD_REF_SYMBOL): Define.
18885169689Skan	(FCALL_NON_PURE): Define.
18886169689Skan	(FCALL_PURE): Define.
18887169689Skan	(FCALL_BUILT_IN): Define.
18888169689Skan	(loop_body): Declare.
18889169689Skan	(set_loop_body): Declare.
18890169689Skan	(last_exec_stmt): Declare.
18891169689Skan	(is_statement_expression): Declare.
18892169689Skan	(first_non_decl_stmt): Declare.
18893169689Skan	(first_decl_stmt): Declare.
18894169689Skan	(first_non_label_in_bb): Declare.
18895169689Skan	(insert_stmt_tree_before): Declare.
18896169689Skan	(insert_stmt_tree_after): Declare.
18897169689Skan	(replace_expr_in_tree): Declare.
18898169689Skan	(find_expr_in_tree): Declare.
18899169689Skan	(insert_bb_before): Declare.
18900169689Skan	(function_may_recurse_p): Declare.
18901169689Skan	(get_fcalls): Declare.
18902169689Skan	(find_declaration): Declare.
18903169689Skan	(tree_compute_rdefs): Declare.
18904169689Skan	(analyze_rdefs): Declare.
18905169689Skan	(is_upward_exposed): Declare.
18906169689Skan	* tree-optimize.c (optimize_tree): Update name for varray
18907169689Skan	referenced_symbols.
18908169689Skan	Free varray referenced_symbols and call delete_ssa on exit.
18909169689Skan	* tree-ssa.c: Include flags.h, diagnostic.h and toplev.h.
18910169689Skan	(tree_build_ssa): Create ghost definitions before building FUD
18911169689Skan	chains.
18912169689Skan	(insert_phi_terms): Use accessor macros for 'referenced_symbols'.
18913169689Skan	Ignore ghost definitions when placing PHI terms.
18914169689Skan	(build_fud_chains): Call get_tree_ann to create an annotation for
18915169689Skan	the symbol if it doesn't already have one.
18916169689Skan	(search_fud_chains): Reformat comments.
18917169689Skan	Do not initialize varray VARDEF_IMM_USES.
18918169689Skan	If a successor basic block does not have references, continue on to
18919169689Skan	the next one, do not stop.
18920169689Skan	Do not initialize varray VARDEF_PHI_CHAIN.
18921169689Skan	(delete_ssa): New function.
18922169689Skan	(delete_refs): New function.
18923169689Skan	(tree_compute_rdefs): New function.
18924169689Skan	(analyze_rdefs): New function.
18925169689Skan	(follow_chain): New function.
18926169689Skan	(is_upward_exposed): New function.
18927169689Skan
18928169689Skan2001-09-14  Diego Novillo  <dnovillo@redhat.com>
18929169689Skan
18930169689Skan	* tree-cfg.c (tree_find_basic_blocks): Remove call to
18931169689Skan	mark_critical_edges.
18932169689Skan	(create_maximal_bb): Do not create annotations for non-executable
18933169689Skan	statements.
18934169689Skan	(map_stmt_to_bb): Rename basic_block_ann with bb_ann.
18935169689Skan	(delete_cfg): Ditto.
18936169689Skan	(is_exec_stmt): Reformat.
18937169689Skan	(create_bb_ann): New function.
18938169689Skan	* tree-dfa.c (create_node): Remove.
18939169689Skan	(ref_symbols_list): Remove.
18940169689Skan	(create_tree_ann): Declare.
18941169689Skan	(referenced_symbols): Declare.
18942169689Skan	(tree_find_varrefs): Replace usage of linked lists with variable
18943169689Skan	arrays.
18944169689Skan	(create_varref): Remove second argument from call to
18945169689Skan	add_ref_symbol.
18946169689Skan	Update comments.
18947169689Skan	(add_ref_to_sym): Replace usage of linked lists with variable
18948169689Skan	arrays.
18949169689Skan	Declare static.
18950169689Skan	(add_ref_to_bb): Ditto.
18951169689Skan	(add_ref_symbol): Ditto.
18952169689Skan	(dump_varref_list): Ditto.
18953169689Skan	(debug_varref_list): Ditto.
18954169689Skan	(create_varref_list): Remove.
18955169689Skan	(push_ref): Remove.
18956169689Skan	(create_node): Remove.
18957169689Skan	(delete_varref_list): Remove.
18958169689Skan	(get_tree_ann): Call create_tree_ann if the tree doesn't have an
18959169689Skan	annotation already.
18960169689Skan	(create_tree_ann): New function.
18961169689Skan	* tree-flow.h (varref_list_def): Remove.
18962169689Skan	(vardef): Change type of field 'imm_uses' to 'varray_type'.
18963169689Skan	(varphi): Change type of field 'phi_chain' to 'varray_type'.
18964169689Skan	(varref_node_def): Remove.
18965169689Skan	(varref_node): Remove.
18966169689Skan	(VARREF_NODE_ELEM): Remove.
18967169689Skan	(VARREF_NODE_NEXT): Remove.
18968169689Skan	(VARREF_NODE_PREV): Remove.
18969169689Skan	(varref_list_def): Remove.
18970169689Skan	(varref_list): Remove.
18971169689Skan	(VARREF_LIST_FIRST): Remove.
18972169689Skan	(VARREF_LIST_LAST): Remove.
18973169689Skan	(tree_ann_def): Change type of field 'refs' to 'varray_type'.
18974169689Skan	(basic_block_ann_def): Rename to 'bb_ann_def'.
18975169689Skan	Change type of field 'refs' to 'varray_type'.
18976169689Skan	(basic_block_ann): Rename to 'bb_ann'.
18977169689Skan	(ref_symbols_list): Remove.
18978169689Skan	(referenced_symbols): Declare.
18979169689Skan	(add_ref_to_sym): Remove.
18980169689Skan	(add_ref_to_bb): Remove.
18981169689Skan	(add_ref_symbol): Remove.
18982169689Skan	(remove_ann_from_sym): Remove.
18983169689Skan	(create_varref_list): Remove.
18984169689Skan	(push_ref): Remove.
18985169689Skan	(delete_varref_list): Remove.
18986169689Skan	(debug_varref_list): Update argument type to be 'varray_type'.
18987169689Skan	(dump_varref_list): Ditto.
18988169689Skan	* tree-optimize.c: Include 'basic-block.h'.
18989169689Skan	(optimize_tree): Replace references to 'ref_symbols_list' with
18990169689Skan	'referenced_symbols'.
18991169689Skan	Remove call to delete_varref_list.
18992169689Skan	* tree-ssa.c (insert_phi_terms): Rename 'work_list' to
18993169689Skan	'work_stack'.
18994169689Skan	Use VARRAY_PUSH and VARRAY_TOP to access 'work_stack' instead of
18995169689Skan	maintaining the stack pointer in 'work_list_top'.
18996169689Skan	Remove code to grow 'work_stack'.
18997169689Skan	Remove references to 'work_list_top'.
18998169689Skan	Replace references to 'ref_symbols_list' with 'referenced_symbols'.
18999169689Skan	(build_fud_chains): Replace references to 'ref_symbols_list' with
19000169689Skan	'referenced_symbols'.
19001169689Skan	(search_fud_chains): If there are no variable references in the
19002169689Skan	basic block, return early.
19003169689Skan	Change usage of linked lists with variable arrays.
19004169689Skan
19005169689Skan2001-09-07  Diego Novillo  <dnovillo@redhat.com>
19006169689Skan
19007169689Skan	* tree-cfg.c (tree_find_basic_blocks): Document how to traverse
19008169689Skan	trees inside a basic block.
19009169689Skan	(make_for_stmt_blocks): Make sure that there is always a block for
19010169689Skan	FOR_EXPR, even if the loop does not have an expression.
19011169689Skan	Create a separate block for FOR_INIT_STMT.
19012169689Skan	(make_while_stmt_blocks): Always create an "end_while" block.
19013169689Skan	(make_if_stmt_blocks): Do not store IF_COND in the header block of
19014169689Skan	an IF statement.
19015169689Skan	(make_for_stmt_edges): Create an edge from the block header to the
19016169689Skan	block for FOR_INIT_STMT.
19017169689Skan	Determine the first block of the loop body calling BB_FOR_STMT on
19018169689Skan	the first executable statement in the body.
19019169689Skan	Remove the special case for missing FOR_EXPR trees.
19020169689Skan	(make_while_stmt_edges): Create a back edge from the end_while
19021169689Skan	block to the header block.
19022169689Skan	Determine the first block of the loop body calling BB_FOR_STMT on
19023169689Skan	the first executable statement in the body.
19024169689Skan	(make_do_stmt_edges): Determine the first block of the loop body
19025169689Skan	calling BB_FOR_STMT on the first executable statement in the body.
19026169689Skan	(condition_block): Rename to latch_block.  Return the latch
19027169689Skan	block for the given loop header.
19028169689Skan	(make_continue_stmt_edges): Rename condition_block to
19029169689Skan	latch_block.
19030169689Skan	(successor_block): Ditto.
19031169689Skan	* tree-flow.h (condition_block): Rename to latch_block.
19032169689Skan
19033169689Skan2001-09-06  Diego Novillo  <dnovillo@redhat.com>
19034169689Skan
19035169689Skan	* tree-dfa.c (tree_find_varrefs): Use TDF_REFS instead of TDF_VARREF.
19036169689Skan	* tree-flow.h (TDF_VARREF): Remove.
19037169689Skan
19038169689Skan2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
19039169689Skan
19040169689Skan	* c-common.h (tree_dump_index): Add more comments.
19041169689Skan	(TDF_REFS): New dump flag.
19042169689Skan	* c-dump.c (dump_files): Name flags `tree' rather than `ast'.
19043169689Skan	(dump_option_value_info): New struct.
19044169689Skan	(dump_options): New array.
19045169689Skan	(dump_switch_p): Parse switch options symbolically.
19046169689Skan	* doc/invoke.texi (-fdump-ast): Rename to ...
19047169689Skan	(-fdump-tree): ... here. Document options are symbolic, and
19048169689Skan	not all are applicable. Combine ssa related flags into the other
19049169689Skan	tree dump flags.
19050169689Skan
19051169689Skan2001-08-27  Diego Novillo  <dnovillo@redhat.com>
19052169689Skan
19053169689Skan	* Makefile.in (tree-ssa.o): Update dependencies.
19054169689Skan	(tree-cfg.o): Ditto.
19055169689Skan	(tree-dfa.o): Ditto.
19056169689Skan	(tree-optimize.o): Ditto.
19057169689Skan
19058169689Skan2001-08-26  Diego Novillo  <dnovillo@redhat.com>
19059169689Skan
19060169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Replace tree-opt.o with
19061169689Skan	tree-optimize.o.
19062169689Skan	(c-decl.o): Ditto.
19063169689Skan	(tree-ssa.o): Ditto.
19064169689Skan	(tree-cfg.o): Ditto.
19065169689Skan	(tree-dfa.o): Ditto.
19066169689Skan	(tree-opt.o): Ditto.
19067169689Skan	* c-decl.c: Replace tree-opt.h with tree-optimize.h.
19068169689Skan	(c_expand_body): Remove call to init_tree_opt.
19069169689Skan	* flow.c (flow_loop_dump): Do not display insn UIDs if this is not
19070169689Skan	an RTL basic block.
19071169689Skan	* tree-cfg.c: Replace tree-opt.h with tree-optimize.h.
19072169689Skan	(block_invalidates_loop): New local function.
19073169689Skan	(validate_loops): New function.
19074169689Skan	(tree_dump_bb): Display the loop depth of the block.
19075169689Skan	* tree-dfa.c: Replace tree-opt.h with tree-optimize.h.
19076169689Skan	* tree-flow.h (validate_loops): Declare.
19077169689Skan	* tree-opt.c: Rename to tree-optimize.c.
19078169689Skan	* tree-opt.h: Rename to tree-optimize.h.
19079169689Skan	* tree-optimize.c: Rename from tree-opt.c.
19080169689Skan	* tree-optimize.h: Rename from tree-opt.h.
19081169689Skan	* tree-ssa.c: Replace tree-opt.h with tree-optimize.h.
19082169689Skan	(tree_build_ssa): Call tree_dump_bb instead of tree_debug_bb.
19083169689Skan	* cp/Make-lang.in: Replace tree-opt.h with tree-optimize.h.
19084169689Skan
19085169689Skan2001-08-20  Diego Novillo  <dnovillo@redhat.com>
19086169689Skan
19087169689Skan	* basic-block.h (basic_block): Remove field 'reachable'.
19088169689Skan	Add new field 'flags'.
19089169689Skan	(BB_REACHABLE): Define.
19090169689Skan	* c-common.h (tree_dump_index): Add TDI_cfg, TDI_dot, TDI_ssa.
19091169689Skan	* c-decl.c (c_decode_option): Skip '-f' prefix before calling
19092169689Skan	dump_switch_p.
19093169689Skan	* c-dump.c (dump_file_info): Add entries for -fdump-tree-cfg,
19094169689Skan	-fdump-tree-graphviz and -fdump-tree-ssa.
19095169689Skan	* flow.c (find_unreachable_blocks): Use BB_REACHABLE bit in bb->flags
19096169689Skan	instead of bb->reachable.
19097169689Skan	(delete_unreachable_blocks): Ditto.
19098169689Skan	* tree-cfg.c: Minor formatting changes throughout the file.
19099169689Skan	(DEBUG_TREE_FLOW): Remove.
19100169689Skan	(debug_tree_flow): Remove.
19101169689Skan	(cfg_dump_file): New local variable.
19102169689Skan	(dot_dump_file): New local variable.
19103169689Skan	(cfg_dump_flags): New local variable.
19104169689Skan	(dot_dump_flags): New local variable.
19105169689Skan	(tree_find_basic_blocks): Remove unused arguments.
19106169689Skan	Add code to react to -fdump-tree-cfg and -fdump-tree-graphviz.
19107169689Skan	Remove uses of DEBUG_TREE_FLOW.
19108169689Skan	(delete_unreachable_blocks): Use BB_REACHABLE bit in bb->flags
19109169689Skan	instead of bb->reachable.
19110169689Skan	(tree_dump_cfg): New.
19111169689Skan	(tree_debug_cfg): Call tree_dump_cfg().
19112169689Skan	(tree_cfg2dot): Accept a FILE pointer instead of a file name as
19113169689Skan	argument.
19114169689Skan	Name the graph with the current function name.
19115169689Skan	* tree-dfa.c: Minor formatting changes throughout the file.
19116169689Skan	(DEBUG_TREE_DFA): Remove.
19117169689Skan	(debug_tree_dfa): Remove.
19118169689Skan	(dump_file): New local variable.
19119169689Skan	(dump_flags): New local variable.
19120169689Skan	(tree_find_varrefs): Add code to react to -fdump-tree-ssa.
19121169689Skan	Remove uses of DEBUG_TREE_DFA.
19122169689Skan	(find_refs_in_expr): Remove uses of DEBUG_TREE_DFA.
19123169689Skan	(create_varref): Replace VARREF_BLOCK with VARREF_BB.
19124169689Skan	* tree-flow.h: Minor formatting changes throughout the file.
19125169689Skan	(VARREF_BLOCK): Rename to VARREF_BB.
19126169689Skan	(VARREF_NEXT): Remove.
19127169689Skan	(VARREF_PREV): Remove.
19128169689Skan	(TDF_VARREF): Define.
19129169689Skan	(tree_find_basic_blocks): Remove unused arguments.
19130169689Skan	(tree_dump_cfg): Declare.
19131169689Skan	(tree_cfg2dot): Change argument to FILE *.
19132169689Skan	* tree-opt.c: Minor formatting changes throughout the file.
19133169689Skan	(optimize_tree): Remove unused arguments in call to
19134169689Skan	tree_find_basic_blocks().
19135169689Skan	* tree-opt.h: Ditto.
19136169689Skan	* tree-ssa.c: Minor formatting changes throughout the file.
19137169689Skan	(DEBUG_TREE_SSA): Remove.
19138169689Skan	(debug_tree_ssa): Remove.
19139169689Skan	(dump_file): New local variable.
19140169689Skan	(dump_flags): New local variable.
19141169689Skan	(tree_build_ssa): Add code to react to -fdump-tree-ssa.
19142169689Skan	Remove uses of DEBUG_TREE_SSA.
19143169689Skan	(insert_phi_terms): Remove uses of DEBUG_TREE_SSA.
19144169689Skan	* doc/invoke.texi: Add documentation for -fdump-tree-cfg,
19145169689Skan	-fdump-tree-graphviz and -fdump-tree-ssa.
19146169689Skan	Replace existing references to -fdump-tree with -fdump-ast.
19147169689Skan
19148169689Skan2001-08-10  Diego Novillo  <dnovillo@redhat.com>
19149169689Skan
19150169689Skan	* basic-block.h (basic_block): Add new field 'reachable'.
19151169689Skan	(expunge_block): Declare.
19152169689Skan	* flow.c (ENTRY_BLOCK_PTR): Initialize field 'reachable'.
19153169689Skan	(EXIT_BLOCK_PTR): Ditto.
19154169689Skan	(expunge_block): Remove static declaration.
19155169689Skan	(cleanup_cfg): Clear bb->aux on every basic block.
19156169689Skan	(find_unreachable_blocks): Use field 'reachable' when computing
19157169689Skan	reachability.
19158169689Skan	(delete_unreachable_blocks): Use field 'reachable'.
19159169689Skan
19160169689Skan	* tree-cfg.c: Rename all instance of 'node' with 'block.
19161169689Skan	(get_successor_block): Rename to successor_block.
19162169689Skan	(make_compound_stmt_edges): Remove.
19163169689Skan	(make_switch_stmt_edges): Remove.
19164169689Skan	(delete_unreachable_blocks): New.
19165169689Skan	(delete_block): New.
19166169689Skan	(make_blocks): Add new argument 'compound_stmt'.  Do not include
19167169689Skan	COMPOUND_STMT trees in the flowgraph.
19168169689Skan	(make_for_stmt_blocks): Include FOR_INIT_STMT in the entry block of
19169169689Skan	the loop.
19170169689Skan	If FOR_COND does not exist, create a tree holding the constant 1.
19171169689Skan	Add new argument 'compound_stmt'.
19172169689Skan	(make_while_stmt_blocks): Include WHILE_COND in the entry block of
19173169689Skan	the loop.
19174169689Skan	Add new argument 'compound_stmt'.
19175169689Skan	(make_do_stmt_blocks): Add new argument 'compound_stmt'.
19176169689Skan	(make_if_stmt_blocks): Add new argument 'compound_stmt'.
19177169689Skan	Include IF_COND in the IF header block.
19178169689Skan	(make_switch_stmt_blocks): Add new argument 'compound_stmt'.
19179169689Skan	Include SWITCH_COND in the SWITCH header block.
19180169689Skan	(create_maximal_bb): Remove argument 'is_loop_header'.
19181169689Skan	Add new argument 'compound_stmt'.
19182169689Skan	Update all callers.
19183169689Skan	Return the newly created basic block instead of its last statement.
19184169689Skan	Update comments.
19185169689Skan	Do not store control flow altering statements in bb->exit_stmt.
19186169689Skan	Only add executable statements to the block.
19187169689Skan	Annotate with 'compound_stmt' each tree added to the block.
19188169689Skan	(create_bb): Do not update annotation 'is_loop_header'.
19189169689Skan	(make_edges): Remove naive reachability analysis.
19190169689Skan	When a label node is found, add an edge from the immediately
19191169689Skan	enclosing switch statement.
19192169689Skan	Call delete_unreachable_blocks() after adding all the edges.
19193169689Skan	(make_ctrl_stmt_edges): Do not consider COMPOUND_STMT trees.
19194169689Skan	Do nothing for SWITCH_STMT trees.
19195169689Skan	(make_exit_edges): Use bb->end_tree instead of BB_EXIT_STMT.
19196169689Skan	(make_for_stmt_edges): Remove code that added edges for the block
19197169689Skan	holding FOR_INIT_STMT.
19198169689Skan	Update comments.
19199169689Skan	Do not consider the case where FOR_COND is NULL.
19200169689Skan	Call first_exec_stmt() to determine if FOR_BODY is empty.
19201169689Skan	Only create an edge from expr_bb to cond_bb if FOR_EXPR is
19202169689Skan	non-null.
19203169689Skan	(make_while_stmt_edges): Remove code that added edges for the block
19204169689Skan	holding WHILE_COND.
19205169689Skan	Update comments.
19206169689Skan	Call first_exec_stmt() to determine if WHILE_BODY is empty.
19207169689Skan	(make_do_stmt_edges): Call first_exec_stmt() to determine if
19208169689Skan	DO_BODY is empty.
19209169689Skan	(make_if_stmt_edges): Remove code that added edges for the block
19210169689Skan	holding IF_COND.
19211169689Skan	Call first_exec_stmt() to determine if THEN_CLAUSE or ELSE_CLAUSE
19212169689Skan	are empty.
19213169689Skan	(make_switch_stmt_edges): Remove.
19214169689Skan	(make_goto_stmt_edges): Use bb->end_tree instead of BB_EXIT_STMT.
19215169689Skan	(make_break_stmt_edges): Use bb->end_tree instead of BB_EXIT_STMT.
19216169689Skan	Call switch_parent() and loop_parent() to determine if the
19217169689Skan	statement is inside an appropriate control structure.
19218169689Skan	(make_continue_stmt_edges): Use bb->end_tree instead of
19219169689Skan	BB_EXIT_STMT.
19220169689Skan	(make_return_stmt_edges): Ditto.
19221169689Skan	(get_successor_block): Rename to successor_block.
19222169689Skan	Call first_exec_stmt() to find the first executable statement in
19223169689Skan	TREE_CHAIN.
19224169689Skan	(is_ctrl_stmt): Do not consider COMPOUND_STMT trees.
19225169689Skan	(stmt_starts_bb_p): Ditto.
19226169689Skan	(stmt_ends_bb_p): Reformat comments.
19227169689Skan	(delete_cfg): Reformat comments.
19228169689Skan	(find_loop_parent): Rename to loop_parent.
19229169689Skan	(get_condition_block): Rename to condition_block.
19230169689Skan	Update to use new index numbers for control structure header
19231169689Skan	blocks.
19232169689Skan	(switch_parent): New.
19233169689Skan	(first_exec_stmt): New.
19234169689Skan	(is_exec_stmt): New.
19235169689Skan	(tree_cfg2dot): Reformat comments.
19236169689Skan	* tree-dfa.c (find_refs): Remove.
19237169689Skan	(find_refs_in_stmt): New
19238169689Skan	(find_refs_in_stmt_expr): New.
19239169689Skan	(tree_find_varrefs): Look for variables doing a CFG traversal
19240169689Skan	instead of the trees.  Remove both arguments.
19241169689Skan	(find_refs_in_expr): Add new argument 'bb'.
19242169689Skan	Update all recursive calls.
19243169689Skan	(create_varref): Abort if the basic block 'bb' is NULL.
19244169689Skan	(add_ref_to_sym): Reformat comments.
19245169689Skan	(add_ref_symbol): Ditto.
19246169689Skan	(delete_varref_list): Ditto.
19247169689Skan	* tree-flow.h (struct tree_ann_def): Add 'compound_stmt'.
19248169689Skan	(TREE_COMPOUND_STMT): New macro.
19249169689Skan	(struct basic_block_ann_def): Remove 'exit_stmt' and
19250169689Skan	'is_loop_header'.
19251169689Skan	(BB_EXIT_STMT): Remove.
19252169689Skan	(BB_IS_LOOP_HEADER): Remove.
19253169689Skan	* tree-opt.c (optimize_tree): Call tree_find_varrefs() with no
19254169689Skan	arguments.
19255169689Skan	Only build DFA and SSA information if n_basic_blocks is greater
19256169689Skan	than zero.
19257169689Skan	* tree-ssa.c: Rename all instances of 'node' with 'block'.
19258169689Skan	(tree_build_ssa): Reformat comments.
19259169689Skan	(insert_phi_terms): Ditto.
19260169689Skan
19261169689Skan2001-08-01  Diego Novillo  <dnovillo@redhat.com>
19262169689Skan
19263169689Skan	* tree-cfg.c (USE_TREE_IL): Remove.
19264169689Skan	(make_back_edges): Remove.
19265169689Skan	(make_fallthru_edge): Remove.
19266169689Skan	(get_outermost_scope_block): Remove.
19267169689Skan	(is_last_block_of_loop): Remove.
19268169689Skan	(tree_find_basic_blocks): Do not return early if 'errorcount' is set.
19269169689Skan	(make_edges): Do not treat back edges as a separate case.
19270169689Skan	Do not call make_fallthru_edge to create fall-through edges.
19271169689Skan	Do not emit a warning for unreachable blocks containing a single
19272169689Skan	closing brace.
19273169689Skan	(make_do_stmt_edges): Update comment.
19274169689Skan	(make_goto_stmt_edges): Do not call get_outermost_scope_block().
19275169689Skan	(make_break_stmt_edges): Do not call get_outermost_scope_block().
19276169689Skan	Do not call make_back_edges().
19277169689Skan	(make_continue_stmt_edges): Call find_loop_parent().  Emit an error
19278169689Skan	if the 'continue' statement is not inside a loop.  Call
19279169689Skan	get_condition_block() to find the target node.
19280169689Skan	(make_return_stmt_edges): Do not call get_outermost_scope_block().
19281169689Skan	(get_successor_block): Return EXIT_BLOCK_PTR if 'bb' is the last
19282169689Skan	block in the graph.
19283169689Skan	Return the condition node of the loop if 'bb' doesn't have a
19284169689Skan	natural successor and its parent is a loop header.
19285169689Skan	(tree_cfg2dot): Output fake edges with dotted lines.
19286169689Skan	* tree-dfa.c (USE_TREE_IL): Remove.
19287169689Skan	* tree-opt.c (USE_TREE_IL): Remove.
19288169689Skan	* tree-ssa.c (USE_TREE_IL): Remove.
19289169689Skan	* tree-flow.h (is_last_block_of_loop): Remove.
19290169689Skan
19291169689Skan2001-07-23  Diego Novillo  <dnovillo@redhat.com>
19292169689Skan
19293169689Skan	* Makefile.in (C_AND_OBJC_OBJS): Add tree-cfg.o, tree-dfa.o,
19294169689Skan	tree-ssa.o and tree-opt.o.
19295169689Skan	(c-decl.o): Add dependency on tree-opt.h
19296169689Skan	(tree-ssa.o): New rule.
19297169689Skan	(tree-cfg.o): New rule.
19298169689Skan	(tree-dfa.o): New rule.
19299169689Skan	(tree-opt.o): New rule.
19300169689Skan	* c-decl.c: Include tree-opt.h.
19301169689Skan	(c_expand_body): Call optimize_tree() when the -ftree-ssa flag is
19302169689Skan	given.
19303169689Skan	* flags.h (flag_tree_ssa): Declare.
19304169689Skan	* toplev.c (flag_tree_ssa): Define.
19305169689Skan	(lang_independent_options): Add -ftree-ssa.
19306169689Skan	* tree-cfg.c: New file.
19307169689Skan	* tree-dfa.c: New file.
19308169689Skan	* tree-flow.h: New file.
19309169689Skan	* tree-opt.c: New file.
19310169689Skan	* tree-opt.h: New file.
19311169689Skan	* tree-ssa.c: New file.
19312169689Skan	* cp/Make-lang.in (CXX_C_OBJS): Add tree-cfg.o, tree-dfa.o,
19313169689Skan	tree-opt.o and tree-ssa.o.
19314169689Skan	* doc/invoke.texi: Add documentation for -ftree-ssa.
19315169689Skan
19316169689Skan2001-07-23  Nathan Sidwell  <nathan@codesourcery.com>
19317169689Skan
19318169689Skan	* Makefile.in (calls.o): Depend on intl.h.
19319169689Skan	* calls.c: Include intl.h.
19320169689Skan	(ECF_NEED_STACK_FRAME, ECF_NEED_ARG_FRAME): New flags.
19321169689Skan	(special_function_p): Detect when we need a stack or arg
19322169689Skan	frame. Don't optimize on length.
19323169689Skan	(setjmp_call_p): Remove.
19324169689Skan	(uninlinable_call_p): New function.
19325169689Skan	* tree.h (setjmp_call_p): Remove.
19326169689Skan	(uninlinable_call_p): Declare.
19327169689Skan
19328169689Skan2001-07-22  Nathan Sidwell  <nathan@codesourcery.com>
19329169689Skan
19330169689Skan	* params.def (PARAM_MAX_INLINE_AST): New parameter.
19331169689Skan	(PARAM_ARG_INLINE_AST): New parameter.
19332169689Skan	* doc/invoke.texi (max-inline-ast, arg-inline-ast): Document
19333169689Skan	parameters.
19334169689Skan
19335169689SkanLocal Variables:
19336169689Skanmode: change-log
19337169689Skanchange-log-default-name: "ChangeLog.tree-ssa"
19338169689SkanEnd:
19339