bfe381cea104e97e0c7704f5cbcdc44d9f0cb9d1
[gcc.git] / gcc / ChangeLog
1 2006-01-08 J"orn Rennecke <joern.rennecke@st.com>
2 Kaz Kojima <kkojima@gcc.gnu.org>
3
4 * config/sh/sh.h (CONST_OK_FOR_K16): Define.
5 (CONST_OK_FOR_K): Add CONST_OK_FOR_K16 case.
6 (EXTRA_CONSTRAINT_C16): Remove.
7 (EXTRA_CONSTRAINT_Css, EXTRA_CONSTRAINT_Csu): Define.
8 (EXTRA_CONSTRAINT_C): Remove EXTRA_CONSTRAINT_C16 case and add
9 EXTRA_CONSTRAINT_Css and EXTRA_CONSTRAINT_Csu cases.
10 * config/sh/sh.c (print_operand): Handle unsigned 16-bit symbolic
11 constants of SHmedia. Handle nested constant expressions of
12 SHmedia correctly.
13 (andcosts): Fix the costs for SHmedia constants.
14 (sh_rtx_costs): Take account of outer_code for SHmedia constants.
15 * config/sh/sh.md (*movsi_media): Use Css constraint instead of C16.
16 (*movsi_media_nofpu, *movqi_media, *movhi_media): Likewise.
17 (*movdi_media, *movdi_media_nofpu, movv8qi_i, movv2hi_i): Likewise.
18 (movv4hi_i, movv2si_i): Likewise.
19 (movsi_const): Adjust the second operand of ior so to match with
20 the Csu constraint.
21 (movdi_const, movdi_const_32bit): Likewise.
22 (movdi_const_16bit+1): Don't sign-extend LOW.
23 (movdi_const_16bit+2): Likewise. Remove the zero_extend and truncate
24 step.
25 (*double_shori): Fix the split condition. Use GEN_INT instead
26 of get_int_mode calls. Mask lower 16-bit of the argument of
27 the last GEN_INT.
28 (sym2GOTPLT): Remove.
29 (symGOTPLT2reg): Replace gen_sym2GOTPLT with gen_rtx_CONST and
30 gen_rtx_UNSPEC.
31 * config/sh/predicates.md (arith_operand): Use EXTRA_CONSTRAINT_Css
32 instead of EXTRA_CONSTRAINT_C16.
33
34 2005-01-07 Ian Lance Taylor <ian@airs.com>
35 David Edelsohn <edelsohn@gnu.org>
36
37 PR rtl-optimization/25662
38 * optabs.c (simplify_expand_binop): Use simplify_binary_operation
39 for constant operands instead of simplify_gen_binary.
40 * simplify-rtx.c (simplify_gen_binary): Swap commutative operands
41 after trying simplify_binary_operation
42
43 2006-01-06 Daniel Berlin <dberlin@dberlin.org>
44
45 * tree.c (iterative_hash_expr): Hash decls based on UID.
46
47 2006-01-06 Eric Christopher <echristo@apple.com>
48
49 * doc/tm.texi (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): Document.
50 (TARGET_UNWIND_EMIT): Fix spelling.
51 * target.h (gcc_target): Add except_table_label.
52 * except.c (output_function_exception_table): Use.
53 * varasm.c (default_emit_except_table_label): New.
54 * target-def.h (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): New default
55 define.
56 (asm_out): Add here.
57 * output.h (default_emit_except_table_label): Prototype.
58 * config/darwin-protos.h (darwin_emit_except_table_label): Ditto.
59 * config/darwin.c (darwin_emit_except_table_label): Define.
60 * config/darwin.h (TARGET_ASM_EMIT_EXCEPT_TABLE): Ditto.
61
62 2005-01-06 Zdenek Dvorak <dvorakz@suse.cz>
63
64 PR tree-optimization/18527
65 * tree-ssa-loop-niter.c (number_of_iterations_cond,
66 number_of_iterations_special, number_of_iterations_exit):
67 Move base and step of an iv to a single structure. Add
68 no_overflow flag, and use it in # of iterations analysis.
69 * tree-scalar-evolution.c (analyze_scalar_evolution_in_loop): Add
70 folded_casts argument.
71 (simple_iv): Pass base and step in a structure. Set no_overflow
72 flag.
73 (scev_const_prop): Add argument to analyze_scalar_evolution_in_loop.
74 Evaluate expensiveness of computing # of iterations instead of
75 the final expression.
76 * tree-scalar-evolution.h (affine_iv): New structure.
77 (simple_iv): Declaration changed.
78 * tree-chrec.c (chrec_apply): Handle chrecs containing symbols.
79 * tree-ssa-loop-ivopts.c (determine_biv_step, find_givs_in_stmt_scev,
80 find_givs_in_stmt): Changed due to simple_iv change.
81
82 2005-01-06 Jeff Law <law@redhat.com>
83
84 PR ada/24994
85 * tree-cfg.c (bsi_replace): Rename final argument from
86 PRESERVE_EH_INFO to UPDATE_EH_INFO. Fix typo in last
87 change (stmt -> orig_stmt).
88 * tree-eh.c (verify_eh_throw_stmt_node): New function.
89 (bsi_remove): Add new argument. Remove EH information
90 if requested.
91 (verify_eh_throw_table_statements): New function.
92 (bsi_remove): Add new argument REMOVE_EH_INFO. All callers
93 updated.
94 * tree-optimize.c (execute_free_cfg_annotations): Verify
95 the EH throw statement table after removing annotations.
96 * except.h (verify_eh_throw_table_statements): Prototype.
97 * tree-flow.h (bsi_remove): Update prototype.
98 * tree-vrp.c (remove_range_assertions): Add new argument to
99 bsi_remove call.
100 * tree-ssa-loop-im.c (move_computations_stmt): Likewise.
101 * tree-complex.c (expand_complex_div_wide): Likewise.
102 * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Likewise
103 * tree-tailcall.c (eliminate_tailcall): Likewise.
104 * tree-ssa-dse.c (dse_optimize_stmt): Likewise.
105 * tree-ssa-loop-ivopts.c (remove_statement): Likewise.
106 * tree-nrv.c (tree_nrv): Likewise.
107 * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Likewise.
108 * tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
109 (combine_blocks): Likewise.
110 * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Likewise.
111 * tree-cfgcleanup.c (cleanup_ctrl_expr_graph): Likewise.
112 (cleanup_control_flow): Likewise.
113 (remove_forwarder_block): Likewise.
114 * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
115 * tree-sra.c (sra_replace): Likewise.
116 * tree-ssa-forwprop.c (forward_propagate_into_cond): Likewise.
117 (forward_propagate_single_use_vars): Likewise.
118 * tree-ssa-dce.c (remove_dead_stmt): Likewise.
119 * tree-inline.c (expand_call_inline): Likewise.
120 * tree-vect-transform.c (vect_transform_loop): Likewise.
121 * tree-outof-ssa.c (rewrite_trees): Likewise.
122 * tree-cfg.c (make_goto_expr_edges): Likewise.
123 (cleanup_dead_labels): Likewise.
124 (tree_merge_blocks, remove_bb, disband_implicit_edges): Likewise.
125 (bsi_move_before, bsi_move_after): Likewise.
126 (bsi_move_to_bb_end, try_redirect_by_replacing_jump): Likewise
127 (tree_redirect_edge_and_branch, tree_split_block): Likewise.
128
129 2006-01-06 Andrew Pinski <pinskia@physics.uc.edu>
130
131 PR tree-opt/25528
132 * tree-ssa-alias.c (find_used_portions): Handle REALPART_EXPR
133 and IMAGPART_EXPR.
134 * tree-flow-inline.h (var_can_have_subvars): Handle complex types
135 on non gimple variables. Also add checks at the top for decls and
136 mtags.
137 * tree-ssa-structalias.c (push_fields_onto_fieldstack): Handle
138 complex types.
139 * tree-ssa-operands.c (parse_ssa_operands): Handle REALPART_EXPR
140 and IMAGPART_EXPR for creating MUST_DEFs.
141 (get_expr_operands): Handle SSA_NAME, STRUCT_FIELD_TAG, TYPE_MEMORY_TAG,
142 and NAME_MEMORY_TAG separately from the DECLs.
143
144 2006-01-06 Richard Guenther <rguenther@suse.de>
145
146 * tree-dfa.c (mark_new_vars_to_rename): Create stmt
147 annotation, if necessary.
148 * tree-ssa-pre.c (create_expression_by_pieces): Remove
149 redundant calls to update_stmt.
150 * tree-ssa-forwprop.c (tidy_after_forward_propagate_addr):
151 Likewise.
152
153 2006-01-05 Richard Henderson <rth@redhat.com>
154
155 * c-parser.c (c_parser_objc_methodprotolist): Handle CPP_PRAGMA.
156
157 2006-01-05 Carlos O'Donell <carlos@codesourcery.com>
158
159 * c-typeck.c: Update copyright date.
160
161 2006-01-05 Carlos O'Donell <carlos@codesourcery.com>
162
163 * c-typeck.c (build_c_cast): Always warn when casting
164 from a pointer to an integer of different size, even if
165 the node was constant.
166
167 2006-01-05 Richard Guenther <rguenther@suse.de>
168
169 PR tree-optimization/22555
170 * tree-ssa-alias.c (create_overlap_variables_for): Do not give up,
171 if one structure field is an array.
172 * tree-ssa-operands.c (get_expr_operands): Continue scanning
173 operands even if we found a subvar, but ignore VOPs in this
174 case.
175 * tree-ssa-loop-ivopts.c (rewrite_use): Mark new vars in stmt
176 for renaming.
177 * tree-ssa-loop.c (pass_iv_optimize): Schedule TODO_update_ssa.
178
179 2006-01-05 Richard Earnshaw <rearnsha@arm.com>
180
181 PR middle-end/24998
182 * arm/t-netbsd (LIB2FUNCS_EXTRA): Define.
183
184 2006-01-05 Richard Guenther <rguenther@suse.de>
185 Diego Novillo <dnovillo@redhat.com>
186
187 * tree-pass.h (TODO_remove_unused_locals): Define.
188 * gimple-low.c (expand_var_p, remove_useless_vars,
189 pass_remove_useless_vars): Remove. Update all users.
190 * tree-ssa-live.c (mark_all_vars_used_1): Handle SSA names.
191 (remove_unused_locals): New function.
192 * tree-flow.h (remove_unused_locals): Declare.
193 * passes.c (execute_todo): Call remove_unused_locals if
194 TODO_remove_unused_locals is set.
195 * tree-into-ssa.c (pass_build_ssa): Add TODO_remove_unused_locals.
196 * tree-ssa-dce.c (pass_dce): Likewise.
197 * tree-outof-ssa.c (pass_del_ssa): Likewise.
198
199 2006-01-05 Richard Guenther <rguenther@suse.de>
200
201 * tree-flow.h (struct fieldoff): Decompose field to
202 type, size and decl.
203 * tree-ssa-alias.c (create_sft): Take type as parameter.
204 (create_overlap_variables_for): Store type, size and decl
205 in the fieldoff structure.
206 * tree-ssa-structalias.c (fieldoff_compare): Adjust users
207 of struct fieldoff.
208 (push_fields_onto_fieldstack): Likewise.
209 (create_variable_info_for): Likewise. Use offset for the
210 SFT name if the decl is not available.
211
212 2006-01-04 Paul Brook <paul@codesourcery.com>
213
214 * config/m68k/m68k.c (m68k_output_mi_thunk): Use jmp, not jsr.
215
216 2006-01-04 Daniel Berlin <dberlin@dberlin.org>
217
218 * lambda-code.c (can_put_in_inner_loop): Relax
219 restrictions.
220 (can_put_after_inner_loop): New function.
221 (can_convert_to_perfect_nest): Use can_put_after_inner_loop as well.
222 (perfect_nestify): Change to make copies and modify uses.
223
224 2006-01-04 Richard Henderson <rth@redhat.com>
225
226 Merge from gomp branch:
227 * c-lex.c (c_lex_with_flags) <CPP_PRAGMA>: Smuggle pragma id
228 via integer constant.
229 (pragma_lex): Remove.
230 * c-pch.c (c_common_pch_pragma): Accept the name as an argument,
231 rather than parsing it.
232 * c-pragma.c (handle_pragma_weak, handle_pragma_redefine_extname,
233 handle_pragma_extern_prefix): Add %< %> quotes.
234 (registered_pragmas): New.
235 (c_register_pragma_1): New.
236 (c_register_pragma): Use it.
237 (c_register_pragma_with_expansion): Likewise.
238 (c_invoke_pragma_handler): New.
239 (init_pragma): Use cpp_register_deferred_pragma directly for
240 pch_preprocess.
241 * c-pragma.h (enum pragma_kind): New.
242 (pragma_handler): New.
243 (c_invoke_pragma_handler): Declare.
244 * c-common.c (c_parse_error): Pretty print CPP_PRAGMA and
245 CPP_PRAGMA_EOL.
246 * c-common.h (c_common_pch_pragma): Update decl.
247 * Makefile.in (c-parser.o): Update dependencies.
248 (GTFILES): Add c-pragma.h.
249 * c-parser.c (struct c_token): Add pragma_kind.
250 (struct c_parser): Add in_pragma.
251 (c_lex_one_token): Always initialize keyword and pragma_kind.
252 Extract data for CPP_PRAGMA.
253 (c_parser_peek_2nd_token): Deny CPP_PRAGMA_EOL.
254 (c_parser_consume_token): Don't allow CPP_PRAGMA unless errors.
255 Don't allow CPP_PRAGMA_EOL if in_pragma.
256 (c_parser_consume_pragma): New.
257 (c_parser_skip_until_found): Stop on CPP_PRAGMA_EOL.
258 (c_parser_skip_to_end_of_parameter): Likewise.
259 (c_parser_skip_to_end_of_block_or_statement): Likewise.
260 (c_parser_skip_to_pragma_eol): New.
261 (c_parser_external_declaration): Handle CPP_PRAGMA.
262 (c_parser_compound_statement_nostart): Likewise.
263 (c_parser_statement_after_labels): Likewise.
264 (c_parser_pragma): New.
265 (pragma_lex): Likewise.
266 (c_parser_pragma_pch_preprocess): New.
267 (c_parser_new): Merge into ...
268 (c_parse_file): ... here. Call c_parser_pragma_pch_preprocess.
269
270 2005-01-04 Jeff Law <law@redhat.com>
271
272 PR ada/24994
273 * tree-cfg.c (bsi_replace): Remove the original statement
274 from the EH throw statement table.
275
276 2006-01-04 Jakub Jelinek <jakub@redhat.com>
277
278 * config/i386/pmm_malloc.h (posix_memalign): If __cplusplus,
279 make the prototype extern "C" and add throw ().
280
281 PR target/25554
282 * config/i386/i386.md (testqi_ext_3): Ensure len is positive
283 and pos non-negative and pos + len <= 32.
284 (testqi_ext_3_rex64): Ensure len is positive and pos non-negative,
285 drop pos + len < HOST_BITS_PER_WIDE_INT test.
286 (testqi_ext_3* splitter): Handle pos + len == HOST_BITS_PER_WIDE_INT.
287
288 PR c/25559
289 * c-common.c (handle_vector_size_attribute): Reject zero vector size
290 as well as sizes not multiple of component size.
291
292 PR debug/25562
293 * function.c (instantiate_expr): New function.
294 (instantiate_decls_1, instantiate_decls): If DECL_HAS_VALUE_EXPR_P,
295 walk its DECL_VALUE_EXPR with instantiate_expr.
296
297 * dwarf2out.c (loc_descriptor_from_tree_1): Don't add
298 DW_OP_deref{,_size} if address isn't going to be added.
299
300 2006-01-04 Ben Elliston <bje@au.ibm.com>
301
302 * config/fp-bit.h: Use top-of-file comment from libgcc2.c.
303 * config/fp-bit.c: Likewise.
304
305 2006-01-03 Daniel Berlin <dberlin@dberlin.org>
306
307 * dominance.c: Add comment about why we use DFS numbering
308 of dominance tree.
309
310 2006-01-03 Jakub Jelinek <jakub@redhat.com>
311 Richard Henderson <rth@redhat.com>
312
313 Merge from gomp-branch:
314 * varasm.c (assemble_variable): Handle thread-local COMMON data.
315 * defaults.h (ASM_OUTPUT_TLS_COMMON): Define.
316
317 2006-01-03 Paolo Bonzini <bonzini@gnu.org>
318
319 PR rtl-optimization/25578
320 * combine.c (combine_simplify_rtx, force_to_mode): Don't
321 pass a parameter to simplify_shift_const if changing ASHIFTRT
322 to LSHIFTRT.
323
324 2006-01-03 Adrian Straetling <straetling@de.ibm.com>
325
326 * gcc/builtins.c (get_builtin_sync_mem): New function.
327 (expand_builtin_sync_operation, expand_builtin_compare_and_swap,
328 expand_builtin_lock_test_and_set, expand_builtin_lock_release):
329 Call get_builtin_sync_mem to generate mem rtx.
330
331 2006-01-03 Richard Guenther <rguenther@suse.de>
332
333 PR c/25183
334 * stmt.c (add_case_node): Make sure to clear overflow flags
335 from ranges.
336
337 2006-01-03 Jakub Jelinek <jakub@redhat.com>
338
339 Merge from gomp-branch.
340 * config/sparc/sync.md: New file.
341 * config/sparc/sparc.md (UNSPECV_MEMBAR, UNSPECV_CAS, UNSPECV_SWAP,
342 UNSPECV_LDSTUB): New constants.
343 * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): New function.
344 * config/sparc/predicates.md (memory_reg_operand): New predicate.
345 * config/sparc/sparc-protos.h (sparc_expand_compare_and_swap_12): New
346 prototype.
347
348 2006-01-03 Roger Sayle <roger@eyesopen.com>
349
350 * combine.c (reg_subword_p): New predicate to test whether the
351 destination of a set refers to a subword/piece of a register.
352 (try_combine): Generalize the code to merge the setting of a
353 pseudo to a constant followed by a set of a subword of that
354 register to a constant.
355
356 2006-01-03 Kazu Hirata <kazu@codesourcery.com>
357
358 * basic-block.h (control_flow_graph): Change the type of
359 x_label_to_block_map to VEC(basic_block,gc) *.
360 * tree-cfg.c (init_empty_tree_cfg, label_to_block_fn,
361 set_bb_for_stmt): Adjust the uses of x_label_to_block_map.
362
363 * tree-ssa-propagate.c (cfg_blocks): Change the type to
364 VEC(basic_block,heap) *.
365 (cfg_blocks_add, cfg_blocks_get, ssa_prop_init,
366 ssa_prop_fini): Adjust the uses of cfg_blocks.
367
368 2006-01-03 Steven Bosscher <stevenb.gcc@gmail.com>
369
370 * fold-const.c (operand_equal_p): Accept a NULL operand 0 for
371 COMPONENT_REFs.
372 * emit-rtl.c (mem_attrs_htab_eq): Use iterative_hash_expr for
373 hashing trees instead of a pointer hash.
374 (mem_attrs_htab_eq): Do a deep compare instead of a pointer
375 compare for MEM_EXPR.
376
377 PR rtl-optimization/25130
378 * cse.c (exp_equiv_p): Compare MEM_ATTRS instead of MEM_ALIAS_SET
379 when comparing MEMs for GCSE
380
381 2006-01-03 Ben Elliston <bje@au.ibm.com>
382
383 * targhooks.h (default_decimal_float_supported_p): Declare.
384 * targhooks.c (default_decimal_float_supported_p): Define.
385 * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Redefine to
386 `default_decimal_float_supported_p'.
387 * doc/tm.texi (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Update.
388
389 2006-01-02 Adam Nemet <anemet@caviumnetworks.com>
390
391 * combine.c (apply_distributive_law <SUBREG>): Check
392 TRULY_NOOP_TRUNCATION.
393
394 2006-01-02 Geoffrey Keating <geoffk@apple.com>
395
396 * dwarf2out.c (have_switched_text_section): Delete.
397 (have_multiple_function_sections): New.
398 (have_location_lists): Make 'bool'.
399 (add_AT_loc_list): Use 'true' not '1'.
400 (dwarf2out_switch_text_section): Set have_multiple_function_sections.
401 (output_loc_list): Use have_multiple_function_sections.
402 (output_ranges): Likewise.
403 (dwarf2out_begin_function): Set have_multiple_function_sections if
404 necessary.
405 (dwarf2out_source_line): Don't fake separate_line_info_table_in_use.
406 Check function_section rather than DECL_SECTION_NAME.
407 (dwarf2out_finish): Use have_multiple_function_sections.
408 Don't clear have_location_lists.
409
410 2006-01-02 Eric Botcazou <ebotcazou@adacore.com>
411 Jan Hubicka <jh@suse.cz>
412
413 * cfglayout.c (fixup_reorder_chain): Remove kludge for the
414 case of conditional jump jumping to the next instruction.
415 * cfgrtl.c (force_nonfallthru_and_redirect): Accept all
416 cases of conditional jump jumping to the next instruction.
417
418 2006-01-02 Jan Hubicka <jh@suse.cz>
419
420 * i386.c (*_cost): Add COSTS_N_INSNS.
421 (ix86_rtx_costs): Do not use COSTS_N_INSNS.
422
423 2006-01-02 Paolo Bonzini <bonzini@gnu.org>
424
425 PR target/25259
426 * Makefile.in (DECNUMINC): Include libdecnumber's build directory.
427
428 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
429
430 * config/arm/arm.c (all_fpus): Fix comment typo.
431 * config/darwin.c: Likewise.
432 * config/frv/frv.h (FRV_STRUCT_VALUE_REGNUM): Likewise.
433 * config/h8300/h8300.md (extendqisi2_h8300hs): Likewise.
434 * config/m68hc11/m68hc11.c (m68hc11_reload_operands): Likewise.
435
436 2006-01-01 David Edelsohn <edelsohn@gnu.org>
437
438 * config/rs6000/rs6000.c (rs6000_expand_compare_and_swapqhi): New.
439 (rs6000_split_compare_and_swapqhi): New.
440 * config/rs6000/sync.md (sync_compare_and_swap{hi,qi}): New.
441 (sync_compare_and_swapqhi_internal): New.
442 * config/rs6000/rs6000-protos.h: Declare.