aboutsummaryrefslogtreecommitdiff
path: root/gcc/ChangeLog.killloop
blob: 2fb12a5791f99b78d6aa2a32e96c74b7a7b27c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
2005-09-14  Zdenek Dvorak  <dvorakz@suse.cz>

	* tree-chrec.c (chrec_convert_aggressive): New function.
	* tree-chrec.h (chrec_convert_aggressive): Declare it.
	* tree-flow.h (tree_ssa_reverse_loops, create_canonical_iv,
	create_increment_stmt, compare_cost): Declare.
	* tree-scalar-evolution.c (instantiate_parameters_1,
	instantiate_parameters, resolve_mixers): Add possibility
	to fold no-op casts.
	* tree-ssa-address.c (add_to_parts): Strip nops before looking for
	symbol.
	* tree-ssa-loop-ivcanon.c (create_canonical_iv): Export.
	* tree-ssa-loop-ivopts.c (add_derived_ivs_candidates): Add a countdown
	iv.
	(get_address_cost): Set cse_not_expected to get more precise costs.
	(convert_cost): New function.
	(force_expr_to_var_cost): Use it.
	(aff_combination_cost_address): Handle base+index addressing modes
	correctly.
	* tree-ssa-loop-manip.c (create_increment_stmt): Split from ...
	(create_iv): ... here.

2005-09-14  Zdenek Dvorak  <dvorakz@suse.cz>

	* config/ia64/ia64.c (ia64_reload_gp): Set MEM_NOTRAP_P for the
	created MEM.

2005-09-09  Zdenek Dvorak  <dvorakz@suse.cz>

	* tree-pretty-print.c (dump_bb_header): Fix merge conflict.

	* fold-const.c (try_move_mult_to_index): Handle negative multipliers.

	* Makefile.in (tree-affine.o): Add.
	(tree-ssa-address.o, tree-ssa-loop-ivopts.o): Add tree-affine.h
	dependency.
	* tree-affine.c: New file.
	* tree-affine.h: New file.
	* tree-flow.h (struct affine_tree_combination): Moved to
	tree-affine.h.
	* tree-ssa-address.c: Include tree-affine.h.
	(fixed_address_object_p): Export.
	(add_to_parts): Do not take coef argument.
	(most_expensive_mult_to_index, addr_to_parts, create_mem_ref):
	Use tree-affine.h utilities.
	* tree-ssa-loop-ivopts.c: Include tree-affine.h.
	(struct iv_use, struct iv_cand): Add base_aff field.
	(record_use, add_candidate_1): Initialize base_aff field.
	(determine_base_object): Handle MULT_EXPR.
	(aff_combination_const, aff_combination_elt, aff_combination_scale,
	aff_combination_add_elt, aff_combination_add,
	tree_to_aff_combination, add_elt_to_tree, unshare_aff_combination,
	aff_combination_to_tree): Moved to tree-affine.c.
	(get_computation_aff): Use tree-affine.h utilities.  Never compute
	result in trees directly.  Return suggested multiplier for an
	addressing mode.
	(get_computation_at, rewrite_use_address): Changed to reflect
	get_computation_aff change.
	(split_address_cost, ptr_difference_cost, difference_cost): Removed.
	(aff_combination_cost, aff_combination_cost_address): New.
	(get_computation_cost_at): Use them.
	* tree.h (fixed_address_object_p): Declare.

2005-09-02  Zdenek Dvorak  <dvorakz@suse.cz>

	Merge from mainline (killloop-merge-20050902).

2005-09-02  Zdenek Dvorak  <dvorakz@suse.cz>

	* Makefile.in (tree-ssa-loop-endcond.o): Add.
	* tree-flow.h (select_condition_shape): Declare.
	* tree-ssa-loop-endcond.c: New file.
	* tree-ssa-loop-ivcanon.c: Extend comments.
	* tree-ssa-loop-ivopts.c (struct cost_pair): Add cmp field.
	(add_iv_value_candidates): Add all_important argument.  For decreasing
	ivs, add iv with final value zero.
	(add_old_iv_candidates): Use add_iv_value_candidates.
	(add_derived_ivs_candidates): Add argument to add_iv_value_candidates.
	(set_use_iv_cost): Add cmp argument.
	(set_use_iv_cost_infinity, set_use_iv_cost_zero,
	set_use_iv_cost_generic, set_use_iv_cost_outer,
	set_use_iv_cost_compare): New functions.
	(determine_use_iv_cost_generic, determine_use_iv_cost_address,
	determine_use_iv_cost_outer): Use them.
	(cand_value_at, iv_elimination_compare): Removed.
	(iv_period): Moved to tree-ssa-loop-endcond.c.
	(may_eliminate_iv): Use select_condition_shape.
	(compare_cost): New function.
	(determine_use_iv_cost_condition): Use set_use_iv_cost_compare and
	compare_cost.
	(determine_use_iv_costs): Dump value and cmp fields of cost pair.
	(try_replacing_cands, minor_adjustments): New functions.
	(find_optimal_iv_set): Call minor_adjustments.
	(rewrite_use_compare): Use cmp field of cost pair.
	* tree-ssa-loop-niter.c (zero_p, nonzero_p): Moved to ...
	* tree.c (zero_p, nonzero_p): ... here.
	(signed_type_for): Generate a signed integer type for pointers.
	* tree.h (nonzero_p): Declare.

