1 2006-01-11 Paolo Bonzini <bonzini@gnu.org>
3 PR tree-optimization/23109
4 PR tree-optimization/23948
5 PR tree-optimization/24123
7 * Makefile.in (tree-ssa-math-opts.o): Adjust dependencies.
8 * tree-cfg.c (single_noncomplex_succ): New.
9 * tree-flow.h (single_noncomplex_succ): Declare it.
10 * tree-ssa-math-opts.c (enum place_reciprocal): Remove.
11 * tree-ssa-math-opts.c (enum place_reciprocal): Remove.
12 (struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit,
13 insert_bb, register_division_in, insert_reciprocals,
14 replace_reciprocal, free_bb): New.
15 (execute_cse_reciprocals_1): Rewritten.
16 (execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1.
17 Do not commit any edge insertion. Always compute dominators and
18 create the allocation pool.
19 * target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New.
20 * target.h (struct gcc_target): Add min_divistions_for_recip_mul.
21 * targhooks.c (default_min_divistions_for_recip_mul): New.
22 * targhooks.h (default_min_divistions_for_recip_mul): New prototype.
23 * passes.c (init_optimization_passes): Run recip after tree loop
25 * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.
27 2005-01-11 Danny Berlin <dberlin@dberlin.org>
28 Kenneth Zadeck <zadeck@naturalbridge.com>
30 * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN,
31 DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN,
32 DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS,
33 DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO,
34 DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT,
35 DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN,
36 DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO,
37 DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO,
38 DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN,
39 DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG,
40 DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P,
41 DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P,
42 DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET,
43 DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET,
44 DF_REG_USE_GET, DF_REG_USE_SET, DF_REGNO_FIRST_DEF,
45 DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET,
46 DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES,
47 DF_INSN_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS,
48 DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL,
49 DF_SCAN_POST_ALLOC): New macros.
50 (df_flow_dir, df_ref_type, df_ref_flags, df_alloc_function,
51 df_free_bb_function, df_local_compute_function, df_init_function,
52 df_dataflow_function, df_confluence_function_0,
53 df_confluence_function_n, df_transfer_function,
54 df_finalizer_function, df_free_function, df_dump_problem_function,
55 df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link,
56 df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info,
57 df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info,
58 df_urec_bb_info, ) New types.
59 (df_invalidated_by_call, df_all_hard_regs, df_state) New public
61 (df_init, df_add_problem, df_set_blocks, df_finish, df_analyze,
62 df_analyze_simple_change_some_blocks,
63 df_analyze_simple_change_one_block, df_compact_blocks,
64 df_bb_replace, df_bb_regno_last_use_find,
65 df_bb_regno_first_def_find, df_bb_regno_last_def_find,
66 df_insn_regno_def_p, df_find_def, df_find_use,
67 df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump,
68 df_regs_chain_dump, df_insn_debug, df_insn_debug_regno,
69 df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno,
70 debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref,
71 debug_df_chain, df_get_dependent_problem, df_chain_create,
72 df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out,
73 df_grow_bb_info, df_chain_dump, df_print_bb_index,
74 df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem,
75 df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info,
76 df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem,
77 df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem,
78 df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem,
79 df_rescan_blocks, df_ref_create, df_get_artificial_defs,
80 df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink,
81 df_ref_remove, df_insn_refs_delete, df_refs_delete,
82 df_reorganize_refs, df_set_state, df_hard_reg_init,
83 df_read_modify_subreg_p) New public functions.
84 * df-core.c: The core dataflow solver and glue routines for rtl
86 (df_init, df_add_problem, df_set_blocks, df_finish,
87 df_hybrid_search_forward, df_hybrid_search_backward,
88 df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem,
89 df_analyze, df_get_bb_info, df_set_bb_info, df_bb_replace,
90 df_bb_regno_last_use_find, df_bb_regno_first_def_find,
91 df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def,
92 df_reg_defined, df_find_use, df_reg_used, df_dump,
93 df_refs_chain_dump, df_regs_chain_dump, df_insn_debug,
94 df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn,
95 debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno,
96 debug_df_useno, reset_df_after_reload): New functions.
97 * df-scan.c: The scanning fuctions, once in df.c, completely
98 rewritten so that they now fully model the functionality of
99 register usage at the backend.
100 (df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info,
101 df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump,
102 df_scan_add_problem, df_grow_reg_info, df_grow_ref_info,
103 df_grow_insn_info, df_rescan_blocks, df_ref_create,
104 df_get_artificial_defs, df_get_artificial_uses,
105 df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink,
106 df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete,
107 df_refs_delete, df_reorganize_refs, df_set_state,
108 df_ref_create_structure, df_ref_record, df_read_modify_subreg_p,
109 df_def_record_1, df_defs_record, df_uses_record,
110 df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record,
111 df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg,
112 df_record_exit_block_uses, df_hard_reg_init): New functions.
114 * df-problems.c: Seven concrete dataflow problems that use the
115 scanning in df-scan.c and are solved by the engine in df-core.c.
116 (df_get_dependent_problem, df_chain_create, df_chain_unlink,
117 df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info,
118 df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen,
119 df_unset_seen, df_ru_get_bb_info, df_ru_set_bb_info,
120 df_ru_free_bb_info, df_ru_alloc,
121 df_ru_bb_local_compute_process_def,
122 df_ru_bb_local_compute_process_use, df_ru_bb_local_compute,
123 df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n,
124 df_ru_transfer_function, df_ru_free, df_ru_dump,
125 df_ru_add_problem, df_rd_get_bb_info, df_rd_set_bb_info,
126 df_rd_free_bb_info, df_rd_alloc,
127 df_rd_bb_local_compute_process_def, df_rd_bb_local_compute,
128 df_rd_local_compute, df_rd_init_solution, df_rd_confluence_n,
129 df_rd_transfer_function, df_rd_free, df_rd_dump,
130 df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info,
131 df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute,
132 df_lr_local_compute, df_lr_init, df_lr_confluence_0,
133 df_lr_confluence_n, df_lr_transfer_function, df_lr_free,
134 df_lr_dump, df_lr_add_problem, df_ur_get_bb_info,
135 df_ur_set_bb_info, df_ur_free_bb_info, df_ur_alloc,
136 df_ur_bb_local_compute, df_ur_local_compute, df_ur_init,
137 df_ur_local_finalize, df_ur_confluence_n, df_ur_transfer_function,
138 df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info,
139 df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc,
140 df_urec_mark_reg_change, df_urec_check_earlyclobber,
141 df_urec_mark_reg_use_for_earlyclobber,
142 df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute,
143 df_urec_local_compute, df_urec_init, df_urec_local_finalize,
144 df_urec_confluence_n, df_urec_transfer_function, df_urec_free,
145 df_urec_dump, df_urec_add_problem, df_chain_alloc,
146 df_chain_create_bb_process_use, df_chain_create_bb,
147 df_chain_finalize, df_chain_free, df_chains_dump,
148 df_chain_add_problem, df_ri_alloc, df_ri_bb_compute,
149 df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem,
150 df_reg_lifetime): New functions.
151 * df.c: Deleted file.
152 * ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code
153 consistent with new df api.
154 * modulo-sched.c (sms_schedule, rest_of_handle_sms,
155 rest_of_handle_sms): Ditto.
156 * web.c (unionfind_union, union_defs, entry_register, web_main):
158 * loop_invariant.c (invariant_for_use, hash_invariant_expr_1,
159 invariant_expr_equal_p, find_defs, check_dependencies,
160 find_invariant_insn, find_invariants_to_move, move_invariant_reg,
161 free_inv_motion_data, move_loop_invariants): Ditto.
162 * sched-deps.c (sched_analyze_1): Ditto.
164 2006-01-11 Zdenek Dvorak <dvorakz@suse.cz>
166 * tree-ssa-operands.c (get_expr_operands): Record addressable
167 variables directly. Do not call add_stmt_operands for CONST_DECLs
169 (get_indirect_ref_operands): Remove handling of *(&a + offset) case.
170 (add_stmt_operands): Handle only objects satisfying SSA_VAR_P.
172 2006-01-11 Ben Elliston <bje@au.ibm.com>
174 * config/i386/i386.c (ix86_return_in_memory): Fix comment: this
175 function returns true in the positive case.
177 2006-01-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
180 * config/pa/pa.md: Create separate 32 and 64-bit move patterns
181 for SI, DI, SF and DF modes. Add alternatives to copy between
182 general and floating point registers to the 32-bit patterns.
183 * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED_RTX): Delete undefine.
184 * config/pa/pa.h (SECONDARY_MEMORY_NEEDED_RTX): Delete define.
185 (SECONDARY_MEMORY_NEEDED): Secondary memory is only needed when
186 generating 64-bit code.
187 * config/pa/pa.c (output_move_double): Handle copies between general
188 and floating registers.
190 2006-01-10 Stuart Hastings <stuart@apple.com>
192 * config/i386/i386.md (set_got): Update.
193 (set_got_labelled): New. (UNSPEC_LD_MPIC): New.
194 (builtin_setjmp_receiver): Mach-O support.
195 * config/i386/darwin.h (TARGET_ASM_FILE_END) Define.
196 (GOT_SYMBOL_NAME): Define.
197 (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): New.
198 (TARGET_DEEP_BRANCH_PREDICTION): Remove.
199 * config/i386/i386.c (override_options): Revise for Darwin.
200 (USE_HIDDEN_LINKONCE): Enable for Mach-O. (ix86_file_end): Mach-O
201 support. (darwin_x86_file_end): New. (output_set_got): Add label
202 parameter, revise for Mach-O. (x86_output_mi_thunk): Likewise.
203 * config/i386/i386-protos.h (output_set_got): Likewise.
204 * config/darwin.c (machopic_legitimize_pic_address): Update
207 2006-01-10 Kaz Kojima <kkojima@gcc.gnu.org>
209 * config/sh/sh.h (SH5_WOULD_BE_PARTIAL_NREGS): Use GET_MODE_SIZE
210 when MODE isn't BLKmode.
212 2006-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
214 PR rtl-optimization/25367
215 * config/sparc/sparc.h (HARD_REGNO_RENAME_OK): New macro.
217 2006-01-10 Hans-Peter Nilsson <hp@axis.com>
220 * config/cris/cris.md ("uminsi3"): Don't use 8- or 16-bit sizes
221 for a negative bound.
223 2006-01-10 Richard Guenther <rguenther@suse.de>
225 * tree-ssa-structalias.c (get_constraint_for_component_ref):
226 Never override with anything constraint.
228 2006-01-10 Jan Beulich <jbeulich@novell.com>
230 * config/i386/i386.c (ix86_data_alignment): Don't force alignment to
231 256 bits when optimize_size.
233 2006-01-10 Jan Beulich <jbeulich@novell.com>
235 * config/i386/netware.h (TARGET_SUBTARGET_DEFAULT): Include
237 * config/i386/nwld.h (LINK_SPEC): Add --extensions:GNU option.
238 * config/i386/t-nwld (SHLIB_LINK): Insert spaces between expr
241 2006-01-10 Ben Elliston <bje@au.ibm.com>
243 * config/rs6000/predicates.md (easy_fp_constant): Discount decimal
245 * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): New.
246 (TARGET_SCALAR_MODE_SUPPORTED_P): Define.
247 (USE_FP_FOR_ARG): Reject decimal float modes.
248 (function_arg_advance): Likewise.
249 (output_toc): Handle emitting TDmode, DDmode and SDmode constants.
250 (rs6000_handle_altivec_attribute): Do not permit decimal floating
251 point types in AltiVec vectors.
252 (rs6000_function_value): Use GP_ARG_RETURN for decimal floats.
253 (rs6000_libcall_value): Likewise.
255 2006-01-09 Bob Wilson <bob.wilson@acm.org>
257 * config/xtensa/ieee754-df.S: New file.
258 * config/xtensa/ieee754-sf.S: New file.
259 * config/xtensa/t-xtensa (LIB2FUNCS_EXTRA): Remove fp-bit.c & dp-bit.c.
260 (LIB1ASMFUNCS): Add SFmode and DFmode floating-point functions.
261 * config/xtensa/lib1funcs.asm: Include ieee754-df.S and ieee754-sf.S.
263 2006-01-09 Kazu Hirata <kazu@codesourcery.com>
265 * config/sh/predicates.md (binary_float_operator,
266 binary_logical_operator, commutative_float_operator,
267 equality_comparison_operator, greater_comparison_operator,
268 less_comparison_operator, logical_operator,
269 noncommutative_float_operator, shift_operator,
270 symbol_ref_operand, unary_float_operator): Remove redundant
273 2006-01-09 Jeff Law <law@redhat.com>
275 * tree-ssa-dom.c (simplify_cond_and_lookup_avail_expr): Remove
276 code to propagate the RHS of a cast into COND_EXPR_COND. Remove
277 now unused arguments. Callers updated.
278 (eliminate_redundant_computations): Remove now unused arguments,
280 (local_fold): Remove, no longer used.
281 (find_equivalent_equality_comparison): Removed from tree-ssa-dom.c
283 * tree-ssa-forwprop.c (find_equivalent_equality_comparison): Here.
284 (simplify_cond): New function.
285 (forward_propagate_into_cond): Call simplify_cond.
287 2006-01-09 Alexandre Oliva <aoliva@redhat.com>
289 * config/i386/sse.md (*vec_extractv2di_1_sse2): New.
290 (*vec_extractv2di_1_sse): New.
292 2006-01-09 Ben Elliston <bje@au.ibm.com>
294 * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Typo fix.
296 2006-01-08 Richard Guenther <rguenther@suse.de>
298 * tree-ssa-structalias.c (get_constraint_for): Remove
300 (get_constraint_for_component_ref): Likewise.
301 (do_deref): Likewise.
302 (get_constraint_for): Likewise.
303 (do_structure_copy): Likewise.
304 (handle_ptr_arith): Likewise.
305 (find_func_aliases): Likewise. Remove unused need_anyoffset
308 2006-01-08 J"orn Rennecke <joern.rennecke@st.com>
309 Kaz Kojima <kkojima@gcc.gnu.org>
311 * config/sh/sh.h (CONST_OK_FOR_K16): Define.
312 (CONST_OK_FOR_K): Add CONST_OK_FOR_K16 case.
313 (EXTRA_CONSTRAINT_C16): Remove.
314 (EXTRA_CONSTRAINT_Css, EXTRA_CONSTRAINT_Csu): Define.
315 (EXTRA_CONSTRAINT_C): Remove EXTRA_CONSTRAINT_C16 case and add
316 EXTRA_CONSTRAINT_Css and EXTRA_CONSTRAINT_Csu cases.
317 * config/sh/sh.c (print_operand): Handle unsigned 16-bit symbolic
318 constants of SHmedia. Handle nested constant expressions of
320 (andcosts): Fix the costs for SHmedia constants.
321 (sh_rtx_costs): Take account of outer_code for SHmedia constants.
322 * config/sh/sh.md (*movsi_media): Use Css constraint instead of C16.
323 (*movsi_media_nofpu, *movqi_media, *movhi_media): Likewise.
324 (*movdi_media, *movdi_media_nofpu, movv8qi_i, movv2hi_i): Likewise.
325 (movv4hi_i, movv2si_i): Likewise.
326 (movsi_const): Adjust the second operand of ior so to match with
328 (movdi_const, movdi_const_32bit): Likewise.
329 (movdi_const_16bit+1): Don't sign-extend LOW.
330 (movdi_const_16bit+2): Likewise. Remove the zero_extend and truncate
332 (*double_shori): Fix the split condition. Use GEN_INT instead
333 of get_int_mode calls. Mask lower 16-bit of the argument of
335 (sym2GOTPLT): Remove.
336 (symGOTPLT2reg): Replace gen_sym2GOTPLT with gen_rtx_CONST and
338 * config/sh/predicates.md (arith_operand): Use EXTRA_CONSTRAINT_Css
339 instead of EXTRA_CONSTRAINT_C16.
341 2006-01-07 Ian Lance Taylor <ian@airs.com>
342 David Edelsohn <edelsohn@gnu.org>
344 PR rtl-optimization/25662
345 * optabs.c (simplify_expand_binop): Use simplify_binary_operation
346 for constant operands instead of simplify_gen_binary.
347 * simplify-rtx.c (simplify_gen_binary): Swap commutative operands
348 after trying simplify_binary_operation
350 2006-01-06 Daniel Berlin <dberlin@dberlin.org>
352 * tree.c (iterative_hash_expr): Hash decls based on UID.
354 2006-01-06 Eric Christopher <echristo@apple.com>
356 * doc/tm.texi (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): Document.
357 (TARGET_UNWIND_EMIT): Fix spelling.
358 * target.h (gcc_target): Add except_table_label.
359 * except.c (output_function_exception_table): Use.
360 * varasm.c (default_emit_except_table_label): New.
361 * target-def.h (TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL): New default
364 * output.h (default_emit_except_table_label): Prototype.
365 * config/darwin-protos.h (darwin_emit_except_table_label): Ditto.
366 * config/darwin.c (darwin_emit_except_table_label): Define.
367 * config/darwin.h (TARGET_ASM_EMIT_EXCEPT_TABLE): Ditto.
369 2006-01-06 Zdenek Dvorak <dvorakz@suse.cz>
371 PR tree-optimization/18527
372 * tree-ssa-loop-niter.c (number_of_iterations_cond,
373 number_of_iterations_special, number_of_iterations_exit):
374 Move base and step of an iv to a single structure. Add
375 no_overflow flag, and use it in # of iterations analysis.
376 * tree-scalar-evolution.c (analyze_scalar_evolution_in_loop): Add
377 folded_casts argument.
378 (simple_iv): Pass base and step in a structure. Set no_overflow
380 (scev_const_prop): Add argument to analyze_scalar_evolution_in_loop.
381 Evaluate expensiveness of computing # of iterations instead of
382 the final expression.
383 * tree-scalar-evolution.h (affine_iv): New structure.
384 (simple_iv): Declaration changed.
385 * tree-chrec.c (chrec_apply): Handle chrecs containing symbols.
386 * tree-ssa-loop-ivopts.c (determine_biv_step, find_givs_in_stmt_scev,
387 find_givs_in_stmt): Changed due to simple_iv change.
389 2006-01-06 Jeff Law <law@redhat.com>
392 * tree-cfg.c (bsi_replace): Rename final argument from
393 PRESERVE_EH_INFO to UPDATE_EH_INFO. Fix typo in last
394 change (stmt -> orig_stmt).
395 * tree-eh.c (verify_eh_throw_stmt_node): New function.
396 (bsi_remove): Add new argument. Remove EH information
398 (verify_eh_throw_table_statements): New function.
399 (bsi_remove): Add new argument REMOVE_EH_INFO. All callers
401 * tree-optimize.c (execute_free_cfg_annotations): Verify
402 the EH throw statement table after removing annotations.
403 * except.h (verify_eh_throw_table_statements): Prototype.
404 * tree-flow.h (bsi_remove): Update prototype.
405 * tree-vrp.c (remove_range_assertions): Add new argument to
407 * tree-ssa-loop-im.c (move_computations_stmt): Likewise.
408 * tree-complex.c (expand_complex_div_wide): Likewise.
409 * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Likewise
410 * tree-tailcall.c (eliminate_tailcall): Likewise.
411 * tree-ssa-dse.c (dse_optimize_stmt): Likewise.
412 * tree-ssa-loop-ivopts.c (remove_statement): Likewise.
413 * tree-nrv.c (tree_nrv): Likewise.
414 * tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Likewise.
415 * tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
416 (combine_blocks): Likewise.
417 * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Likewise.
418 * tree-cfgcleanup.c (cleanup_ctrl_expr_graph): Likewise.
419 (cleanup_control_flow): Likewise.
420 (remove_forwarder_block): Likewise.
421 * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
422 * tree-sra.c (sra_replace): Likewise.
423 * tree-ssa-forwprop.c (forward_propagate_into_cond): Likewise.
424 (forward_propagate_single_use_vars): Likewise.
425 * tree-ssa-dce.c (remove_dead_stmt): Likewise.
426 * tree-inline.c (expand_call_inline): Likewise.
427 * tree-vect-transform.c (vect_transform_loop): Likewise.
428 * tree-outof-ssa.c (rewrite_trees): Likewise.
429 * tree-cfg.c (make_goto_expr_edges): Likewise.
430 (cleanup_dead_labels): Likewise.
431 (tree_merge_blocks, remove_bb, disband_implicit_edges): Likewise.
432 (bsi_move_before, bsi_move_after): Likewise.
433 (bsi_move_to_bb_end, try_redirect_by_replacing_jump): Likewise
434 (tree_redirect_edge_and_branch, tree_split_block): Likewise.
436 2006-01-06 Andrew Pinski <pinskia@physics.uc.edu>
439 * tree-ssa-alias.c (find_used_portions): Handle REALPART_EXPR
441 * tree-flow-inline.h (var_can_have_subvars): Handle complex types
442 on non gimple variables. Also add checks at the top for decls and
444 * tree-ssa-structalias.c (push_fields_onto_fieldstack): Handle
446 * tree-ssa-operands.c (parse_ssa_operands): Handle REALPART_EXPR
447 and IMAGPART_EXPR for creating MUST_DEFs.
448 (get_expr_operands): Handle SSA_NAME, STRUCT_FIELD_TAG, TYPE_MEMORY_TAG,
449 and NAME_MEMORY_TAG separately from the DECLs.
451 2006-01-06 Richard Guenther <rguenther@suse.de>
453 * tree-dfa.c (mark_new_vars_to_rename): Create stmt
454 annotation, if necessary.
455 * tree-ssa-pre.c (create_expression_by_pieces): Remove
456 redundant calls to update_stmt.
457 * tree-ssa-forwprop.c (tidy_after_forward_propagate_addr):
460 2006-01-05 Richard Henderson <rth@redhat.com>
462 * c-parser.c (c_parser_objc_methodprotolist): Handle CPP_PRAGMA.
464 2006-01-05 Carlos O'Donell <carlos@codesourcery.com>
466 * c-typeck.c: Update copyright date.
468 2006-01-05 Carlos O'Donell <carlos@codesourcery.com>
470 * c-typeck.c (build_c_cast): Always warn when casting
471 from a pointer to an integer of different size, even if
472 the node was constant.
474 2006-01-05 Richard Guenther <rguenther@suse.de>
476 PR tree-optimization/22555
477 * tree-ssa-alias.c (create_overlap_variables_for): Do not give up,
478 if one structure field is an array.
479 * tree-ssa-operands.c (get_expr_operands): Continue scanning
480 operands even if we found a subvar, but ignore VOPs in this
482 * tree-ssa-loop-ivopts.c (rewrite_use): Mark new vars in stmt
484 * tree-ssa-loop.c (pass_iv_optimize): Schedule TODO_update_ssa.
486 2006-01-05 Richard Earnshaw <rearnsha@arm.com>
489 * arm/t-netbsd (LIB2FUNCS_EXTRA): Define.
491 2006-01-05 Richard Guenther <rguenther@suse.de>
492 Diego Novillo <dnovillo@redhat.com>
494 * tree-pass.h (TODO_remove_unused_locals): Define.
495 * gimple-low.c (expand_var_p, remove_useless_vars,
496 pass_remove_useless_vars): Remove. Update all users.
497 * tree-ssa-live.c (mark_all_vars_used_1): Handle SSA names.
498 (remove_unused_locals): New function.
499 * tree-flow.h (remove_unused_locals): Declare.
500 * passes.c (execute_todo): Call remove_unused_locals if
501 TODO_remove_unused_locals is set.
502 * tree-into-ssa.c (pass_build_ssa): Add TODO_remove_unused_locals.
503 * tree-ssa-dce.c (pass_dce): Likewise.
504 * tree-outof-ssa.c (pass_del_ssa): Likewise.
506 2006-01-05 Richard Guenther <rguenther@suse.de>
508 * tree-flow.h (struct fieldoff): Decompose field to
510 * tree-ssa-alias.c (create_sft): Take type as parameter.
511 (create_overlap_variables_for): Store type, size and decl
512 in the fieldoff structure.
513 * tree-ssa-structalias.c (fieldoff_compare): Adjust users
515 (push_fields_onto_fieldstack): Likewise.
516 (create_variable_info_for): Likewise. Use offset for the
517 SFT name if the decl is not available.
519 2006-01-04 Paul Brook <paul@codesourcery.com>
521 * config/m68k/m68k.c (m68k_output_mi_thunk): Use jmp, not jsr.
523 2006-01-04 Daniel Berlin <dberlin@dberlin.org>
525 * lambda-code.c (can_put_in_inner_loop): Relax
527 (can_put_after_inner_loop): New function.
528 (can_convert_to_perfect_nest): Use can_put_after_inner_loop as well.
529 (perfect_nestify): Change to make copies and modify uses.
531 2006-01-04 Richard Henderson <rth@redhat.com>
533 Merge from gomp branch:
534 * c-lex.c (c_lex_with_flags) <CPP_PRAGMA>: Smuggle pragma id
535 via integer constant.
536 (pragma_lex): Remove.
537 * c-pch.c (c_common_pch_pragma): Accept the name as an argument,
538 rather than parsing it.
539 * c-pragma.c (handle_pragma_weak, handle_pragma_redefine_extname,
540 handle_pragma_extern_prefix): Add %< %> quotes.
541 (registered_pragmas): New.
542 (c_register_pragma_1): New.
543 (c_register_pragma): Use it.
544 (c_register_pragma_with_expansion): Likewise.
545 (c_invoke_pragma_handler): New.
546 (init_pragma): Use cpp_register_deferred_pragma directly for
548 * c-pragma.h (enum pragma_kind): New.
549 (pragma_handler): New.
550 (c_invoke_pragma_handler): Declare.
551 * c-common.c (c_parse_error): Pretty print CPP_PRAGMA and
553 * c-common.h (c_common_pch_pragma): Update decl.
554 * Makefile.in (c-parser.o): Update dependencies.
555 (GTFILES): Add c-pragma.h.
556 * c-parser.c (struct c_token): Add pragma_kind.
557 (struct c_parser): Add in_pragma.
558 (c_lex_one_token): Always initialize keyword and pragma_kind.
559 Extract data for CPP_PRAGMA.
560 (c_parser_peek_2nd_token): Deny CPP_PRAGMA_EOL.
561 (c_parser_consume_token): Don't allow CPP_PRAGMA unless errors.
562 Don't allow CPP_PRAGMA_EOL if in_pragma.
563 (c_parser_consume_pragma): New.
564 (c_parser_skip_until_found): Stop on CPP_PRAGMA_EOL.
565 (c_parser_skip_to_end_of_parameter): Likewise.
566 (c_parser_skip_to_end_of_block_or_statement): Likewise.
567 (c_parser_skip_to_pragma_eol): New.
568 (c_parser_external_declaration): Handle CPP_PRAGMA.
569 (c_parser_compound_statement_nostart): Likewise.
570 (c_parser_statement_after_labels): Likewise.
571 (c_parser_pragma): New.
572 (pragma_lex): Likewise.
573 (c_parser_pragma_pch_preprocess): New.
574 (c_parser_new): Merge into ...
575 (c_parse_file): ... here. Call c_parser_pragma_pch_preprocess.
577 2006-01-04 Jeff Law <law@redhat.com>
580 * tree-cfg.c (bsi_replace): Remove the original statement
581 from the EH throw statement table.
583 2006-01-04 Jakub Jelinek <jakub@redhat.com>
585 * config/i386/pmm_malloc.h (posix_memalign): If __cplusplus,
586 make the prototype extern "C" and add throw ().
589 * config/i386/i386.md (testqi_ext_3): Ensure len is positive
590 and pos non-negative and pos + len <= 32.
591 (testqi_ext_3_rex64): Ensure len is positive and pos non-negative,
592 drop pos + len < HOST_BITS_PER_WIDE_INT test.
593 (testqi_ext_3* splitter): Handle pos + len == HOST_BITS_PER_WIDE_INT.
596 * c-common.c (handle_vector_size_attribute): Reject zero vector size
597 as well as sizes not multiple of component size.
600 * function.c (instantiate_expr): New function.
601 (instantiate_decls_1, instantiate_decls): If DECL_HAS_VALUE_EXPR_P,
602 walk its DECL_VALUE_EXPR with instantiate_expr.
604 * dwarf2out.c (loc_descriptor_from_tree_1): Don't add
605 DW_OP_deref{,_size} if address isn't going to be added.
607 2006-01-04 Ben Elliston <bje@au.ibm.com>
609 * config/fp-bit.h: Use top-of-file comment from libgcc2.c.
610 * config/fp-bit.c: Likewise.
612 2006-01-03 Daniel Berlin <dberlin@dberlin.org>
614 * dominance.c: Add comment about why we use DFS numbering
617 2006-01-03 Jakub Jelinek <jakub@redhat.com>
618 Richard Henderson <rth@redhat.com>
620 Merge from gomp-branch:
621 * varasm.c (assemble_variable): Handle thread-local COMMON data.
622 * defaults.h (ASM_OUTPUT_TLS_COMMON): Define.
624 2006-01-03 Paolo Bonzini <bonzini@gnu.org>
626 PR rtl-optimization/25578
627 * combine.c (combine_simplify_rtx, force_to_mode): Don't
628 pass a parameter to simplify_shift_const if changing ASHIFTRT
631 2006-01-03 Adrian Straetling <straetling@de.ibm.com>
633 * builtins.c (get_builtin_sync_mem): New function.
634 (expand_builtin_sync_operation, expand_builtin_compare_and_swap,
635 expand_builtin_lock_test_and_set, expand_builtin_lock_release):
636 Call get_builtin_sync_mem to generate mem rtx.
638 2006-01-03 Richard Guenther <rguenther@suse.de>
641 * stmt.c (add_case_node): Make sure to clear overflow flags
644 2006-01-03 Jakub Jelinek <jakub@redhat.com>
646 Merge from gomp-branch.
647 * config/sparc/sync.md: New file.
648 * config/sparc/sparc.md (UNSPECV_MEMBAR, UNSPECV_CAS, UNSPECV_SWAP,
649 UNSPECV_LDSTUB): New constants.
650 * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): New function.
651 * config/sparc/predicates.md (memory_reg_operand): New predicate.
652 * config/sparc/sparc-protos.h (sparc_expand_compare_and_swap_12): New
655 2006-01-03 Roger Sayle <roger@eyesopen.com>
657 * combine.c (reg_subword_p): New predicate to test whether the
658 destination of a set refers to a subword/piece of a register.
659 (try_combine): Generalize the code to merge the setting of a
660 pseudo to a constant followed by a set of a subword of that
661 register to a constant.
663 2006-01-03 Kazu Hirata <kazu@codesourcery.com>
665 * basic-block.h (control_flow_graph): Change the type of
666 x_label_to_block_map to VEC(basic_block,gc) *.
667 * tree-cfg.c (init_empty_tree_cfg, label_to_block_fn,
668 set_bb_for_stmt): Adjust the uses of x_label_to_block_map.
670 * tree-ssa-propagate.c (cfg_blocks): Change the type to
671 VEC(basic_block,heap) *.
672 (cfg_blocks_add, cfg_blocks_get, ssa_prop_init,
673 ssa_prop_fini): Adjust the uses of cfg_blocks.
675 2006-01-03 Steven Bosscher <stevenb.gcc@gmail.com>
677 * fold-const.c (operand_equal_p): Accept a NULL operand 0 for
679 * emit-rtl.c (mem_attrs_htab_eq): Use iterative_hash_expr for
680 hashing trees instead of a pointer hash.
681 (mem_attrs_htab_eq): Do a deep compare instead of a pointer
682 compare for MEM_EXPR.
684 PR rtl-optimization/25130
685 * cse.c (exp_equiv_p): Compare MEM_ATTRS instead of MEM_ALIAS_SET
686 when comparing MEMs for GCSE
688 2006-01-03 Ben Elliston <bje@au.ibm.com>
690 * targhooks.h (default_decimal_float_supported_p): Declare.
691 * targhooks.c (default_decimal_float_supported_p): Define.
692 * target-def.h (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Redefine to
693 `default_decimal_float_supported_p'.
694 * doc/tm.texi (TARGET_DECIMAL_FLOAT_SUPPORTED_P): Update.
696 2006-01-02 Adam Nemet <anemet@caviumnetworks.com>
698 * combine.c (apply_distributive_law <SUBREG>): Check
699 TRULY_NOOP_TRUNCATION.
701 2006-01-02 Geoffrey Keating <geoffk@apple.com>
703 * dwarf2out.c (have_switched_text_section): Delete.
704 (have_multiple_function_sections): New.
705 (have_location_lists): Make 'bool'.
706 (add_AT_loc_list): Use 'true' not '1'.
707 (dwarf2out_switch_text_section): Set have_multiple_function_sections.
708 (output_loc_list): Use have_multiple_function_sections.
709 (output_ranges): Likewise.
710 (dwarf2out_begin_function): Set have_multiple_function_sections if
712 (dwarf2out_source_line): Don't fake separate_line_info_table_in_use.
713 Check function_section rather than DECL_SECTION_NAME.
714 (dwarf2out_finish): Use have_multiple_function_sections.
715 Don't clear have_location_lists.
717 2006-01-02 Eric Botcazou <ebotcazou@adacore.com>
718 Jan Hubicka <jh@suse.cz>
720 * cfglayout.c (fixup_reorder_chain): Remove kludge for the
721 case of conditional jump jumping to the next instruction.
722 * cfgrtl.c (force_nonfallthru_and_redirect): Accept all
723 cases of conditional jump jumping to the next instruction.
725 2006-01-02 Jan Hubicka <jh@suse.cz>
727 * i386.c (*_cost): Add COSTS_N_INSNS.
728 (ix86_rtx_costs): Do not use COSTS_N_INSNS.
730 2006-01-02 Paolo Bonzini <bonzini@gnu.org>
733 * Makefile.in (DECNUMINC): Include libdecnumber's build directory.
735 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
737 * config/arm/arm.c (all_fpus): Fix comment typo.
738 * config/darwin.c: Likewise.
739 * config/frv/frv.h (FRV_STRUCT_VALUE_REGNUM): Likewise.
740 * config/h8300/h8300.md (extendqisi2_h8300hs): Likewise.
741 * config/m68hc11/m68hc11.c (m68hc11_reload_operands): Likewise.
743 2006-01-01 David Edelsohn <edelsohn@gnu.org>
745 * config/rs6000/rs6000.c (rs6000_expand_compare_and_swapqhi): New.
746 (rs6000_split_compare_and_swapqhi): New.
747 * config/rs6000/sync.md (sync_compare_and_swap{hi,qi}): New.
748 (sync_compare_and_swapqhi_internal): New.
749 * config/rs6000/rs6000-protos.h: Declare.