OSDN Git Service

* doc/extend.texi (MIPS DSP Built-in Functions): Document the DSP
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2007-03-09  Chao-ying Fu  <fu@mips.com>
2
3         * doc/extend.texi (MIPS DSP Built-in Functions): Document the DSP
4         REV 2.
5         * doc/invoke.texi (-mdspr2): Document new option.
6         * config/mips/mips.md (UNSPEC_ABSQ_S_QB .. UNSPEC_DPSQX_SA_W_PH):
7         New unspec for DSP REV 2.
8         (<u>mulsidi3_32bit_internal): Check if !TARGET_DSPR2, because
9         these instructions are extended in DSP REV 2.
10         (mips-dspr2.md): Include.
11         * config/mips/mips.opt (mdspr2): New option.
12         * config/mips/mips.c (mips_function_type): Add MIPS_V4QI_FTYPE_V4QI,
13         MIPS_SI_FTYPE_SI_SI_SI, MIPS_DI_FTYPE_DI_USI_USI, MIPS_DI_FTYPE_SI_SI,
14         MIPS_DI_FTYPE_USI_USI, MIPS_V2HI_FTYPE_SI_SI_SI.
15         (override_options): Check TARGET_DSPR2 to enable MASK_DSP.
16         (CODE_FOR_mips_mul_ph): Define it to CODE_FOR_mulv2hi3.
17         (dsp_bdesc): Add DSP REV 2 builtins.  Remove 32-bit only DSP builtins.
18         (dsp_32only_bdesc): New description table for 32-bit only DSP REV 1
19         and 2 builtins.
20         (bdesc_map): Add one field of unsupported_target_flags.
21         (bdesc_arrays):  Update entries to have extra fields.  Add
22         dsp_32only_bdesc.
23         (mips_init_builtins): Initialize new function types.
24         Check unsupported_target_fileds to filter out builtins.
25         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_dspr2 if
26         TARGET_DSPR2.
27         (ASM_SPEC): Pass mdspr2 to the assembler.
28         * config/mips/mips-dspr2.md: New file.
29
30 2007-03-09  Sa Liu  <saliu@de.ibm.com>
31
32         * config/rs6000/altivec.md: Fix vcond patterns using if_then_else.
33
34 2007-03-09  Ian Lance Taylor  <iant@google.com>
35
36         * opts.c (common_handle_option): Treat -Wstrict-overflow (with no
37         argument) like -Wstrict-overflow=2.
38         * doc/invoke.texi (Warning Options): Update documentation.
39
40 2007-03-09  Dirk Mueller  <dmueller@suse.de>
41
42         PR c++/17946
43         * doc/invoke.texi (-Wlogical-op): Document.
44         * common.opt (-Wlogical-op): New.
45         * c-common.h (warn_logical_operator): Declare.
46         * c-common.c (warn_logical_operator): Define.
47         * c-typeck.c (parser_build_binary_op): Call
48         warn_logical_operator.
49
50 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
51
52         * rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
53         * final.c (final_scan_insn): Test for non-"" file name.
54
55 2007-03-09  Sebastian Pop  <sebastian.pop@inria.fr>
56
57         * doc/loop.texi: Document the Omega linear constraints solver.
58         * doc/invoke.texi: Document -fcheck-data-deps, omega-max-vars,
59         omega-max-geqs, omega-max-eqs, omega-max-wild-cards, 
60         omega-hash-table-size, omega-max-keys, and 
61         omega-eliminate-redundant-constraints.
62         * tree-pass.h (pass_check_data_deps): Declared.
63         * omega.c: New.
64         * omega.h: New.
65         * timevar.def (TV_CHECK_DATA_DEPS): Declared.
66         * tree-ssa-loop.c (check_data_deps, gate_check_data_deps, 
67         pass_check_data_deps): New.
68         * tree-data-ref.c (init_data_ref): Remove declaration.
69         (dump_data_dependence_relation): Dump DDR_INNER_LOOP.
70         (analyze_array): Renamed init_array_ref, move up initializations.
71         (init_data_ref): Renamed init_pointer_ref.  Moved before its call.
72         Removed arguments that are set to NULL.
73         (analyze_indirect_ref): Correct indentation, correct call to 
74         init_pointer_ref.
75         (object_analysis): Call init_array_ref instead of analyze_array.
76         (initialize_data_dependence_relation): Initialize DDR_INNER_LOOP.
77         (access_functions_are_affine_or_constant_p): Use DR_ACCESS_FNS instead
78         of DR_ACCESS_FNS_ADDR.
79         (init_omega_eq_with_af, omega_extract_distance_vectors, 
80         omega_setup_subscript, init_omega_for_ddr_1, init_omega_for_ddr,
81         ddr_consistent_p): New.
82         (compute_affine_dependence): Check consistency of ddrs when 
83         flag_check_data_deps is passed.
84         (analyze_all_data_dependences): Uncomment.
85         (tree_check_data_deps): New.
86         * tree-data-ref.h: Include omega.h.
87         (DR_ACCESS_FNS_ADDR): Removed.
88         (data_dependence_relation): Add inner_loop.
89         (DDR_INNER_LOOP): New.
90         * common.opt (fcheck-data-deps): New.
91         * tree-flow.h (tree_check_data_deps): Declare.
92         * Makefile.in (TREE_DATA_REF_H): Depend on omega.h.
93         (OBJS-common): Depend on omega.o.
94         (omega.o): Define.
95         * passes.c (pass_check_data_deps): Scheduled.
96         * params.def (PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS, 
97         PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS,
98         PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS,
99         PARAM_VECT_MAX_VERSION_CHECKS,
100         PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS): New.
101
102 2007-03-09  Richard Guenther  <rguenther@suse.de>
103
104         PR tree-optimization/30904
105         PR middle-end/31058
106         * tree-vrp.c (extract_range_from_binary_expr): Handle RSHIFT_EXPR
107         the same way as *_DIV_EXPR.
108
109 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
110
111         * recog.c (decode_asm_operands): No mixed declarations and code.
112
113 2007-03-09  Alexandre Oliva  <aoliva@redhat.com>
114
115         * rtl.def (ASM_INPUT): Add location.
116         * rtl.h (ASM_INPUT_SOURCE_LOCATION): New.
117         (ASM_INPUT_SOURCE_FILE, ASM_INPUT_SOURCE_LINE): New.
118         (decode_asm_operands): Add loc operand.
119         (gen_rtx_ASM_INPUT, gen_rtx_ASM_INPUT_loc): Define.
120         * stmt.c (expand_asm): Rename to...
121         (expand_asm_loc): ... this.  Add locus argument.  Pass it on to
122         gen_rtx_ASM_INPUT_loc.
123         (expand_asm_expr): Adjust.
124         * recog.c (decode_asm_operands): Add loc operand.
125         (check_asm_operands, extract_insn): Adjust.
126         * reload1.c (maybe_fix_stack_asms): Likewise.
127         * final.c (asm_insn_count): Likewise.
128         (final_scan_insn): Output # line before and after asm.
129
130 2007-03-09  Daniel Berlin  <dberlin@dberlin.org>
131
132         * tree-ssa-structalias.c (variable_info): Remove
133         finished_solution.
134         (new_var_info): Ditto.
135         (shared_bitmap_info_t): New structure.
136         (shared_bitmap_table): New variable.
137         (shared_bitmap_hash): New function.
138         (shared_bitmap_eq): Ditto
139         (shared_bitmap_lookup): Ditto.
140         (shared_bitmap_add): Ditto.
141         (merge_smts_into): Change to take bitmap directly.
142         (find_what_p_points_to): Rewrite to use shared bitmap hashtable.
143         (init_alias_vars): Init shared bitmap hashtable.
144         (delete_points_to_sets): Delete shared bitmap hashtable.
145         * tree-ssa-operands.c (add_virtual_operand): Partially revert the
146         is_aliased removal as a change that was still necessary was
147         deleted.
148
149 2007-03-09  Uros Bizjak  <ubizjak@gmail.com>
150
151         * config/i386/i386.h (override_options): Conditionally disable
152         x86_sahf for 64bit targets only.
153
154 2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>
155
156         PR C/31072
157         * c-decl.c (merge_decls): Don't call make_var_volatile.
158         * varasm.c (make_var_volatile): Remove.
159         * output.h (make_var_volatile): Remove.
160
161 2007-03-08  Zdenek Dvorak  <dvorakz@suse.cz>
162
163         PR tree-optimization/31085
164         * tree-ssa-address.c (create_mem_ref): Fix test of type of base.
165
166 2007-03-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
167
168         * builtins.def (lceil, lceilf, lceill, lfloor, lfloorf, lfloorl,
169         llceil, llceilf, llceill, llfloor, llfloorf, llfloorl): Mark with
170         ATTR_CONST_NOTHROW_LIST.
171         
172         * fold-const.c (tree_expr_nonnegative_warnv_p): Handle
173         FIX_TRUNC_EXPR.
174
175 2007-03-08  Diego Novillo  <dnovillo@redhat.com>
176
177         * doc/tree-ssa.texi: Remove documentation for V_MUST_DEF.
178
179 2007-03-08  Geoffrey Keating  <geoffk@apple.com>
180
181         PR 31013
182         * gccspec.c (lang_specific_driver): Do nothing when NEXT_OBJC_RUNTIME
183         is declared.
184         * config/darwin.h (REAL_LIBGCC_SPEC): When -fgnu-runtime is
185         passed, use shared libgcc.
186
187 2007-03-08  Roger Sayle  <roger@eyesopen.com>
188
189         * tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt
190         instead of calling build2 with a GIMPLE_MODIFY_STMT.
191         (honor_protect_cleanup_actions, lower_try_finally_switch):
192         Likewise.
193         * tree-if-conv.c (replace_phi_with_cond_gimple_modify_stmt,
194         ifc_temp_var): Likewise.
195         * tree-inline.c (setup_one_parameter): Likewise.
196         * tree-mudflap.c (mf_decl_cache_locals,
197         mf_build_check_statement_for): Likewise.
198         * tree-nested.c (init_tmp_var, save_tmp_var,
199         finalize_nesting_tree_1): Likewise.
200         * tree-outof-ssa.c (insert_copy_on_edge,
201         insert_backedge_copies): Likewise.
202         * tree-profile.c (tree_gen_edge_profiler,
203         tree_gen_ic_profiler): Likewise.
204         * tree-scalar-evolution.c (scev_const_prop): Likewise.
205         * tree-sra.c (sra_build_assignment): Likewise.
206         * tree-ssa-loop-im.c (determine_invariantness_stmt): Likewise.
207         * tree-ssa-math-opts.c (insert_reciprocals,
208         execute_cse_sincos_1): Likewise.
209         * tree-tailcall.c (adjust_accumulator_values,
210         adjust_return_value): Likewise.
211         * tree-vect-patterns.c (vect_pattern_recog_1): Likewise.
212         * tree-vect-transform.c (vect_create_data_ref_ptr,
213         bump_vector_ptr, vect_init_vector, get_initial_def_for_induction,
214         vect_create_epilog_for_reduction, vectorizable_reduction,
215         vectorizable_call, vectorizable_conversion,
216         vectorizable_assignment, vectorizable_operation,
217         vectorizable_type_demotion, vect_gen_widened_results_half,
218         vect_permute_store_chain, vectorizable_store,
219         vect_setup_realignment, vect_permute_load_chain,
220         vectorizable_load, vectorizable_condition,
221         vect_create_cond_for_align_checks): Likewise.
222         * tree-vrp.c (build_assert_expr_for): Likewise.
223
224 2007-03-08  Ian Lance Taylor  <iant@google.com>
225
226         * tree-vrp.c: Include "intl.h".
227         (usable_range_p): New static function.
228         (compare_values_warnv): Don't test TYPE_OVERFLOW_UNDEFINED for
229         overflowed values, juts set *strict_overflow_p.
230         (compare_values): Only return -2 if one of the operands is not a
231         constant.
232         (compare_ranges): Call usable_range_p.
233         (compare_range_with_value): Likewise.
234         (vrp_evaluate_conditional_warnv): Rename from
235         vrp_evaluate_conditional.  Make static.  Change all callers.
236         (vrp_evaluate_conditional): New function.
237         (simplify_div_or_mod_using_ranges): Issue warning about reliance
238         on signed overflow.
239         (simplify_abs_using_ranges): Likewise.
240         (simplify_stmt_for_jump_threading): Add within_stmt parameter.
241         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Add
242         within_stmt parameter.
243         * tree-ssa-propagate.c (fold_predicate_in): Update call to
244         vrp_evaluate_conditional.
245         * tree-ssa-threadedge.c
246         (record_temporary_equivalences_from_stmts_at_dest): Change
247         simplify parameter to take a second tree parameter.
248         (simplify_control_stmt_condition): Likewise.
249         (thread_across_edge): Likewise.
250         * tree-flow.h (vrp_evaluate_conditional): Update declaration.
251         (thread_across_edge): Likewise.
252         * gcc/Makefile.in (tree-vrp.o): Depend upon intl.h.
253
254 2007-03-08  Uros Bizjak  <ubizjak@gmail.com>
255
256         * config/i386/i386.h (TARGET_SAHF): New define.
257         * config/i386/i386.c (ix86_tune_features) [X86_TUNE_USE_SAHF]:
258         Also enable for m_K8, m_AMDFAM10 and m_CORE2.
259         (x86_sahf): New global variable.
260         (override_options): Add PTA_NO_SAHF to pta_flags enum.  Recode
261         pta_flags masks using shifts.  Add PTA_NO_SAHF to x86_64 and
262         nocona processor flags.  Set x86_sahf when PTA_NO_SAHF is not set
263         in processor flags.  Do not unconditionally disable TARGET_USE_SAHF
264         for 64-bit.
265         (ix86_fp_comparison_sahf_cost): Return high value for !TARGET_SAHF.
266         (ix86_expand_fp_compare): Check for TARGET_CMOVE or TARGET_SAHF
267         when expanding fcomi/sahf based tests.
268         (ix86_emit_fp_unordered_jump): Check for TARGET_SAHF when
269         expanding sahf based alternative. Emit sahf based sequence when
270         optimizing for code size.
271         * config/i386/i386.md (x86_sahf_1): Do not disable for
272         TARGET_64BIT, enable for TARGET_SAHF. 
273
274 2007-03-08  Martin Michlmayr  <tbm@cyrius.com>
275
276         * tree-ssa-coalesce.c (fail_abnormal_edge_coalesce): Remove
277         spurious whitespace from error message.
278
279 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
280
281         PR c++/30852
282         * c-common.c (fold_offsetof_1): Handle COMPOUND_EXPR.
283
284 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
285
286         * c-decl.c (grokdeclarator): Disable warnings for anonymous
287         bitfields.
288         * tree-sra.c (instantiate_element): Propagate disabled warnings
289         from the element itself to the created variable.
290
291 2007-03-07  Richard Henderson  <rth@redhat.com>
292
293         PR target/30848
294         * reg-stack.c (emit_swap_insn): If a malformed asm was seen,
295         silently fix up the stack in the case of a missing register.
296
297 2007-03-07  Paul Brook  <paul@codesourcery.com>
298
299         * config/arm/libunwind.S: Add .arch/.object_arch for armv4 builds.
300
301 2007-03-07  Joseph Myers  <joseph@codesourcery.com>
302
303         * config/arm/unwind-arm.c (struct wmmxd_regs, struct wmmxc_regs):
304         New.
305         (phase1_vrs): Use them.
306         (DEMAND_SAVE_WMMXD, DEMAND_SAVE_WMMXC): New.
307         (__gnu_Unwind_Save_WMMXD, __gnu_Unwind_Restore_WMMXD,
308         __gnu_Unwind_Save_WMMXC, __gnu_Unwind_Restore_WMMXC): Declare.
309         (restore_non_core_regs): Call __gnu_Unwind_Restore_WMMXD and
310         __gnu_Unwind_Restore_WMMXC if required.
311         (_Unwind_VRS_Pop): Implement iWMMXt support.
312         * config/arm/libunwind.S (gnu_Unwind_Restore_WMMXD,
313         gnu_Unwind_Save_WMMXD, gnu_Unwind_Restore_WMMXC,
314         gnu_Unwind_Save_WMMXC): Define.
315
316 2007-03-07  Richard Sandiford  <richard@codesourcery.com>
317
318         * config/vxworks.h (vxworks_override_options): Declare.
319         (VXWORKS_OVERRIDE_OPTIONS): Use it.
320         * config/vxworks.c: Include target.h and toplev.h.
321         (vxworks_override_options): New function.
322         * config/t-vxworks (vxworks.o): Depend on $(TARGET_H) and toplev.h.
323
324 2007-03-07  Andreas Krebbel  <krebbel1@de.ibm.com>
325
326         * config/s390/s390.c (override_options): Don't emit an error when
327         -mstack-size is used without providing -mstack-guard.
328         (s390_emit_prologue): Choose stack_guard value automatically if not
329         provided via command line.
330         * doc/invoke.texi: Adjust description of -mstack-guard and -mstack-size.
331
332 2007-03-07  Richard Sandiford  <richard@codesourcery.com>
333
334         * config/i386/i386.c (output_set_got): Add a GOT initialization
335         sequence for VxWorks PIC.
336         (legitimate_pic_address_disp_p): Allow UNSPEC_GOT wrappers
337         around labels as well as symbols.  Use gotoff_operand instead
338         of local_symbolic_operand.
339         (legitimize_pic_address): Use gotoff_operand instead of
340         local_symbolic_operand.  Use @GOT accesses for labels as
341         well as symbols.
342         (ix86_output_addr_diff_elt): Use PC-relative rather than
343         GP-relative offsets for VxWorks PIC.
344         (ix86_expand_move): Pass NULL_RTX to legitimize_pic_address unless
345         no_new_pseudos.  Check whether the returned register is op0.
346         * config/i386/i386.md (tablejump): Use PC-relative rather than
347         GP-relative offsets for VxWorks PIC.
348         * config/i386/predicates.md (gotoff_operand): New predicate.
349
350 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
351
352         * config/vxworks.h (VXWORKS_GOTT_BASE, VXWORKS_GOTT_INDEX): Undefine
353         before defining.
354         * config/vxworks-dummy.h: New file.
355         * config/i386/i386.h: Include it.
356
357 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
358
359         * dwarf2out.c (is_inlined_entry_point): New
360         (add_high_low_attributes): Emit DW_AT_entry_pc along with
361         DW_AT_ranges if the first subblock is the entry point.
362
363 2007-03-06  David Daney  <ddaney@avtrex.com>
364
365         * doc/install.texi (mips-*-*): Change recommended binutils
366         version.
367
368 2007-03-06  Anatoly Sokolov <aesok@post.ru>
369
370         * config/avr/avr.c (avr_mcu_types): Add support for ATmega325P,
371         ATmega3250P, ATmega329P, ATmega3290P, AT90USB82 and AT90USB162 
372         devices.
373         * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
374         * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).
375
376 2007-03-06  Jan Hubicka  <jh@suse.cz>
377
378         * errors.h (warning, error, fatal, internal_error): Mark as cold.
379         * predict.c (maybe_hot_bb): Cold functions are never hot; hot functions
380         are hot.
381         (probably_cold_bb_p): Cold functions are cold.
382         (probably_never_executed_bb_p): Cold functions are cold.
383         (tree_bb_level_predictions): Predict calls to cold functions as not
384         taken.
385         (compute_function_frequency): Check hot/cold attributes.
386         * function.h (function_frequency): Update comments.
387         * predict.def (PRED_COLD_FUNCTION): Predict cold function.
388         * c-common.c (handle_hot_attribute, handle_cold_attribute): New.
389         (c_common_att): Add cold and hot.
390
391         * doc/extend.texi (hot,cold attributes): Document.
392
393 2007-03-06  Andrew Haley  <aph@redhat.com>
394
395         * function.c (expand_function_end): Move blockage to just after we
396         emit the label for the naked return from the function.
397
398 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
399
400         * config/i386/att.h (ASM_OUTPUT_ASCII, ASM_OUTPUT_SKIP): Undefine
401         before redefining.
402
403 2007-03-06  Jan Hubicka  <jh@suse.cz>
404
405         * reg-stack.c (reg_to_stack): Large models don't allow NAN to be
406         loaded for constant large models.  Non-large 64bit PIC can do.
407         * i386.h (CASE_VECTOR_MODE): Large PIC cases are 64bit.
408         * cmodel.h: Add LARGE PIC.
409         * i386.md (UNSPEC_PLTOFF): New.
410         (UNSPEC_SET_RIP, UNSPEC_SET_GOT_OFFSET): New; renumber other unspecs as
411         needed.
412         (*call_1_rex64): Disable for large models.
413         (*call_1_rex64_large): New.
414         (*call_value_1_rex64): Disable for large models.
415         (*call_value_1_rex64_large): New.
416         (set_rip_rex4): New.
417         (set_got_offset_rex64): New.
418         * predicates.md (constant_call_address_operand): For large model
419         constant calls are not possible.
420         * i386-protos.h (construct_plt_address): Declare.
421         * i386.c (override_options): Accept large models.
422         (ix86_expand_prologue): Expand large PIC GOT pointer load.
423         (legitimate_constant_p): Add new UNSPECs.
424         (legitimate_pic_operand_p): Likewise.
425         (legitimate_pic_address_disp_p): Disallow local symbols for large PICs.
426         (legitimize_pic_address): Do easy RIP relative way for TLS only for
427         non-large model.
428         (output_pic_addr_const): Add PLTOFF.
429         (ix86_output_addr_diff_elt): Output 64bit tables when needed.
430         (ix86_expand_move): Legitimize pic address when in PIC mode.
431         (construct_plt_address): New function.
432         (ix86_expand_call): Offload the address to register and use GOT pointer
433         for large model.
434         * invoke.texi (mcmodel=large): Update documentation.
435
436 2007-03-06  Richard Henderson  <rth@redhat.com>
437
438         * config/i386/i386.c (x86_use_leave, x86_push_memory,
439         x86_zero_extend_with_and, x86_movx, x86_double_with_add,
440         x86_use_bit_test, x86_unroll_strlen, x86_deep_branch,
441         x86_branch_hints, x86_use_sahf, x86_partial_reg_stall,
442         x86_partial_flag_reg_stall, x86_use_himode_fiop, x86_use_simode_fiop,
443         x86_use_mov0, x86_use_cltd, x86_read_modify_write, x86_read_modify,
444         x86_split_long_moves, x86_promote_QImode, x86_fast_prefix, 
445         x86_single_stringop, x86_qimode_math, x86_promote_qi_regs,
446         x86_himode_math, x86_promote_hi_regs, x86_sub_esp_4, x86_sub_esp_8,
447         x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves, 
448         x86_partial_reg_dependency, x86_memory_mismatch_stall, 
449         x86_prologue_using_move, x86_epilogue_using_move, x86_shift1,
450         x86_sse_partial_reg_dependency, x86_sse_split_regs, 
451         x86_sse_unaligned_move_optimal, x86_sse_typeless_stores,
452         x86_sse_load0_by_pxor, x86_use_ffreep, x86_use_incdec,
453         x86_inter_unit_moves, x86_ext_80387_constants, x86_four_jump_limit,
454         x86_schedule, x86_use_bt, x86_pad_returns): Merge into ...
455         (ix86_tune_features): ... here.  New array.
456         (x86_cmove, x86_use_xchgb, x86_cmpxchg, x86_cmpxchg8b,  
457         x86_xadd, x86_bswap): Merge into ...
458         (ix86_arch_features): ... here.  New array.
459         (x86_3dnow_a): Remove.
460         (x86_accumulate_outgoing_args): Make static.
461         (x86_arch_always_fancy_math_387): Make static.
462         (ix86_tune_mask, ix86_arch_mask): Move ...
463         (override_options): ... to local variables here.  Apply the
464         appropriate mask to each element of ix86_arch_features and
465         ix86_tune_features.  Adjust TARGET_CMOVE and TARGET_USE_SAHF
466         as were done in the old macros.
467         (standard_80387_constant_p): Use TARGET_EXT_80387_CONSTANTS.
468         * config/i386/i386.h (x86_use_leave, x86_push_memory,
469         x86_zero_extend_with_and, x86_use_bit_test, x86_cmove, x86_deep_branch,
470         x86_branch_hints, x86_unroll_strlen, x86_double_with_add,
471         x86_partial_reg_stall, x86_movx, x86_use_himode_fiop,
472         x86_use_simode_fiop, x86_use_mov0, x86_use_cltd, x86_use_xchgb,
473         x86_read_modify_write, x86_read_modify, x86_split_long_moves,
474         x86_promote_QImode, x86_single_stringop, x86_fast_prefix,
475         x86_himode_math, x86_qimode_math, x86_promote_qi_regs,
476         x86_promote_hi_regs, x86_integer_DFmode_moves, x86_add_esp_4,
477         x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8,
478         x86_partial_reg_dependency, x86_memory_mismatch_stall,
479         x86_accumulate_outgoing_args, x86_prologue_using_move,
480         x86_epilogue_using_move, x86_decompose_lea,
481         x86_arch_always_fancy_math_387, x86_shift1,
482         x86_sse_partial_reg_dependency, x86_sse_split_regs,
483         x86_sse_unaligned_move_optimal, x86_sse_typeless_stores,        
484         x86_sse_load0_by_pxor, x86_use_ffreep, x86_inter_unit_moves,
485         x86_schedule, x86_use_bt, x86_cmpxchg, x86_cmpxchg8b, x86_xadd,
486         x86_use_incdec, x86_pad_returns, x86_bswap,
487         x86_partial_flag_reg_stall): Remove.
488         (enum ix86_tune_indices): New.
489         (ix86_tune_features): New.
490         (TARGET_USE_LEAVE, TARGET_PUSH_MEMORY, TARGET_ZERO_EXTEND_WITH_AND,
491         TARGET_USE_BIT_TEST, TARGET_UNROLL_STRLEN,
492         TARGET_DEEP_BRANCH_PREDICTION, TARGET_BRANCH_PREDICTION_HINTS,
493         TARGET_DOUBLE_WITH_ADD, TARGET_USE_SAHF, TARGET_MOVX,
494         TARGET_PARTIAL_REG_STALL, TARGET_PARTIAL_FLAG_REG_STALL,
495         TARGET_USE_HIMODE_FIOP, TARGET_USE_SIMODE_FIOP, TARGET_USE_MOV0,
496         TARGET_USE_CLTD, TARGET_USE_XCHGB, TARGET_SPLIT_LONG_MOVES,
497         TARGET_READ_MODIFY_WRITE, TARGET_READ_MODIFY, TARGET_PROMOTE_QImode,
498         TARGET_FAST_PREFIX, TARGET_SINGLE_STRINGOP, TARGET_QIMODE_MATH,
499         TARGET_HIMODE_MATH, TARGET_PROMOTE_QI_REGS, TARGET_PROMOTE_HI_REGS,
500         TARGET_ADD_ESP_4, TARGET_ADD_ESP_8, TARGET_SUB_ESP_4,
501         TARGET_SUB_ESP_8, TARGET_INTEGER_DFMODE_MOVES,
502         TARGET_PARTIAL_REG_DEPENDENCY, TARGET_SSE_PARTIAL_REG_DEPENDENCY,
503         TARGET_SSE_UNALIGNED_MOVE_OPTIMAL, TARGET_SSE_SPLIT_REGS,
504         TARGET_SSE_TYPELESS_STORES, TARGET_SSE_LOAD0_BY_PXOR,
505         TARGET_MEMORY_MISMATCH_STALL, TARGET_PROLOGUE_USING_MOVE,
506         TARGET_EPILOGUE_USING_MOVE, TARGET_SHIFT1, TARGET_USE_FFREEP,
507         TARGET_INTER_UNIT_MOVES, TARGET_FOUR_JUMP_LIMIT, TARGET_SCHEDULE,
508         TARGET_USE_BT, TARGET_USE_INCDEC, TARGET_PAD_RETURNS,
509         TARGET_EXT_80387_CONSTANTS): Use it.
510         (enum ix86_arch_indices): New.
511         (ix86_arch_features): New.
512         (TARGET_CMOVE, TARGET_CMPXCHG, TARGET_CMPXCHG8B, TARGET_XADD,
513         TARGET_BSWAP): Use it.
514         (ix86_tune_mask, ix86_arch_mask): Remove.
515
516 2007-03-06  Joseph Myers  <joseph@codesourcery.com>
517
518         PR bootstrap/31020
519         * configure.ac (CROSS_SYSTEM_HEADER_DIR, build_system_header_dir):
520         Define using $${sysroot_headers_suffix}.
521         * configure: Regenerate.
522         * cppdefault.c (cpp_include_defaults): Make FIXED_INCLUDE_DIR a
523         multilib-suffixed directory if SYSROOT_HEADERS_SUFFIX_SPEC
524         defined.
525         * doc/invoke.texi (-print-sysroot-headers-suffix): Document.
526         * gcc.c (print_sysroot_headers_suffix): New.
527         (option_map): Include --print-sysroot-headers-suffix.
528         (display_help): Mention -print-sysroot-headers-suffix.
529         (process_command): Handle -print-sysroot-headers-suffix.
530         (do_spec_1): Append multilib directory to include-fixed path if
531         sysroot suffixes in use.
532         (main): Handle -print-sysroot-headers-suffix.
533         * Makefile.in (start.encap): Don't depend on xlimits.h
534         (xlimits.h): Remove.
535         (stmp-int-hdrs): Don't depend on xlimits.h.  Inline generation of
536         limits.h for each multilib in fixinc_list.
537         (fixinc_list, s-fixinc_list): New.
538         (stmp-fixinc): Depend on fixinc_list.  If not copying headers,
539         generate them for each multilib in fixinc_list.
540         (stmp-fixproto): Use include-fixed.  Run fixproto for each
541         multilib in fixinc_list.
542         (mostlyclean): Don't remove xlimits.h.
543         (clean): Remove include-fixed.
544         (real-install-headers-tar, real-install-headers-cpio,
545         real-install-headers-cp): Don't copy include, only include-fixed.
546         (install-mkheaders): Depend on fixinc_list.  Don't depend on
547         xlimits.h.  Save limits.h files for each multilib in fixinc_list.
548         Always save mkinstalldirs.  Preserve ${sysroot_headers_suffix} in
549         SYSTEM_HEADER_DIR setting in mkheaders.conf.
550
551 2007-03-06  Jan Hubicka  <jh@suse.cz>
552
553         * regstack.c (reg_to_stack): When in 64bit PIC mode, we still can load
554         NANs easilly.
555
556 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
557
558         * configure.ac: Allow tm_file to contain build-directory files.
559         * configure: Regenerate.
560         * config.gcc (m68k-*-uclinux*): Add ./sysroot-suffix.h to tm_file.
561         * config/m68k/t-uclinux (sysroot-suffix.h): New target.
562         * config/m68k/print-sysroot-suffix.sh: New file.
563
564 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
565
566         * config/m68k/m68k.h (PIC_OFFSET_TABLE_REGNUM): Use the REGNO
567         of pic_offset_table_rtx if reload_completed.
568         (CONDITIONAL_REGISTER_USAGE): Use PIC_REG instead of
569         PIC_OFFSET_TABLE_REGNUM.
570         * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Always
571         return true.
572         (m68k_save_reg): Use PIC_REG instead of PIC_OFFSET_TABLE_REGNO.
573         (m68k_output_mi_thunk): Rewrite to use RTL.  Honor vcall_offset.
574
575 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
576
577         * config/m68k/m68k.c (m68k_save_reg): Save the PIC register in
578         functions that call eh_return.
579
580 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
581
582         * config/m68k/m68k.c (m68k_save_reg): Save the PIC register in
583         functions that need a constant pool.
584
585 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
586
587         PR target/28181
588         * config/m68k/m68k-protos.h (m68k_secondary_reload_class): Declare.
589         (m68k_preferred_reload_class): Likewise.
590         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Remove duplicated comment.
591         (SECONDARY_RELOAD_CLASS): Define.
592         (PREFERRED_RELOAD_CLASS): Use m68k_preferred_reload_class.
593         (LIMIT_RELOAD_CLASS): Delete.
594         * config/m68k/m68k.c (m68k_regno_mode_ok): Don't prevent address
595         registers from storing bytes.
596         (m68k_secondary_reload_class): New function.
597         (m68k_preferred_reload_class): Likewise.
598
599 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
600
601         * config/m68k/m68k.c (m68k_save_reg): Remove special case for
602         leaf functions.
603         (m68k_expand_prologue): Likewise.
604
605 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
606
607         * config/m68k/m68k-protos.h (output_sibcall): Declare.
608         (mips_expand_epilogue): Add a bool parameter.
609         (m68k_legitimize_sibcall_address): Declare.
610         * config/m68k/m68k.c (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
611         (m68k_expand_epilogue): Add a parameter to select between sibling
612         and normal epilogues.  Only generate a return for the latter.
613         (m68k_ok_for_sibcall_p): New function.
614         (m68k_legitimize_sibcall_address, output_sibcall): New functions.
615         * config/m68k/m68k.md (sibcall, *sibcall): New patterns.
616         (sibcall_value, *sibcall_value): Likewise.
617         (*call, *call_value): Require !SIBLING_CALL_P.
618         (epilogue): Update call to m68k_expand_epilogue.
619         (sibcall_epilogue): New pattern.
620         * config/m68k/predicates.md (const_call_operand): Say that this
621         predicate applies to sibling calls too.
622         (sibcall_operand): New predicate.
623
624 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
625
626         * config/m68k/m68k.md (movsf_cf_soft): Provide the same non-mov3q
627         alternatives as movsi_cf.
628         (movsf_cf_hard): Add commentary.
629
630 2007-03-06  Kazu Hirata  <kazu@codesourcery.com>
631             Richard Sandiford  <richard@codesourcery.com>
632
633         * config/m68k/m68k-protos.h (m68k_interrupt_function_p): Declare.
634         (m68k_movem_pattern_p, m68k_output_movem): Likewise.
635         (m68k_expand_prologue, m68k_expand_epilogue): Likewise.
636         * config/m68k/m68k.h (EPILOGUE_USES): Define.  Treat all registers
637         as being live on exit from an interrupt function.
638         (PRINT_OPERAND_PUNCT_VALID_P): Return true for '?'.
639         * config/m68k/m68k.c (MIN_MOVEM_REGS, MIN_FMOVEM_REGS): New macros.
640         (m68k_frame): Remove reg_rev_mask and fpu_rev_mask.
641         (TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE): Delete.
642         (m68k_interrupt_function_p): Globalize.
643         (m68k_compute_frame_layout): Remove reverse mask code.
644         (m68k_emit_movem, m68k_set_frame_related): New functions.
645         (m68k_output_function_prologue): Delete in favor of...
646         (m68k_expand_prologue): ...this new function.
647         (m68k_output_function_epilogue): Delete in favor of...
648         (m68k_expand_epilogue): ...this new function.
649         (m68k_split_offset, m68k_movem_pattern_p, m68k_output_movem): New
650         functions.
651         (print_operand): Handle %?.
652         * config/m68k/m68k.md (UNSPEC_SIN, UNSPEC_COS): Remove excess space.
653         (UNSPEC_GOT, A1_REG, PIC_REG, FP0_REG): New constants.
654         (prologue, epilogue): New patterns.
655         (return): Turn into a define_expand.
656         (*return): New pattern, derived from old "return" pattern.  Use rte
657         rather than rts for interrupt functions.  Only use rtd if the pop
658         count is nonzero.
659         (*m68k_store_multiple, *m68k_store_multiple_automod): New patterns.
660         (*m68k_load_multiple, *m68k_load_multiple_automod): Likewise.
661         (link, *link, unlink, *unlink, load_got): Likewise.
662
663 2007-03-06  Richard Sandiford  <richard@codesourcery.com>
664
665         PR target/23482
666         PR target/17114
667         * config/m68k/m68k-protos.h (m68k_legitimate_base_reg_p): Declare.
668         (m68k_legitimate_index_reg_p, m68k_legitimate_address_p): Likewise.
669         (m68k_matches_q_p, m68k_matches_u_p): Likewise.
670         * config/m68k/m68k.h (EXTRA_CONSTRAINT): Use m68k_matches_q_p
671         and m68k_matches_u_p.
672         (PCREL_GENERAL_OPERAND_OK, LEGITIMATE_BASE_REG_P): Delete.
673         (INDIRECTABLE_1_ADDRESS_P, GO_IF_NONINDEXED_ADDRESS): Delete.
674         (GO_IF_INDEXABLE_BASE, GO_IF_INDEXING, GO_IF_INDEXED_ADDRESS): Delete.
675         (LEGITIMATE_INDEX_REG_P, LEGITIMATE_INDEX_P): Delete.
676         (GO_IF_COLDFIRE_FPU_LEGITIMATE_ADDRESS): Delete.
677         (REG_STRICT_P): New macro.
678         (LEGITIMATE_PIC_OPERAND_P): Use REG_STRICT_P rather than
679         PCREL_GENERAL_OPERAND_OK.
680         (REG_OK_FOR_BASE_P): Merge definitions.  Use REG_STRICT_P and
681         m68k_legitimate_base_reg_p.
682         (REG_MODE_OK_FOR_INDEX_P): Likewise m68k_legitimate_index_reg_p.
683         (GO_IF_LEGITIMATE_ADDRESS): Likewise m68k_legitimate_address_p.
684         (PIC_CASE_VECTOR_ADDRESS): Update comment.
685         * config/m68k/m68k.c (m68k_address): New structure.
686         (m68k_legitimate_base_reg_p, m68k_legitimate_index_reg_p)
687         (m68k_decompose_index, m68k_legitimate_constant_address_p)
688         (m68k_jump_table_ref_p, m68k_decompose_address)
689         (m68k_legitimate_address_p, m68k_legitimate_mem_p, m68k_matches_q_p)
690         (m68k_matches_u_p): New functions.
691         (print_operand_address): Rewrite to use m68k_decompose_index.
692
693 2007-03-05  David Taylor  <dtaylor@emc.com>
694
695         * gcc.c: Correct copyright date in --version output.
696
697 2007-03-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
698
699         * pa.md: In unamed move patterns, disparge copies between general
700         and floating point registers using '?' modifier.  Don't include 'f'
701         constraint for register preferences in DImode, SImode, HImode and
702         QImode patterns.  Likewise for 'r' in DFmode and SFmode patterns.
703         Remove constraints for copies between general and floating registers
704         in soft-float DFmode pattern.
705         (movdf): Fail if operand1 is a CONST_DOUBLE and operand0 is a hard
706         floating register.
707         (movsf): Likewise. 
708
709 2007-03-05  Mike Stump  <mrs@apple.com>
710
711         * c-common.c (targetcm): Add.   
712         * c-opts.c (c_common_handle_option): Handle language specific
713         target options.
714         * opts.c (handle_option): Verify language for target options, if
715         any are given.
716         * opth-gen.awk: Add CL_LANG_ALL.
717         * target-def.h (TARGET_HANDLE_C_OPTION): Add.
718         (TARGETCM_INITIALIZER): Add.
719         * target.h (struct gcc_targetcm): Add.
720         (targetcm): Add.
721         * targhooks.c (default_handle_c_option): Add.
722         * targhooks.h (default_handle_c_option): Add.
723         * doc/tm.texi (TARGET_HANDLE_C_OPTION): Add.
724
725         * config/darwin.opt (iframework): Add.
726         * config/darwin.h (TARGET_HAS_TARGETCM): Add.
727         * config/darwin-c.c (handle_c_option): Add.
728         (TARGET_HANDLE_C_OPTION): Add.
729         (targetcm): Add.
730         * doc/invoke.texi (Darwin Options): Add -iframework.
731
732 2007-03-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
733
734         * convert.c (convert_to_integer): Fix nearbyint/rint -> *lrint
735         conversion.
736
737 2007-03-05  Ian Lance Taylor  <iant@google.com>
738
739         * c.opt (fgnu89-inline): New option.
740         * c-opts.c (c_common_post_options): Set default value for
741         flag_gnu89_inline.
742         * c-decl.c (WANT_C99_INLINE_SEMANTICS): Remove.
743         (pop_scope): Check flag_gnu89_inline rather than flag_isoc99 for
744         inline functions.
745         (diagnose_mismatched_decls, merge_decls, start_decl): Likewise.
746         (grokdeclarator, start_function): Likewise.
747         * c-cppbuiltin.c (c_cpp_builtins): Define either
748         __GNUC_GNU_INLINE__ or __GNUC_STDC_INLINE__.
749         * doc/invoke.texi (Option Summary): Mention -fgnu89-inline.
750         (C Dialect Options): Document -fgnu89-inline.
751         * doc/extend.texi (Function Attributes): Explain what the
752         gnu_inline attribute does.
753         * doc/cpp.texi (Common Predefined Macros): Document
754         __GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.
755
756 2007-03-05  Ian Lance Taylor  <iant@google.com>
757
758         PR tree-optimization/31034
759         * tree-vrp.c (extract_range_from_assert): Don't try to handle a
760         half-range if the other side is an overflow infinity.
761
762 2007-03-05  Bernd Schmidt  <bernd.schmidt@analog.com>
763
764         * config.gcc (bfin*-uclinux*): Use t-bfin-uclinux.
765         (bfin*-linux-uclibc*): New configuration.
766         * config/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Undefined before
767         defining.
768         * config/bfin/linux.h: New file.
769         * config/bfin/libgcc-bfin.ver: New file.
770         * config/bfin/t-bfin-uclinux: New file.
771         * config/bfin/t-bfin-linux: New file.
772         * config/bfin/uclinux.h (LINUX_TARGET_OS_CPP_BUILTINS): New macro.
773         (TARGET_OS_CPP_BUILTINS): New macro.
774
775 2007-03-05  Richard Guenther  <rguenther@suse.de>
776
777         * fold-const.c (fold_binary): Remove duplicate folding
778         of comparison of non-null ADDR_EXPR against null.
779
780 2007-03-05  Richard Guenther  <rguenther@suse.de>
781             Dorit Nuzman  <dorit@il.ibm.com>
782
783         PR tree-optimization/26420
784         * tree-vectorizer.c (vectorize_loops): Bail out early if there
785         are no loops in the function.  Only print the number of
786         vectorized loops if it is greater than zero or we are supposed
787         to print information about unvectorized loops.
788
789 2007-03-05  Revital Eres  <eres@il.ibm.com>
790
791         * gcc.dg/var-expand1.c: New test.
792         * loop-unroll.c (analyze_insn_to_expand_var): Add dump info
793         when an accumulator is expanded.
794
795 2007-03-04  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
796
797         PR other/30465
798         * c-common.c (convert_and_check): Don't give warnings for
799         conversion if 'expr' already overflowed.
800         
801 2007-03-04  Roger Sayle  <roger@eyesopen.com>
802
803         PR middle-end/30744
804         * fold-const.c (fold_comparison): Enforce type consistency when
805         transforming ~X op ~Y to Y op X, and ~X op C to X op' ~C.
806
807 2007-03-04  Zdenek Dvorak  <dvorakz@suse.cz>
808
809         * tree-ssa-address.c (create_mem_ref): Do not put an expression
810         containing a cast to the base of TARGET_MEM_REF.
811
812 2007-03-04  Martin Michlmayr  <tbm@cyrius.com>
813
814         * tree.c (tree_contains_struct_check_failed): Remove spurious
815         whitespace from error message.
816
817 2007-03-04 Andrew Pinski <andrew_pinski@playstation.sony.com>
818
819         PR target/30406
820         * config/rs6000/rs6000.c (rs6000_function_value): Look at bit size
821         instead of precision.
822
823 2007-03-04  Roman Zippel <zippel@linux-m68k.org>
824             Nathan Sidwell  <nathan@codesourcery.com>
825
826         * emit-rtl.c (find_auto_inc): New.
827         (try_split): recreate REG_INC notes,
828         Use regular for loops rather than whiles.
829
830 2007-03-03  Andreas Schwab  <schwab@suse.de>
831
832         * configure.ac (HAVE_AS_REL16): Move test back to correct place.
833         * configure: Regenerate.
834
835 2007-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
836
837         * builtins.def (ATTR_MATHFN_FPROUNDING): Rely on
838         flag_rounding_math, not flag_unsafe_math_optimizations.
839
840         * c-pretty-print.c (pp_c_direct_abstract_declarator): Use
841         fold_build2.
842         * config/alpha/alpha.c (alpha_fold_builtin_zapnot,
843         alpha_fold_vector_minmax): Likewise.
844         * config/i386/i386.c (ix86_gimplify_va_arg): Likewise.
845         * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise.
846
847 2007-03-02  Eric Botcazou  <ebotcazou@adacore.com>
848
849         * tree-sra.c (sra_walk_fns) <ldst>: Document new restriction.
850         (sra_walk_modify_expr) <rhs_elt>: Treat the reference as a use
851         if the lhs has side-effects.
852         <lhs_elt>: Treat the reference as a use if the rhs has side-effects.
853
854 2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
855
856         * config/i386/i386.h (TUNEMASK): Remove define.
857         (ARCHMASK): Remove define.
858         (TARGET_*): Use ix86_tune_mask variable instead of TUNEMASK.
859          Use ix86_arch_mask variable instead of ARCHMASK.
860         * config/i386/i386.c (override_options): Ditto.
861         (standard_80387_constant_p): Ditto.
862
863 2007-03-02  Ian Lance Taylor  <iant@google.com>
864
865         Used signed infinities in VRP.
866         * tree-vrp.c (uses_overflow_infinity): New static function.
867         (supports_overflow_infinity): New static function.
868         (make_overflow_infinity): New static function.
869         (negative_overflow_infinity): New static function.
870         (positive_overflow_infinity): New static function.
871         (is_negative_overflow_infinity): New static function.
872         (is_positive_overflow_infinity): New static function.
873         (is_overflow_infinity): New static function.
874         (overflow_infinity_range_p): New static function.
875         (compare_values_warnv): New function split out of compare_values.
876         (compare_value): Call it.
877         (set_value_range_to_nonnegative): Add overflow_infinity
878         parameter.  Change caller.
879         (vrp_expr_computes_nonnegative): Add strict_overflow_p parameter.
880         Change callers.
881         (vrp_expr_computes_nonzero): Likewise.
882         (compare_ranges, compare_range_with_value): Likewise.
883         (compare_name_with_value, compare_names): Likewise.
884         (vrp_evaluate_conditional): Likewise.
885         (set_value_range): Handle infinity
886         (vrp_operand_equal_p, operand_less_p): Likewise.
887         (extract_range_from_assert): Likewise.
888         (vrp_int_const_binop): Likewise.
889         (extract_range_from_binary_expr): Likewise.
890         (extract_range_from_unary_expr): Likewise.
891         (extract_range_from_comparison): Likewise.
892         (extract_range_from_expr): Likewise.
893         (dump_value_range): Likewise.
894         (vrp_visit_cond_stmt, vrp_visit_phi_node): Likewise.
895         (test_for_singularity): Likewise.
896         (vrp_int_const_binop): Remove inline qualifier.
897         (adjust_range_with_scev): Add comment.
898         * tree-flow.h (vrp_evaluate_conditional): Update declaration.
899
900 2007-03-02  Diego Novillo  <dnovillo@redhat.com>
901
902         * tree-ssa-structalias.c (could_have_pointers): Tidy.
903         (get_constraint_for): Likewise.
904         (do_structure_copy): Likewise.
905         (find_func_aliases): Fix references to MODIFY_EXPR.
906         (intra_create_variable_infos): Tidy.
907         * tree-ssa-operands.c (add_virtual_operand): Add argument
908         IS_CALL_SITE.
909         When adding members of alias sets, if IS_CALL_SITE is true and
910         the symbol is not call-clobbered, skip it.
911         Adjust all callers.
912
913 2007-03-02  Eric Botcazou  <ebotcazou@adacore.com>
914
915         * config/alpha/alpha.c (alpha_gp_save_rtx): Insert the insns at the
916         entry by means of emit_insn_at_entry.
917
918 2007-03-02  Richard Henderson  <rth@redhat.com>
919
920         * expr.h (promoted_input_arg): Remove decl.
921         * function.c (promoted_input_arg): Merge into ...
922         * combine.c (setup_incoming_promotions): ... only caller.
923         Rearrange to avoid double loop.
924
925 2007-03-02  Ben Elliston  <bje@au.ibm.com>
926             Peter Bergner  <bergner@vnet.ibm.com>
927             Janis Johnson  <janis187@us.ibm.com>
928
929         * config/rs6000/dfp.md: New file.
930         * config/rs6000/rs6000.md: Include dfp.md.
931         (add<mode>3_internal1): Disable for DECIMAL_FLOAT_MODE_P operands.
932         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Handle DDmode
933         and TDmode decimal float modes in FP registers.
934         (num_insns_constant): Likewise.
935         (rs6000_legitimate_offset_address_p): Likewise.
936         (rs6000_legitimize_address): Likewise.
937         (rs6000_legitimize_reload_address): Likewise.
938         (rs6000_legitimate_address): Likewise.
939         (rs6000_emit_move): Likewise.
940         (function_arg_boundary): Likewise.
941         (function_arg_advance): Likewise.
942         (rs6000_darwin64_record_arg_recurse): Likewise.
943         (function_arg): Likewise.
944         (rs6000_gimplify_va_arg): Likewise.
945         (rs6000_split_multireg_move): Likewise.
946         (rs6000_output_function_epilogue): Likewise.
947         (rs6000_output_function_epilogue): Likewise.
948         (rs6000_register_move_cost): Likewise.
949         (rs6000_function_value): Likewise.
950         (rs6000_libcall_value): Likewise.
951
952 2007-03-02  Richard Sandiford  <richard@codesourcery.com>
953
954         * config/t-vxworks (LIMITS_H_TEST): Define to true for VxWorks.
955
956 2007-03-02  Richard Sandiford  <richard@codesourcery.com>
957
958         * config/t-vxworks (LIBGCC2_INCLUDES): Pass -nostdinc.
959         Use $MULTIDIR to choose between the kernel and RTP headers,
960         and use $WIND_BASE and $WIND_USR to locate them.
961
962 2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
963
964         * config/i386/i386.c (override_options): Put initialization of
965         ix86_tune_mask and ix86_arch_mask to the correct place.
966
967 2007-03-02  Uros Bizjak  <ubizjak@gmail.com>
968             Michael Meissner  <michael.meissner@amd.com>
969
970         PR target/31019
971         * config/i386/i386.h (TUNEMASK): Redefine to use ix86_tune_mask.
972         (ARCHMASK): Define.
973         (TARGET_CMOVE): Use ARCHMASK.
974         (TARGET_CMPXCHG): Ditto.
975         (TARGET_CMPXCHG8B): Ditto.
976         (TARGET_XADD): Ditto.
977         (TARGET_BSWAP): Ditto.
978         * config/i386/i386.c (ix86_tune_mask): New global variable.
979         (ix86_arch_mask): Ditto.
980         (override_options): Initialize ix86_tune_mask and
981         ix86_arch_mask. Use ARCHMASK to clear MASK_NO_FANCY_MATH_387 in
982         target_flags.
983
984 2007-03-02  Ben Elliston  <bje@au.ibm.com>
985
986         PR 30992
987         * config/dfp-bit.c (DFP_TO_INT): Initialise qval with "1.".
988
989 2007-03-02  Joseph Myers  <joseph@codesourcery.com>
990
991         * target.h (init_dwarf_reg_sizes_extra): New target hook.
992         * target-def.h (TARGET_INIT_DWARF_REG_SIZES_EXTRA): New default.
993         * doc/tm.texi (TARGET_INIT_DWARF_REG_SIZES_EXTRA): Document.
994         * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Call this
995         hook.
996         * config/rs6000/rs6000.c (TARGET_INIT_DWARF_REG_SIZES_EXTRA,
997         rs6000_init_dwarf_reg_sizes_extra): New.
998         * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Support
999         SPE register high parts.
1000
1001 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1002
1003         * Makefile.in: Add install-pdf target as
1004         copied from automake v1.10 rules.
1005         * configure.ac: Add install-pdf to target list.
1006         * configure: Regenerate.
1007
1008 2007-03-01  Paul Brook  <paul@codesourcery.com>
1009
1010         * config/arm/arm.c (arm_legitimate_index_p): Limit iWMMXt addressing
1011         modes to LDRD for DImode.
1012         (output_move_double): Fixup out of range ldrd/strd.
1013         (vfp_secondary_reload_class): Rename...
1014         (coproc_secondary_reload_class): ... to this.  Add wb argument.
1015         * config/arm/arm.h (SECONDARY_OUTPUT_RELOAD_CLASS): Use
1016         coproc_secondary_reload_class for CLASS_IWMMXT.
1017         (SECONDARY_INPUT_RELOAD_CLASS): Ditto.
1018         * arm-protos.h (coproc_secondary_reload_class): Update prototype.
1019
1020 2007-03-01  Zdenek Dvorak  <dvorakz@suse.cz>
1021
1022         * tree-ssa-loop-prefetch.c (determine_unroll_factor):  Bound the unroll
1023         factor by the estimated number of iterations.
1024         (loop_prefetch_arrays): Do not prefetch in loops that iterate less than
1025         prefetch latency.
1026
1027         * config/i386/driver-i386.c (describe_cache, detect_caches_amd,
1028         decode_caches_intel, detect_caches_intel): New functions.
1029         (host_detect_local_cpu): Use detect_caches_amd and
1030         detect_caches_intel.
1031
1032 2007-03-01  Richard Henderson  <rth@redhat.com>
1033
1034         * expr.c (emit_move_complex_push): Export.
1035         (emit_move_complex_parts): Split out from ...
1036         (emit_move_complex): ... here.
1037         * expr.h (emit_move_complex_push, emit_move_complex_parts): Declare.
1038         * config/i386/i386.md (movcdi): New.
1039
1040 2007-03-01  Uros Bizjak  <ubizjak@gmail.com>
1041
1042         * config/i386/i386.c (ix86_modes_tieable_p): Fix typo, use also
1043         size of mode1 to check for tieable modes in MMX case.
1044
1045 2007-03-01  Richard Sandiford  <richard@codesourcery.com>
1046
1047         * Makefile.in (rtlanal.o): Depend on tree.h.
1048         * rtl.h (offset_within_section_p, split_const): Declare.
1049         * rtlanal.c: Include tree.h.
1050         (offset_within_block_p): New function, taken from
1051         mips_offset_within_object_p.
1052         (split_const): New function, taken from mips_split_const.
1053         * config/m68k/m68k-protos.h (m68k_illegitimate_symbolic_constant_p):
1054         Declare.
1055         * config/m68k/m68k.h (M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P): Define.
1056         (CONSTANT_ADDRESS_P): Only accept legitimate constants.
1057         (LEGITIMATE_CONSTANT_P): Check m68k_illegitimate_symbolic_constant_p.
1058         * config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1059         (m68k_illegitimate_symbolic_constant_p): New function.
1060         * config/m68k/m68k.md (movsi): Remove misleading predicates.
1061         If M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P and the source is a
1062         symbolic constant that might be outside the symbol's section,
1063         move the symbol first and then add the offset.
1064         * config/m68k/uclinux.h (M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P):
1065         Override.
1066         * config/mips/mips.c (mips_split_const): Delete.
1067         (mips_offset_within_object_p): Delete.
1068         (mips_symbolic_constant_p): Use offset_within_section_p and
1069         split_const instead of mips_offset_within_object_p and
1070         mips_split_const.
1071         (mips_cannot_force_const_mem, mips_const_insns, mips_unspec_address)
1072         (mips_legitimize_const_move, print_operand_reloc)
1073         (mips_dangerous_for_la25_p): Use split_const instead of
1074         mips_split_const.
1075
1076 2007-02-28  Eric Christopher  <echristo@apple.com>
1077
1078         * Makefile.in (install-include-dir): Don't rm -rf include.
1079
1080 2007-02-28  Richard Guenther  <rguenther@suse.de>
1081
1082         PR middle-end/30364
1083         * fold-const.c (fold_binary): Do not associate expressions
1084         with more than one variable for integer types that do not wrap.
1085
1086 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
1087
1088         * builtins.c (fold_builtin_call_list, fold_builtin_call_valist):
1089         Delete, and replace with...
1090         (fold_builtin_call_array): This.  Update callers to use it.
1091         * fold-const.c (fold_build_call_list): Delete, and replace with...
1092         (fold_build_call_array): This.
1093         (fold_build_call_list_initializer): Delete, and replace with...
1094         (fold_build_call_array_initializer): This.
1095         * tree.h: Update declarations to reflect above changes.
1096
1097         * c-typeck.c (build_function_call): Store converted arguments
1098         in a stack-allocated array instead of building a list.
1099         (convert_arguments): Store arguments in the array passed in as an
1100         argument, and return the actual number of arguments.
1101         * c-format.c: (check_function_format): Pass arguments in an
1102         array instead of a list.
1103         * c-common.c (check_function_nonnull): Likewise.
1104         (check_function_sentinel): Likewise.
1105         (check_function_arguments): Likewise.
1106         * c-common.h: Update declarations to reflect above changes.
1107
1108 2007-02-28  Jan Hubicka  <jh@suse.cz>
1109
1110         * predict.def (PRED_TREE_EARLY_RETURN, PRED_CONST_RETURN,
1111         PRED_NEGATIVE_RETURN): Update outcomes.
1112
1113 2007-02-28  Bernd Schmidt  <bernd.schmidt@analog.com>
1114
1115         * calls.c (emit_library_call_value_1): Handle partial registers
1116         correctly when building up CALL_INSN_FUNCTION_USAGE.
1117
1118 2007-02-27  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1119
1120         * pa/predicates.md (move_src_operand): Allow zero for mode.
1121         * pa/pa.md: Fix constraints for zero CONST_DOUBLE in 64-bit DFmode
1122         move pattern.
1123
1124 2007-02-27  Uros Bizjak  <ubizjak@gmail.com>
1125
1126         PR target/30970
1127         * config/i386/sse.md (*mov<mode>_internal, *movv4sf_internal,
1128         *movv2df_internal): Enable pattern only for valid operand
1129         combinations.
1130         * config/i386/i386.c (ix86_modes_tieable_p): For SSE registers,
1131         tie only 128bit modes. For MMX registers, tie only 64bit modes.
1132
1133 2007-02-27  Mike Stump  <mrs@apple.com>
1134
1135         * config/darwin-crt3.c: Avoid compilation when compiling for a
1136         kext multilib.
1137
1138 2007-02-27  Joseph Myers  <joseph@codesourcery.com>
1139
1140         * Makefile.in (PREPROCESSOR_DEFINES, test-protoize-simple): Define
1141         FIXED_INCLUDE_DIR.
1142         (stmp-int-hdrs, stmp-fixinc, install-headers): Use include-fixed
1143         for fixed headers and limits.h.
1144         (install-include-dir, install-headers-tar, install-headers-cpio,
1145         install-headers-cp, real-install-headers-tar,
1146         real-install-headers-cpio, real-install-headers-cp): Handle
1147         include-fixed as well as include.
1148         (install-mkheaders): Don't install files that go only in include
1149         not include-fixed.
1150         * cppdefault.c (cpp_include_defaults): Separate FIXED_INCLUDE_DIR
1151         from GCC_INCLUDE_DIR.
1152         * gcc.c (process_command): Remove special -BstageN/ handling.
1153         (do_spec_1): Add include-fixed directories.
1154
1155 2007-02-27  Bernd Schmidt  <bernd.schmidt@analog.com>
1156
1157         * config/bfin/t-bfin-elf (LIB1ASMFUNCS): Add _umulsi3_highpart and
1158         _smulsi3_highpart.
1159         * config/bfin/lib1funcs.asm (___umulsi3_highpart, ___smulsi3_highpart):
1160         New functions.
1161         * config/bfin/bfin.md (smulsi3_highpart, umulsi3_highpart): New
1162         patterns.
1163
1164 2007-02-27  Mark Mitchell  <mark@codesourcery.com>
1165
1166         * c-common.c (get_priority): Add check for
1167         SUPPORTS_INIT_PRIORITY.
1168
1169 2007-02-27  Bernd Schmidt  <bernd.schmidt@analog.com>
1170
1171         * config/bfin/bfin.md (doloop_end): FAIL if counter reg isn't SImode.
1172
1173         * config/bfin/bfin.c: Include "cfglayout.h".
1174         (MAX_LSETUP_DISTANCE): New macro.
1175         (struct loop_info): New members incoming, incoming_src and
1176         incoming_dest.  Delete member predecessor.
1177         (length_for_loop): New function.
1178         (bfin_optimize_loop): Handle more different loop structures.
1179         (bfin_discover_loop): Rework detection of predecessor blocks by
1180         examining incoming edges.
1181         (bfin_discover_loops, bfin_free_loops): New functions, broken out of
1182         bfin_reorg_loops.
1183         (bfin_reorder_loops): New function.
1184         (bfin_reorg_loops): Use these three new functions.
1185
1186         * config/bfin/bfin.h (enum reg_class, REG_CLASS_NAMES,
1187         REG_CLASS_CONTENTS): Add D0REGS through D7REGS.
1188         (CONSTRAINT_LEN): Add entry for 'q'.
1189         (REG_CLASS_FROM_CONSTRAINT): Renamed from REG_CLASS_FROM_LETTER.
1190         Add 'q' constraints.
1191         (REGNO_REG_CLASS): For R0 through R7, return corresponding regclass.
1192         (CLASS_LIKELY_SPILLED_P): True for R0, R1 and R2.
1193
1194         * config/bfin/bfin.md (add_with_carry): New pattern.
1195         (s_or_u, su_optab, su_modifier): New code macros/attrs.
1196         (<su_optab>hisi_ll, <su_optab>hisi_lh, <su_optab>hisi_hl,
1197         <su_optab>hisi_hh): Renamed from mulhisi_xx patterns; macroized to
1198         support unsigned multiplies too.  Removed incorrect commutativity from
1199         operand 1 constraint where appropriate.
1200         (usmulhisi_ull, usmulhisi_ulh, usmulhisi_uhl, usmulhisi_uhh): New
1201         patterns.
1202         (<su_optab>hisi_ll_lh, <su_optab>hisi_ll_hl, <su_optab>hisi_ll_hh,
1203         <su_optab>hisi_lh_hl, <su_optab>hisi_lh_hh, <su_optab>hisi_hl_hh):
1204         New patterns.
1205         (usmulhisi_ll_lul, usmulhisi_ll_luh, usmulhisi_ll_hul,
1206         usmulhisi_ll_huh, usmulhisi_lh_lul, usmulhisi_lh_luh, usmulhisi_lh_hul,
1207         usmulhisi_lh_huh, usmulhisi_hl_lul, usmulhisi_hl_luh, usmulhisi_hl_hul,
1208         usmulhisi_hl_huh, usmulhisi_hh_lul, usmulhisi_hh_luh, usmulhisi_hh_hul,
1209         usmulhisi_hh_huh): New patterns.
1210
1211         * config/bfin/bfin.md (ssashiftv2hi3, ssashifthi3, lshiftv2hi3,
1212         lshifthi3): Fix output template to use half reg for operand 2.
1213
1214         * config/bfin/bfin.c (bfin_output_mi_thunk): Use R3 as scratch reg
1215         instead of R2.
1216
1217         * config/bfin/bfin.md (rotl16, rotlsi3, rotrsi3): New patterns.
1218
1219 2007-02-27  Andreas Schwab  <schwab@suse.de>
1220
1221         * Makefile.in (TEXI_GCCINSTALL_FILES): Add gcc-common.texi.
1222
1223 2007-02-27  Jan Hubicka  <jh@suse.cz>
1224
1225         * predict.c (last_basic_block_p): Remove.
1226         (tree_estimate_probability): Update return heuristic for commonized
1227         return blocks.
1228
1229 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
1230
1231         * Makefile.in (TEXI_GCCINSTALL_FILES): Add gcc-vers.texi dependency.
1232
1233 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
1234
1235         * doc/include/gcc-common.texi (versionsubtitle): New macro.
1236         * doc/cpp.texi: Standardize title page.
1237         * doc/cppinternals.texi: Likewise.
1238         * doc/gcc.texi: Standardize title page, remove version number
1239         from copyright page.
1240         * doc/gccint.texi: Likewise.
1241         * doc/install.texi: Standardize title page, add table of
1242         contents.
1243
1244 2007-02-26  Jan Hubicka  <jh@suse.cz>
1245
1246         * predict.def: Set outcomes according to more recent results.
1247         (PRED_LOOP_CONDITION, PRED_LOOP_PRECONDITIONING, PRED_LOOP_HEADER):
1248         Remove dead predictors.
1249         * predict.c (return_prediction): Fix pasto.
1250
1251 2007-02-27  Bernd Schmidt  <bernd.schmidt@analog.com>
1252
1253         * loop-iv.c (simplify_using_initial_values): Fix oversight in previous
1254         change; avoid a memory leak when returning early.
1255
1256 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
1257
1258         * c-decl.c (static_ctors): Move to c-common.c.
1259         (static_dtors): Likewise.
1260         (finish_function): Use c_record_cdtor_fn.
1261         (build_cdtor): Move to c-common.c.
1262         (c_write_global_declarations): Use c_build_cdtor_fns.
1263         * c-common.h (static_ctors): Declare.
1264         (static_dtors): Likewise.
1265         (c_record_cdtor_fn): Likewise.
1266         (c_build_cdtor_fns): Likewise.
1267         * c-common.c (static_ctors): New variable.
1268         (static_dtors): Likewise.
1269         (c_record_cdtor_fn): New function.
1270         (build_cdtor): Move from c-decl.c
1271         (c_build_cdtor_fns): New function.
1272
1273         * output.h (assemble_addr_to_section): Declare.
1274         (get_cdtor_priority_section): Likewise.
1275         * varasm.c (assemble_addr_to_section): New function.
1276         (get_cdtor_priority_section): Likewise.
1277         (default_named_section_asm_out_destructor): Use them.
1278         (destor_dtor_section_asm_out_destructor): Likewise.
1279         (default_named_section_asm_out_constructor): Likewise.
1280         (default_ctor_section_asm_out_constructor): Likewise.
1281         * config.gcc (*-*-vxworks*): Include vxworks.o.
1282         * config/t-vxworks (vxworks.o): New target.
1283         * config/vxworks.h (ALWAYS_NUMBER_CTORS_SECTIONS): Remove.
1284         (TARGET_ASM_CONSTRUCTOR): Define.
1285         (TARGET_ASM_DESTRUCTOR): Likewise.
1286         (vxworks_asm_out_constructor): Declare.
1287         (vxworks_asm_out_destructor): Likewise.
1288
1289         * c-common.c (get_priority): Check that we have not just an
1290         INTEGER_CST, but an integer constant with integeral type.
1291
1292 2007-02-25  Uros Bizjak  <ubizjak@gmail.com>
1293
1294         PR tree-optimization/30938
1295         * tree-vect-transform.c (vectorizable_call): Fix off-by-one error:
1296         use &dt[nargs-1] instead of &dt[nargs] in the call to
1297         vect_is_simple_use().
1298
1299 2007-02-25  Ulrich Weigand  <uweigand@de.ibm.com>
1300
1301         * reload.c (find_reloads_address_1): Handle PLUS expressions resulting
1302         from register elimination as PRE_MODIFY / POST_MODIFY increments.
1303         Do not attempt to handle MEM inside auto-inc expressions.
1304         * reload1.c (eliminate_regs_1): Do not attempt to handle elimination
1305         of a register modified by an auto-inc expression.  However, do handle
1306         elimination of a register used as PRE_MODIFY / POST_MODIFY increment.
1307         (elimination_effects): Prohibit elimination of a register modified
1308         by an auto-inc expression.  Disable register elimination rules whose
1309         target register is modified by an auto-inc expression with variable
1310         increment.
1311
1312 2007-02-25  Zdenek Dvorak  <dvorakz@suse.cz>
1313
1314         * tree-ssa-loop-niter.c (compute_estimated_nb_iterations): Fix
1315         off-by-one error.
1316         (array_at_struct_end_p): New function.
1317         (idx_infer_loop_bounds): Use it.
1318         (estimate_numbers_of_iterations_loop): Export.
1319         * predict.c (predict_loops): Use estimated_loop_iterations_int.
1320         Do not use PRED_LOOP_EXIT on exits predicted by # of iterations.
1321         (tree_estimate_probability): Call record_loop_exits.
1322         * tree-data-ref.c (get_number_of_iters_for_loop): Replaced by ...
1323         (estimated_loop_iterations, estimated_loop_iterations_int,
1324         estimated_loop_iterations_tree): New functions.
1325         (analyze_siv_subscript_cst_affine,
1326         compute_overlap_steps_for_affine_1_2,
1327         analyze_subscript_affine_affine): Use estimated_loop_iterations_int.
1328         (analyze_miv_subscript): Use estimated_loop_iterations_tree.
1329         * predict.def (PRED_LOOP_ITERATIONS): Update comment.
1330         (PRED_LOOP_ITERATIONS_GUESSED): New.
1331         * cfgloop.c (record_loop_exits): Do nothing if there are no loops.
1332         * cfgloop.h (estimate_numbers_of_iterations_loop,
1333         estimated_loop_iterations_int): Declare.
1334
1335 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
1336
1337         * doc/extend.texi: Document optional priority argument to
1338         constructors and destructors.
1339         * tree.c (init_priority_for_decl): Adjust GTY markers.
1340         (init_ttree): Use priority-info hash functions for
1341         init_priority_for_decl.
1342         (tree_map_eq): Rename to ...
1343         (tree_map_base_eq): ... this.
1344         (tree_map_marked_p): Rename to ...
1345         (tree_map_base_marked_p): ... this.
1346         (tree_map_base_hash): New function.
1347         (decl_init_priority_lookup): Rework.
1348         (decl_fini_priority_lookup): New function.
1349         (decl_priority_info): New function.
1350         (decl_init_priority_insert): Use it.
1351         (decl_fini_priority_insert): Likewise.
1352         (decl_restrict_base_lookup): Adjust for refactoring of tree_map
1353         hierarchy.
1354         (decl_restrict_base_insert): Likewise.
1355         (decl_debug_expr_insert): Likewise.
1356         (decl_value_expr_lookup): Likewise.
1357         (decl_value_expr_insert): Likewise.
1358         * tree.h (priority_type): New type.
1359         (decl_init_priority_lookup): Use priority_type.
1360         (decl_fini_priority_lookup): New function.
1361         (decl_init_priority_insert): Use priority_type.
1362         (decl_fini_priority_insert): New function.
1363         (DECL_HAS_INIT_PRIORITY): Tweak comments.
1364         (DECL_INIT_PRIORITY): Likewise.
1365         (SET_DECL_INIT_PRIORITY): Add comment.
1366         (DECL_FINI_PRIORITY): New macro.
1367         (SET_DECL_FINI_PRIORITY): Likewise.
1368         (DEFAULT_INIT_PRIORITY): Document.
1369         (MAX_INIT_PRIORITY): Likewise.
1370         (MAX_RESERVED_INIT_PRIORITY): Likewise.
1371         (tree_map_base): New type.
1372         (tree_map_base_eq): New function.
1373         (tree_map_base_hash): Likewise.
1374         (tree_map_base_marked_p): Likewise.
1375         (tree_map): Inherit from tree_map_base.
1376         (tree_map_eq): Make it a macro.
1377         (tree_map_marked_p): Likewise.
1378         (tree_int_map): Inherit from tree_map_base.
1379         (tree_int_map_eq): Make it a macro.
1380         (tree_int_map_hash): Likewise.
1381         (tree_int_map_marked_p): Likewise.
1382         (tree_priority_map): New type.
1383         (tree_priority_map_eq): New macro.
1384         (tree_priority_map_hash): Likewise.
1385         (tree_priority_map_marked_p): Likewise.
1386         * varasm.c (emults_decl): Adjust for refactoring of tree_map
1387         hierarchy.
1388         (emutls_common_1): Likewise.
1389         * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.
1390         * tree-ssa-structalias.c (heapvar_lookup): Adjust for refactoring
1391         of tree_map hierarchy.
1392         * tree-cfg.c (move_stmt_r): Likewise.
1393         (new_label_mapper): Likewise.
1394         * c-tree.h (c_expand_body): Move to ...
1395         * c-common.h (c_expand_body): ... here.
1396         * c-decl.c (c_expand_body): Move to ...
1397         * c-common.c (c_expand_body): ... here.
1398         (c_common_attribute_table): Allow 1 argument for the constructor
1399         and destructor attributes.
1400         (get_priority): New function.
1401         (handle_constructor_attribute): Set DECL_INIT_PRIORITY.
1402         (handle_destructor_attribute): Set DECL_FINI_PRIORITY.
1403
1404 2007-02-24  Jan Hubicka  <jh@suse.cz>
1405
1406         PR middle-end/30509
1407         * tree-inline.c (copy_bb): Produce exact copy of EH info when copying for inlining.
1408
1409 2007-02-24  Uros Bizjak  <ubizjak@gmail.com>
1410             Jan Hubicka  <jh@suse.cz>
1411
1412         PR target/30778
1413         * i386.c (counter_mode): New function.
1414         (expand_set_or_movmem_via_loop): Use it.
1415         (expand_movmem_epilogue): Likewise; fix pasto.
1416         (ix86_expand_movmem): Do emit guard even for constant counts.
1417         (ix86_expand_setmem): Likewise.
1418
1419 2007-02-25  Nick Clifton  <nickc@redhat.com>
1420
1421         * config/frv/frv.h (ASM_OUTPUT_CASE_LABEL): Delete.
1422         (JUMP_TABLES_IN_TEXT_SECTION): Define.
1423
1424 2007-02-24  Uros Bizjak  <ubizjak@gmail.com>
1425
1426         PR target/30770
1427         * config/i386/i386.md (expand_movmem_epilogue): Fix typo, mask
1428         count argument with 0x10, not with 0x16.
1429         (expand_setmem_epilogue): Ditto.
1430
1431 2007-02-24  Mike Stump  <mrs@apple.com>
1432
1433         * config/i386/i386.c (output_pic_addr_const): Stubify optimized
1434         symbols.
1435
1436 2007-02-24  Richard Guenther  <rguenther@suse.de>
1437
1438         PR middle-end/30951
1439         * fold-const.c (fold_binary): Fold x +- CST op x for
1440         EQ_EXPR and NE_EXPR.
1441
1442 2007-02-24  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1443
1444         * pa.md (muldi3): Force subregs to registers in 64-bit expander.
1445
1446 2007-02-24  Jan Hubicka  <jh@suse.cz>
1447
1448         * cgraphunit.c (decide_is_function_needed): Honor
1449         -fkeep-inline-functions.
1450
1451 2007-02-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1452
1453         * builtins.c (fold_builtin_modf): New.
1454         (fold_builtin_2): Use it.
1455
1456 2007-02-24  Bernd Schmidt  <bernd.schmidt@analog.com>
1457
1458         * loop-iv.c (implies_p): Detect additional cases where A implies B.
1459         (determine_max_iter): Take additional LOOP arg; all callers changed.
1460         Lose broken logic dealing with PLUS.  Try to limit the upper bound by
1461         one using simplifications.
1462         (simplify_using_initial_values): Return if the expression becomes
1463         invalid due to altered regs.
1464
1465 2007-02-23  DJ Delorie  <dj@redhat.com>
1466
1467         * doc/tm.h (BIGGEST_ALIGNMENT): Clarify the purpose of this macro.
1468
1469 2007-02-23  Mike Stump  <mrs@apple.com>
1470
1471         * tlink.c (scan_linker_output): Parse linker messages from
1472         darwin9's linker better.
1473
1474 2007-02-23  Steve Ellcey  <sje@cup.hp.com>
1475
1476         PR debug/29614
1477         * varpool.c (varpool_assemble_pending_decls):  Set
1478         varpool_last_needed_node to null.
1479
1480 2007-02-23  DJ Delorie  <dj@redhat.com>
1481
1482         * config/i386/i386.c (ix86_data_alignment): Don't specify an
1483         alignment bigger than the object file can handle.
1484
1485 2007-02-23  Uros Bizjak  <ubizjak@gmail.com>
1486
1487         PR target/30825
1488         * config/i386/i386.md (*movdi_1_rex64, zero_extendsidi2_32,
1489         zero_extendsidi2_rex64): Penalize MMX register<->memory moves.
1490         (*movsf_1): Penalize MMX moves.
1491
1492 2007-02-23  Bernd Schmidt  <bernd.schmidt@analog.com>
1493
1494         * config/bfin/bfin.md (doloop_end): Fail for loops that can iterate
1495         2^32-1 or more times unless flag_unsafe_loop_optimizations.
1496
1497         * loop-iv.c (determine_max_iter): Moved in front of its sole user.
1498
1499 2007-02-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1500
1501         * builtins.c (fold_builtin_logb, fold_builtin_significand): New.
1502         (fold_builtin_1): Use them.
1503         * fold-const.c (tree_expr_nonnegative_warnv_p): Handle
1504         BUILT_IN_SIGNIFICAND.
1505
1506 2007-02-23  H.J. Lu  <hongjiu.lu@intel.com>
1507
1508         * config/i386/i386.c (bdesc_1arg): Initialize
1509         IX86_BUILTIN_MOVSHDUP and IX86_BUILTIN_MOVSLDUP with
1510         "__builtin_ia32_movshdup" and "__builtin_ia32_movsldup".
1511         (ix86_init_mmx_sse_builtins): Remove IX86_BUILTIN_MOVSHDUP
1512         and IX86_BUILTIN_MOVSLDUP.
1513
1514 2007-02-22  Paolo Bonzini  <bonzini@gnu.org>
1515
1516         PR rtl-optimization/30841
1517         * fwprop.c (propagate_rtx_1): Accept a VOIDmode replacement address.
1518
1519 2007-02-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1520
1521         * builtins.c (fold_builtin_frexp): New.
1522         (fold_builtin_2): Use it.
1523
1524 2007-02-22  Mark Mitchell  <mark@codesourcery.com>
1525
1526         * doc/invoke.texi (Spec Files): Document getenv spec function.
1527
1528         * gcc.c (getenv_spec_function): New function.
1529         (static_spec_functions): Add it.
1530         * config/vxworks.h (VXWORKS_TARGET_DIR): Remove.
1531         (VXWORKS_ADDITIONAL_CPP_SPEC): Use getenv to find the VxWorks
1532         header files.
1533
1534 2007-02-22  Michael Matz  <matz@suse.de
1535
1536         PR c++/29433
1537         * dwarf2out.c (add_AT_string): Call ggc_strdup once per string.
1538         (type_tag): Use lang_hooks.dwarf_name instead of DECL_NAME.
1539
1540 2007-02-22  Ian Lance Taylor  <iant@google.com>
1541
1542         PR debug/30898
1543         * dwarf2out.c (concatn_mem_loc_descriptor): New static function.
1544         (mem_loc_descriptor): Call it.
1545
1546 2007-02-22  Zdenek Dvorak  <dvorakz@suse.cz>
1547             Ira Rosen  <irar@il.ibm.com>
1548
1549         * tree-data-ref.c (ptr_ptr_may_alias_p): Take alias sets into account.
1550
1551 2007-02-22  Ira Rosen  <irar@il.ibm.com>
1552
1553         PR tree-optimization/30843
1554         * tree-vect-transform.c (vect_transform_loop): Remove strided scalar
1555         stores only after all the group is vectorized.
1556
1557 2007-02-22  Dorit Nuzman  <dorit@il.ibm.com>
1558
1559         PR tree-optimization/30858
1560         * tree-vectorizer.c (vect_is_simple_reduction): Check that the stmts
1561         in the reduction cycle have a single use in the loop.
1562         * tree-vectorizer.h (relevant): Add documentation.
1563
1564 2007-02-20  Mike Stump  <mrs@apple.com>
1565
1566         * configure.ac (powerpc*-*-darwin*): #include <sys/cdefs.h>.
1567         * configure: Regenerate.
1568
1569 2007-02-21  Trevor Smigiel  <trevor_smigiel@playstation.sony.com>
1570
1571         Change the defaults of some parameters and options.
1572         * config/spu/spu-protos.h (spu_optimization_options): Declare.
1573         * config/spu/spu.c (spu_optimization_options): Add.
1574         (spu_override_options): Change params in spu_optimization_options.
1575         * config/spu/spu.h (OPTIMIZATION_OPTIONS): Define.
1576
1577         Register 127 is only 16 byte aligned when used as a frame pointer.
1578         * config/spu/spu-protos.h (spu_init_expanders): Declare.
1579         * config/spu/spu.c (spu_expand_prologue): Set REGNO_POINTER_ALIGN for
1580         HARD_FRAME_POINTER_REGNUM.
1581         (spu_legitimate_address):  Use regno_aligned_for_reload.
1582         (regno_aligned_for_load):  HARD_FRAME_POINTER_REGNUM is only 16 byte
1583         aligned when frame_pointer_needed is true.
1584         (spu_init_expanders): New.  Set alignment of HARD_FRAME_POINTER_REGNUM
1585         to 8 bits.
1586         * config/spu/spu.h (INIT_EXPANDERS): Define.
1587
1588         Make sure shift and rotate instructions have valid immediate operands.
1589         * config/spu/predicates.md (spu_shift_operand): Remove.
1590         * config/spu/spu.c (print_operand): Add [efghEFGH] modifiers.
1591         * config/spu/constraints.md (W, O): Extend range.
1592         * config/spu/spu.md (umask, nmask): Define.
1593         (ashl<mode>3, ashldi3, ashlti3_imm, shlqbybi_ti, shlqbi_ti, shlqby_ti,
1594         lshr<mode>3, rotm_<mode>, lshr<mode>3_imm, rotqmbybi_<mode>,
1595         rotqmbi_<mode>, rotqmby_<mode>, ashr<mode>3, rotma_<mode>,
1596         rotl<mode>3, rotlti3, rotqbybi_ti, rotqby_ti, rotqbi_ti): Use
1597         spu_nonmem_operand instead of spu_shift_operands.  Use new modifiers.
1598         (lshr<mode>3_reg):  Fix rtl description.
1599
1600         Make sure mulhisi immediate operands are valid.
1601         * config/spu/predicates.md (imm_K_operand): Add.
1602         * config/spu/spu.md (mulhisi3_imm, umulhisi3_imm): Use imm_K_operand.
1603
1604         Generate constants using fsmbi and andi.
1605         * config/spu/spu.c (enum immediate_class): Add IC_FSMBI2.
1606         (print_operand, spu_split_immediate, classify_immediate,
1607         fsmbi_const_p): Handle IC_FSMBI2.
1608
1609         Correctly handle a CONST_VECTOR containing symbols.
1610         * config/spu/spu.c (print_operand): Handle HIGH correctly.
1611         (spu_split_immediate): Split CONST_VECTORs with -mlarge-mem.
1612         (immediate_load_p): Allow symbols that use 2 instructions to create.
1613         (classify_immediate, spu_builtin_splats):  Don't accept a CONST_VECTOR
1614         with symbols when flag_pic is set.
1615         (const_vector_immediate_p): New.
1616         (logical_immediate_p, iohl_immediate_p, arith_immediate_p): Don't
1617         accept a CONST_VECTOR with symbols.
1618         (spu_legitimate_constant_p): Use const_vector_immediate_p.  Don't
1619         accept a CONST_VECTOR with symbols when flag_pic is set.  Handle HIGH
1620         correctly.
1621         * config/spu/spu.md (high, low): Delete.
1622         (low_<mode>): Define.
1623
1624         Remove INTRmode and INTR_REGNUM, which didn't work.
1625         * config/spu/spu.c (spu_conditional_register_usage): Remove reference
1626         of INTR_REGNUM.
1627         * config/spu/spu-builtins.md (spu_idisable, spu_ienable, set_intr,
1628         set_intr_pic, set_intr_cc, set_intr_cc_pic, set_intr_return, unnamed
1629         peephole2 pattern): Don't use INTR or 131.
1630         (movintrcc): Delete.
1631         * config/spu/spu.h (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS,
1632         CALL_USED_REGISTERS, REGISTER_NAMES, INTR_REGNUM): Remove INTR_REGNUM.
1633         * config/spu/spu.md (UNSPEC_IDISABLE, UNSPEC_IENABLE): Remove.
1634         (UNSPEC_SET_INTR): Add.
1635         * config/spu/spu-modes.def (INTR): Remove.
1636
1637         More accurate warnings about run-time relocations.
1638         * config/spu/spu.c (reloc_diagnostic): Test in_section.
1639
1640         Correctly warn about immediate arguments to specific intrinsics.
1641         * config/spu/spu.c (spu_check_builtin_parm): Handle CONST_VECTORs.
1642         (spu_expand_builtin_1): Call spu_check_builtin_parm before checking
1643         the instruction predicate.
1644
1645         Fix tree check errors with latest update.
1646         * config/spu/spu.c (expand_builtin_args, spu_expand_builtin_1): Use
1647         CALL_EXPR_ARG.
1648         (spu_expand_builtin): Use CALL_EXPR_FN.
1649
1650         Add missing specific intrinsics.
1651         * config/spu/spu-builtins.def: Add si_bisled, si_bisledd and
1652         si_bislede.
1653         * config/spu/spu_internals.h: Ditto.
1654
1655         Fix incorrect operand modifiers.
1656         * config/spu/spu-builtins.md (spu_mpy, spu_mpyu):  Remove use of %H.
1657         * config/spu/spu.md (xor<mode>3):  Change %S to %J.
1658
1659         Optimize one case of zero_extend of a vec_select.
1660         * config/spu/spu.md (_vec_extractv8hi_ze):  Add.
1661
1662         Accept any immediate for hbr.
1663         * config/spu/spu.md (hbr):  Change s constraints to i.
1664
1665 2007-02-21  Paul Brook  <paul@codesourcery.com>
1666
1667         * config/arm/arm.c (thumb2_final_prescan_insn): Don't incrememnt
1668         condexec_count when skipping USE and CLOBBER.
1669
1670 2007-02-21  Nick Clifton  <nickc@redhat.com>
1671
1672         * common.opt (Warray-bounds): Add Warning attribute.
1673         (Wstrict-overflow, Wstrict-overflow=, Wcoverage-mismatch):
1674         Likewise.
1675         (fsized-zeroes): Add Optimization attribute.
1676         (fsplit-wide-types, ftree-scev-cprop): Likewise.
1677         * c.opt (Wc++0x-compat): Add Warning attribute.
1678
1679 2007-02-21  Ulrich Weigand  <uweigand@de.ibm.com>
1680
1681         PR middle-end/30761
1682         * reload1.c (eliminate_regs_in_insn): In the single_set special
1683         case, attempt to re-recognize the insn before falling back to
1684         having reload fix it up.
1685
1686 2007-02-20  Eric Christopher  <echristo@gmail.com>
1687
1688         * config/frv/frv.c (frv_read_argument): Take a tree and int argument.
1689         Rewrite accordingly.
1690         (frv_read_iacc_argument): Ditto.
1691         (frv_expand_set_builtin): Take a call instead of arglist, update for
1692         above changes.
1693         (frv_expand_unop_builtin): Ditto.
1694         (frv_expand_binop_builtin): Ditto.
1695         (frv_expand_cut_builtin): Ditto.
1696         (frv_expand_binopimm_builtin): Ditto.
1697         (frv_expand_voidbinop_builtin): Ditto.
1698         (frv_expand_int_void2arg): Ditto.
1699         (frv_expand_prefetches): Ditto.
1700         (frv_expand_voidtriop_builtin): Ditto.
1701         (frv_expand_voidaccop_builtin): Ditto.
1702         (frv_expand_load_builtin): Ditto.
1703         (frv_expand_store_builtin): Ditto.
1704         (frv_expand_mdpackh_builtin): Ditto.
1705         (frv_expand_mclracc_builtin): Ditto.
1706         (frv_expand_mrdacc_builtin): Ditto.
1707         (frv_expand_mwtacc_builtin): Ditto.
1708         (frv_expand_builtin): Remove usage of CALL_EXPR_ARGS, update
1709         calls for above.
1710
1711 2007-02-20  Janis Johnson  <janis187@us.ibm.com>
1712
1713         * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcmpb and -mdfp.
1714         * configure.ac (HAVE_GAS_CMPB): Check for assembler support of the
1715         cmpb instruction.
1716         (HAVE_GAS_DFP): Check for assembler support of decimal floating
1717         point instructions.
1718         * configure: Regenerate.
1719         * config.in: Regenerate.
1720         * config/rs6000/rs6000.opt (mcmpb, mdfp): New.
1721         * config/rs6000/rs6000.c (rs6000_override_options): Add CMPB and DFP
1722         masks to power6 and power6x and to POWERPC_MASKS.
1723         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
1724         _ARCH_PWR6.
1725         * config/rs6000/rs6000.h: Check assembler support for CMPB and DFP.
1726         * config/rs6000/sysv4.opt (mprototype): Use variable, not mask.
1727         * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS):
1728         Access PROTOTYPE as variable, not mask.
1729
1730 2007-02-20  Steven Bosscher  <steven@gcc.gnu.org>
1731
1732         * rtl.h (remove_reg_equal_equiv_notes): New prototype.
1733         * rtlanal.c (remove_reg_equal_equiv_notes): New function.
1734         * combine.c (adjust_for_new_dest): Use it.
1735         * postreload.c (reload_combine): Likewise.
1736
1737 2007-02-20  Steven Bosscher  <steven@gcc.gnu.org>
1738
1739         * rtlanal.c (find_reg_equal_equiv_note): Do not find REG_EQ*
1740         notes on an insn with multiple sets, even if single_set returns
1741         non-NULL for that insn.
1742
1743 2007-02-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1744
1745         * fold-const.c (tree_expr_nonnegative_warnv_p): Handle scalb,
1746         scalbn and scalbln.
1747
1748 2007-02-20  Geoffrey Keating  <geoffk@apple.com>
1749
1750         * config/darwin.h (LINK_SPEC): Default -mmacosx-version-min only
1751         if user didn't pass it.
1752         * config/i386/darwin.h (CC1_SPEC): Likewise.
1753         * config/rs6000/darwin.h (CC1_SPEC): Likewise.
1754         (DARWIN_MINVERSION_SPEC): Don't depend on user's setting of
1755         -mmacosx-version-min.
1756
1757 2007-02-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1758             Uros Bizjak  <ubizjak@gmail.com>
1759
1760         * optabs.h (enum optab_index): Add new OTI_scalb.
1761         (scalb_optab): Define corresponding macro.
1762         * optabs.c (init_optabs): Initialize scalb_optab.
1763         * genopinit.c (optabs): Implement scalb_optab using scalb?f3
1764         patterns.
1765         * builtins.c (expand_builtin_mathfn_2, expand_builtin): Handle
1766         BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L} and BUILT_IN_SCALBLN{,F,L}.
1767         (expand_builtin): Expand BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L}
1768         and BUILT_IN_SCALBLN{,F,L} using expand_builtin_mathfn_2 if
1769         flag_unsafe_math_optimizations is set.
1770
1771         * config/i386/i386.md (scalbxf3, scalb<mode>3): New expanders
1772         to implement scalbf, scalb and scalbl built-ins as inline x87
1773         intrinsics.
1774
1775 2007-02-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1776             DJ Delorie <dj@redhat.com>
1777
1778         PR other/30824
1779         * diagnostic.c (diagnostic_count_diagnostic): Move -Werror logic to...
1780         (diagnostic_report_diagnostic): ... here, and turn them into real
1781         errors. If warnings are inhibited, no need to do anything.
1782
1783 2007-02-20  Uros Bizjak  <ubizjak@gmail.com>
1784
1785         * config/i386/i386.md (expm1xf2): Reorder insn sequence for
1786         better code generation.
1787
1788 2007-02-20  Ben Elliston  <bje@au.ibm.com>
1789
1790         * config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove extra ;.
1791
1792 2007-02-20  Kazu Hirata  <kazu@codesourcery.com>
1793
1794         * config/alpha/alpha.c, config/alpha/alpha.md,
1795         config/alpha/lib1funcs.asm, config/alpha/vms-crt0-64.c,
1796         config/alpha/vms-psxcrt0-64.c, config/arc/arc.c,
1797         config/arc/arc.h, config/arm/arm.c, config/arm/arm.md,
1798         config/arm/lib1funcs.asm: Follow spelling conventions.
1799
1800         * config/c4x/c4x.md, config/cris/cris.c, config/crx/crx.c,
1801         config/fr30/fr30.md, config/i386/i386.h,
1802         config/iq2000/iq2000.h, config/iq2000/predicates.md,
1803         config/pa/milli64.S, config/pa/pa.c, config/pa/pa.h,
1804         config/pa/pa.md, config/pa/pa32-regs.h, config/pa/pa64-regs.h,
1805         config/pdp11/pdp11.c, config/pdp11/pdp11.h,
1806         config/rs6000/altivec.md, config/rs6000/rs6000.c,
1807         config/s390/s390-modes.def, config/sparc/netbsd-elf.h,
1808         config/sparc/sparc.c, config/sparc/sparc.h,
1809         config/sparc/sparc.md, config/spu/constraints.md,
1810         config/spu/spu.c, config/stormy16/stormy16.md: Follow spelling
1811         conventions.
1812
1813 2007-02-20  Alan Modra  <amodra@bigpond.net.au>
1814
1815         PR target/29943
1816         * varasm.c (use_blocks_for_decl_p): Return false for decls with
1817         alias attribute.
1818
1819 2007-02-19  Kazu Hirata  <kazu@codesourcery.com>
1820
1821         * doc/invoke.texi (-ftree-lrs): Remove.
1822
1823 2007-02-19  Diego Novillo  <dnovillo@redhat.com>
1824
1825         * tree-ssa-pre.c (create_value_expr_from): Initialize POOL to
1826         NULL.
1827
1828 2007-02-19  Lee Millward  <lee.millward@codesourcery.com>
1829
1830         * config/ia64/ia64.c (ia64_expand_builtin): Use the
1831         new CALL_EXPR_FN macro for retrieving the function
1832         declaration of the input expression.
1833
1834 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1835
1836         * c.opt (Waddress): New.
1837         * common.opt (Walways-true): Delete.
1838         (Wstring-literal-comparison): Delete.
1839         * doc/invoke.texi (Warning Options): Delete -Walways-true and
1840         -Wstring-literal-comparison. Add -Waddress.
1841         (Waddress): New.
1842         (Walways-true): Delete.
1843         (Wstring-literal-comparison): Delete.
1844         * doc/extend.texi (#pragma GCC diagnostic): Use -Wformat
1845         consistently instead of -Walways-true in example.
1846         * c-opts.c (c_common_handle_option): -Waddress is enabled by -Wall.
1847         * c-typeck.c (parser_build_binary_op): Replace
1848         -Wstring-literal-comparison and -Walways-true with -Waddress.
1849         * c-common.c (c_common_truthvalue_conversion): Replace -Walways-true
1850         with -Waddress.
1851
1852 2007-02-19  Eric Botcazou  <ebotcazou@adacore.com>
1853
1854         * tree-cfg.c (dump_function_to_file): Be prepared for functions
1855         without DECL_STRUCT_FUNCTION initialized.
1856
1857 2007-02-19  Eric Botcazou  <ebotcazou@adacore.com>
1858
1859         * gimplify.c (gimplify_init_ctor_preeval_1): Detect potential overlap
1860         due to calls to functions taking pointers as parameters.
1861
1862 2007-02-19  Richard Henderson  <rth@redhat.com>
1863
1864         PR debug/29558
1865         * var-tracking.c (track_expr_p): Disallow AGGREGATE_TYPE_P
1866         in memory.
1867
1868 2007-02-19  Andreas Krebbel  <krebbel1@de.ibm.com>
1869
1870         * config/s390/s390.c (s390_call_saved_register_used,
1871         s390_function_ok_for_sibcall): Adjust the way CALL_EXPR arguments are
1872         accessed to the new scheme.
1873
1874 2007-02-19  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
1875
1876         * config/cris/cris.c (cris_movem_load_rest_p, cris_store_multiple_op_p)
1877         (cris_print_index, cris_print_operand, cris_print_operand_address)
1878         (cris_reload_address_legitimized, cris_rtx_costs, cris_address_cost)
1879         (cris_side_effect_mode_ok, cris_valid_pic_const, cris_split_movdx)
1880         (cris_expand_pic_call_address): Use xxx_P predicate macros instead of
1881         GET_CODE () == xxx.
1882         * config/cris/cris.h (SECONDARY_RELOAD_CLASS, EXTRA_CONSTRAINT_Q,
1883         EXTRA_CONSTRAINT_T, BDAP_INDEX_P, BIAP_INDEX_P, SIMPLE_ADDRESS_P,
1884         GO_IF_LEGITIMATE_ADDRESS): Ditto.
1885         * config/cris/cris.md (define_insns: *btst, movdi, *mov_side<mode>)
1886         (*mov_sidesisf, *mov_side<mode>_mem, *mov_sidesisf_mem)
1887         (*clear_side<mode>, movsi, *movsi_internal, *ext_sideqihi)
1888         (*ext_side<mode>si, *op_side<mode>, *op_swap_side<mode>, addsi3)
1889         (*extopqihi_side, *extop<mode>si_side, *extopqihi_swap_side)
1890         (*extop<mode>si_swap_side, addi_mul, *addi,andsi3, andhi3, ashl<mode>3)
1891         (uminsi3, call, call_value): Ditto.
1892         (define_split: indir_to_reg_split, unnamed): Ditto.
1893
1894 2007-02-19  Dorit Nuzman  <dorit@il.ibm.com>
1895
1896         PR tree-optimization/30975
1897         * tree-vect-trasnform.c (vect_get_vec_def_for_stmt_copy): Remove
1898         wrong assert.
1899
1900 2007-02-18  Eric Christopher  <echristo@gmail.com>
1901
1902         * mips.c (mips_prepare_builtin_arg): Add argnum parameter.
1903         Remove use of arglist.
1904         (mips_expand_builtin): Remove use of arglist, pass in expr.
1905         (mips_expand_builtin_direct): Rewrite handling for arglist removal.
1906         (mips_expand_builtin_movtf): Ditto.
1907         (mips_expand_builtin_compare): Ditto.
1908
1909 2007-02-19  Alexandre Oliva  <aoliva@redhat.com>
1910
1911         * tree-sra.c (sra_build_assignment): Replace assertion
1912         checking with a comment explaining why it can't be done.
1913
1914 2007-02-18  Sandra Loosemore  <sandra@codesourcery.com>
1915
1916         PR middle-end/30833
1917         * tree-dump.c (dequeue_and_dump): Add tcc_vl_exp case missed
1918         during CALL_EXPR representation conversion.
1919         * tree-ssa-propagate.c (set_rhs): Likewise.
1920
1921 2007-02-19  Alexandre Oliva  <aoliva@redhat.com>
1922
1923         * tree-sra.c (sra_build_assignment): Disable assertion checking
1924         for now.
1925
1926 2007-02-18  Roger Sayle  <roger@eyesopen.com>
1927
1928         * function.c (gimplify_parameters): Call build_gimple_modify_stmt
1929         instead of calling build2 with a GIMPLE_MODIFY_STMT.
1930         * gimple-low.c (lower_function_body, lower_builtin_setjmp):
1931         Likewise.
1932         * gimplify.c (build_stack_save_restore, gimplify_return_expr,
1933         gimplify_decl_expr,  gimplify_self_mod_expr, gimplify_cond_expr,
1934         gimplify_init_ctor_eval_range, gimple_push_cleanup,
1935         gimplify_omp_for, gimplify_omp_atomic_pipeline,
1936         gimplify_omp_atomic_mutex, gimplify_expr, gimplify_one_sizepos,
1937         force_gimple_operand): Likewise.
1938         * ipa-cp.c (constant_val_insert): Likewise.
1939         * lambda-code.c (lbv_to_gcc_expression, lle_to_gcc_expression,
1940         lambda_loopnest_to_gcc_loopnest, replace_uses_equiv_to_x_with_y,
1941         perfect_nestify): Likewise.
1942         * langhooks.c (lhd_omp_assignment): Likewise.
1943         * omp-low.c (lower_rec_input_clauses, lower_reduction_clauses,
1944         lower_copyprivate_clauses, lower_send_clauses,
1945         lower_send_shared_vars, expand_parallel_call,
1946         expand_omp_for_generic, expand_omp_for_static_nochunk,
1947         expand_omp_for_static_chunk, expand_omp_sections,
1948         lower_omp_single_copy, lower_omp_for_lastprivate,
1949         lower_omp_parallel, init_tmp_var, save_tmp_var): Likewise.
1950         * value-prof.c (tree_divmod_fixed_value, tree_mod_pow2,
1951         tree_mod_subtract, tree_ic, tree_stringop_fixed_value):
1952         Likewise.
1953
1954 2007-02-19  Kazu Hirata  <kazu@codesourcery.com>
1955
1956         * config/sh/divtab.c, config/sh/sh.c, config/sh/sh.h,
1957         config/sh/sh.md: Follow spelling conventions.
1958
1959         * config/frv/frv.c, config/frv/frv.h, config/frv/frv.md,
1960         config/frv/predicates.md: Follow spelling conventions.
1961
1962         * config/m68k/linux-unwind.h: Fix a comment typo.
1963         * target.h: Follow spelling conventions.
1964
1965 2007-02-18  Roger Sayle  <roger@eyesopen.com>
1966
1967         PR rtl-optimization/28173
1968         * simplify-rtx.c (simplify_binary_operation_1) <IOR>:  Optimize
1969         (X & C1) | C2 as C2 when (C1 & C2) == C1 and X has no side-effects.
1970         Optimize (X & C1) | C2 as X | C2 when (C1 | C2) == ~0.
1971         Canonicalize (X & C1) | C2 as (X & (C1 & ~C2)) | C2.
1972         <AND>: Canonicalize (X | C1) & C2 as (X & C2) | (C1 & C2).
1973
1974 2007-02-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1975
1976         * builtins.c (fold_builtin_load_exponent): New.
1977         (fold_builtin_2): Use it.
1978
1979 2007-02-18  Steven Bosscher  <steven@gcc.gnu.org>
1980
1981         PR rtl-optimization/30773
1982         * local-alloc.c (update_equiv_regs): Do not set reg_equiv_init
1983         if we fail to attach a REG_EQUIV note.
1984
1985 2007-02-18  David Edelsohn  <edelsohn@gnu.org>
1986             Roger Sayle  <roger@eyesopen.com>
1987
1988         * config/rs6000/rs6000.md (bswapsi2): New define_insn and splitter.
1989
1990 2007-02-18  Sandra Loosemore  <sandra@codesourcery.com>
1991
1992         * calls.c (initialize_argument_information): Pass original EXP
1993         and STRUCT_VALUE_ADDR_VALUE instead of a list of arguments.  Move
1994         code to split complex arguments here, as part of initializing the
1995         ARGS array.
1996         (expand_call): Remove code that builds a list of arguments and
1997         inserts implicit arguments into it.  Instead, just count how many
1998         implicit arguments there will be so we can determine the size of
1999         the ARGS array, and let initialize_argument_information do the work.
2000         (split_complex_values): Delete unused function.
2001
2002 2007-02-18  Eric Botcazou  <ebotcazou@adacore.com>
2003
2004         * tree-eh.c (tree_could_trap_p): Handle VIEW_CONVERT_EXPR.
2005
2006 2007-02-18  Eric Botcazou  <ebotcazou@adacore.com>
2007
2008         * calls.c (mem_overlaps_already_clobbered_arg_p): Return true
2009         for arg pointer based indexed addressing.
2010
2011 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2012
2013         * config/ia64/ia64.h, config/ia64/ia64.md,
2014         config/ia64/predicates.md, config/ia64/sysv4.h: Follow
2015         spelling conventions.
2016
2017 2007-02-18  Roman Zippel <zippel@linux-m68k.org>
2018
2019         * config/m68k/m68k.c (split_di): New.
2020         * config/m68k/m68k-protos.h: Declare split_di.
2021         * config/m68k/m68k.md (extendsidi2*,ashldi3*,ashrdi3*,lshrdi3*):
2022           Improve predicate handling and split constant shifts.
2023
2024 2007-02-18  Roman Zippel <zippel@linux-m68k.org>
2025
2026         * config/m68k/m68k.md (extv,extzv,insv): disable dynamic
2027         parameter for register bitfield operations, general predicates
2028         cleanup
2029
2030 2007-02-18  Roman Zippel <zippel@linux-m68k.org>
2031
2032         * config/m68k/linux.h (MD_UNWIND_SUPPORT): Define.
2033         * config/m68k/linux-unwind.h: New file.
2034
2035 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2036
2037         * cfgloop.c, config/alpha/alpha.c, config/bfin/bfin.c,
2038         config/i386/athlon.md, config/ia64/ia64.md,
2039         config/rs6000/rs6000.c, config/s390/s390.c, config/spu/spu.md,
2040         df-problems.c, df.h, fold-const.c, ipa-cp.c, ipa-inline.c,
2041         ipa-prop.h, see.c, struct-equiv.c, tree-inline.c,
2042         tree-ssa-loop-niter.c, tree-vect-analyze.c,
2043         tree-vect-transform.c: Fix comment typos.
2044
2045 2007-02-17  Kazu Hirata  <kazu@codesourcery.com>
2046
2047         * sched-deps.c (find_insn_list): Remove.
2048         * sched-int.h: Remove the prototype for find_insn_list.
2049
2050 2007-02-16  Geoffrey Keating  <geoffk@apple.com>
2051
2052         * config/darwin.h (LINK_SPEC): Always pass -macosx_version_min
2053         to linker.
2054         (DARWIN_EXTRA_SPECS): Add %(darwin_minversion).
2055         * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Just call
2056         darwin_rs6000_override_options.
2057         (C_COMMON_OVERRIDE_OPTIONS): Expect
2058         darwin_macosx_version_min to be non-NULL always.
2059         (TARGET_C99_FUNCTIONS): Likewise.
2060         (CC1_SPEC): Always pass -mmacosx-version-min to cc1*.
2061         (DARWIN_MINVERSION_SPEC): New.
2062         * config/rs6000/rs6000.c (darwin_rs6000_override_options): New.
2063         * config/i386/darwin.h (CC1_SPEC): Always pass -mmacosx-version-min
2064         to cc1*.
2065         (DARWIN_MINVERSION_SPEC): New.
2066         * config/darwin.opt (mmacosx-version-min): Initialize to non-NULL
2067         value.
2068         * config/darwin-c.c (darwin_cpp_builtins): Expect
2069         darwin_macosx_version_min to be non-NULL always.
2070
2071         * config/rs6000/rs6000.c: Clean up trailing whitespace.
2072
2073 2007-02-16  Uros Bizjak  <ubizjak@gmail.com>
2074
2075         * config/i386/i386.h (x86_use_xchgb): New.
2076         (TARGET_USE_XCHGB): New macro.
2077         * config/i386/i386.c (x86_use_xchgb): Set for PENT4.
2078         * config/i386/i386.md (*rotlhi3_1 splitter, *rotrhi3_1 splitter):
2079         Split after reload into bswaphi for shifts of 8.
2080         (bswaphi_lowpart): Generate rolw insn for HImode byte swaps.
2081         (*bswaphi_lowpart_1): Generate xchgb for Q registers for TARGET_XCHGB
2082         or when optimizing for size.
2083
2084 2007-02-16  Richard Guenther  <rguenther@suse.de>
2085             Christian Bruel  <christian.bruel@st.com>
2086
2087         * fold-const.c (tree_swap_operands_p): Treat SSA_NAMEs like
2088         DECLs but prefer SSA_NAMEs over DECLs.
2089
2090 2007-02-16  Richard Guenther  <rguenther@suse.de>
2091
2092         * tree-flow-inline.h (single_imm_use_p): Remove.
2093         (zero_imm_uses_p): Likewise.
2094         * tree-ssa-coalesce.c (create_outofssa_var_map): Use has_single_use
2095         instead of single_imm_use_p.
2096         * tree-cfg.c (replace_uses_by): Use has_zero_use instead of
2097         zero_imm_uses_p.
2098
2099 2007-02-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2100
2101         PR other/27843
2102         * Makefile.in (SYSTEM_HEADER_DIR): Use single quotes to avoid
2103         nested double- and backquotes.
2104
2105 2007-02-15  Roger Sayle  <roger@eyesopen.com>
2106
2107         PR middle-end/30391
2108         * tree.c (expr_align): Handle MODIFY_EXPR.  GIMPLE_MODIFY_STMT
2109         should be unreachable.
2110         (build2_stat): Allow construction of MODIFY_EXPR at any time.
2111         For the time being redirect GIMPLE_MODIFY_STMT to the new
2112         (renamed) build_gimple_modify_stmt_stat.
2113         (build2_gimple_stat): Rename to...
2114         (build_gimple_modify_stmt_stat): Now longer take a CODE argument.
2115         Always build a GIMPLE_MODIFY_STMT node.
2116         * tree.h (build2_gimple, build2_gimple_stat): Delete.
2117         (build_gimple_modify_stmt, build_gimple_modify_stmt_stat): New
2118         declarations.
2119
2120         * tree-cfg.c (factor_computed_gotos, tree_merge_blocks,
2121         gimplify_val): Use build_gimple_modify_stmt instead of build2_gimple.
2122         * tree-complex.c (set_component_ssa_name, expand_complex_move,
2123         expand_complex_div_wide): Likewise.
2124         * tree-ssa-dom.c (record_equivalences_from_stmt): Likewise.
2125         * tree-ssa-loop-im.c (schedule_sm): Likewise.
2126         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Likewise.
2127         * tree-ssa-loop-manip.c (create_iv): Likewise.
2128         * tree-ssa-phiopt.c (conditional_replacement, minmax_replacement,
2129         abs_replacement): Likewise.
2130         * tree-ssa-pre.c (create_expression_by_pieces, poolify_modify_stmt,
2131         realify_fake_stores): Likewise.
2132
2133         * builtins.c (std_expand_builtin_va_start): Build a MODIFY_EXPR
2134         node rather than a GIMPLE_MODIFY_STMT node.
2135         (std_gimpify_va_arg_expr, expand_builtin_va_copy,
2136         fold_builtin_memset, fold_builtin_memory_op, do_mpfr_sincos):
2137         Likewise.
2138         (integer_valued_real_p): Handle MODIFY_EXPR, not GIMPLE_MODIFY_STMT.
2139         * expr.c (expand_expr_real_1): Handle both MODIFY_EXPR and
2140         GIMPLE_MODIFY_STMT.
2141
2142 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2143
2144         PR middle-end/30433
2145         * fold-const.c (fold_comparison): Add back the
2146         folding of constant complex comparisions.
2147
2148 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2149
2150         PR middle-end/30729
2151         * stmt.c (warn_if_unused_value): VA_ARG_EXPR has side
2152         effects unknown to this function, return early.
2153
2154 2007-02-15  Ian Lance Taylor  <iant@google.com>
2155
2156         * lower-subreg.c (move_eh_region_note): New static function.
2157         (resolve_simple_move): Call it.
2158         (decompose_multiword_subregs): Track blocks for which we resolve a
2159         simple move which is also a control flow insn.  Pass them to
2160         find_many_sub_basic_blocks.
2161         (pass_lower_subreg): Add TODO_verify_flow.
2162         (pass_lower_subreg2): Likewise.
2163
2164 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2165             Brooks Moses  <brooks.moses@codesourcery.com>
2166             Lee Millward  <lee.millward@codesourcery.com>
2167
2168         * tree.h (enum tree_code_class): Add tcc_vl_exp.
2169         (VL_EXP_CLASS_P): New.
2170         (TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of
2171         TREE_CODE_LENGTH.
2172         (TREE_OPERAND_CHECK_CODE): Likewise.
2173         (GIMPLE_STMT_OPERAND_CHECK): Likewise.
2174         (TREE_RTL_OPERAND_CHECK): Likewise.
2175         (tree_operand_check_failed): Make second parameter the whole tree
2176         instead of its code.  Fixed callers.
2177         (VL_EXP_CHECK): New.
2178         (TREE_OPERAND_LENGTH): New.
2179         (VL_EXP_OPERAND_LENGTH): New.
2180         (CALL_EXPR_FN): New.
2181         (CALL_EXPR_STATIC_CHAIN): New.
2182         (CALL_EXPR_ARGS): New.
2183         (CALL_EXPR_ARG): New.
2184         (call_expr_nargs): New.
2185         (CALL_EXPR_ARGP): New.
2186         (build_nt_call_list): Declare.
2187         (build_vl_exp_stat): Declare.
2188         (build_vl_exp): New.
2189         (build_call_list): Declare.
2190         (build_call_nary): Declare.
2191         (build_call_valist): Declare.
2192         (build_call_array): Declare.
2193         (call_expr_arg): Declare.
2194         (call_expr_argp): Declare.
2195         (call_expr_arglist): Declare.
2196         (fold_build_call_list): Declare.
2197         (fold_build_call_list_initializer): Declare.
2198         (fold_call_expr): Declare to replace fold_builtin.
2199         (fold_builtin_fputs): Update to agree with modified definition.
2200         (fold_builtin_strcpy): Likewise.
2201         (fold_builtin_strncpy): Likewise.
2202         (fold_builtin_memory_chk): Likewise.
2203         (fold_builtin_stxcpy_chk): Likewise.
2204         (fold_builtin_strncpy_chk): Likewise.
2205         (fold_builtin_next_arg): Likewise.
2206         (fold_build_call_expr): Declare.
2207         (fold_builtin_call_list): Declare.
2208         (fold_builtin_call_valist): Declare.
2209         (build_call_expr): Declare.
2210         (validate_arglist): Update to agree with modified definition.
2211         (tree_operand_length): New.
2212         (call_expr_arg_iterator): New.
2213         (init_call_expr_arg_iterator): New.
2214         (next_call_expr_arg): New.
2215         (first_call_expr_arg): New.
2216         (more_call_expr_args_p): New.
2217         (FOR_EACH_CALL_EXPR_ARG): New.
2218
2219         * tree.c (tree_code_class_string): Add entries for tcc_vl_exp
2220         and tcc_gimple_stmt.
2221         (tree_code_size): Update documentation.  Use sizeof (tree) rather
2222         than sizeof (char *).
2223         (tree_size): Likewise.  Add case for tcc_vl_exp.
2224         (tree_node_structure): Add case for tcc_vl_exp.
2225         (contains_placeholder_p): Likewise.
2226         (substitute_in_expr): Likewise.
2227         (substitute_placeholder_in_expr): Likewise.
2228         (stabilize_reference_1): Likewise.
2229         (build3_stat): Remove logic for CALL_EXPRs.  Replace with assertion
2230         to diagnose breakage of this interface for constructing CALL_EXPRs.
2231         (build_nt): Add similar assertion here.
2232         (build_nt_call_list): New.
2233         (simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors.
2234         (iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of
2235         TREE_CODE_LENGTH.
2236         (get_callee_fndecl): Use new CALL_EXPR accessors.
2237         (tree_operand_check_failed): Change parameters to pass entire node
2238         instead of its code, so that we can call TREE_OPERAND_LENGTH on it.
2239         (process_call_operands): New.
2240         (build_vl_exp_stat): New.
2241         (build_call_list): New.
2242         (build_call_nary): New.
2243         (build_call_valist): New.
2244         (build_call_array): New.
2245         (walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2246         (call_expr_arglist): New.
2247
2248         * tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use
2249         tcc_vl_exp instead of a fixed-size tcc_expression.
2250
2251         * doc/c-tree.texi (CALL_EXPR): Document new representation and
2252         accessors for CALL_EXPRs.
2253         (AGGR_INIT_EXPR): Likewise.
2254
2255 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2256             Brooks Moses  <brooks.moses@codesourcery.com>
2257             Lee Millward  <lee.millward@codesourcery.com>
2258
2259         * builtins.c (c_strlen): Return NULL_TREE instead of 0.
2260         (expand_builtin_nonlocal_goto): Change parameter to be entire
2261         CALL_EXPR instead of an arglist.  Use new CALL_EXPR accessors.
2262         (expand_builtin_prefetch): Likewise.
2263         (expand_builtin_classify_type): Likewise.
2264         (mathfn_built_in): Return NULL_TREE instead of 0.
2265         (expand_errno_check): Use new CALL_EXPR accessors.
2266         (expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors.
2267         Return NULL_RTX instead of 0.
2268         (expand_builtin_mathfn_2): Likewise.
2269         (expand_builtin_mathfn_3): Likewise.
2270         (expand_builtin_interclass_mathfn): Likewise.
2271         (expand_builtin_sincos): Likewise.
2272         (expand_builtin_cexpi): Likewise.
2273         (expand_builtin_int_roundingfn): Likewise.
2274         (expand_builtin_int_roundingfn_2): Likewise.
2275         (expand_builtin_pow): Likewise.
2276         (expand_builtin_powi): Likewise.
2277         (expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead
2278         of arglist, fixing callers appropriately.  Use new CALL_EXPR
2279         accessors and constructors.  Return NULL_RTX instead of 0.
2280         (expand_builtin_strstr): Likewise.
2281         (expand_builtin_strchr): Likewise.
2282         (expand_builtin_strrchr): Likewise.
2283         (expand_builtin_strpbrk): Likewise.
2284         (expand_builtin_memcpy): Likewise.
2285         (expand_builtin_mempcpy): Likewise.
2286         (expand_builtin_mempcpy_args): New.
2287         (expand_builtin_memmove): Similarly to expand_builtin_mempcpy.
2288         (expand_builtin_memmove_args): New.
2289         (expand_builtin_bcopy): Similarly to expand_builtin_mempcpy.
2290         (expand_movstr): Likewise.
2291         (expand_builtin_strcpy): Likewise.
2292         (expand_builtin_strcpy_args): New.
2293         (expand_builtin_stpcpy): Similarly to expand_builtin_strcpy.
2294         (expand_builtin_strncpy): Likewise.
2295         (expand_builtin_memset): Likewise.
2296         (expand_builtin_memset_args): New.
2297         (expand_builtin_bzero): Similarly to expand_builtin_memset.
2298         (expand_builtin_memcmp): Likewise.
2299         (expand_builtin_strcmp): Likewise.
2300         (expand_builtin_strncmp): Likewise.
2301         (expand_builtin_strcat): Likewise.
2302         (expand_builtin_strncat): Likewise.
2303         (expand_builtin_strspn): Likewise.
2304         (expand_builtin_strcspn): Likewise.
2305         (expand_builtin_args_info): Likewise.
2306         (expand_builtin_va_start): Likewise.
2307         (gimplify_va_arg_expr): Likewise.
2308         (expand_builtin_va_end): Likewise.
2309         (expand_builtin_va_copy): Likewise.
2310         (expand_builtin_frame_address): Likewise.
2311         (expand_builtin_alloca): Likewise.
2312         (expand_builtin_bswap): Likewise.
2313         (expand_builtin_unop): Likewise.
2314         (expand_builtin_fputs): Likewise.
2315         (expand_builtin_expect): Likewise.
2316         (expand_builtin_fabs): Likewise.
2317         (expand_builtin_copysign): Likewise.
2318         (expand_builtin_printf): Likewise.
2319         (expand_builtin_fprintf): Likewise.
2320         (expand_builtin_sprintf): Likewise.
2321         (expand_builtin_init_trampoline): Likewise.
2322         (expand_builtin_signbit): Likewise.
2323         (expand_builtin_fork_or_exec): Likewise.
2324         (expand_builtin_sync_operation): Likewise.
2325         (expand_builtin_compare_and_swap): Likewise.
2326         (expand_builtin_lock_test_and_set): Likewise.
2327         (expand_builtin_lock_release): Likewise.
2328         (expand_builtin): Likewise.
2329         (builtin_mathfn_code): Likewise.
2330
2331         (fold_builtin_constant_p): Pass call arguments individually instead
2332         of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
2333         accessors and constructors.  Return NULL_TREE instead of 0.
2334         (fold_builtin_expect): Likewise.
2335         (fold_builtin_classify_type): Likewise.
2336         (fold_builtin_strlen): Likewise.
2337         (fold_builtin_nan): Likewise.
2338         (integer_valued_real_p): Likewise.
2339         (fold_trunc_transparent_mathfn): Likewise.
2340         (fold_fixed_mathfn): Likewise.
2341         (fold_builtin_cabs): Likewise.
2342         (fold_builtin_sqrt): Likewise.
2343         (fold_builtin_cbrt): Likewise.
2344         (fold_builtin_cos): Likewise.
2345         (fold_builtin_cosh): Likewise.
2346         (fold_builtin_tan): Likewise.
2347         (fold_builtin_sincos): Likewise.
2348         (fold_builtin_cexp): Likewise.
2349         (fold_builtin_trunc): Likewise.
2350         (fold_builtin_floor): Likewise.
2351         (fold_builtin_ceil): Likewise.
2352         (fold_builtin_round): Likewise.
2353         (fold_builtin_int_roundingfn): Likewise.
2354         (fold_builtin_bitop): Likewise.
2355         (fold_builtin_bswap): Likewise.
2356         (fold_builtin_logarithm): Likewise.
2357         (fold_builtin_hypot): Likewise.
2358         (fold_builtin_pow): Likewise.
2359         (fold_builtin_powi): Likewise.
2360         (fold_builtin_exponent): Likewise.
2361         (fold_builtin_memset): Likewise.
2362         (fold_builtin_bzero): Likewise.
2363         (fold_builtin_memory_op): Likewise.
2364         (fold_builtin_bcopy): Deleted; call site changed to invoke
2365         fold_builtin_memory_op directly.
2366         (fold_builtin_strcpy): Similarly as for fold_builtin_memory_op.
2367         (fold_builtin_strncpy): Likewise.
2368         (fold_builtin_memcmp): Likewise.
2369         (fold_builtin_strcmp): Likewise.
2370         (fold_builtin_strncmp): Likewise.
2371         (fold_builtin_signbit): Likewise.
2372         (fold_builtin_copysign): Likewise.
2373         (fold_builtin_isascii): Likewise.
2374         (fold_builtin_toascii): Likewise.
2375         (fold_builtin_isdigit): Likewise.
2376         (fold_builtin_fabs): Likewise.
2377         (fold_builtin_abs): Likewise.
2378         (fold_builtin_fmin_fmax): Likewise.
2379         (fold_builtin_carg): Likewise.
2380         (fold_builtin_classify): Likewise.
2381         (fold_builtin_unordered_cmp): Likewise.
2382
2383         (fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4):
2384         New functions split out from fold_builtin_1.
2385         (fold_builtin_n): New.
2386         (fold_builtin_varargs): New.
2387         (fold_builtin): Deleted.  Most callers changed to use fold_call_expr
2388         instead.
2389         (fold_call_expr): New.
2390         (build_function_call_expr): Rewrite to use new helper function.
2391         (fold_builtin_call_list): New.
2392         (build_call_expr): New.
2393         (fold_builtin_call_valist): New.
2394         (rewrite_call_expr): New.
2395         (validate_arg): New.
2396         (validate_arglist): Change parameter to be entire CALL_EXPR instead
2397         of an arglist.  Change return type to bool.  Use new CALL_EXPR
2398         accessors.
2399
2400         (fold_builtin_strstr):  Pass call arguments individually instead
2401         of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
2402         accessors and constructors.  Return NULL_TREE instead of 0.
2403         (fold_builtin_strchr): Likewise.
2404         (fold_builtin_strrchr): Likewise.
2405         (fold_builtin_strpbrk): Likewise.
2406         (fold_builtin_strcat): Likewise.
2407         (fold_builtin_strncat): Likewise.
2408         (fold_builtin_strspn): Likewise.
2409         (fold_builtin_strcspn): Likewise.
2410         (fold_builtin_fputs): Likewise.
2411         (fold_builtin_next_arg): Likewise.
2412         (fold_builtin_sprintf): Likewise.
2413
2414         (expand_builtin_object_size): Use new CALL_EXPR accessors.  Use
2415         NULL_RTX instead of 0.
2416         (expand_builtin_memory_chk): Likewise.
2417         (maybe_emit_chk_warning): Likewise.
2418         (maybe_emit_sprintf_chk_warning): Likewise.
2419
2420         (fold_builtin_object_size): Pass call arguments individually instead
2421         of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
2422         accessors and constructors.  Return NULL_TREE instead of 0.
2423         (fold_builtin_memory_chk): Likewise.
2424         (fold_builtin_stxcpy_chk): Likewise.
2425         (fold_builtin_strncpy_chk): Likewise.
2426         (fold_builtin_strcat_chk): Likewise.
2427         (fold_builtin_strcat_chk): Likewise.
2428         (fold_builtin_strncat_chk): Likewise.
2429         (fold_builtin_sprintf_chk): Likewise.
2430         (fold_builtin_snprintf_chk): Likewise.
2431         (fold_builtin_printf): Likewise.
2432         (fold_builtin_vprintf): Likewise.
2433
2434         * fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and
2435         constructors.
2436         (operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case.
2437         (make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2438         (extract_muldiv_1): Add VL_EXP_CLASS_P case.
2439         (fold_mathfn_compare): Use new CALL_EXPR accessors and constructors.
2440         (fold_unary): Likewise.
2441         (fold_binary): Likewise.
2442         (fold_ternary): Remove CALL_EXPR case, since they are no longer
2443         ternary expressions.
2444         (fold): Add logic for tcc_vl_exp.
2445         (fold_checksum_tree):  Make it know about tcc_vl_exp.  Use
2446         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2447         (fold_build3_stat): Add assertion to flag broken interface for
2448         constructing CALL_EXPRs.
2449         (fold_build_call_list): New.
2450         (fold_build_call_list_initializer): New.
2451         (tree_expr_nonnegative_p): Use new CALL_EXPR accessors and
2452         constructors.
2453         (fold_strip_sign_ops): Likewise.
2454
2455 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2456             Brooks Moses  <brooks.moses@codesourcery.com>
2457             Lee Millward  <lee.millward@codesourcery.com>
2458
2459         * tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR
2460         accessors and dump arguments explicitly.
2461
2462         * tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of
2463         TREE_CODE_LENGTH.
2464         (dump_generic_node): Use new CALL_EXPR accessors and walk arguments
2465         explicitly.
2466         (print_call_name): Use new CALL_EXPR accessors.
2467
2468         * print-tree.c (print_node): Add case tcc_vl_exp.  Print
2469         CALL_EXPR arguments explicitly instead of as a list.  Use
2470         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2471
2472         * tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors.
2473         (vrp_visit_stmt): Likewise.
2474
2475         * tree-ssa-loop-im.c (outermost_invariant_loop_expr):  Make it
2476         know about tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of
2477         TREE_CODE_LENGTH.
2478         (force_move_till_expr): Likewise.
2479
2480         * targhooks.c (default_external_stack_protect_fail): Use
2481         build_call_expr instead of build_function_call_expr.
2482         (default_hidden_stack_protect_fail): Likewise.
2483
2484         * tree-complex.c (expand_complex_libcall): Use build_call_expr to
2485         build the call.
2486
2487         * cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors
2488         and walk arguments explicitly.
2489
2490         * tree-ssa-loop-niter.c (simplify_replace_tree): Use
2491         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2492         (expand_simple_operations): Likewise.
2493         (infer_loop_bounds_from_array): Use new CALL_EXPR accessors.
2494
2495         * gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead
2496         of TREE_CODE_LENGTH.
2497         (walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs.
2498
2499         * optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH
2500         instead of TREE_CODE_LENGTH.
2501
2502         * value_prof.c (tree_ic): Use new CALL_EXPR accessors.
2503         (tree_ic_transform): Likewise.
2504         (interesting_stringop_to_profile_p): Pass entire CALL_EXPR as
2505         parameter instead of arglist.  Fix callers.
2506         (tree_stringop_fixed_value): Use new CALL_EXPR accessors.
2507         (tree_stringops_transform): Likewise.
2508         (tree_indirect_call_to_profile): Likewise.
2509         (tree_stringops_values_to_profile): Likewise.
2510
2511         * tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator.
2512         (eliminate_tail_call): Likewise.
2513
2514         * ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors.
2515
2516         * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
2517         Use TREE_OPERAND_LENGTH and generalize to handle any number of
2518         operands.
2519         (instantiate_parameters_1): Can't handle tcc_vl_exp here.
2520
2521         * omp-low.c (build_omp_barrier): Use build_call_expr.
2522         (lower_rec_input_clauses): Likewise.
2523         (lower_reduction_clauses): Likewise.
2524         (expand_parallel_call): Likewise.
2525         (maybe_catch_exception): Likewise.
2526         (expand_omp_for_generic): Likewise.
2527         (expand_omp_for_static_nochunk): Likewise.
2528         (expand_omp_sections): Likewise.
2529         (lower_omp_single_simple): Likewise.
2530         (lower_omp_single_copy): Likewise.
2531         (lower_omp_master): Likewise.
2532         (lower_omp_ordered): Likewise.
2533         (lower_omp_critical): Likewise.
2534
2535         * ipa-reference.c (check-call): Use new CALL_EXPR iterator.
2536         (scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR.
2537
2538         * tree-gimple.c (is_gimple_call_addr): Fix doc.
2539         (recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of
2540         TREE_CODE_LENGTH.  Add tcc_vl_exp case.
2541
2542         * tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH
2543         and generalize to handle any number of operands.
2544         (chrec_contains_undetermined): Likewise.
2545         (tree_contains_chrecs): Likewise.
2546         (evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH.
2547
2548         * cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors.
2549
2550         * tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors.  Use
2551         fold_call_expr instead of fold_builtin.
2552         (ccp_fold_builtin): Likewise.  Update calls into builtins.c to
2553         match declarations there.
2554         (fold_stmt): Use new CALL_EXPR constructor and accessors.  Doc
2555         updates.
2556
2557         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use
2558         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2559
2560         * ipa-pure-const.c (check_call): Use new CALL_EXPR accessors.
2561         (scan_function): Add case tcc_vl_exp for CALL_EXPR.
2562
2563         * tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR
2564         accessors.
2565
2566         * tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr.
2567         (execute_cse_sincos): Use new CALL_EXPR accessors.
2568
2569         * tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator.
2570
2571         * gimple-low.c (lower_function_body): Use build_call_expr.
2572         (lower_builtin_setjmp): Likewise.
2573
2574         * expr.c (emit_block_move_via_libcall): Use build_call_expr.
2575         (set_storage_via_libcall): Likewise.
2576         (safe_from_p): Add tcc_vl_exp case.  Use TREE_OPERAND_LENGTH
2577         instead of TREE_CODE_LENGTH.
2578         (expand_expr_real_1): Use new CALL_EXPR accessors.
2579
2580         * tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and
2581         generalize to handle any number of operands.
2582         (TB_parent_eq): Likewise.
2583
2584         * predict.c (expr_expected_value): Use new CALL_EXPR accessors.
2585         (strip_builtin_expect): Likewise.
2586
2587         * function.c (gimplify_parameters): Use build_call_expr.
2588
2589         * tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH
2590         instead of TREE_CODE_LENGTH.
2591
2592         * ipa-type-escape.c (check_call): Use new CALL_EXPR iterators.
2593         (scan_for_refs): Add case tcc_vl_exp for CALL_EXPR.
2594
2595         * tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR
2596         iterators.
2597
2598         * gimplify.c (build_stack_save_restore): Use build_call_expr.
2599         (gimplify_decl_expr): Likewise.
2600         (gimplify_call_expr): Use fold_call_expr instead of fold_builtin.
2601         Use new CALL_EXPR iterators.
2602         (gimplify_modify_expr_to_memcpy): Use build_call_expr.
2603         (gimplify_modify_expr_to_memset): Likewise.
2604         (gimplify_variable_sized_compare): Likewise.
2605         (gimplify_omp_atomic_fetch_op): Likewise.
2606         (gimplify_omp_atomic_pipeline): Likewise.
2607         (gimplify_omp_atomic_mutex): Likewise.
2608         (gimplify_function_tree): Likewise.
2609
2610         * calls.c (alloca_call_p): Use new CALL_EXPR accessors.
2611         (call_expr_flags): Likewise.
2612         (expand_call): Likewise.
2613
2614         * except.c (expand_builtin_eh_return_data_regno): Pass entire
2615         CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR
2616         accessors.
2617
2618         * coverage.c (create_coverage): Use build_call_expr.
2619
2620         * tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete.
2621         (temp_call_expr_obstack): New.
2622         (pool_copy_list): Delete.
2623         (temp_copy_call_expr): New.
2624         (phi_translate): Add case tcc_vl_exp for CALL_EXPR.  Use new
2625         CALL_EXPR accessors.  Get rid of special goo for copying argument
2626         lists and use temp_copy_call_expr instead.
2627         (valid_in_sets): Add case tcc_vl_exp for CALL_EXPR.  Use new
2628         CALL_EXPR accessors.
2629         (create_expression_by_pieces): Likewise.  Use build_call_array
2630         to construct the result instead of fold_build3.
2631         (create_value_expr_from): Add tcc_vl_exp.  Delete special goo for
2632         dealing with argument lists.
2633         (init_pre): Remove references to expression_node_pool and
2634         list_node_pool.  Init temp_call_expr_obstack instead.
2635         (fini_pre): Remove references to expression_node_pool and
2636         list_node_pool.
2637
2638         * tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors
2639         and walk arguments explicitly instead of as a list.
2640
2641         * tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr.
2642         (mx_register_decls): Likewise.
2643         (mudflap_register_call): Likewise.
2644         (mudflap_finish_file): Likewise.
2645
2646         * ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors.
2647         (ipa_callsite_compute_param): Likewise.
2648
2649         * tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR
2650         accessors and constructor.
2651
2652         * tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR
2653         accessors and constructor.
2654         (convert_tramp_reference): Likewise.
2655         (convert_call_expr): Likewise.
2656         (finalize_nesting_tree_1): Likewise.
2657
2658         * tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR
2659         accessors.
2660
2661         * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr.
2662
2663         * tree-inline.c (initialize_inlined_parameters): Pass entire
2664         CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR
2665         accessors.
2666         (estimate_num_insns_1): Use new CALL_EXPR accessors.
2667         (expand_call_inline): Tidy up call to initialize_inlined_parameters.
2668
2669         * tree-vect-transform.c (vect_create_epilog_for_reduction):  Use
2670         TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2671         (vectorizable_reduction): Likewise.
2672         (vectorizable_call): Use new CALL_EXPR iterators.
2673         (vectorizable_conversion): Use build_call_expr.
2674         (vectorizable_operation): Use TREE_OPERAND_LENGTH.
2675         (vect_gen_widened_results_half): Use build_call_expr.
2676         (vect_setup_realignment): Likewise.
2677         (vectorizable_live_operation): Use TREE_OPERAND_LENGTH.
2678
2679         * tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors.
2680         (pass_through_call): Likewise.
2681         (compute_object_sizes): Likewise.  Use fold_call_expr instead of
2682         fold_builtin.
2683
2684         * tree-profile.c (tree_gen_interval_profiler): Use build_call_expr.
2685         (tree_gen_pow2_profiler): Likewise.
2686         (tree_gen_one_value_profiler): Likewise.
2687         (tree_gen_ic_func_profiler): Likewise.
2688         (tree_gen_average_profiler): Likewise.
2689         (tree_gen_ior_profiler): Likewise.
2690
2691         * tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp.
2692         (find_func_aliases): Use new CALL_EXPR accessors.  Add case
2693         tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
2694
2695         * tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead
2696         of TREE_CODE_LENGTH.
2697
2698         * stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead
2699         of TREE_CODE_LENGTH.
2700
2701         * convert.c (convert_to_real): Use new CALL_EXPR accessors and
2702         constructor.
2703         (convert_to_integer): Likewise.
2704
2705         * tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR
2706         accessors.
2707
2708 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2709             Brooks Moses  <brooks.moses@codesourcery.com>
2710             Lee Millward  <lee.millward@codesourcery.com>
2711
2712         * config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR
2713         accessors.
2714         * config/frv/frv.c (frv_expand_builtin): Likewise.
2715         * config/s390/s390.c (s390_expand_builtin): Likewise.
2716
2717         * config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr.
2718         (sparc_expand_builtin): Use new CALL_EXPR accessors.
2719
2720         * config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise.
2721         (ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter
2722         instead of arglist.  Use new CALL_EXPR accessors on it.  Fix callers.
2723         (ix86_expand_store_builtin): Likewise.
2724         (ix86_expand_unop_builtin): Likewise.
2725         (ix86_expand_unop1_builtin): Likewise.
2726         (ix86_expand_sse_compare): Likewise.
2727         (ix86_expand_sse_comi): Likewise.
2728         (ix86_expand_vec_init_builtin): Likewise.
2729         (ix86_expand_vec_ext_builtin): Likewise.
2730         (ix86_expand_vec_set_builtin): Likewise.
2731         (ix86_expand_builtin): Use new CALL_EXPR accessors.
2732
2733         * config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors.
2734         * config/c4x/c4x.c (c4x_expand_builtin): Likewise.
2735
2736         * config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR
2737         instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
2738         (iq2000_expand_builtin): Use new CALL_EXPR accessors.
2739
2740         * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use
2741         build_call_expr.
2742         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise.
2743         (rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of
2744         arglist.  Use new CALL_EXPR accessors.  Fix callers.
2745         (altivec_expand_abs_builtin): Likewise.
2746         (rs6000_expand_binop_builtin): Likewise.
2747         (altivec_expand_predicate_builtin): Likewise.
2748         (altivec_expand_lv_builtin): Likewise.
2749         (spe_expand_stv_builtin): Likewise.
2750         (altivec_expand_stv_builtin): Likewise.
2751         (rs6000_expand_ternop_builtin): Likewise.
2752         (altivec_expand_ld_builtin): Use new CALL_EXPR accessors.
2753         (altivec_expand_st_builtin): Likewise.
2754         (altivec_expand_dst_builtin): Likewise.
2755         (altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of
2756         arglist.  Use new CALL_EXPR accessors.  Fix callers.
2757         (altivec_expand_vec_set_builtin): Likewise.
2758         (altivec_expand_vec_ext_builtin): Likewise.
2759         (altivec_expand_builtin): Use new CALL_EXPR accessors.
2760         (spe_expand_builtin): Likewise.
2761         (spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of
2762         arglist.  Use new CALL_EXPR accessors.  Fix callers.
2763         (spe_expand_evsel_builtin): Likewise.
2764         (rs6000_expand_builtin): Use new CALL_EXPR accessors.  VCFUX and
2765         FCFSX cases must construct whole new CALL_EXPR, not just arglist.
2766
2767         * config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR
2768         instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
2769         (arm_expand_unop_builtin): Likewise.
2770         (arm_expand_builtin): Use new CALL_EXPR accessors.
2771
2772         * config/mips/mips.c (mips_expand_builtin):  Use new CALL_EXPR
2773         accessors.
2774
2775         * config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR
2776         instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
2777         (bfin_expand_unop_builtin): Likewise.
2778         (bfin_expand_builtin): Use new CALL_EXPR accessors.
2779
2780 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2781             Brooks Moses  <brooks.moses@codesourcery.com>
2782             Lee Millward  <lee.millward@codesourcery.com>
2783
2784         * c-semantics.c (build_stmt): Add internal diagnostic check.
2785
2786         * c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR
2787         accessors.  Print arguments explicitly instead of as a list.
2788
2789         * c-typeck.c (build_function_call): Use new CALL_EXPR constructors.
2790
2791         * c-omp.c (c_finish_omp_barrier): Use build_call_expr.
2792         (c_finish_omp_flish): Likewise.
2793
2794         * c-common.c (verify_tree): Use new CALL_EXPR accessors.  Traverse
2795         arguments explicitly instead of as a list.  Use TREE_OPERAND_LENGTH
2796         instead of TREE_CODE_LENGTH.
2797         (check_function_arguments_recurse): Use new CALL_EXPR accessors.
2798         (c_warn_unused_result): Likewise.
2799
2800 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2801
2802         PR c/26494
2803         * doc/invoke.texi (Warning Options): Remove
2804         -Werror-implicit-function-declaration.
2805         (Wimplicit-function-declaration): Update description.
2806         * opts.c (common_handle_option): Move handling of -Werror=* to...
2807         (enable_warning_as_error): ...here.
2808         * opts.h (enable_warning_as_error): Declare.
2809         * c-decl.c (implicit_decl_warning): Unless
2810         -Wno-implicit-function-declaration is given, emit a pedwarn if
2811         -std=c99 or emit a warning if -Wimplicit-function-declaration.
2812         * c.opt (Wimplicit-function-declaration): Replace
2813         mesg_implicit_function_declaration with
2814         warn_implicit_function_declaration.
2815         * c-opts.c (c_common_handle_option):
2816         -Werror-implicit-function-declaration is exactly equal as
2817         -Werror=implicit-function-declaration.
2818         (set_Wimplicit): Replace mesg_implicit_function_declaration with
2819         warn_implicit_function_declaration.
2820         (c_common_post_options): -Wimplict-function-declaration is enabled
2821         by default by -std=c99, otherwise is disabled by default.
2822         * c-objc-common.c (c_objc_common_init): Remove flawed logic.
2823
2824 2007-02-15  Eric Botcazou  <ebotcazou@adacore.com>
2825
2826         * gimplify.c (gimplify_modify_expr): During gimplification, attach a
2827         DECL on the rhs to a DECL on the lhs for debug info purposes if the
2828         former is ignored but not the latter.
2829
2830 2007-02-15  Eric Botcazou  <ebotcazou@adacore.com>
2831
2832         * expr.c (expand_expr_real_1) <normal_inner_ref>: If a temporary
2833         is made and the reference doesn't use the alias set of its type,
2834         do not create the temporary using that type.
2835
2836 2007-02-15  Aldy Hernandez  <aldyh@redhat.com>
2837
2838         * jump.c: Remove prototypes for delete_computation and
2839         delete_prior_computation.
2840
2841 2007-02-15  Paolo Bonzini  <bonzini@gnu.org>
2842
2843         * jump.c (get_label_after): Delete.
2844         (get_label_before, delete_computation, delete_jump,
2845         delete_prior_computation, follow_jumps): Move...
2846         * reorg.c (delete_computation, delete_prior_computation): ... here...
2847         (get_label_before, delete_jump): ... making these static ...
2848         (follow_jumps): ... and simplifying this since it only runs after
2849         reload.
2850         * rtl.h (get_label_after, get_label_before, delete_jump,
2851         follow_jumps): Delete prototypes.
2852
2853 2007-02-15  Paolo Bonzini  <bonzini@gnu.org>
2854
2855         * caller-save.c (save_call_clobbered_regs): Do not process sibcalls.
2856
2857 2007-02-15  Nick Clifton  <nickc@redhat.com>
2858
2859         * varasm.c (default_asm_output_anchor): Prepend * to . symbol in
2860         order to prevent it from being munged by the target.
2861
2862 2007-02-15  Uros Bizjak  <ubizjak@gmail.com>
2863
2864         * config/i386/i386.md: Remove misleading comment.
2865
2866 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
2867
2868         * config/frv/frv.md (reload_incc, reload_outcc, reload_incc_uns,
2869         reload_outcc_uns, reload_incc_nz, reload_outcc_nz): Remove
2870         invalid patterns.
2871
2872 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
2873
2874         * tree-sra.c (instantiate_missing_elements): Canonicalize
2875         bit-field types.
2876         (sra_build_assignment): New.
2877         (generate_copy_inout, generate_element_copy,
2878         generate_element_zero, generate_one_element_init): Use it.
2879
2880 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
2881
2882         * tree-sra.c (instantiate_missing_elements): Canonicalize
2883         bit-field types.
2884         (sra_build_assignment): New.
2885         (generate_copy_inout, generate_element_copy,
2886         generate_element_zero, generate_one_element_init): Use it.
2887
2888 2007-02-15  Alexandre Oliva  <aoliva@redhat.com>
2889
2890         * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
2891         limbo die nodes.
2892
2893 2007-02-14  Joseph Myers  <joseph@codesourcery.com>
2894
2895         * emit-rtl.c (set_mem_attributes_minus_bitpos): Treat complex
2896         types as aggregates not scalars.
2897         * function.c (assign_stack_temp_for_type): Likewise.
2898
2899 2007-02-14  Roger Sayle  <roger@eyesopen.com>
2900             Zdenek Dvorak  <dvorakz@suse.cz>
2901
2902         * tree-dump.c (dump_switch_p_1): Require exact match of the option
2903         name.
2904
2905 2007-02-14  Zdenek Dvorak  <dvorakz@suse.cz>
2906
2907         * passes.c (next_pass_1): Clear the next field of the copied
2908         pass structure.
2909
2910 2007-02-14  Richard Henderson  <rth@redhat.com>
2911
2912         * tree-sra.c (early_sra): New.
2913         (decl_can_be_decomposed_p): Deny va_list if early_sra.
2914         (tree_sra_early, pass_sra_early): New.
2915         * tree-pass.h (pass_sra_early): Declare.
2916         * passes.c (init_optimization_passes): Use it.
2917
2918 2007-02-14  Richard Guenther  <rguenther@suse.de>
2919
2920         * flags.h (issue_strict_overflow_warning): Convert to a macro.
2921
2922 2007-02-14  Dorit Nuzman  <dorit@il.ibm.com>
2923
2924          PR tree-optimization/30771
2925         * tree-vect-analyze.c (vect_determine_vectorization_factor): Traverse
2926         also phi nodes.
2927         (vect_analyze_operations): Induction phis can now be marked as
2928         used_in_loop.
2929         (vect_mark_stmts_to_be_vectorized): No special treatment for phis.
2930         Update documentation accordingly.
2931
2932 2007-02-14  Nick Clifton  <nickc@redhat.com>
2933
2934         * builtin-types.def (DEF_FUNCTION_TYPE_x): Do not imply that at
2935         most 3 arguments are supported.
2936         (DEF_FUNCTION_TYPE_VAR_5): Fix typo in its description.
2937
2938 2007-02-13  Seongbae Park <seongbae.park@gmail.com>
2939
2940         * bitmap.c (bitmap_and, bitmap_and_compl, bitmap_xor):
2941         Ensure dst->current is valid.
2942
2943 2007-02-13  Paul Brook  <paul@codesourcery.com>
2944
2945         * config.gcc: Add arm*-*-uclinux-*eabi.
2946         * config/arm/uclinux-elf.h (TARGET_OS_CPP_BUILTINS): Define.
2947         (SUBTARGET_EXTRA_LINK_SPEC): Define.
2948         (STARTFILE_SPEC, ENDFILE_SPEC): Remove broken -shared handling.
2949         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
2950         (LINK_SPEC): Define.
2951         (LIB_SPEC): Define.
2952         * config/arm/arm.c (arm_override_options): Use r9 as EABI PIC
2953         register.
2954         * config/arm/uclinux-eabi.h: New file.
2955         * config/arm/linux-eabi.h (WCHAR_TYPE): Remove.
2956         * config/arm/linux-gas.h (WCHAR_TYPE): Use unsigned long on AAPCS
2957         based targets.
2958
2959 2007-02-13  Ian Lance Taylor  <iant@google.com>
2960
2961         * common.opt: Add Wstrict-overflow and Wstrict-overflow=.
2962         * flags.h (warn_strict_overflow): Declare.
2963         (enum warn_strict_overflow_code): Define.
2964         (issue_strict_overflow_warning): New static inline function.
2965         * opts.c (warn_strict_overflow): New variable.
2966         (common_handle_option): Handle OPT_Wstrict_overflow and
2967         OPT_Wstrict_overflow_.
2968         * c-opts.c (c_common_handle_option): Set warn_strict_overflow for
2969         OPT_Wall.
2970         * fold-const.c: Include intl.h.
2971         (fold_deferring_overflow_warnings): New static variable.
2972         (fold_deferred_overflow_warning): New static variable.
2973         (fold_deferred_overflow_code): New static variable.
2974         (fold_defer_overflow_warnings): New function.
2975         (fold_undefer_overflow_warnings): New function.
2976         (fold_undefer_and_ignore_overflow_warnings): New function.
2977         (fold_deferring_overflow_warnings_p): New function.
2978         (fold_overflow_warning): New static function.
2979         (make_range): Add strict_overflow_p parameter.  Change all
2980         callers.
2981         (extract_muldiv, extract_muldiv_1): Likewise.
2982         (fold_unary) [ABS_EXPR]: Check ABS_EXPR before calling
2983         tree_expr_nonnegative_p.
2984         (fold_negate_expr): Call fold_overflow_warning.
2985         (fold_range_test): Likewise.
2986         (fold_comparison): Likewise.
2987         (fold_binary): Likewise.  Call tree_expr_nonnegative_warnv_p
2988         instead of tree_expr_nonnegative_p.
2989         (tree_expr_nonnegative_warnv_p): Rename from
2990         tree_expr_nonnegative_p, add strict_overflow_p parameter.
2991         (tree_expr_nonnegative_p): New function.
2992         (tree_expr_nonzero_warnv_p): Rename from tree_expr_nonzero_p, add
2993         strict_overflow_p parameter.
2994         (tree_expr_nonzero_p): New function.
2995         * passes.c (verify_interpass_invariants): New static function.
2996         (execute_one_pass): Call it.
2997         * tree-ssa-loop-niter.c (expand_simple_operations): Ignore fold
2998         warnings.
2999         (number_of_iterations_exit, loop_niter_by_eval): Likewise.
3000         (estimate_numbers_of_iterations): Likewise.
3001         (scev_probably_wraps_p): Likewise.
3002         * tree-ssa-ccp.c: Include "toplev.h".
3003         (evaluate_stmt): Defer fold overflow warnings until we know we are
3004         going to optimize.
3005         (struct fold_stmt_r_data): Add stmt field.
3006         (fold_stmt_r): Defer fold overflow warnings until we know we
3007         optimized.
3008         (fold_stmt): Initialize stmt field of fold_stmt_r_data.
3009         (fold_stmt_inplace): Likewise.
3010         * tree-cfgcleanup.c: Include "toplev.h" rather than "errors.h".
3011         (cleanup_control_expr_graph): Defer fold overflow warnings until
3012         we know we are going to optimize.
3013         * tree-cfg.c (fold_cond_expr_cond): Likewise.
3014         * tree-ssa-threadedge.c (simplify_control_stmt_condition):
3015         Likewise.
3016         * tree-vrp.c (vrp_expr_computes_nonnegative): Call
3017         tree_expr_nonnegative_warnv_p instead of tree_expr_nonnegative_p.
3018         * tree-ssa-loop-manip.c (create_iv): Likewise.
3019         * c-typeck.c (build_conditional_expr): Likewise.
3020         (build_binary_op): Likewise.
3021         * tree-vrp.c (vrp_expr_computes_nonzero): Call
3022         tree_expr_nonzero_warnv_p instead of tree_expr_nonzero_p.
3023         (extract_range_from_unary_expr): Likewise.
3024         * simplify-rtx.c (simplify_const_relational_operation): Warn when
3025         assuming that signed overflow does not occur.
3026         * c-common.c (pointer_int_sum): Ignore fold overflow warnings.
3027         * tree.h (tree_expr_nonnegative_warnv_p): Declare.
3028         (fold_defer_overflow_warnings): Declare.
3029         (fold_undefer_overflow_warnings): Declare.
3030         (fold_undefer_and_ignore_overflow_warnings): Declare.
3031         (fold_deferring_overflow_warnings_p): Declare.
3032         (tree_expr_nonzero_warnv_p): Declare.
3033         * doc/invoke.texi (Option Summary): Add -Wstrict-overflow to list
3034         of warning options.
3035         (Warning Options): Document -Wstrict-overflow.
3036         * Makefile.in (tree-ssa-threadedge.o): Depend on toplev.h.
3037         (tree-ssa-ccp.o): Likewise.
3038         (tree-cfgcleanup.o): Change errors.h dependency to toplev.h.
3039         (fold-const.o): Depend on intl.h.
3040
3041 2007-02-13  Ian Lance Taylor  <iant@google.com>
3042
3043         PR middle-end/30751
3044         * lower-subreg.c (resolve_simple_move): Decompose subregs in
3045         addresses.
3046
3047 2007-02-13  Stuart Hastings  <stuart@apple.com>
3048
3049         * gcc/config/i386/i386.md (fixuns_truncdfhi2): Require SSE2.
3050
3051 2007-02-13  Richard Henderson  <rth@redhat.com>
3052
3053         * config/alpha/alpha.c (alpha_stdarg_optimize_hook): Strip
3054         handled_component_p before looking for the indirect_ref.
3055
3056 2007-02-13  Richard Henderson  <rth@redhat.com>
3057
3058         * config/i386/i386.md (bswapsi_1): Rename from bswapsi2,
3059         remove flags clobber.
3060         (bswapsi2): New expander, emit code for !TARGET_BSWAP.
3061         (bswaphi_lowpart): New.
3062         (bswapdi2): Rename from bswapdi2_rex, remove flags clobber,
3063         remove TARGET_BSWAP test.  Delete expander of the same name.
3064
3065         * optabs.c (widen_bswap, expand_doubleword_bswap): New.
3066         (expand_unop): Use them.
3067
3068 2007-02-13  Uros Bizjak  <ubizjak@gmail.com>
3069
3070         * config/i386/i386.md (cmpdi_ccno_1_rex64, *cmpsi_ccno_1,
3071         *cmphi_ccno_1, *cmpqi_ccno_1, *movsi_xor, *movstricthi_xor,
3072         *movstrictqi_xor, *movdi_xor_rex64, *ashldi3_1_rex64,
3073         *ashldi3_cmp_rex64, *ashldi3_cconly_rex64, ashlsi3, *ashlsi3_1_zext,
3074         *ashlsi3_cmp, *ashlsi3_cconly, *ashlsi3_cmp_zext, *ashlhi3_1_lea,
3075         *ashlhi3_1, *ashlhi3_cmp, *ashlhi3_cconly, *ashlqi3_1_lea,
3076         *ashlqi3_1, *ashlqi3_cmp, *ashlqi3_cconly): Remove equivalent
3077         assembler dialect choice from asm templates.
3078
3079 2007-02-12  Richard Henderson  <rth@redhat.com>
3080
3081         * config/i386/i386.md (fixuns_trunc<SSEMODEF>si_1): New insn.
3082         (fixuns_trunc<SSEMODEF>si2): Use it.
3083         * config/i386/sse.md (vec_setv4sf_0): Export.
3084         * config/i386/i386.c (ix86_build_const_vector): Export.
3085         (ix86_split_convert_uns_si_sse): Rename from
3086         ix86_expand_convert_uns_si_sse and rewrite as a splitter.
3087         * config/i386/i386-protos.h: Update.
3088
3089 2007-02-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3090
3091         PR c/29521
3092         * c-typeck.c (c_finish_return): Improve warning message.
3093
3094 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3095
3096         * alias.c (find_symbolic_term): Delete unused function.
3097
3098 2007-02-12  Uros Bizjak  <ubizjak@gmail.com>
3099
3100         * config/i386/i386.md (paritydi2, paritysi2): New expanders.
3101         (paritydi2_cmp, paritydi2_cmp): New insn and split patterns.
3102         (*parityhi2_cmp, *parityqi2_cmp): New insn patterns.
3103
3104 2007-02-12  Eric Botcazou  <ebotcazou@adacore.com>
3105
3106         * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
3107         * cgraphunit.c (cgraph_expand_function): If DECL_IGNORED_P is set on
3108         the function, temporarily point the debug interface to the null one.
3109
3110 2007-02-12  Eric Botcazou  <ebotcazou@adacore.com>
3111
3112         * dwarf2out.c (round_up_to_align): New static function.
3113         (field_byte_offset): Use it to round the offset.
3114
3115 2007-02-12  Richard Henderson  <rth@redhat.com>
3116
3117         * config/alpha/alpha.md (bswapsi2, bswapdi2): New.
3118         (inswl_const): Export.
3119
3120 2007-02-12  Richard Henderson  <rth@redhat.com>
3121
3122         * calls.c (emit_library_call_value_1): If PROMOTE_MODE modifed the
3123         result mode of the libcall, convert back to outmode.
3124
3125 2007-02-12  Roger Sayle  <roger@eyesopen.com>
3126
3127         * config/i386/i386.md (*bswapdi2_rex): Renamed from bswapdi2.
3128         (bswapdi2): New define_expand to implement 32-bit implementation.
3129
3130 2007-02-12  Nick Clifton  <nickc@redhat.com>
3131
3132         * doc/invoke.texi (Overall Options): Document --help=.
3133         * gcc.c (target_help_flag): Rename to print_subprocess_flag.
3134         (cc1_options): Pass --help= on to cc1.
3135         (display_help): Add description of --help=.
3136         (process_command): Add code to handle --help=.  Allow translated
3137         --help and --target-help switches to be passed on to compiler
3138         sub-process.
3139         (main): Remove unused if statement.
3140         * opts.c (columns): Remove.
3141         (LEFT_COLUMN): Define.
3142         (wrap_help): Add columns argument.
3143         (print_filtered_help): Change parameters to be an include bitmask,
3144         an exclude bitmask, an any bitmask and the column width.  Move the
3145         code to display the params list here.  Add code to display the
3146         status of options rather than their descriptions if the quiet flag
3147         is not active.
3148         (print_specific_help): Change parameters to be an include bitmask,
3149         an exclude bitmask and an any bitmask.  Move code to look up the
3150         column width here.  Decide upon the title for an options listing.
3151         (common_handle_options): Add code to handle --help=.  Adapt code
3152         for --help and --target-help to use the revised form of the
3153         print_specific_help function.
3154         (print_help): Delete.
3155         (print_param_help): Delete.
3156         (print_switch): Delete.
3157         * opts.h (cl_lang_count): Add prototype.
3158         (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_MIN_OPTION_CLASS,
3159         CL_MAX_OPTION_CLASS): New defines.
3160         * optc-gen.awk: Add construction of cl_lang_count.
3161         * c.opt: Add Warning attribute to warning options and Optimization
3162         attribute to optimization options.
3163         * common.opt: Likewise.
3164         Add --help=.
3165         Add -fhelp and -ftarget-help as aliases for the transformed --help
3166         and --target-help options.
3167         * opt-functions.awk: Add code to handle Warning and Optimization
3168         attributes.
3169
3170 2007-02-12  Richard Henderson  <rth@redhat.com>
3171
3172         * config/alpha/constraints.md: New file.
3173         * config/alpha/alpha.c: Include tm-constrs.h.
3174         (alpha_const_ok_for_letter_p, alpha_const_double_ok_for_letter_p,
3175         alpha_extra_constraint): Remove.
3176         (alpha_emit_conditional_branch): Use satisfies_constraint_*.
3177         * config/alpha/alpha-protos.h: Update.
3178         * config/alpha/alpha.h (REG_CLASS_FROM_LETTER): Remove.
3179         (CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P): Remove.
3180         (EXTRA_CONSTRAINT): Remove.
3181         * config/alpha/alpha.md: Include constraints.md.
3182         (adddi splitter): Use satisfies_constraint_*.
3183         * config/alpha/predicates.md (add_operand): Likewise.
3184         (sext_add_operand, addition_operation): Likewise.
3185
3186 2007-02-12  Dorit Nuzman  <dorit@il.ibm.com>
3187
3188         PR tree-optimization/29145
3189         * tree-data-ref.c (base_addr_differ_p): Make us more conservative
3190         in our handling of restrict qualified pointers.
3191
3192 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3193
3194         PR middle-end/7651
3195         * doc/invoke.texi (Wunused-value): Update description.
3196         (Wextra): Delete item.
3197         * opts.c (set_Wextra): Don't use the value of Wextra to set the
3198         value of Wunused-value.
3199         * c-typeck.c (c_process_expr_stmt): Don't check extra_warnings.
3200         (c_finish_stmt_expr): Don't check extra_warnings.
3201         (emit_side_effect_warnings): The caller is responsible to check
3202         warn_unused_value.
3203
3204 2007-02-11  Roger Sayle  <roger@eyesopen.com>
3205             Matt Thomas  <matt@3am-software.com>
3206
3207         * simplify-rtx.c (simplify_relational_operation_1): Correct typo.
3208
3209 2007-02-11  Roger Sayle  <roger@eyesopen.com>
3210
3211         * simplify-rtx.c (simplify_relational_operation_1): Optimize
3212         comparisons of POPCOUNT against zero.
3213         (simplify_const_relational_operation): Likewise.
3214
3215 2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3216
3217         * doc/invoke.texi (Wextra): Delete outdated paragraph.
3218
3219 2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3220
3221         * dwarf2out.c (root_type): Delete unused function.
3222
3223 2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3224
3225         * genattrtab.c (contained_in_p): Delete unused function.
3226         (write_expr_attr_cache): Likewise.
3227
3228 2007-02-11  Jan Hubicka  <jh@suse.cz>
3229
3230         * ipa-inline.c (cgraph_edge_badness): Add "else" missing in the
3231         previous patch.
3232
3233 2007-02-11  Steven Bosscher  <steven@gcc.gnu.org>
3234
3235         * fwprop.c (try_fwprop_subst): Use set_unique_reg_note
3236         to add the REG_EQ* note.
3237         * see.c (see_merge_one_use_extension): Likewise.
3238         * local-alloc.c (update_equiv_regs): Likewise.  Also don't
3239         turn REG_EQUAL notes into REG_EQUIV notes if the target
3240         register may have more than one set.
3241         * function.c (assign_parm_setup_reg): Use set_unique_reg_note.
3242         * gcse.c (try_replace_reg): Likewise.
3243         * alias.c (init_alias_analysis): Use find_reg_equal_equiv_note.
3244         * calls.c (fixup_tail_calls): Likewise.  Abort if there is
3245         more than one REG_EQUIV note.
3246         * reload1.c (gen_reload): Use set_unique_reg_note.
3247
3248 2007-02-11  Uros Bizjak  <ubizjak@gmail.com>
3249
3250         * config/i386/i386.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Define.
3251         (ix86_builtin_conversion): New function.
3252
3253 2007-02-06  Mark Mitchell  <mark@codesourcery.com>
3254
3255         PR target/29487
3256         * tree.h (DECL_REPLACEABLE_P): New macro.
3257         * except.c (set_nothrow_function_flags): Likewise.
3258
3259 2007-02-11  Tehila Meyzels  <tehila@il.ibm.com>
3260             Ira Rosen  <irar@il.ibm.com>
3261             Dorit Nuzman  <dorit@il.ibm.com>
3262
3263         * doc/tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): New target hook.
3264         * targhooks.c (default_builtin_vectorized_conversion): New.
3265         * targhooks.h (default_builtin_vectorized_function): New declaration.
3266         * target.h (struct vectorize): Add builtin_conversion field.
3267         * tree-vectorizer.h (type_conversion_vec_info_type): New enum
3268         stmt_vec_info_type value.
3269         (vectorizable_conversion): New declaration.
3270         * tree-vect-analyze.c (vect_analyze_operations): Add
3271         vectorizable_conversion call.
3272         * target-def.h (TARGET_VECTORIZE_BUILTIN_CONVERSION): New.
3273         * tree-vect-transform.c (vectorizable_conversion): New function.
3274         (vect_transform_stmt): Add case for type_conversion_vec_info_type.
3275         * tree-vect-generic.c (expand_vector_operations_1): Consider correct
3276         mode.
3277         * config/rs6000/rs6000.c (rs6000_builtin_conversion): New.
3278         (TARGET_VECTORIZE_BUILTIN_CONVERSION): Defined.
3279         (rs6000_expand_builtin): Add handling a case of ALTIVEC_BUILTIN_VCFUX
3280         or ALTIVEC_BUILTIN_VCFSX.
3281
3282 2007-02-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3283
3284         PR target/30634
3285         * pa.md (movdf): For 64-bit target, fail if operand 1 is a non-zero
3286         CONST_DOUBLE and operand 0 is a hard register.
3287         (movdi): For 64-bit target, remove code to force CONST_DOUBLE to
3288         memory.  Fail if operand 1 is a non-zero CONST_INT and operand 0
3289         is a hard floating-point register.
3290
3291 2007-02-10  Richard Henderson  <rth@redhat.com>
3292             Jakub Jelinek  <jakub@redhat.com>
3293             Alexandre Oliva  <aoliva@redhat.com>
3294
3295         * Makefile.in (libgcc-support, libgcc.mvars): Add emutls.c.
3296         * builtin-types.def (BT_WORD): Make unsigned.
3297         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3298         * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New.
3299         (BUILT_IN_EMUTLS_REGISTER_COMMON): New.
3300         * c-decl.c (grokdeclarator): Don't error if !have_tls.
3301         * c-parser.c (c_parser_omp_threadprivate): Likewise.
3302         * dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for
3303         emulated tls.
3304         * expr.c (emutls_var_address): New.
3305         (expand_expr_real_1): Expand emulated tls.
3306         (expand_expr_addr_expr_1): Likewise.
3307         * libgcc-std.ver: Add __emutls_get_address, __emutls_register_common.
3308         * output.h (emutls_finish): Declare.
3309         * toplev.c (compile_file): Call it.
3310         * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the
3311         address before wrapping in CONST.
3312         * varasm.c (emutls_htab, emutls_object_type): New.
3313         (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New.
3314         (get_emutls_object_name, get_emutls_object_type): New.
3315         (get_emutls_init_templ_addr, emutls_decl): New.
3316         (emutls_common_1, emutls_finish): New.
3317         (assemble_variable): When emulating tls, swap decls; generate
3318         constructor for the emutls objects.
3319         (do_assemble_alias): When emulating tls, swap decl and target name.
3320         (default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT
3321         for emulated tls.
3322         * varpool.c (decide_is_variable_needed): Look at force_output.
3323         Recurse for emulated tls.
3324         (cgraph_varpool_remove_unreferenced_decls): Remove checks redundant
3325         with decide_is_variable_needed.
3326         * emutls.c: New file.
3327         * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit
3328         tls_object for real tls.
3329
3330 2007-02-10  Kaz Kojima  <kkojima@gcc.gnu.org>
3331
3332         PR rtl-optimization/29599
3333         * reload1.c (eliminate_regs_in_insn): Take the destination
3334         mode into account when computing the offset.
3335
3336 2007-02-09  Stuart Hastings  <stuart@apple.com>
3337             Richard Henderson  <rth@redhat.com>
3338
3339         * gcc/config/i386/i386.h (TARGET_KEEPS_VECTOR_ALIGNED_STACK): New.
3340         * gcc/config/i386/darwin.h: (TARGET_KEEPS_VECTOR_ALIGNED_STACK): New.
3341         * gcc/config/i386/i386.md (fixuns_trunc<mode>si2, fixuns_truncsfhi2,
3342         fixuns_truncdfhi2): New.
3343         (fix_truncsfdi_sse): Call ix86_expand_convert_sign_didf_sse.
3344         (floatunsdidf2): Call ix86_expand_convert_uns_didf_sse.
3345         (floatunssisf2): Add call to ix86_expand_convert_uns_sisf_sse.
3346         (floatunssidf2): Allow nonimmediate source.
3347         * gcc/config/i386/sse.md (movdi_to_sse): New.
3348         (vec_concatv2di): Drop '*'.
3349         * gcc/config/i386/i386-protos.h (ix86_expand_convert_uns_si_sse,
3350         ix86_expand_convert_uns_didf_sse, ix86_expand_convert_uns_sidf_sse,
3351         ix86_expand_convert_uns_sisf_sse, ix86_expand_convert_sign_didf_sse):
3352         New.
3353         * gcc/config/i386/i386.c (ix86_expand_convert_uns_si_sse,
3354         ix86_expand_convert_uns_didf_sse, ix86_expand_convert_uns_sidf_sse,
3355         ix86_expand_convert_uns_sisf_sse, ix86_expand_convert_sign_didf_sse,
3356         ix86_build_const_vector, ix86_expand_vector_init_one_nonzero): New.
3357         (ix86_build_signbit_mask): Fix decl of v, refactor to call
3358         ix86_build_const_vector.
3359         (x86_emit_floatuns): Rewrite.
3360
3361 2007-02-10  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3362
3363         * genautomata.c (longest_path_length): Delete unused function.
3364         (struct state): Delete unused longest_path_length.
3365         (UNDEFINED_LONGEST_PATH_LENGTH): Delete unused macro.
3366         (get_free_state): Delete unused.
3367
3368 2007-02-09  Jan Hubicka  <jh@suse.cz>
3369
3370         * params.def (PARAM_INLINE_UNIT_GROWTH): Set to 30.
3371         * doc/invoke.texi (inline-unit-growth): Update default value.
3372
3373         * Makefile.in (passes.o, ipa-inline.o): Add dependencies.
3374         * cgraphbuild.c (build_cgraph_edges): Compute frequencies.
3375         (rebuild_cgraph_edges): Likewise.
3376         * cgraph.c (cgraph_set_call_stmt): Add new argument frequency.
3377         (dump_cgraph_node): Dump frequencies.
3378         (cgraph_clone_edge): Add frequency scales.
3379         (cgraph_clone_node): Add freuqnecy.
3380         * cgraph.h (cgraph_edge): Add freuqnecy argument.
3381         (CGRAPH_FREQ_BASE, CGRAPH_FREQ_MAX): New constants.
3382         (cgraph_create_edge, cgraph_clone_edge, cgraph_clone_node): Update.
3383         * tree-pass.h (TODO_rebuild_frequencies): New constant.
3384         * cgraphunit.c (verify_cgraph_node): Verify frequencies.
3385         (cgraph_copy_node_for_versioning): Update call of cgraph_clone_edge.
3386         (save_inline_function_body): Likewise.
3387         * ipa-inline.c: inluce rtl.h
3388         (cgraph_clone_inlined_nods): Update call of cgraph_clone_node.
3389         (cgraph_edge_badness): Use frequencies.
3390         (cgraph_decide_recursive_inlining): Update clonning.
3391         (cgraph_decide_inlining_of_small_function): Dump frequency.
3392         * predict.c (estimate_bb_frequencies): Export.
3393         * predict.h (estimate_bb_frequencies): Declare.
3394         * tree-inline.c (copy_bb): Watch overflows.
3395         (expand_call_inline): Update call of cgraph_create_edge.
3396         (optimize_inline_calls): Use TODO flags to update frequnecies.
3397         * passes.h: Include predict.h
3398         (init_optimization_passes): Move profile ahead.
3399         (execute_function_todo): Handle TODO_rebuild_frequencies.
3400
3401 2007-02-09  Roger Sayle  <roger@eyesopen.com>
3402
3403         * config/alpha/alpha.c (emit_insxl): Force the first operand of