2005-08-31  Zdenek Dvorak  <dvorakz@suse.cz>

	* tree-ssa-loop-ivopts.c (AVG_LOOP_NITER): Use
	expected_loop_iterations.
	(BEFORE_LOOP_COST): New macro.
	(extract_cond_operands): New function.
	(find_interesting_uses_cond, rewrite_use_compare): Use
	extract_cond_operands.
	(get_address_cost): Do not limit offset to at most 20 bits.
	(determine_use_iv_cost_condition): Use extract_cond_operands.
	Choose better from keeping original iv and iv elimination.
	(determine_use_iv_cost_outer, determine_iv_cost): Use BEFORE_LOOP_COST.

2005-08-30  Zdenek Dvorak  <dvorakz@suse.cz>
	    Steven Bosscher  <stevenb@suse.de>

	* rtlanal.c (may_trap_p): Handle PREFETCH.
	* loop-unroll.c (struct opt_info): Add refetches_to_remove field.
	(analyze_prefetch_to_remove, remove_redundant_prefetch): New functions.
	(analyze_insns_in_loop): Call analyze_prefetch_to_remove.
	(apply_opt_in_copies): Call remove_redundant_prefetch.
	(free_opt_info): Free prefetches_to_remove field.

2005-08-30  Zdenek Dvorak  <dvorakz@suse.cz>

	* cfgloop.h (struct rtx_iv): Remove analysed field.  Added biv_p field.
	(iv_get_reaching_def): Removed.
	(iv_analyze_result, iv_analyze_expr): Declare.
	* df.c (df_bitmaps_free, df_bb_modify): Only work on the specified part
	of cfg.
	(df_find_use): Handle subregs.
	* Makefile.in (loop-iv.o): Add DF_H dependency.
	* loop-iv.c: Include df.h.
	(enum iv_grd_result): New enum.
	(DF_REF_IV, DF_REF_IV_SET): New macros.
	(df): New global variable.
	(struct insn_info, insn_info, last_def, bivs, max_insn_no, max_reg_no,
	assign_luids, mark_sets, kill_sets, mark_single_set, simple_set_p):
	Removed.
	(clear_iv_info, latch_dominating_def, record_iv, iv_analyze_expr,
	iv_analyze_result, iv_analyze_def): New functions.
	(iv_analysis_loop_init, iv_get_reaching_def, simple_reg_p,
	get_biv_step_1, get_biv_step, iv_analyze_biv, iv_analyze_op,
	iv_analyze, biv_p, iv_analysis_done): Work with df representation of
	UD chains.
	(iv_constant, iv_subreg, iv_extend, iv_mult, iv_shift): Initialize
	biv_p, do not set analysed.
	(iv_number_of_iterations): Use new interface to iv analysis.
	* loop-unroll.c (analyze_iv_to_split_insn): Ditto.
	* loop-unswitch.c (may_unswitch_on): Ditto.

2005-08-30  Zdenek Dvorak  <dvorakz@suse.cz>

	* tree-pretty-print.c (dump_bb_header): Show bb frequency.

2005-08-30  Zdenek Dvorak  <dvorakz@suse.cz>

	* Makefile.in (loop-invariant.o): Add HASHTAB_H dependency.
	* df.c (df_find_use): New function.
	* df.h (df_find_use): Declare.
	* loop-invariant.c: Include hashtab.h.
	(struct invariant): Replace processed field by reg field.
	Add eqto field.
	(struct invariant_expr_entry): New.
	(df): New global variable.
	(invariant_for_use, hash_invariant_expr_1, invariant_expr_equal_p,
	hash_invariant_expr, eq_invariant_expr, find_or_insert_inv,
	find_identical_invariants, merge_identical_invariants): New functions.
	(find_defs, check_dependencies, find_invariant_insn,
	record_uses, find_invariants_bb, find_invariants_body,
	find_invariants, find_invariants_to_move, move_invariants,
	free_inv_motion_data, move_single_loop_invariants,
	move_loop_invariants): Do not pass df in arguments.
	(create_new_invariant): Return the new invariant.  Initialize new
	fields.
	(find_invariants): Call merge_identical_invariants.
	(get_inv_cost, best_gain_for_invariant, set_move_mark,
	move_invariant_reg): Handle equivalent invariants.

2005-08-29  Zdenek Dvorak  <dvorakz@suse.cz>

	* loop-invariant.c (check_dependencies): Improve comment.

2005-07-27  Zdenek Dvorak  <dvorakz@suse.cz>

	Branch created (killloop-branchpoint)
	* common.opt (floop-optimize2): Removed.
	(fmove-loop-invariants): Enabled by default.
	* loop-init.c (gate_handle_loop2): Do not check flag_loop_optimize2.
	Check flag_branch_on_count_reg only if HAVE_doloop_end.
	* opts.c (decode_options): Do not enable flag_loop_optimize.
	* toplev.c (process_options): Do not handle flag_loop_optimize2.
	* doc/invoke.texi: Remove -floop-optimize2 documentation.