OSDN Git Service

2007-09-07 Zdenek Dvorak <ook@ucw.cz>
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2007-09-07  Zdenek Dvorak  <ook@ucw.cz>
2
3         PR tree-optimization/32183
4         * Makefile.in (tree-ssa-reassoc.o): Also depend on $(CFGLOOP_H).
5
6         * tree-ssa-reassoc.c: Include cfgloop.h.
7         (is_reassociable_op): Add a loop argument and return true only
8         for inside loop.
9         (linearize_expr): Updated.
10         (should_break_up_subtract): Likewise.
11         (linearize_expr_tree): Likewise.
12         (init_reassoc): Call loop_optimizer_init with
13         AVOID_CFG_MODIFICATIONS.  Remove calculate_dominance_info call
14         with CDI_DOMINATORS.
15         (fini_reassoc): Call loop_optimizer_finalize.
16
17 2007-09-07  Sterling Augustine  <sterling@tensilica.com>
18
19         * config/xtensa/lib2funcs.S (__xtensa_sync_caches): Use an ISYNC even
20         if there is no i-cache.
21
22 2007-09-07  Richard Guenther  <rguenther@suse.de>
23
24         Reapply
25         2007-09-06  Richard Guenther  <rguenther@suse.de>
26
27         PR tree-optimization/32586
28         * tree-ssa-sccvn.c (simplify_binary_expression): Avoid
29         folding if nothing changed.
30         (simplify_unary_expression): New function.  Do tree combining
31         on conversion like codes.
32         (try_to_simplify): Call it.
33
34 2007-09-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
35
36         PR target/33286
37         * gthr-posix.h (__gthread_active_p): Add implementation for hppa-hpux.
38         (__gthread_active,__gthread_start, __gthread_active_init): New.
39         * gthr-posix95.h: Likewise.
40
41 2007-09-07  Roman Zippel <zippel@linux-m68k.org>
42
43         * function.h (struct function): Rename calls_unwind_init
44         to saves_all_registers.
45         (current_function_saves_all_registers): Renamed from
46         current_function_calls_unwind_init.
47         * reload1.c (reload): Set current_function_saves_all_registers.
48         * except.c (expand_builtin_unwind_init): Likewise.
49         * config/m68k/m68k.c (m68k_save_reg): Use
50         current_function_saves_all_registers to save pic register.
51
52 2007-09-07  Janis Johnson  <janis187@us.ibm.com>
53
54         config/m68k/m68k.c (floating_exact_log2): Update call to real_2expN.
55         config/s390/s390.md (fixuns_trunc<BFP:mode><GPR:mode>2): Ditto.
56
57         Reapply reverted changes:
58
59         2007-09-06  Jan Hubicka  <jh@suse.cz>
60  
61         * config/i386.c (ix86_expand_lround, ix86_expand_round): Update call of
62         real_2expN.
63
64         2007-09-06  Richard Sandiford  <richard@codesourcery.com>
65
66         * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
67         (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
68
69         2007-09-05  Janis Johnson  <janis187@us.ibm.com>
70
71         * optabs.c (expand_float): Convert unsigned integer as signed only
72         if it provides sufficient accuracy; add mode argument to real_2expN.
73         (expand_fix): Fix comment typos; extend binary float into mode
74         wider than destination for converion to unsigned integer; add mode
75         argument to real_2expN.
76         * real.c (real_2expN): Add mode argument to special-case decimal
77         float values.
78         * real.h (real_2expN): Ditto.
79         * fixed-value.c (check_real_for_fixed_mode): Add mode argument to
80         real_2expN.
81         (fixed_from_string): Ditto.
82         (fixed_to_decimal): Ditto.
83         (fixed_convert_from_real): Ditto.
84         (real_convert_from_fixed): Ditto.
85         * config/rs6000/rs6000.md (FP): Include DD and TD modes.
86         * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
87         muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
88         floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
89
90 2007-09-07  Diego Novillo  <dnovillo@google.com>
91
92         * tree-flow.h (const_block_stmt_iterator): Remove.
93         Update all users to use block_stmt_iterator.
94         * tree-iterator.h (const_tree_stmt_iterator): Remove.
95         Update all users to use tree_stmt_iterator.
96
97 2007-09-07  Sandra Loosemore  <sandra@codesourcery.com>
98
99         * config/mips/mips.c (mips_set_current_function): Temporarily
100         make this a no-op to fix bootstrap errors, pending rewrite.
101
102 2007-09-07  Jan Hubicka  <jh@suse.cz>
103
104         * reorg.c (dbr_schedule): Move code removing placeholder USEs later
105         in the pass.
106
107 2007-09-07  Dorit Nuzman  <dorit@il.ibm.com>
108
109         PR tree-optimization/33299
110         * tree-vect-transform.c (vect_create_epilog_for_reduction): Update uses 
111         for all relevant loop-exit phis, not just the first.
112
113 2007-09-07  Richard Guenther  <rguenther@suse.de>
114
115         PR middle-end/33330
116         * tree-ssa-operands.c (access_can_touch_variable): An access
117         of the form (*p)[0] can touch a variable of same size.
118
119 2007-09-07  Jan Hubicka  <jh@suse.cz>
120
121         * passes.c (init_optimization_passes): Add simple dce and addressable
122         passes.
123         * tree-ssa.c (execute_update_addresses_taken): New function.
124         (pass_update_address_taken): New.
125         * tree-ssa-dse.c (execute_simple_dse): New function.
126         (pass_simple_dse): New.
127         * tree-pass.h (pass_simple_dse, pass_update_address_taken): Declare.
128
129 2007-09-07  Tobias Burnus  <burnus@net-b.de>
130
131         PR middle-end/33321
132         * doc/invoke.texi: Fix -Wstrict-overflow= table.
133
134 2007-09-07  Richard Guenther  <rguenther@suse.de>
135
136         Revert
137         2007-09-06  Richard Guenther  <rguenther@suse.de>
138
139         PR tree-optimization/32586
140         * tree-ssa-sccvn.c (simplify_binary_expression): Avoid
141         folding if nothing changed.
142         (simplify_unary_expression): New function.  Do tree combining
143         on conversion like codes.
144         (try_to_simplify): Call it.
145
146 2007-09-07  Richard Guenther  <rguenther@suse.de>
147             Uros Bizjak  <ubizjak@gmail.com>
148
149         PR tree-optimization/32821
150         * tree_if_conv.c (combine_blocks): Use alloc_stmt_list instead of
151         NULL in the call to set_bb_stmt_list.
152
153 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
154
155         * config/mips/mips.c (build_mips16_call_stub): Emit all direct
156         float calls here, rather than leaving some to the caller.
157         Use call_internal_direct and call_value_internal_direct.
158         * config/mips/mips.md (call_internal_direct): New pattern.
159         (call_value_internal_direct): Likewise.
160
161 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
162
163         * config/mips/mips.c (mips_base_move_loop_invariants): New variable.
164         (mips_set_mips16_mode): Restore flag_move_loop_invariants, then set
165         to 0 for MIPS16.
166         (override_options): Set mips_base_move_loop_invariants.
167
168 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
169
170         * config/mips/mips.opt (mcode-readable=): Move to keep list
171         alphabetical.
172
173 2007-09-07  Richard Sandiford  <richard@codesourcery.com>
174
175         * doc/invoke.texi: Document the MIPS -mlocal-sdata, -mextern-sdata
176         and -mgpopt options.  Adjust the -G documentation to match.
177         * config/mips/mips.opt (mextern-data, mgpopt, mlocal-data): New.
178         * config/mips/mips.c (mips_rtx_constant_in_small_data_p): New
179         function, split out from mips_classify_symbol.  Return false for
180         !TARGET_LOCAL_SDATA.
181         (mips_classify_symbol): Call mips_rtx_constant_in_small_data_p.
182         Only use GP-relative accesses for non-pool symbols if TARGET_GPOPT.
183         (override_options): Check whether the -mgpopt setting is consistent
184         with the other flags.
185         (symbolic_expression_p): Delete.
186         (mips_select_rtx_section): Use mips_rtx_constant_in_small_data_p
187         and default_elf_select_rtx_section.
188         (mips_in_small_data_p): Honor section attributes for MIPS16 too.
189         Return false for local data unless TARGET_LOCAL_SDATA.  Likewise
190         external data and TARGET_EXTERN_SDATA.
191
192 2007-09-07  Tobias Burnus  <burnus@net-b.de>
193
194         PR fortran/33303
195         * doc/cpp.texi (Common Predefined Macros): Add __GFORTRAN__.
196
197 2007-09-05  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
198
199         * regrename.c (copyprop_hardreg_forward_1): New variable next. Use
200         FOR_BB_INSNS_SAFE instead of for loop.
201         * cse.c (cse_extended_basic_block): Likewise.
202         * postreload.c (reload_cse_regs_1): New variable next. Make sure
203         that the for loop does not invoke NEXT_INSN on a deleted insn.
204         * function.c (instantiate_virtual_regs): Likewise.
205         * lower-subreg.c (remove_retval_note): Likewise.
206         (decompose_multiword_subregs): Use FOR_BB_INSNS_SAFE instead of
207         FOR_BB_INSNS.
208         * emit-rtl.c (remove_insn): Set NEXT_INSN and PREV_INSN to NULL on
209         a deleted insn.
210         * cfgrtl.c (delete_insn): Set JUMP_LABEL to NULL on a deleted
211         insn, if it's a jump.
212         (try_redirect_by_replacing_jump): New variable jump_p. Call
213         tablejump_p before delete_insn_chain.
214         * reload1.c (reload): New variable next. Make sure that the for
215         loop does not invoke NEXT_INSN on a deleted insn.
216         (fixup_eh_region_note): Make the loop terminate if i becomes NULL.
217         (delete_output_reload): New variable prev. Make sure the the for
218         loops do not invoke PREV_INSN on a deleted insn.
219
220 2007-09-06  Zdenek Dvorak  <ook@ucw.cz>
221
222         * cgraphbuild.c (rebuild_cgraph_edges): Export.
223         * cgraph.h (rebuild_cgraph_edges): Declare.
224         * tree-pass.h (pass_expand_omp_ssa): New.
225         * omp-low.c (find_omp_clause): Export.
226         (copy_var_decl): Split from omp_copy_decl_2.
227         (build_omp_barrier): Return the call to emit instead of emitting
228         it directly.
229         (lower_rec_input_clauses, expand_omp_single): Gimplify the result of
230         build_omp_barrier.
231         (extract_omp_for_data, expand_parallel_call, expand_omp_parallel,
232         expand_omp_for_generic, expand_omp_for_static_nochunk,
233         expand_omp_for_static_chunk, expand_omp_for, expand_omp_sections):
234         Adapted to work on SSA form.
235         (execute_expand_omp): Do not invalidate dominance information.
236         (gate_expand_omp): Do not run with -fopenmp-ssa flag.
237         (gate_expand_omp_ssa, pass_expand_omp_ssa): New.
238         * gimplify.c (gimplify_omp_for): Ensure that the control variable is
239         a gimple_reg.
240         (force_gimple_operand): Allow gimplifying code expressions without
241         value.
242         * tree-predcom.c (mark_virtual_ops_for_renaming): Handle phi nodes.
243         * common.opt (fopenmp-ssa): New.
244         * tree-flow.h (find_omp_clause, copy_var_decl): Declare.
245         * Makefile.in (tree-cfg.o): Add TREE_INLINE_H dependency.
246         * tree-cfg.c: Include tree-inline.h.
247         (struct move_stmt_d): Replace vars_to_remove by vars_map field.
248         (replace_by_duplicate_decl, replace_ssa_name,
249         mark_virtual_ops_in_region): New functions.
250         (move_stmt_r, move_block_to_fn, move_sese_region_to_fn): Adapted
251         to work on SSA form.
252         * passes.c (init_optimization_passes): Add pass_expand_omp_ssa pass.
253         * tree-ssa-operands.c (get_expr_operands): Handle operands of OMP
254         constructs.
255
256 2007-09-06  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
257
258         * tree-loop-linear.c: Include obstack.h.
259         (linear_transform_loops): New obstack lambda_obstack.
260         Initialize it, pass it to gcc_loopnest_to_lambda_loopnest,
261         lambda_loopnest_transform, lambda_loopnest_to_gcc_loopnest calls
262         and free afterwards.
263         * lambda.h (struct obstack): New forward declaration.
264         (lambda_linear_expression_new): New parameter of type struct
265         obstack *.
266         (lambda_loopnest_new): Likewise.
267         (lambda_loopnest_transform): Likewise.
268         (lambda_body_vector_new): Likewise.
269         (lambda_body_vector_compute_new): Likewise.
270         (gcc_loopnest_to_lambda_loopnest): Likewise.
271         (lambda_loopnest_to_gcc_loopnest): Likewise.
272         * lambda-code.c: Include obstack.h.
273         (lambda_lattice_new): New parameter lambda_obstack.  Use it for
274         allocation of ret.
275         (lambda_body_vector_new): Likewise.
276         (lambda_linear_expression_new): Likewise.
277         (lambda_lattice_new): Likewise.
278         (lambda_loopnest_new): Likewise.  Additionally use obstack to
279         allocate LN_LOOPS(ret).
280         (lambda_lattice_compute_base): New parameter lambda_obstack.  Pass
281         it to lambda_lattice_new.
282         (lambda_body_vector_compute_new): New parameter lambda_obstack.
283         Pass it to lambda_body_vector_new.
284         (lambda_lattice_compute_base): New paramater lambda_obstack.  Pass
285         it to lambda_lattice_new.
286         (compute_nest_using_fourier_motzkin): New parameter lambda_obstack.
287         Pass it to lambda_loopnest_new, lambda_linear_expression_new.
288         (lambda_compute_target_space): Likewise.
289         (lambda_compute_auxillary_space): New parameter lambda_obstack.
290         Pass it to lambda_lattice_compute_base and
291         compute_nest_using_fourieer_motzkin.
292         (lambda_loopnest_transform): New parameter lambda_obstack.  Pass
293         it to lambda_lattice_compute_base, lambda_lattice_auxillary_space
294         and lambda_lattice_compute_target_space.
295         (gcc_tree_to_linear_expression): Nex parameter lambda_obstack.
296         Pass it to lambda_linear_expression_new.
297         (gcc_loop_to_lambda_loop): New parameter lambda_obstack.  Pass it
298         to gcc_tree_to_linear_expression.
299         (gcc_loopnest_to_lambda_loopnest): New parameter lambda_obstack.
300         Pass it to gcc_loop_to_lambda_loop and lambda_loopnest_new.
301         (lambda_loopnest_to_gcc_loopnest): New parameter lambda_obstack.
302         Pass it to lambda_body_vector_new and
303         lambda_body_vector_compute_new.
304         * Makefile.in (tree-loop-linear.o): Add $(OBSTACK_H) dependency.
305         (lambda-code.o): Likewise.
306
307 2007-09-06  Chao-ying Fu  <fu@mips.com>
308
309         * ginclude/stdfix.h: New file.
310         * Makefile.in (USER_H): Add $(srcdir)/ginclude/stdfix.h.
311         (convert.o): Add dependence on fixed-value.h.
312         * c-convert.c (convert): Support FIXED_POINT_TYPE.
313         * c-cppbuiltin.c (builtin_define_fixed_point_constants): New function
314         to define fixed-point constants.
315         (c_cpp_builtins): Define fixed-point constants.
316         * convert.c (fixed-value.h): New include.
317         (convert_to_real): Update comment to include fixed-point.
318         Support FIXED_POINT_TYPE.
319         (convert_to_integer): Update comment to include fixed-point.
320         Support FIXED_POINT_TYPE.
321         (convert_to_complex): Support FIXED_POINT_TYPE.
322         (convert_to_fixed): New function.
323         * convert.h (convert_to_fixed): Declare.
324         * genopinit.c: Add comment about $Q for only fixed-point modes.
325         (optabs): Add fract_optab, fractuns_optab, satfract_optab,
326         satfractuns_optab, add_optab, ssadd_optab, usadd_optab, sub_optab,
327         sssub_optab, ussub_optab, smul_optab, ssmul_optab, usmul_optab,
328         ssmadd_widen_optab, usmadd_widen_optab, ssdiv_optab, udiv_optab,
329         usdiv_optab, ssashl_optab, usashl_optab, neg_optab, ssneg_optab,
330         usneg_optab for fixed-point modes.
331         (gen_insn): Add force_fixed to track the $Q format for all fixed-point
332         modes.
333         * optabs.c (optab_for_tree_code): For *DIV_EXPR, LSHIFT_EXPR,
334         PLUS_EXPR, MINUS_EXPR, MULT_EXPR, NEGATE_EXPR, return signed or
335         unsigned saturation optabs, when type is saturating.
336         (shift_optab_p): Return true for SS_ASHIFT or US_ASHIFT.
337         (expand_fixed_convert): New function.
338         (gen_fixed_libfunc, gen_signed_fixed_libfunc,
339         gen_unsigned_fixed_libfunc, gen_int_fp_fixed_libfunc,
340         gen_int_fp_signed_fixed_libfunc, gen_int_fixed_libfunc,
341         gen_int_signed_fixed_libfunc, gen_int_unsigned_fixed_libfunc,
342         gen_fract_conv_libfunc, gen_fractuns_conv_libfunc,
343         gen_satfract_conv_libfunc, gen_satfractuns_conv_libfunc): New
344         functions.
345         (init_optabs): Initialize ssadd_optab, usadd_optab, sssub_optab,
346         ussub_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab,
347         usmadd_widen_optab, ssmsub_widen_optab, usmsub_widen_optab,
348         ssdiv_optab, usdiv_optab, ssashl_optab, usashl_optab, ssneg_optab,
349         usneg_optab, fract_optab, fractuns_optab, satfract_optab,
350         satfractuns_optab.
351         Initialize fixed-point libraries, including add, ssadd, usadd, sub,
352         sssub, ussub, mul, ssmul, usmul, div, ssdiv, udiv, usdiv, ashl,
353         ssashl, usashl, ashr, lshr, neg, ssneg, usneg, cmp, fract, satfract,
354         fractuns, satfractuns.
355         * optabs.h (enum optab_index): Add OTI_ssadd, OTI_usadd, OTI_sssub,
356         OTI_ussub, OTI_ssmul, OTI_usmul, OTI_ssdiv, OTI_usdiv, OTI_ssneg,
357         OTI_usneg, OTI_ssashl, OTI_usashl, OTI_ssmadd_widen, OTI_usmadd_widen,
358         OTI_ssmsub_widen,  OTI_usmsub_widen.
359         (ssadd_optab, usadd_optab, sssub_optab, ussub_optab, ssmul_optab,
360         usmul_optab, ssdiv_optab, usdiv_optab, ssneg_optab, usneg_optab,
361         ssashl_optab, usashl_optab, ssmadd_widen_optab, usmadd_widen_optab,
362         umsub_widen_optab, usmsub_widen_optab): Define.
363         (enum convert_optab_index): Add COI_fract, COI_fractuns, COI_satfract,
364         COI_satfractuns.
365         (fract_optab, fractuns_optab, satfract_optab, satfractuns_optab):
366         Define.
367         (expand_fixed_convert): Declare.
368         * expr.c (convert_move): Support the move of fixed-point modes.
369         (emit_move_insn_1): Handle fixed-point mode to move via integer.
370         (categorize_ctor_elements_1): Handle FIXED_CST.
371         (count_type_elements): Handle FIXED_POINT_TYPE.
372         (expand_expr_real_1): For VECTOR_CST, check MODE_VECTOR_FRACT,
373         MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
374         Support FIXED_CST.
375         For PLUS_EXPR and MINUS_EXPR, support saturating and non-saturating
376         multiply and add/subtract for fixed-point types.
377         For MULT_EXPR, *DIV_EXPR, *SHIFT_EXPR, if the mode if a fixed-point
378         mode, we jump to binop directly.
379         Support FIXED_CONVERT_EXPR.
380         (do_store_flag): Check FIXED_CST to put a constant second.
381         (vector_mode_valid_p): Handle MODE_VECTOR_FRACT,
382         MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
383         (const_vector_from_tree): Support FIXED_CST.
384         * doc/extend.texi (Fixed-Point): New node.
385         * doc/md.texi (ssadd, usadd, sssub, ussub, ssmul, usmul, ssdiv, usdiv,
386         ssmadd, usmadd, ssmsub, usmsub, ssashl, usashl, ssneg, usneg, fract,
387         satfract, fractuns, satfractuns): Document them.
388
389 2007-09-07  Bernd Schmidt  <bernd.schmidt@analog.com>
390
391         * config/bfin/bfin.h (PREFERRED_RELOAD_CLASS): Don't reload autoinc
392         addresses into I registers.
393
394 2007-09-06  Jan Hubicka  <jh@suse.cz>
395             Andreas Tobler  <a.tobler@schweiz.org>
396
397         * config/darwin.c (machopic_indirect_data_reference): Avoid invalid
398         sharing.
399         (machopic_legitimize_pic_address): Likewise.
400
401 2007-09-06  Andrew Pinski  <andrew_pinski@playstation.sony.com>
402             Jan Hubicka  <jh@suse.cz>
403
404         * config/spu/spu.md (floatsidf2): Use convert_optab_libfunc
405         instead of ufloat_optab->handlers directly.
406         (floatdidf2): Likewise.
407
408 2007-09-06  Sandra Loosemore  <sandra@codesourcery.com>
409
410         * config/mips/mips.c:  Include diagnostic.h.
411         (mips_set_current_function): Check errorcount and sorrycount 
412         before generating RTL.
413
414 2007-09-06  Richard Sandiford  <richard@codesourcery.com>
415
416         PR target/33256
417         * config/mips/mips.c (mips_classify_symbolic_expression): New function.
418         (mips_classify_address): Use it instead of mips_symbolic_constant_p.
419         (print_operand_reloc): Likewise.
420
421 2007-09-06  Janis Johnson  <janis187@us.ibm.com>
422
423         Revert:
424
425         2007-09-06  Jan Hubicka  <jh@suse.cz>
426  
427         * i386.c (ix86_expand_lround, ix86_expand_round): Update call of
428         real_2expN.
429
430         2007-09-06  Richard Sandiford  <richard@codesourcery.com>
431
432         * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
433         (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
434
435         2007-09-05  Janis Johnson  <janis187@us.ibm.com>
436
437         * optabs.c (expand_float): Convert unsigned integer as signed only
438         if it provides sufficient accuracy; add mode argument to real_2expN.
439         (expand_fix): Fix comment typos; extend binary float into mode
440         wider than destination for converion to unsigned integer; add mode
441         argument to real_2expN.
442         * real.c (real_2expN): Add mode argument to special-case decimal
443         float values.
444         * real.h (real_2expN): Ditto.
445         * fixed-value.c (check_real_for_fixed_mode): Add mode argument to
446         real_2expN.
447         (fixed_from_string): Ditto.
448         (fixed_to_decimal): Ditto.
449         (fixed_convert_from_real): Ditto.
450         (real_convert_from_fixed): Ditto.
451         * config/rs6000/rs6000.md (FP): Include DD and TD modes.
452         * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
453         muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
454         floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
455
456 2007-09-06  Tom Tromey  <tromey@redhat.com>
457
458         * tree-cfg.c (remove_bb): Only warn if line is non-zero.
459         * c-pch.c (c_common_read_pch): Restore current location after
460         reading PCH file.
461         * tree.c (expand_location): Update.
462         (expr_filename): Changed return type.  Unified the two cases.
463         (expr_lineno): Likewise.
464         (annotate_with_file_line): Don't use EXPR_LINENO and EXPR_FILENAME
465         as lvalues.
466         * toplev.c (line_table): Changed type.
467         (general_init): Update.
468         (realloc_for_line_map): New function.
469         (general_init): Allocate line_table using GC.
470         * fix-header.c (line_table): Changed type.
471         (read_scan_file): Update.
472         (read_scan_file): Update.
473         * c-ppoutput.c (maybe_print_line): Update.
474         (print_line): Update.
475         (cb_line_change): Update.
476         (cb_define): Update.
477         (pp_file_change): Update.
478         * c-opts.c (c_common_init_options): Update.
479         (finish_options): Update.
480         (push_command_line_include): Update.
481         * c-lex.c (cb_line_change): Update.
482         (cb_def_pragma): Update.
483         (cb_define): Update.
484         (cb_undef): Update.
485         (c_lex_with_flags): Use cpp_get_token_with_location.
486         * input.h (line_table): Changed type.
487         (location_from_locus): New macro.
488         * tree.h (EXPR_FILENAME): No longer an lvalue.
489         (EXPR_LINENO): Likewise.
490         (expr_locus, set_expr_locus): Declare separately for
491         USE_MAPPED_LOCATION.
492         (expr_filename, expr_lineno): Changed return type.
493         * gimplify.c (tree_to_gimple_tuple): Use SET_EXPR_LOCUS.
494         * cfgexpand.c (expand_gimple_cond_expr): Use location_from_locus.
495         (expand_gimple_basic_block): Likewise.
496         * final.c (final_scan_insn): Use expanded_location.
497
498 2007-09-06  Richard Guenther  <rguenther@suse.de>
499
500         PR tree-optimization/32586
501         * tree-ssa-sccvn.c (simplify_binary_expression): Avoid
502         folding if nothing changed.
503         (simplify_unary_expression): New function.  Do tree combining
504         on conversion like codes.
505         (try_to_simplify): Call it.
506         * builtins.c (fold_builtin_cexp): Fold the built expressions.
507         * fold-const.c (fold_unary): Test result of get_callee_fndecl().
508
509 2007-09-06  Jan Hubicka  <jh@suse.cz>
510
511         PR target/33318
512         * cse.c (fold_rtx): Avoid invalid sharing.
513
514 2007-09-06  Richard Sandiford  <richard@codesourcery.com>
515
516         * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
517         (fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
518
519 2007-09-06  Revital Eres  <eres@il.ibm.com>
520
521         * config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p):
522         Fix offsettable memory reference for 750CL.
523
524 2007-09-06  Pat Haugen  <pthaugen@us.ibm.com>
525
526         * reload.c (find_reloads_address_1): Try to preserve original
527         base/index regclass of operands.
528         * regrename.c (scan_rtx_address): Likewise.
529         (replace_oldest_value_addr): Likewise.
530
531 2007-09-06  Richard Guenther  <rguenther@suse.de>
532
533         PR tree-optimization/33302
534         * domwalk.c (walk_dominator_tree): The exit block is
535         interesting even if it is not reachable.
536
537 2007-09-06  Richard Sandiford  <richard@codesourcery.com>
538
539         PR middle-end/33306
540         * optabs.c (avoid_expensive_constant): Do nothing if MODE is VOIDmode.
541
542 2007-09-06  Basile Starynkevitch  <basile@starynkevitch.net>
543
544         * cfg.c (dump_bb_info, dump_edge_info): Added cfun test for 
545         robustness.
546
547 2007-09-05  Ian Lance Taylor  <iant@google.com>
548
549         * tree-pretty-print.c (dump_decl_name): Cast LABEL_DECL_UID to int
550         when printing.
551         (dump_generic_node): Likewise.
552         * print-rtl.c (print_decl_name): Likewise.
553         * print-tree.c (print_node_brief): Likewise.
554         (print_node): Likewise.
555         * Makefile.in (RTL_BASE_H): Add alias.h.
556         (TREE_H): Likewise.
557
558 2007-09-06  Jesper Nilsson  <jesper.nilsson@axis.com>
559
560         * longlong.h [__CRIS_arch_version >= 8] (count_trailing_zeros):
561         Defined.
562         * config/cris/cris.md (ctzsi2, cris_swap_bits): Implemented.
563         * config/cris/cris.h (CTZ_DEFINED_VALUE_AT_ZERO): Defined.
564
565 2007-09-06  Jie Zhang  <jie.zhang@analog.com>
566
567         * config.gcc (tm_file): Add linux.h for bfin*-uclinux*.
568         (tm_defines): Define UCLIBC_DEFAULT to 1.
569         (extra_options): Add linux.opt.
570         * config/bfin/linux.h (CPLUSPLUS_CPP_SPEC): Don't define.
571         (CRT_CALL_STATIC_FUNCTION): Likewise.
572         (NO_IMPLICIT_EXTERN_C): Likewise.
573         (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS.
574         * config/bfin/elf.h (OBJECT_FORMAT_ELF): Don't define.
575         * config/bfin/uclinux.h (CPLUSPLUS_CPP_SPEC): Don't define.
576         (ENDFILE_SPEC): Don't define.
577         (LIB_SPEC): Likewise.
578         (CRT_CALL_STATIC_FUNCTION): Likewise.
579         (NO_IMPLICIT_EXTERN_C): Likewise.
580         (LINUX_TARGET_OS_CPP_BUILTINS): Likewise.
581         (TARGET_OS_CPP_BUILTINS): Define as LINUX_TARGET_OS_CPP_BUILTINS.
582
583 2007-09-06  Jan Hubicka  <jh@suse.cz>
584
585         * i386.c (ix86_expand_lround, ix86_expand_round): Update call of
586         real_2expN.
587
588 2007-09-06  Jan Hubicka  <jh@suse.cz>
589
590         * opts.c (common_handle_option): Enable inlining functions for
591         -fprofile-generate.
592
593 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
594
595         * builtin-attrs.def (ATTR_NONNULL_3): New.
596         (DEF_FORMAT_ATTRIBUTE): Use just ATTR_NONNULL_##FA instead of
597         ATTR_NOTHROW_NONNULL_##FA.
598         (DEF_FORMAT_ATTRIBUTE_NOTHROW, DEF_FORMAT_ATTRIBUTE_BOTH): New macros.
599         (ATTR_FORMAT_PRINTF_NOTHROW_2_0, ATTR_PRINTF_NOTHROW_2_3,
600         ATTR_FORMAT_PRINTF_NOTHROW_3_0, ATTR_FORMAT_PRINTF_NOTHROW_3_4,
601         ATTR_FORMAT_PRINTF_NOTHROW_4_0, ATTR_PRINTF_NOTHROW_4_5,
602         ATTR_FORMAT_PRINTF_NOTHROW_5_0, ATTR_FORMAT_PRINTF_NOTHROW_5_6,
603         ATTR_FORMAT_SCANF_NOTHROW_2_0, ATTR_FORMAT_SCANF_NOTHROW_2_3,
604         ATTR_FORMAT_STRFTIME_NOTHROW_3_0, ATTR_FORMAT_STRFMON_NOTHROW_3_4):
605         New.
606         (ATTR_FORMAT_PRINTF_4_0, ATTR_PRINTF_4_5, ATTR_FORMAT_PRINTF_5_0,
607         ATTR_FORMAT_PRINTF_5_6, ATTR_FORMAT_STRFTIME_3_0,
608         ATTR_FORMAT_NOTHROW_3_4): Remove.
609         * builtins.def (snprintf, sprintf, sscanf, vsnprintf, vsprintf,
610         vsscanf, strfmon, strftime, __snprintf_chk, __sprintf_chk,
611         __vsnprintf_chk, __vsprintf_chk): Use ATTR_FORMAT_*_NOTHROW_*
612         instead of ATTR_FORMAT_*_*.
613
614 2007-09-06  Hans-Peter Nilsson  <hp@axis.com>
615
616         * config/cris/cris.c (cris_emit_movem_store): Call copy_rtx on
617         parts re-used for REG_FRAME_RELATED_EXPR.
618
619 2007-09-05  Janis Johnson  <janis187@us.ibm.com>
620
621         * optabs.c (expand_float): Convert unsigned integer as signed only
622         if it provides sufficient accuracy; add mode argument to real_2expN.
623         (expand_fix): Fix comment typos; extend binary float into mode
624         wider than destination for converion to unsigned integer; add mode
625         argument to real_2expN.
626         * real.c (real_2expN): Add mode argument to special-case decimal
627         float values.
628         * real.h (real_2expN): Ditto.
629         * fixed-value.c (check_real_for_fixed_mode): Add mode argument to
630         real_2expN.
631         (fixed_from_string): Ditto.
632         (fixed_to_decimal): Ditto.
633         (fixed_convert_from_real): Ditto.
634         (real_convert_from_fixed): Ditto.
635         * config/rs6000/rs6000.md (FP): Include DD and TD modes.
636         * config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
637         muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
638         floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
639
640 2007-09-05  Ian Lance Taylor  <iant@google.com>
641
642         * init-regs.c (initialize_uninitialized_regs): Call
643         emit_insn_before rather than add_insn_before.
644
645 2007-09-05  Jakub Jelinek  <jakub@redhat.com>
646
647         * builtins.def (BUILT_IN_VA_ARG_PACK): New built-in.
648         * tree.h (CALL_EXPR_VA_ARG_PACK): Define.
649         * tree-inline.h (copy_body_data): Add call_expr field.
650         * tree-inline.c (expand_call_inline): Initialize call_expr.
651         (copy_bb): Append anonymous inline fn arguments to arguments
652         when inlining a CALL_EXPR_VA_ARG_PACK call.
653         * builtins.c (expand_builtin): Issue an error if
654         BUILT_IN_VA_ARG_PACK is seen during expand.
655         (fold_call_expr, fold_builtin_call_array): Don't fold
656         CALL_EXPR_VA_ARG_PACK CALL_EXPRs or calls with
657         __builtin_va_arg_pack () call as last argument.
658         * gimplify.c (gimplify_call_expr): If last argument to a vararg
659         function is __builtin_va_arg_pack (), decrease number of call
660         arguments and instead set CALL_EXPR_VA_ARG_PACK on the CALL_EXPR.
661         * expr.c (expand_expr_real_1): Issue an error if
662         CALL_EXPR_VA_ARG_PACK CALL_EXPR is seen during expand.
663         * tree-pretty-print.c (dump_generic_node): Handle printing
664         CALL_EXPR_VA_ARG_PACK bit on CALL_EXPRs.
665         * doc/extend.texi (__builtin_va_arg_pack): Document.
666
667 2007-09-05  Adam Nemet  <anemet@caviumnetworks.com>
668
669         PR tree-optimization/21513
670         * builtins.c (build_builtin_expect_predicate): New function.
671         (fold_builtin_expect): Add argument for expected value.
672         Distribute __builtin_expect over short-circuiting operations.
673         Fold nested builtin_expects.
674         (fold_builtin_2): Adjust call to fold_builtin_expect.
675
676 2007-09-05  Rask Ingemann Lambertsen  <rask@sygehus.dk>
677
678         PR web/32965
679         PR tree-optimization/13756
680         * doc/invoke.texi (Options That Control Optimization): Document
681         -ftree-dse.
682
683 2007-09-05  Uros Bizjak  <ubizjak@gmail.com>
684
685         * gcc/config/i386/cpuid.h: New file.
686         * gcc/config/i386/driver-i386.c: Include cpuid.h.
687         (describe_cache): Shrink size and line strings to 100 bytes.
688         (detect_caches_amd): Return "" for unsupported max_ext_level.
689         Use __cpuid function.
690         (detect_caches_intel): Return "" for unsupported max_level.
691         Use __cpuid function.
692         (host_detect_local_cpu): Change feature flag variables to
693         unsigned int.  Initialize only extended feature flag variables.
694         Use __get_cpuid_max to determine max supported cpuid level.
695         Use __cpuid function to determine supported features.  Fix
696         calculation of family id.  Remove is_amd and check signature
697         directly.  Check for Geode signature.  Handle family 4 id.
698         [PROCESSOR_GENERIC32]: New default for unknown family id.  Move
699         cpu discovery code to lower part of the function.
700         [PROCESSOR_PENTIUM, PROCESSOR_K6, PROCESSOR_ATHLON]: Do not tune
701         for sub-architecture.
702         [PROCESSOR_PENTIUMPRO]: Simplify cpu discovery code.
703         [PROCESSOR_K8]: Add k8-sse3 architecture.
704         [PROCESSOR_NOCONA]: Remove.
705         [PROCESSOR_GENERIC64]: Ditto.
706         * gcc/config/i386/x-i386 (driver-i386.o): Depend on cpuid.h.
707         * gcc/config/i386/crtfastmath.c: Include cpuid.h.  Use __get_cpuid
708         to check for SSE and FXSAVE support.
709         * gcc/config/i386/t-crtfm (crtfastmath.o): Depend on cpuid.h.
710         Add -minline-all-stringops.
711         * gcc/config.gcc (i[34567]86-*-*): Add cpuid.h to extra_headers.
712         (x86_64-*-*): Ditto.
713
714 2007-09-05  Jie Zhang  <jie.zhang@analog.com>
715
716         * config/bfin/linux-unwind.h: New file.
717         * config/bfin/linux.h (MD_UNWIND_SUPPORT): Define.
718         * config/bfin/uclinux.h (MD_UNWIND_SUPPORT): Define.
719
720 2007-09-05  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
721
722         * Makefile.in (stmt.o): Add alloc-pool.h dependency.
723         * stmt.c: Include alloc-pool.h.
724         (struct case_node): Remove GTY marker.
725         (add_case_node): New parameter case_node_pool.  Use it for
726         allocation of r.
727         (expand_case): New allocation pool case_node_pool.  Initialize it,
728         pass to add_case_node and free it.
729
730 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
731             David Ung  <davidu@mips.com>
732             Nigel Stephens <nigel@mips.com>
733
734         Add mips16/nomips16 function attributes and -mflip-mips16 option
735         for testing mixed-mode compilation.
736
737         * config/mips/mips.opt (mflip-mips16): New.
738
739         * config/mips/mips.h (SYMBOL_FLAG_MIPS16_FUNC): Define.
740         (SYMBOL_FLAG_MIPS16_FUNC_P): Define.
741
742         * config/mips/mips.c (mips_base_target_flags): New.
743         (mips_base_mips16): New.
744         (mips_base_schedule_insns): New.
745         (mips_base_reorder_blocks_and_partition): New.
746         (mips_base_align_loops): New.
747         (mips_base_align_jumps): New.
748         (mips_base_align_functions): New.
749         (mips16_flipper): New.
750         (mips_attribute_table): Add "mips16" and "nomips16" entries.
751         (TARGET_SET_CURRENT_FUNCTION): Define.
752         (mips_mips16_type_p, mips_nomips16_type_p): New.
753         (mips_comp_type_attributes): Check mips16/nomips16 attributes.
754         (mips_function_ok_for_sibcall): Make it deal with functions with
755         mips16 attributes.
756         (mips_init_split_addresses): New, split out from override_options.
757         (mips_init_relocs): New, split out from override_options.
758         (was_mips16_p): New.
759         (mips_set_mips16_mode): New, split out from override_options.
760         (mips_set_current_function): New.
761         (override_options): Add sorry for unsupported mips16/pic
762         combination.  Remove error for mips16/dsp combination.  Save
763         base option settings.  
764         (mips_file_start): Move mips16 mode setting output from here....
765         (mips_output_function_prologue): ....to here.
766         (mips_output_mi_thunk): Check for mips16 function.
767         (build_mips16_function_stub): Don't set .mips16 here.
768         (build_mips16_call_stub): Likewise.
769         (mips_expand_builtin): Error in mips16 mode.
770         (mips_use_mips16_mode_p): New.
771         (mips_encode_section_info): Check for mips16 function, and set
772         SYMBOL_REF_FLAGS accordingly.
773
774         * doc/extend.texi (Function Attributes): Document new
775         mips16/nomips16 attributes.
776         * doc/invoke.texi (Option Summary): Add -mflip-mips16.
777         (MIPS Options): Document -mflip-mips16.
778
779 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
780
781         * config/mips/mips.c (mips_legitimize_tls_address): Call sorry
782         if we encounter TLS address in MIPS16 mode.
783         (mips_legitimize_const_move): Check cannot_force_const_mem for
784         the (const (plus symbol offset)) case; this forces invalid TLS
785         address in MIPS16 mode to be caught by the above call to sorry.
786         (override_options): Don't reset targetm.have_tls in MIPS16 mode,
787         because that now enables emutls, which is not ABI compatible
788         with native TLS in non-MIPS16 mode.
789
790 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
791
792         Add target hook invoked when cfun changes.
793
794         * doc/tm.texi (TARGET_SET_CURRENT_FUNCTION): Document.
795         * target.h (struct gcc_target): Add set_current_function.
796         * target-def.h (TARGET_SET_CURRENT_FUNCTION): Define.
797         (TARGET_INITIALIZER): Add initializer for set_current_function.
798         * tree.h (push_struct_function): New.
799         * tree-inline.h (push_cfun, pop_cfun): Move declarations to...
800         * function.h: Here.
801         (set_cfun): Declare.
802         * tree-inline.c (cfun_stack, push_cfun, pop_cfun): Moved to...
803         * function.c: Here.
804         (push_function_context_to): Use allocate_struct_function
805         to create null context, not init_dummy_function_start.  Use set_cfun.
806         (pop_function_context_from): Use set_cfun.
807         (in_dummy_function): New.
808         (invoke_set_current_function_hook): New.
809         (set_cfun): New.
810         (push_cfun, pop_cfun): Use set_cfun.
811         (push_struct_function): New.
812         (allocate_struct_function): Call invoke_set_current_function_hook
813         before returning.
814         (prepare_function_start): Don't set cfun here.  Remove unused
815         argument; fix all callers.
816         (init_dummy_function_start): Fiddle with in_dummy_function.  Call
817         push_struct_function.
818         (init_function_start): Set cfun here.
819         (expand_dummy_function_end): Fiddle with in_dummy_function.  Pop cfun.
820         * omp-low.c (create_omp_child_function): Use push_struct_function
821         and pop_cfun to save/restore state.
822         (expand_omp_parallel): Remove unused saved_cfun variable.
823         * cgraphunit.c (ipa_passes): Use set_cfun.
824         * gimple-low.c (record_vars_into): Use push_cfun/pop_cfun here.
825         * dwarf2out.c (dwarf2out_abstract_function): Likewise.
826         * matrix-reorg.c (transform_allocation_sites): Likewise.
827         (matrix_reorg): Use set_cfun.
828         * gimplify.c (gimplify_function_tree): Use push_cfun/pop_cfun here.
829         * tree-optimize.c (tree_rest_of_compilation): Remove one redundant
830         assignment to cfun; use set_cfun for the other.
831         * tree-cfg.c (move_sese_region_to_fn): Use set_cfun.
832         (dump_function_to_file): Use push_cfun/pop_cfun here.
833         * c-decl.c (finish_function): Use set_cfun.
834
835 2007-09-05  Kenneth Zadeck <zadeck@naturalbridge.com>
836
837         * regrename.c (rerename_optimize): Use deferred rescanning and
838         insert explicit calls to rescan insns when changed.
839         
840 2007-09-05  Jan Hubicka  <jh@suse.cz>
841
842         * optabs.c (libfunc_entry): Change optab to integer.
843         (hash_libfunc, convert_optab_libfunc, optab_libfunc,
844         set_optab_libfunc, set_conv_libfunc): Use optable indexes instead
845         of pointers for hashing.
846
847 2007-09-05  Jan Hubicka  <jh@suse.cz>
848
849         * regrename.c (pass_regrename, pass_cprop_hardreg): Add RTL sharing
850         verifier.
851         * fwprop.c (pass_rtl_fwprop, pass_rtl_fwprop_add): Likewise.
852         * see.c (pass_see): Likewise.
853         * tracer.c (pass_tracer): Likewise.
854         * postreload-gcse.c (pass_gcse2): Likewise.
855         * postreload.c (pass_postreload_cse): Likewise.
856         * mode-switching.c (pass_mode_switching): Likewise.
857         * modulo-sched.c (pass_sms): Likewise.
858         * cse.c (cse_insn): Likewise.
859         * web.c (pass_web): Likweise.
860         * combine-stack-adj.c (pass_stack_adjustments): Likewise.
861         * dce.c (pass_ud_rtl_dce, pass_fast_rtl_dce): Likewise.
862         * loop-init.c (pass_rtl_loop_init): Likewise.
863         (pass_rtl_loop_done, pass_rtl_move_loop_, pass_rtl_unswitch,
864         pass_rtl_unroll_and, pass_rtl_doloop): Likewise.
865         * global.c (pass_global_alloc): Likewise.
866         * ifcvt.c (pass_rtl_ifcvt, pass_if_after_combine,
867         pass_if_after_reload): Likewise.
868         * reload.c (pass_peephole2, pass_split_for_shoren_branches): Likewise.
869         * dse.c (pass_rtl_dse1, pass_rtl_dse2): Likewise.
870         * regmove.c (pass_regmove): Likewise.
871         * function.c (pass_thread_prologugues_epilogues): Likewise.
872         * gcse.c (pass_gcse): Likewise.
873         * rtl-factoring.c (pass_rtl_seqabstr): Likewise.
874         * lower-subreg.c (pass_lower_subreg2): Likewise.
875         * bt-load.c (pass_branch_target_load): Likewise.
876         * emit-rtl.c (pass_unshare_all_rtl): Likewise.
877         * cfgcleanup.c (pass_jump, pass_jump2): Likewise.
878         * combine.c (pass_combine): Likewise.
879         * bb-reorder.c (pass_duplicate_comp, pass_reorder_blocks): Likewise.
880         (pass_partition_blocks): Likewise.
881         * var-tracking.c (pass_variable_track): Likewise.
882         * reg-stack.c (pass_stack_regs_run): Likewise.
883         * sched-rgn.c (pass_sched, pass_sched2): Likewise.
884         * passes.c (pass_postreload): Likewise.
885         (execute_function_todo): Add TODO_verify_rtl_sharing handling code.
886         * tree-pass.h (TODO_verify_rtl_sharing): New.
887         (TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi,
888         TODO_update_ssa_only_virtuals, TODO_remove_unused_locals,
889         TODO_set_props, TODO_df_finish, TODO_df_verify,
890         TODO_mark_first_instance, TODO_rebuild_alias): Renumber.
891
892 2007-09-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
893
894         * fold-const.c (all_ones_mask_p, sign_bit_p, simple_operand_p,
895         fold_real_zero_addition_p, reorder_operands_p,
896         div_if_zero_remainder, fold_undefer_overflow_warnings,
897         int_binop_types_match_p, fold_convert_const_int_from_int,
898         fold_convert_const_int_from_real,
899         fold_convert_const_int_from_fixed,
900         fold_convert_const_real_from_real,
901         fold_convert_const_real_from_fixed,
902         fold_convert_const_fixed_from_fixed,
903         fold_convert_const_fixed_from_int,
904         fold_convert_const_fixed_from_real, maybe_lvalue_p,
905         fold_checksum_tree, fold_check_failed, print_fold_checksum,
906         debug_fold_checksum, multiple_of_p): Constify.
907         * tree-flow-inline.h (get_lineno): Likewise.
908         * tree-flow.h (get_lineno): Likewise.
909         * tree-object-size.c (compute_object_offset, addr_object_size,
910         alloc_object_size, pass_through_call): Likewise.
911         * tree-pretty-print.c (op_symbol, print_call_name,
912         print_struct_decl, do_niy): Likewise.
913         * tree.h (fold_undefer_overflow_warnings, multiple_of_p,
914         debug_fold_checksum): Likewise.
915
916 2007-09-04  Steven Bosscher  <steven@gcc.gnu.org>
917
918         PR middle-end/33029
919         * lower-subreg.c (resolve_clobber): If we remove a REG_LIBCALL
920         note, remove the associated REG_RETVAL note.
921
922 2007-09-04  Andrew Pinski  <andrew_pinski@playstation.sony.com>
923
924         * config.gcc (powerpc*-*-*): Install
925         spu2vmx.h, vec_types.h, and si2vmx.h headers.
926         * config/rs6000/spu2vmx.h: New header.
927         * config/rs6000/si2vmx.h: New header.
928         * config/rs6000/vec_types.h: New header.
929
930 2007-09-05  Ben Elliston  <bje@au.ibm.com>
931
932         * varasm.c (initializer_constant_valid_p): Fix comment typo.
933
934 2007-09-05  Ben Elliston  <bje@au.ibm.com>
935
936         * config/rs6000/ppu_intrinsics.h (__ldarx): Use `Z' constraint,
937         not `m' for *ptrp.
938         (__stdcx): Make asm volatile.
939         (__stwcx, __stdcx): Return only 0 or 1.
940
941 2007-09-05  Jan Hubicka  <jh@suse.cz>
942
943         Revert:
944
945         2007-09-04  Jan Hubicka  <jh@suse.cz>
946         * tree-tailcall.c (eliminate_tail_call): Expect unrenamed return value.
947
948         2007-09-04  Richard Guenther  <rguenther@suse.de>
949         * tree-ssa-operands.c (add_virtual_operand): Only mark
950         stores as has_volatile_ops if alias information is not available.
951
952 2007-09-05  Jakub Jelinek  <jakub@redhat.com>
953
954         * config/rs6000/tramp.asm: Include config.h.
955         Check __PIC__ or __pic__ macro instead of SHARED.
956
957         PR rtl-optimization/32300
958         * see.c (see_copy_insn): New function.
959         (see_def_extension_not_merged, see_merge_one_use_extension,
960         see_merge_one_def_extension): Use it.  Avoid changing
961         PREV_INSN/NEXT_INSN chains directly, insted emit insns
962         into sequences.  Call df_insn_delete on temporary insns
963         that won't be emitted into the insn stream.
964         (rest_of_handle_see): Turn off DF_DEFER_INSN_RESCAN
965         and run df_process_deferred_rescans () before run_fast_dce.
966
967         PR tree-optimization/33017
968         * tree-data-ref.c (split_constant_offset) <case SSA_NAME>: Don't
969         recurse for pure or const function calls.
970
971 2007-09-04  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
972
973         * c-format.c: Include alloc-pool.h.
974         (check_format_info_main): New argument fwt_alloc.  Use allocation
975         pool instead of GC.  Remove GC deallocation code.
976         (check_format_arg): Create allocation pool, pass it to
977         check_format_info_main and free it afterwards.
978         * Makefile.in (c-format.o): Add alloc-pool.h dependency.
979
980 2007-09-05  Ben Elliston  <bje@au.ibm.com>
981
982         * config/rs6000/ppu_intrinsics.h (__protected_stream_count):
983         Rename count macro arugment for clarity.
984         (__protected_unlimited_stream_set): Pass UG=1 to __dcbt_TH1000.
985         (__protected_stream_set): Likewise, pass 0.
986
987 2007-09-04  Jan Hubicka  <jh@suse.cz>
988
989         * tree-tailcall.c (eliminate_tail_call): Expect unrenamed return value.
990
991 2007-09-04  Jan Hubicka  <jh@suse.cz>
992
993         * invoke.texi (-finline-small-functions): Document.
994         * ipa-inline.c (cgraph_default_inline_p): Do not use DECL_INLINE
995         when deciding what is inlinable.
996         (cgraph_decide_recursive_inlining): Handle flag_inline_functions.
997         (cgraph_decide_inlining_of_small_function): Handle new flags.
998         (cgraph_decide_inlining_incrementally): Likewise.
999         * opts.c (decode_options): Enable flag_inline_small_functions at -O2
1000         * common.opt (finline-small-functions): New.
1001         * Makefile.in (build/gengtype.o-warn): Work around PR29478
1002
1003 2007-09-04  Richard Guenther  <rguenther@suse.de>
1004
1005         * tree-ssa-operands.c (add_virtual_operand): Only mark
1006         stores as has_volatile_ops if alias information is not available.
1007
1008 2007-09-04  Andrew Haley  <aph@redhat.com>
1009
1010         * config/arm/libgcc-bpabi.ver: Add _Unwind_Backtrace as GCC_4.3.0.
1011
1012 2007-09-04  Andrew Haley  <aph@redhat.com>
1013
1014         * config/arm/libunwind.S (UNWIND_WRAPPER _Unwind_Backtrace): New.
1015         * config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New.
1016         * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New.
1017
1018 2007-09-04  Emmanuel Thome  <Emmanuel.Thome@inria.fr>
1019
1020         PR c++/14178
1021         * common.opt: Mention ABI version 2 in comment.
1022
1023 2007-09-04  Jan Hubicka  <jh@suse.cz>
1024
1025         * optabs.c (debug_optab_libfunc): Update; make available to gdb.
1026         (libfunc_entry): New structure.
1027         (libfunc_hash): New hashtable.
1028         (hash_libfunc): New function.
1029         (eq_libfunc): New function.
1030         (convert_optab_libfunc): New function.
1031         (optab_libfunc): New function.
1032         (expand_binop, sign_expand_binop, expand_twoval_binop_libfunc,
1033         expand_unop, prepare_cmp_insn, prepare_float_insn, gen_add2_insn,
1034         expand_float, expand_fix, new_optab, new_convert_optab):
1035          Update for new libfunc API.
1036         (init_libfunc, init_integral_libfuncs,
1037         init_floating_libfuncs, init_interclass_conv_libfuncs
1038         init_intraclass_conv_libfuncs): Remove; reorganize all logic to:
1039         (gen_libfunc, gen_int_libfunc, gen_fp_libfunc, gen_int_fp_libfunc,
1040         gen_intv_fp_libfunc, gen_interclass_conv_libfunc,
1041         gen_int_to_fp_conv_libfunc, gen_ufloat_conv_libfunc,
1042         gen_int_to_fp_nondecimal_conv_libfunc, gen_fp_to_int_conv_libfunc,
1043         gen_intraclass_conv_libfunc, gen_trunc_conv_libfunc,
1044         gen_extend_conv_libfunc): New.
1045         (init_one_libfunc): Revamp for hashtables.
1046         (set_conv_libfunc): Likewise.
1047         (init_optabs): Initialize hashtable; use lazy initialization where
1048         possible.
1049         * optabs.h (optab_handlers): Move out of GGC.
1050         (optab, convert_optab): Move out of GGC; add lazy gen info.
1051         (code_to_optab, convert_optab_table, optab_table): Move out of GGC.
1052         (optab_libfunc, convert_optab_libfunc): New.
1053         * builtins.c (expand_builtin_powi): Update for new API.
1054         * expr.c (convert_move): Likewise.
1055         * expmed.c (expand_divmod): Likewise.
1056
1057 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
1058
1059         * config/rs6000/rs6000.c (rs6000_stack_info): Allocate space for the
1060         GOT pointer only if there is a constant pool.  Use the allocated space
1061         for SPE also.
1062
1063 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
1064
1065         * config/rs6000/linux-unwind.h (ppc_fallback_frame_state): Correct
1066         typo for AltiVec.
1067
1068 2007-09-04  Revital Eres  <eres@il.ibm.com>
1069             Richard Guenther  <rguenther@suse.de>
1070             R. Clint Whaley  <whaley@cs.utsa.edu>
1071
1072         * doc/invoke.texi (-fassociative-math, -freciprocal-math):
1073         Document new flags.
1074         * tree-tailcall.c (process_assignment): Use -fassociative-math
1075         when reodering operands of floating-point type.
1076         * fold-const.c (fold_comparison, fold_binary): Use
1077         -fassociative-math and -freciprocal-math instead of
1078         -funsafe-math-optimization flag.
1079         * toplev.h (set_unsafe_math_optimizations_flags): Declare function.
1080         * tree-ssa-math-opts.c (gate_cse_reciprocals): Use
1081         -freciprocal-math instead of -funsafe-math-optimizations.
1082         * opts.c (set_fast_math_flags): Set -freciprocal-math and
1083         -fassociative-math when -ffast-math is set.
1084         (set_unsafe_math_optimizations_flags): New Function
1085         to set -freciprocal-math and -fassociative-math when
1086         -funsafe-math-optimizations is set.
1087         (common_handle_option): Call it.
1088         * tree-vectorizer.c (vect_is_simple_reduction): Use
1089         -fassociative-math when doing reduction on floats.
1090         * loop-unroll.c (analyze_insn_to_expand_var): Use
1091         -fassociative-math when expanding an accumulator of type float.
1092         * simplify-rtx.c (simplify_binary_operation_1): Use
1093         -fassociative-math and -freciprocal-math when reordeing operands
1094         of floating-point type.
1095         * combine.c (combine_simplify_rtx): Likewise.
1096         * tree-ssa-reassoc.c (break_up_subtract_bb, reassociate_bb):
1097         Likewise.
1098         * common.opt (-fassociative-math, -freciprocal-math): New flags.
1099
1100 2007-09-04  Paolo Carlini  <pcarlini@suse.de>
1101
1102         PR c++/18608
1103         * doc/install.texi (--enable-__cxa_atexit): Fix typo.
1104
1105 2007-09-04  Jan Hubicka  <jh@suse.cz>
1106
1107         * regrename.c(copyprop_hardreg_forward_1): Unshare when doing copyprop.
1108
1109 2007-09-04  Jan Hubicka  <jh@suse.cz>
1110
1111         * regrename.c (build_def_use): Don't share RTL between MATCH_OPERATOR
1112         and corresponding MATCH_DUP.
1113
1114 2007-09-04  Uros Bizjak  <ubizjak@gmail.com>
1115
1116         PR middle-end/33187
1117         * combine.c (subst): Do not try to simplify X if it represents load
1118         of FP constant from the constant pool via float extension.
1119
1120 2007-09-04  Ben Elliston  <bje@au.ibm.com>
1121
1122         * c-opts.c: Include "tm_p.h".
1123         * Makefile.in (c-opts.o): Add $(TM_P_H) as a dependency.
1124
1125 2007-09-04  Richard Guenther  <rguenther@suse.de>
1126
1127         PR tree-optimization/33291
1128         * tree-pretty-print.c (dump_generic_node): Dump all
1129         qualifiers for pointer types, not only first.  Dump
1130         qualifiers for aggregate types as well.
1131         * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Always
1132         use the canonical type for building ARRAY_REFs.
1133         * gimplify.c (canonicalize_addr_expr): Clean up.  The
1134         correct validness check is compatibility of the pointer
1135         types.  Always use the canonical type for building
1136         ARRAY_REFs and ADDR_EXPRs.
1137         * tree-ssa-forwprop.c (forward_propagate_addr_expr): Revert
1138         change that disabled propagation of ADDR_EXPRs into statements
1139         with volatile ops.
1140
1141 2007-09-03  Zack Weinberg  <zack@codesourcery.com>
1142
1143         * config/arm/arm.md (mulsidi3, umulsidi3, mulsi3_highpart)
1144         (umulsi3_highpart): Make into expanders; existing insns are
1145         now named *[insn]_nov6.  Add stars to existing [insn]_v6
1146         counterparts' names.
1147
1148 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1149
1150         * Makefile.in (DRIVER_DEFINES, gcc.o, gccspec.o, protoize.o)
1151         (unprotoize.o): Remove SHLIB_MULTILIB.
1152
1153 2007-09-03  Eric Weddington  <eweddington@cso.atmel.com>
1154
1155         * doc/extend.texi: Document progmem attribute for AVR.
1156
1157 2007-09-03  Anatoly Sokolov <aesok@post.ru>
1158
1159         PR target/28902
1160         * config/avr/avr.h (TARGET_VTABLE_ENTRY_ALIGN): Define.
1161
1162 2007-09-03  Zack Weinberg  <zack@codesourcery.com>
1163
1164         * optabs.c (expand_ffs): Initialize val and defined_at_zero
1165         to avoid warnings.
1166
1167         * optabs.c: Remove unnecessary forward declarations.
1168         (expand_unop_direct): New, broken out of expand_unop.
1169         (expand_doubleword_clz): New.
1170         (expand_ctz): Move above expand_ffs.  Use
1171         start_sequence, end_sequence, add_equal_note, and
1172         expand_unop_direct.  Add more commentary.
1173         (expand_ffs): Try both ctz optab and expand_ctz.
1174         Generate a test and branch if the hardware doesn't give us
1175         a useful value for input zero.  Style improvements similar to
1176         expand_ctz.
1177
1178         * config/arm/arm.md (ffssi2, ctzsi2): Delete.
1179
1180 2007-09-03  Zack Weinberg  <zack@codesourcery.com>
1181
1182         * config.gcc: Delete stanza for arm-semi-aof and
1183         armel-semi-aof targets.
1184         * config/arm/arm-protos.h
1185         * config/arm/arm.c
1186         * config/arm/arm.h: Delete all #ifdef AOF_ASSEMBLER blocks;
1187         make all #ifndef AOF_ASSEMBLER blocks unconditional.  Also
1188         delete aof_pic_label and remove mention of AOF in comments.
1189         * config/arm/arm.md: Delete patterns used only for AOF assembly.
1190         * config/arm/aof.h
1191         * config/arm/semiaof.h
1192         * config/arm/t-semi: Delete file.
1193
1194 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1195
1196         * system.h (CONST_CAST2, CONST_CAST_TREE, CONST_CAST_RTX,
1197         CONST_CAST_BB): New macros for type-specific casts.
1198         (CONST_CAST): Add a TYPE parameter and define it in terms of
1199         CONST_CAST2.
1200
1201         * c-decl.c (c_make_fname_decl): Supply a TYPE for CONST_CAST.
1202         * c-lex.c (cb_ident, lex_string): Likewise,
1203         * c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise,
1204         * config/i386/i386.c (ix86_function_regparm,
1205         ix86_function_sseregparm): Use CONST_CAST_TREE.
1206         * config/mmix/mmix.c (mmix_encode_section_info): Supply a TYPE for
1207         CONST_CAST.
1208         * gcc.c (set_spec, read_specs, for_each_path, execute, do_spec_1,
1209         give_switch, set_multilib_dir): Likewise,
1210         * gengtype-parse.c (string_seq, typedef_name): Likewise,
1211         * gimple-low.c (block_may_fallthru): Use CONST_CAST_TREE.
1212         * jump.c (reversed_comparison_code_parts): Use CONST_CAST_RTX.
1213         * passes.c (execute_one_pass): Supply a TYPE for CONST_CAST.
1214         * prefix.c (update_path): Likewise,
1215         * pretty-print.c (pp_base_destroy_prefix): Likewise,
1216         * rtlanal.c (keep_with_call_p): Use CONST_CAST_RTX.
1217         * tree-cfg.c (tree_can_merge_blocks_p,
1218         tree_block_ends_with_condjump_p): Use CONST_CAST_BB.
1219         * tree-eh.c (lookup_stmt_eh_region_fn): USe CONST_CAST_TREE.
1220         * tree.c (build_string): Supply a TYPE for CONST_CAST.
1221         (attribute_list_contained): Use CONST_CAST_TREE.
1222
1223 2007-09-03  Krister Walfridsson  <cato@df.lth.se>
1224
1225         * config/netbsd-elf.h (USE_LD_AS_NEEDED): Define.
1226
1227 2007-09-03  Richard Sandiford  <richard@codesourcery.com>
1228
1229         PR middle-end/33290
1230         * optabs.c (avoid_expensive_constant): Canonicalize CONST_INTs
1231         before forcing them into a register.
1232
1233 2007-09-03  Richard Sandiford  <richard@codesourcery.com>
1234
1235         * config/mips/mips.md (fetchop_bit): Use define_code_iterator
1236         rather than define_code_macro.
1237
1238 2007-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1239
1240         * gcc.c (xputenv): New function.
1241         (putenv_from_prefixes): Use xputenv instead of putenv.
1242         (process_command): Use xputenv instead of putenv.
1243         (set_collect_gcc_options): Use xputenv instead of putenv.
1244         (main): Use xputenv instead of putenv.
1245
1246 2007-09-03  Jesper Nilsson  <jesper.nilsson@axis.com>
1247
1248         * config/cris/cris.h (TARGET_HAS_SWAP): Defined to describe
1249         availability of swap instruction.
1250         * config/cris/cris.md (bswapsi2): Implement using swap instruction.
1251
1252 2007-09-03  Revital Eres  <eres@il.ibm.com>
1253
1254         * doc/invoke.texi (-fmodulo-sched-allow-regmoves): Update
1255         Documentation.
1256
1257 2007-09-03  Vladimir Yanovsky  <yanov@il.ibm.com>
1258             Ayal Zaks  <zaks@il.ibm.com>
1259             Revital Eres  <eres@il.ibm.com>
1260
1261         * modulo-sched.c (ps_insert_empty_row, verify_partial_schedule,
1262         compute_split_row): New functions.
1263         (ps_unschedule_node): Remove.
1264         (normalize_sched_times): Iterate over the already scheduled
1265         insns instead of the number of nodes.
1266         (MAX_SPLIT_NUM): New definition.
1267         (sms_schedule_by_order): Change the scheduling heuristic to
1268         avoid useless increases of initiation interval ii.
1269         (get_sched_window): Add dump printouts.
1270
1271 2007-09-02  David Daney  <ddaney@avtrex.com>
1272
1273         * config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP, UNSPEC_SYNC_OLD_OP,
1274         UNSPEC_SYNC_NEW_OP, UNSPEC_SYNC_EXCHANGE): New define_constants.
1275         (optab, insn): Add more attributes.
1276         (fetchop_bit): New code macro.
1277         (immediate_insn): New code macro attribute.
1278         (sync): Change condition to ISA_HAS_SYNC.
1279         (rdhwr): Change predicate for operand 0 to register_operand.
1280         (memory_barrier): New expand.
1281         (sync_compare_and_swap<mode>, sync_add<mode>, sync_sub<mode>,
1282         sync_old_add<mode>, sync_old_sub<mode>, sync_new_add<mode>,
1283         sync_new_sub<mode>, sync_<optab><mode>, sync_old_<optab><mode>,
1284         sync_new_<optab><mode>, sync_nand<mode>, sync_old_nand<mode>,
1285         sync_new_nand<mode>, sync_lock_test_and_set<mode>): New insns.
1286         * config/mips/mips.h (ISA_HAS_SYNC, ISA_HAS_LL_SC): New ISA predicates.
1287         (MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP, MIPS_SYNC_OLD_OP,
1288         MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND, MIPS_SYNC_OLD_NAND,
1289         MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): New Macros.
1290         
1291 2007-09-03  Jesper Nilsson  <jesper.nilsson@axis.com>
1292             Hans-Peter Nilsson  <hp@axis.com>
1293
1294         * config/cris/cris.h (TARGET_HAS_LZ, CLZ_DEFINED_VALUE_AT_ZERO):
1295         Defined to describe availability and behavior of CLZ.
1296         * config/cris/cris.md (clzsi2): Implement using lz instruction.
1297         * config/cris/cris.opt: Tweak comment for "-metrax4".
1298         * config/cris/arit.c (LZ): When defined, define as __builtin_clz.
1299         * longlong.h [__CRIS__ && __CRIS_arch_version >= 3]
1300         (count_leading_zeros): Define.
1301
1302 2007-09-01  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1303
1304         * ggc-page.c (ggc_pch_read): Call validate_free_objects.
1305
1306 2007-09-02  Joseph Myers  <joseph@codesourcery.com>
1307
1308         PR middle-end/33272
1309         * c-decl.c (grokdeclarator): Apply qualifiers to type of parameter
1310         decayed from array.
1311
1312 2007-09-01  Kazu Hirata  <kazu@codesourcery.com>
1313
1314         * config/arm/arm.c, config/rs6000/ppu_intrinsics.h,
1315         config/spu/spu.c, df-scan.c, fixed-value.c, fold-const.c,
1316         ginclude/tgmath.h, haifa-sched.c, optabs.c, recog.c,
1317         sched-deps.c, sched-int.h, system.h, target.h,
1318         tree-ssa-live.c, tree-vect-transform.c, tree-vectorizer.c,
1319         tree.def: Fix comment typos.
1320
1321 2007-09-01  Kazu Hirata  <kazu@codesourcery.com>
1322
1323         * config/m68k/m68k.c (TARGET_DEFAULT_TARGET_FLAGS): Remove.
1324         (override_options): Turn on -mstrict-align on non-ColdFire
1325         targets.
1326         * config/m68k/m68k.h (BIGGEST_ALIGNMENT): Update a comment.
1327
1328 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1329
1330         * c-common.c (const_strip_array_types): Delete.
1331         * c-common.h (const_strip_array_types): Likewise.
1332         * emit-rtl.c (const_next_insn, const_previous_insn,
1333         const_next_nonnote_insn, const_prev_nonnote_insn,
1334         const_next_real_insn, const_prev_real_insn,
1335         const_next_active_insn, const_prev_active_insn, const_next_label,
1336         const_prev_label): Delete.
1337         * gimple-low.c (block_may_fallthru): Use expr_last.
1338         * jump.c (reversed_comparison_code_parts): Use prev_nonnote_insn.
1339         * rtl.h (const_previous_insn, const_next_insn,
1340         const_prev_nonnote_insn, const_next_nonnote_insn,
1341         const_prev_real_insn, const_next_real_insn,
1342         const_prev_active_insn, const_next_active_insn, const_prev_label,
1343         const_next_label): Delete.
1344         * rtlanal.c (keep_with_call_p): Use next_nonnote_insn.
1345         * system.h (CONST_CAST): Update comment.
1346         * tree-cfg.c (tree_can_merge_blocks_p): Use last_stmt.
1347         (const_first_stmt, const_last_stmt): Delete.
1348         (tree_block_ends_with_condjump_p): Use last_stmt.
1349         * tree-flow.h (const_first_stmt, const_last_stmt): Delete.
1350         * tree-iterator.c (const_expr_first, const_expr_last,
1351         const_expr_only): Delete.
1352         * tree.c (const_lookup_attribute): Likewise.
1353         (attribute_list_contained): Use lookup_attribute.
1354         * tree.h (const_lookup_attribute, const_expr_first,
1355         const_expr_last, const_expr_only): Delete.
1356
1357 2007-09-01  Richard Guenther  <rguenther@suse.de>
1358
1359         * tree-ssa-alias.c (create_name_tags): Use TYPE_VOLATILE
1360         instead of TREE_THIS_VOLATILE.
1361         * tree-ssa-operands.c (add_virtual_operand): Do not set
1362         has_volatile_ops.  Do not check s_ann for NULL.
1363         (get_indirect_ref_operands): Likewise.
1364         (get_expr_operands): Likewise.  For all reference trees
1365         set has_volatile_ops based on TREE_THIS_VOLATILE.  Also
1366         check base of reference for TREE_THIS_VOLATILE.
1367
1368 2007-09-01  Richard Guenther  <rguenther@suse.de>
1369
1370         * tree-cfg.c (verify_gimple_expr): Fix check for conversions
1371         between integral types.  Also allow conversions between
1372         pointer types.
1373
1374 2007-08-31  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1375
1376         * optabs.c (prepare_float_lib_cmp): Use
1377         libgcc_cmp_return_mode instead of word_mode.
1378         * config/dfp-bit.h: Likewise.
1379         * config/fp-bit.h: Likewise.
1380         * config/spu/spu.c (spu_libgcc_cmp_return_mode):
1381         New function.
1382         (spu_libgcc_shift_count_mode): New function.
1383         (TARGET_LIBGCC_CMP_RETURN_MODE): Define.
1384         (TARGET_LIBGCC_SHIFT_COUNT_MODE): Define.
1385
1386 2007-08-31  Joseph Myers  <joseph@codesourcery.com>
1387
1388         * tree-pretty-print.c: Include output.h.
1389         (dump_decl_name, dump_generic_node): Use %wd with pp_printf, not
1390         HOST_WIDE_INT_PRINT_DEC.
1391         * Makefile.in (tree-pretty-print.o): Add dependency on output.h.
1392
1393 2007-08-31  Zdenek Dvorak  <ook@ucw.cz>
1394
1395         PR rtl-optimization/33224
1396         * loop-iv.c (latch_dominating_def): Check that the definition belongs
1397         to the analysed region.
1398
1399 2007-08-31  Richard Guenther  <rguenther@suse.de>
1400
1401         * function.c (allocate_struct_function): Do not set
1402         current_function_returns_pointer.
1403         * function.h (struct var_refs_queue): Remove.
1404         (struct simple_obstack_stack): Likewise.
1405         (struct function): Remove fixup_var_refs_queue member.
1406         Remove returns_pointer flag.
1407         (current_function_returns_pointer): Remove define.
1408
1409 2007-08-31  Nick Clifton  <nickc@redhat.com>
1410
1411         * tree-ssa-coalesce.c (compare_pairs): Use the elements as
1412         secondary keys in order to obtain a stable sort.
1413
1414 2007-08-31  Nick Clifton  <nickc@redhat.com>
1415
1416         PR target/33132
1417         * config/m32r/constraints.md: Add W constraint for integer zero.
1418         * config/m32r/m32r.md (get_pc): Use W and i constraints.
1419         Fix length calculation by using alternatives.
1420
1421 2007-08-31  Richard Sandiford  <richard@codesourcery.com>
1422
1423         * optabs.c (shift_optab_p, commutative_optab_p): New functions,
1424         split out from expand_binop.
1425         (avoid_expensive_constant): New function.
1426         (expand_binop_directly): Remove commutative_op argument and
1427         (expand_binop_directly): Remove commutative_op argument and
1428         call cummutative_optab_p instead.  Do not change op0 or op1
1429         when swapping xop0 and xop1.  Apply avoid_expensive_constant
1430         to each argument after potential swapping.  Enforce the
1431         canonical order of commutative operands.
1432         (expand_binop): Use shift_optab_p and commutative_optab_p.
1433         Update the calls to expand_binop_directly.  Only force constants
1434         into registers when widening an operation.  Only swap operands
1435         once a direct expansion has been rejected.
1436         (expand_twoval_binop): Only force constants into registers when
1437         using a direct expansion.
1438
1439 2007-08-31  Maxim Kuvyrkov  <maxim@codesourcery.com>
1440
1441         * sched-deps.c (update_dep): Mark arguments with ATTRIBUTE_UNUSED.
1442         (sched_analyze_insn): Don't postprocess speculative dependencies when
1443         target has no scheduling.
1444         * tree-vect-transform.c (vect_estimate_min_profitable_iters): Fix
1445         'uninitialized' warning.
1446
1447 2007-08-31  Richard Guenther  <rguenther@suse.de>
1448
1449         * tree.c (build_complex_type): Always set TYPE_NAME for
1450         comples types.
1451
1452 2007-08-31  Olivier Hainque  <hainque@adacore.com>
1453
1454         * config/rs6000/xcoff.h (XCOFF_CSECT_DEFAULT_ALIGNMENT_STR): New
1455         internal macro. Default alignment factor for csect directives, chosen
1456         to match what BIGGEST_ALIGNMENT allows.
1457         (DATA_SECTION_ASM_OP): Use it.
1458         * config/rs6000/rs6000.c
1459         (rs6000_xcoff_output_readonly_section_asm_op):
1460         Use XCOFF_CSECT_DEFAULT_ALIGNMENT_STR.
1461         (rs6000_xcoff_output_readwrite_section_asm_op): Likewise.
1462         
1463 2007-08-31  Olivier Hainque  <hainque@adacore.com>
1464
1465         * dbxout.c (dbxout_block): Move declaration within the first
1466         #if defined (DBX_DEBUGGING_INFO) block.  Rearrange another such
1467         block to include the definition, together with the associated
1468         helpers.
1469
1470 2007-08-31  David Edelsohn  <edelsohn@gnu.org>
1471             Revital Eres  <eres@il.ibm.com>
1472
1473         * doc/invoke.texi (-mpaired): Document flag.
1474         * config.gcc: Include paired.h in powerpc extra_headers and
1475         750cl.h in powerpc-*-linux*paired*.
1476         * config/rs6000/rs6000.opt (-mpaired): New flag.
1477         * config/rs6000/rs6000.c (paired_init_builtins,
1478         paired_expand_builtin, paired_expand_lv_builtin,
1479         paired_expand_stv_builtin, paired_expand_predicate_builtin):
1480         New functions to support the paired single builtin functions.
1481         (rs6000_hard_regno_mode_ok): Handle PAIRED_VECTOR_MODE.
1482         (def_builtin, bdesc_3arg, bdesc_2arg, bdesc_1arg): Add paired
1483         single builtins.
1484         (bdesc_paired_preds): New structure for paired predicate
1485         instructions.
1486         (rs6000_expand_builtin): Expand paired single builtins.
1487         (rs6000_init_builtins): Init paired single builtins.
1488         (rs6000_common_init_builtins): Add v2sf_ftype_v2sf_v2sf_v2sf.
1489         Rename v2sf_ftype_v2sf_v2sf to v2sf_ftype_v2sf_v2sf_spe
1490         and v2sf_ftype_v2sf_spe to v2sf_ftype_v2sf.  Add new types
1491         v2sf_ftype_v2sf_v2sf and v2sf_ftype_v2sf.
1492         (rs6000_vector_mode_supported_p): Support paired vector mode.
1493         * config/rs6000/rs6000.h: (UNITS_PER_PAIRED_WORD,
1494         PAIRED_VECTOR_MODE, PAIRED_SIMD_REGNO_P, TARGET_PAIRED_FLOAT):
1495         New.
1496         (LOCAL_ALIGNMENT): Handle PAIRED_VECTOR_MODE.
1497         (DATA_ALIGNMENT): Likewise.
1498         (UNITS_PER_SIMD_WORD): Handle PAIRED_VECTOR_MODE.
1499         (rs6000_builtins): Add PAIRED builtins.
1500         * config/rs6000/rs6000.md: Include paired.md.
1501         * config/rs6000/paired.h: New.
1502         * config/rs6000/paired.md: New.
1503         * config/rs6000/750cl.h: New.
1504         * config/rs6000/spe.md: Recognize movv2sf instruction for 750cl.
1505
1506 2007-08-30  Ollie Wild  <aaw@google.com>
1507
1508         * c-opts.c (c_common_handle_option): Support -fno-directives-only.
1509         * gcc.c (default_compilers): Add -fno-directives-only to
1510         @assembler-with-cpp.
1511
1512 2007-08-30  Sandra Loosemore  <sandra@codesourcery.com>
1513
1514         PR middle-end/33211
1515
1516         * regclass.c (initial_fixed_regs): Revert previous change and make
1517         it const again.
1518         (initial_call_used_regs): Likewise.
1519         (initial_call_really_used_regs): Delete, reverting previous addition.
1520         (initial_reg_names): Likewise.
1521         (init_reg_sets): Revert previous change.
1522         (saved_fixed_regs): New.
1523         (saved_call_used_regs): New.
1524         (saved_call_really_used_regs): New.
1525         (saved_reg_names): New.
1526         (save_register_info): New.
1527         (restore_register_info): New.
1528         (init_reg_sets_1): Replace reset of register info with call to
1529         restore_register_info.
1530         * rtl.h (save_register_info): Declare.
1531         * toplev.c (backend_init): Call save_register_info.
1532
1533 2007-08-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1534
1535         * tree-ssa-propagate.c (set_rhs): Remove the copied annotation
1536         from the original statement.
1537
1538 2007-08-30  Chao-ying Fu  <fu@mips.com>
1539
1540         * c-lex.c (interpret_fixed): Declare.
1541         (interpret_float): Process _Fract and _Accum.
1542         (interpret_fixed): New function.
1543         * final.c (output_addr_const): Process CONST_FIXED.
1544         * simplify-rtx.c (simplify_const_unary_operation): Handle US_NEG.
1545         (simplify_binary_operation_1): Handle US_ASHIFT, SS_MULT, US_MULT,
1546         SS_DIV, US_DIV.
1547         (simplify_const_binary_operation): Handle SS_MULT, US_MULT, SS_DIV,
1548         US_DIV, US_ASHIFT.
1549         (simplify_immed_subreg): Support CONST_FIXED.
1550         Process MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM.
1551         (simplify_subreg): Support CONST_FIXED.
1552
1553 2007-08-30  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1554
1555         * config/rs6000/ppu_intrinsics.h: New file.
1556         * config.gcc (powerpc*-*-* <extra_headers>): Install
1557         ppu_intrinsics.h.
1558
1559 2007-08-30  Kenneth Zadeck <zadeck@naturalbridge.com>
1560
1561         * cfg.c (dump_flow_info): Change to also print entry and exit
1562         block info.
1563         * print-rtl.c (print_rtl_single): Allow to print rtl with
1564         -fdump-unnumbered.
1565         
1566 2007-08-30  Kenneth Zadeck <zadeck@naturalbridge.com>
1567
1568         * df-core.h (df_dump_region): New function.
1569         * df.h (df_dump_region): New function.
1570         * loop-invariant.c (find_defs): Add call to df_dump_region.
1571         * loop-iv.c (iv_analysis_loop_init): Changed call from df_dump to
1572         df_dump_region.
1573         
1574 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
1575
1576         PR target/33168
1577         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Return
1578         true if any of the compare_section_name calls returned true,
1579         rather than if any returned false.
1580
1581 2007-08-30  Richard Guenther  <rguenther@suse.de>
1582
1583         PR tree-optimization/33199
1584         * tree-ssa-structalias.c (handle_lhs_call): New function.
1585         (find_func_aliases): In non-IPA mode make sure that for
1586         calls that return a pointer we add a constraint for the
1587         result to point to anything.
1588
1589 2007-08-30  Richard Guenther  <rguenther@suse.de>
1590
1591         * doc/invoke.texi (-mveclibabi): Document new target option.
1592         * config/i386/i386.opt (-mveclibabi): New target option.
1593         * config/i386/i386.c (ix86_veclib_handler): Handler for
1594         vectorization library support.
1595         (override_options): Handle the -mveclibabi option, initialize
1596         the vectorization library handler.
1597         (ix86_builtin_vectorized_function): As fallback call the
1598         vectorization library handler, if set.
1599         (ix86_veclibabi_acml): New static function for ACML ABI style
1600         vectorization support.
1601
1602 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
1603
1604         * config/rs6000/rs6000.c (rs6000_emit_sync): For QI or HI mode
1605         used_m, even if it is 32-bit aligned, adjust used_m MEM to have
1606         SImode and update m.  Don't run gen_lowpart_common on arbitrary
1607         memory address, force it to register first.
1608
1609         PR middle-end/32758
1610         * dce.c (dce_process_block): Don't delete setters of
1611         artificially used registers.
1612
1613 2007-08-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1614
1615         * config/s390/s390.md ("*add<mode>3_alc_carry1_cc",
1616         "*add<mode>3_alc_carry1_cconly", "*add<mode>3_alc_carry2_cc",
1617         "*add<mode>3_alc_carry2_cconly"): New insn definitions.
1618
1619 2007-08-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1620
1621         * config/s390/s390.c (s390_expand_addcc): Emit canonical alc
1622         pattern.
1623         * config/s390/s390.md ("*add<mode>3_alc_cc", "*add<mode>3_alc",
1624         "addti3", "*adddi3_31z", "*scond<mode>"): Make alc pattern canonical.
1625
1626 2007-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1627
1628         * system.h: Activate -Wcast-qual as warning-only.
1629
1630 2007-08-29  Paolo Bonzini  <bonzini@gnu.org>
1631
1632         PR target/33168
1633         * config/rs6000/rs6000.c (compare_section_name): New function.
1634         (rs6000_elf_in_small_data_p): Compare section prefixes instead
1635         of full name.
1636
1637 2007-08-29  Olivier Hainque  <hainque@adacore.com>
1638
1639         * xcoffout.c: #include debug.h.
1640         * Makefile.in (xcoffout.o): Add debug.h dependency.
1641
1642 2007-08-29  Uros Bizjak  <ubizjak@gmail.com>
1643
1644         * simplify-rtx.c (simplify_binary_operation_1) [VEC_SELECT]:
1645         Change CONST_VECTOR_ELT to XVECEXP in elem calculation.
1646
1647 2007-08-29  Richard Guenther  <rguenther@suse.de>
1648
1649         * tree-pretty-print.c (dump_generic_node): Print
1650         label DECL_UID as D.%u.
1651         * tree-dfa.c (dump_variable): Print DECL_UID as D.%u.
1652
1653 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1654
1655         * gcc/builtin-types.def (BT_FN_PTR_PTR_SIZE): New type.
1656         * gcc/builtins.def (BUILT_IN_REALLOC): New builtin.
1657
1658 2007-08-29  Douglas Gregor  <doug.gregor@gmail.com>
1659
1660         PR c++/33194
1661         * tree.c (build_type_attribute_qual_variant): Set canonical types
1662         on the final, unqualified attribute variant before building the
1663         qualified version.
1664
1665 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
1666
1667         * config/bfin/bfin.c (bfin_expand_builtin): Fix the argument
1668         order of __builtin_bfin_cmplx_mac and __builtin_bfin_cmplx_msu.
1669
1670 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
1671
1672         Revert
1673         2007-08-29  Jie Zhang  <jie.zhang@analog.com>
1674         * config/bfin/bfin.md (composev2hi): Put operands into vector
1675         with correct order.
1676
1677 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
1678
1679         * config/bfin/bfin.md (composev2hi): Put operands into vector
1680         with correct order.
1681
1682 2007-08-29  Jie Zhang  <jie.zhang@analog.com>
1683
1684         * config/bfin/bfin.c (bfin_expand_call): Inline PLT with l1_text
1685         attribute when appropriate.
1686         (bfin_handle_l1_text_attribute): New.
1687         (bfin_handle_l1_data_attribute): New.
1688         (bfin_attribute_table): Add attributes: l1_text, l1_data,
1689         l1_data_A and l1_data_B.
1690         * doc/extend.texi (node Function Attributes): Document l1_text
1691         function attribute.
1692         (Variable Attributes): Add Blackfin subsection. Document l1_data,
1693         l1_data_A and l1_data_B variable attributes.
1694
1695 2007-08-28  Jie Zhang  <jie.zhang@analog.com>
1696
1697         * config/bfin/bfin.opt (minline-plt): Add.
1698         * config/bfin/bfin.c (bfin_expand_call): Inline PLT when emit
1699         call to global functions.
1700         * doc/invoke.texi (Option Summary): Mention -minline-plt.
1701         (Blackfin Options): Document -minline-plt.
1702
1703 2007-08-28  Nathan Sidwell  <nathan@codesourcery.com>
1704
1705         * config/m68k/m68k.c (m68k_get_function_kind): Assert we're never
1706         given a non-function.
1707         (m68k_ok_for_sibcall_p): Only sibcall functions of the same kind.
1708
1709 2007-08-28  DJ Delorie  <dj@redhat.com>
1710
1711         * config/sh/sh.c (sh_gimplify_va_arg_expr): Fix sh2a support.
1712
1713 2007-08-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1714
1715         * system.h (CONST_CAST): Avoid union for gcc-4.0.x.
1716
1717 2007-08-28  Richard Guenther  <rguenther@suse.de>
1718
1719         * tree.h (struct tree_function_decl): Increase size of
1720         function_code bitfield.
1721
1722 2007-08-28  Nathan Sidwell  <nathan@codesourcery.com>
1723             Kazu Hirata  <kazu@codesourcery.com>
1724
1725         * gcc/config/m68k/linux.h
1726         (M68K_HONOR_TARGET_STRICT_ALIGNMENT): Redefine as 0.
1727         * config/m68k/m68k.c (TARGET_RETURN_IN_MEMORY): New.
1728         (m68k_return_in_memory): New.
1729         * gcc/config/m68k/m68k.h (M68K_HONOR_TARGET_STRICT_ALIGNMENT):
1730         New.
1731
1732 2007-08-28  Uros Bizjak  <ubizjak@gmail.com>
1733
1734         PR target/32661
1735         * simplify-rtx.c (simplify_binary_operation_1) [VEC_SELECT]:
1736         Simplify nested VEC_SELECT (with optional VEC_CONCAT operator as
1737         operand) when top VEC_SELECT extracts scalar element.
1738         * config/i386/sse.md (*vec_extract_v4si_mem): New pattern.
1739         (*vec_extract_v4sf_mem): Ditto.
1740
1741 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
1742
1743         PR middle-end/32370
1744         * passes.c (init_optimization_passes): Move pass_df_finish
1745         after pass_postreload sublist.
1746
1747         PR rtl-optimization/33148
1748         * simplify-rtx.c (simplify_unary_operation_1): Only optimize
1749         (neg (lt X 0)) if X has scalar int mode.
1750
1751         PR debug/32914
1752         * dwarf2out.c (rtl_for_decl_init): If vector decl has CONSTRUCTOR
1753         initializer, use build_vector_from_ctor if possible to create
1754         VECTOR_CST out of it.  If vector initializer is not VECTOR_CST
1755         even after this, return NULL.
1756
1757 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1758
1759         * c-pretty-print.c (pp_c_constant): Handle COMPLEX_CST.
1760
1761 2007-08-28  Richard Guenther  <rguenther@suse.de>
1762
1763         * tree.h (DECL_DISREGARD_INLINE_LIMITS): New.
1764         (struct tree_function_decl): Make function_code a bitfield.
1765         Add disregard_inline_limits flag.
1766         * cgraphunit.c (cgraph_process_new_functions): Check
1767         DECL_DISREGARD_INLINE_LIMITS instead of disregard_inline_limits_p.
1768         (cgraph_preserve_function_body_p): Likewise.
1769         * ipa-inline.c (compute_inline_parameters): Likewise.
1770         * c-decl.c (finish_function): Set DECL_DISREGARD_INLINE_LIMITS
1771         for GNU C extern inline functions.
1772         (merge_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
1773         * tree-inline.c (disregard_inline_limits_p): Remove.
1774         * tree-inline.h (disregard_inline_limits_p): Likewise.
1775         * c-common.c (handle_always_inline_attribute): Set
1776         DECL_DISREGARD_INLINE_LIMITS.
1777         * langhooks.c (add_builtin_function): Verify the function code
1778         fits in the bitfield.
1779
1780 2007-08-28  Mircea Namolaru  <namolaru@il.ibm.com>
1781             Vladimir Yanovsky  <yanov@il.ibm.com>
1782             Revital Eres  <eres@il.ibm.com>
1783             Andrey Belevantsev  <abel@ispras.ru>
1784
1785         * config/spu/spu.md: Recognize doloop pattern when -fmodulo-sched
1786         is set.
1787         * modulo-sched.c: Add documentation regarding do-loop.
1788         (doloop_register_get): Change number of arguments to support
1789         the new do-loop pattern and check whether COUNT_REG has no other
1790         occurences in the loop besides in the control part.
1791         (duplicate_insns_of_cycles): Do not duplicate the insn which
1792         changes count_reg as it is already adjusted.
1793         (generate_prolog_epilog): New argument to support the new
1794         do-loop pattern.  Change the subtract instruction to use
1795         expand_simple_binop.  Call duplicate_insns_of_cycles with new
1796         argument.
1797         (sms_schedule): Call doloop_register_get and
1798         generate_prolog_epilog with new argument.  Do not handle loops
1799         with single sets insns with subreg in their lhs.
1800         * loop-doloop.c (doloop_optimize): Support for another do-loop
1801         pattern.
1802         (doloop_condition_get): Gets an instruction instead of a pattern
1803         and change the return condition when the do-loop pattern is
1804         not parallel.
1805         * ddg.c (create_ddg_dep_from_intra_loop_link): Handle only reg
1806         deps when considering to not create edges.
1807
1808 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
1809
1810         * doc/extend.texi (gnu_inline funtion attribute): Document C++
1811         behavior.
1812
1813 2007-08-27  Jason Merrill  <jason@redhat.com>
1814
1815         PR c++/31337
1816         * gimplify.c (gimplify_modify_expr): Discard the assignment of 
1817         zero-sized types after calling gimplify_modify_expr_rhs.
1818
1819 2007-08-27  Sandra Loosemore  <sandra@codesourcery.com>
1820
1821         * regclass.c (init_reg_autoinc): Fix typo.
1822
1823 2007-08-27  Daniel Berlin  <dberlin@dberlin.org>
1824         
1825         Fix PR tree-optimization/33173
1826         * tree-ssa-alias.c (find_used_portions): Fix reversed test.
1827
1828 2007-08-27  H.J. Lu  <hongjiu.lu@intel.com>
1829
1830         PR target/31385
1831         * config/i386/i386.h (VALID_DFP_MODE_P): New.
1832         * config/i386/i386.c (ix86_hard_regno_mode_ok): Allow DFP in
1833         GPR.
1834
1835 2007-08-27  Sandra Loosemore  <sandra@codesourcery.com>
1836             David Ung  <davidu@mips.com>
1837             Nigel Stephens <nigel@mips.com>
1838
1839         Separate target-specific initialization from general
1840         back-end initialization.
1841
1842         * toplev.c (init_alignments): New, split out from...
1843         (process_options): ...here.
1844         (backend_init_target): New, split out from...
1845         (backend_init): ...here.
1846         (lang_dependent_init_target): New, split out from...
1847         (lang_dependent_init): ...here.
1848         (target_reinit): New.
1849         * toplev.h (target_reinit): Declare.
1850         * expr.c (init_expr_target): Renamed from init_expr_once, since it
1851         now can be called more than once.  Update comments.
1852         * expr.h (init_expr_target): Likewise.
1853         * alias.c (init_alias_target): Renamed from init_alias_once, since it
1854         now can be called more than once.  Explicitly zero
1855         static_reg_base_value.
1856         * emit-rtl.c (init_emit_regs): New, split out from...
1857         (init_emit_once): Here.
1858         * regclass.c (initial_fixed_regs, initial_call_used_regs): Make
1859         non-const, so that changes from command-line arguments can overwrite
1860         values provided by the static initializers.
1861         (initial_call_really_used_regs): New, used similarly to the above.
1862         (initial_reg_names): Likewise.
1863         (last_mode_for_init_move_cost): Promoted function-local static to
1864         file-scope static to make it accessible outside init_move_cost.
1865         (init_reg_sets): Do not initialize fixed_regs and call_used_regs yet.
1866         Do not initialize inv_reg_alloc_order yet, either.  Do initialize
1867         reg_names since it is needed for parsing command-line options.
1868         (init_move_cost): Use last_mode_for_init_move_cost instead of
1869         function-local static.
1870         (init_reg_sets_1): Initialize fixed_regs, call_used_regs, and
1871         call_really_used_regs now.  Reinitialize reg_names.  Also
1872         initialize inv_reg_alloc_order.  Zero reg_class_subunion and
1873         reg_class_superunion.  Clear losing_caller_save_reg_set.
1874         Preserve global registers if called more than once.  Reset
1875         move cost, may_move_in_cost, may_move_out_cost, and
1876         last_mode_for_init_move_cost.
1877         (init_reg_modes_target): Renamed from init_reg_modes_once, since it
1878         can now be invoked more than once.  Update comments.
1879         (init_regs): Update comments.
1880         (fix_register): Update initial_fixed_regs, initial_call_used_regs,
1881         and initial_call_really_used_regs, instead of the non-initial 
1882         variables.  This allows us to save the command-line register settings
1883         after target reinitialization.
1884         (init_reg_autoinc): Zero forbidden_inc_dec_classes.
1885         * rtl.h (init_emit_regs): Declare.
1886         (init_reg_modes_target, init_alias_target): Renamed as described
1887         above.
1888         * reload1.c (init_reload): Update comments.
1889         * optabs.c (init_optabs): Likewise.
1890         * cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs.
1891         
1892 2007-08-26  Chao-ying Fu  <fu@mips.com>
1893
1894         * rtl.h (XCNMPFV): Preserve const-ness of parameters through use of
1895         __typeof().
1896
1897 2007-08-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1898
1899         * alias.c (memory_modified_1, memory_modified_in_insn_p):
1900         Constify.
1901         * basic-block.h (tree_predicted_by_p, rtl_predicted_by_p):
1902         Likewise.
1903         * bb-reorder.c (copy_bb_p): Likewise.
1904         * cfghooks.c (can_remove_branch_p, can_merge_blocks_p,
1905         predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
1906         block_ends_with_condjump_p): Likewise.
1907         * cfghooks.h (can_remove_branch_p, can_merge_blocks_p,
1908         predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
1909         block_ends_with_condjump_p): Likewise.
1910         * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise.
1911         * cfgrtl.c (can_delete_note_p, can_delete_label_p,
1912         rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p,
1913         rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p,
1914         need_fake_edge_p, rtl_can_remove_branch_p): Likewise.
1915         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use
1916         debug_true_const_tree instad of debug_true_tree.
1917         * debug.c (do_nothing_debug_hooks): Likewise.
1918         * debug.h (ignore_block, debug_true_const_tree): Constify.
1919         * dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save,
1920         dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type,
1921         decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc,
1922         same_dw_val_p, add_ranges, is_subrange_type, type_is_enum,
1923         dbx_reg_number, is_based_loc, field_type,
1924         simple_type_align_in_bits, simple_decl_align_in_bits,
1925         simple_type_size_in_bits, field_byte_offset, insert_float,
1926         type_tag, member_declared_type, is_redundant_typedef,
1927         secname_for_decl, is_inlined_entry_point): Likewise.
1928         * emit-rtl.c (const_next_insn, const_previous_insn,
1929         const_next_nonnote_insn, const_prev_nonnote_insn,
1930         const_next_real_insn, const_prev_real_insn,
1931         const_next_active_insn, const_prev_active_insn, const_next_label,
1932         const_prev_label): Likewise.
1933         * except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region):
1934         Likewise.
1935         * haifa-sched.c (may_trap_exp, haifa_classify_insn,
1936         find_set_reg_weight, no_real_insns_p, find_set_reg_weight,
1937         sched_insn_is_legitimate_for_speculation_p): Likewise.
1938         * jump.c (reversed_comparison_code_parts,
1939         reversed_comparison_code, reversed_comparison, condjump_label):
1940         Likewise.
1941         * predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise.
1942         * reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned):
1943         Likewise.
1944         * rtl.h (const_previous_insn, const_next_insn,
1945         const_prev_nonnote_insn, const_next_nonnote_insn,
1946         const_prev_real_insn, const_next_real_insn,
1947         const_prev_active_insn, const_next_active_insn, const_prev_label,
1948         const_next_label, modified_between_p, modified_in_p,
1949         const_note_storeskeep_with_call_p, condjump_label,
1950         reversed_comparison, reversed_comparison_code,
1951         reversed_comparison_code_parts, memory_modified_in_insn_p,
1952         stack_regs_mentioned): Likewise.
1953         * rtlanal.c (modified_between_p, modified_in_p, const_note_stores,
1954         keep_with_call_p): Likewise.
1955         * sched-deps.c (deps_may_trap_p, sched_get_condition,
1956         conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list,
1957         sd_lists_size, sd_lists_empty_p): Likewise.
1958         * sched-int.h (sched_insns_conditions_mutex_p,
1959         haifa_classify_insn, no_real_insns_p,
1960         sched_insn_is_legitimate_for_speculation_p, sd_next_list,
1961         sd_lists_size, sd_lists_empty_p): Likewise.
1962         * sdbout.c (sdb_debug_hooks): Likewise.
1963         * tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt,
1964         stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p,
1965         -tree_block_ends_with_call_p, tree_block_ends_with_condjump_p):
1966         Likewise.
1967         * tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region,
1968         tree_can_throw_internal): Likewise.
1969         * tree-flow-inline.h (phi_nodes): Likewise.
1970         * tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt,
1971         tree_can_throw_internal, lookup_stmt_eh_region): Likewise.
1972         * tree-gimple.c (const_get_call_expr_in): Likewise.
1973         * tree-gimple.h (const_get_call_expr_in): Likewise.
1974         * tree.c (const_lookup_attribute, attribute_list_equal,
1975         attribute_list_contained): Likewise.
1976         * tree.h (attribute_list_equal, attribute_list_contained,
1977         const_lookup_attribute): Likewise.
1978         * vmsdbgout.c (vmsdbgout_ignore_block): Likewise.
1979
1980 2007-08-26  Bernhard Fischer  <aldot@gcc.gnu.org>
1981
1982         * tree-ssa-sccvn.c, tree-ssa-sccvn.h, tree-vn.c,
1983         tree-ssa-pre.c: Remove unnecessary trailing whitespace.
1984
1985 2007-08-26  H.J. Lu  <hongjiu.lu@intel.com>
1986
1987         PR target/32991
1988         * config/alpha/constraints.md: Delete "svn:mime-type" property
1989         with svn propdel "svn:mime-type".
1990
1991 2007-08-26  H.J. Lu  <hongjiu.lu@intel.com>
1992
1993         PR middle-end/33181
1994         * ifcvt.c (noce_get_alt_condition): Make sure that the previous
1995         non NOTE insn doesn't cross basic block.
1996         (noce_try_abs): Likewise.
1997         (noce_process_if_block): Likewise.
1998
1999 2007-08-26  David Edelsohn  <edelsohn@gnu.org>
2000
2001         PR target/33151
2002         * config/rs6000/predicates.md (offsettable_mem_operand): Memory
2003         operand without auto-inc-dec.
2004         * config/rs6000/rs6000.md (floatsidf2_internal): Use
2005         offsettable_mem_operand.
2006         (floatunssidf2_internal): Same.
2007         (fix_truncdfsi2_internal): Same.
2008         (floatsidf_ppc64): Same.
2009         (floatunssidf_ppc64): Same.
2010         (fix_trunctfsi2_internal): Same.
2011
2012 2007-08-26  Bernhard Fischer  <aldot@gcc.gnu.org>
2013
2014         PR bootstrap/30620
2015         * Makefile.in (libbackend.o): Add gcov-iov.h dependency and
2016         pass defines needed for version.c.
2017
2018 2007-08-25  Joseph Myers  <joseph@codesourcery.com>
2019
2020         * configure.ac (--debug-prefix-map check): Change assembler
2021         version presumed to have feature to 2.18.
2022         * configure: Regenerate.
2023
2024 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2025
2026         * c-common.c (vector_types_convertible_p,
2027         decl_with_nonnull_addr_p, c_promoting_integer_type_p,
2028         self_promoting_args_p): Constify.
2029         * c-common.h (has_c_linkage, decl_with_nonnull_addr_p,
2030         c_promoting_integer_type_p, self_promoting_args_p,
2031         anon_aggr_type_p, vector_types_convertible_p): Likewise.
2032         * c-decl.c (anon_aggr_type_p): Likewise.
2033         * * c-dump.c (dump_stmt): Likewise.
2034         * c-objc-common.c (has_c_linkage): Likewise.
2035         * c-tree.h (same_translation_unit_p): Likewise.
2036         * c-typeck.c (null_pointer_constant_p,
2037         tagged_types_tu_compatible_p, function_types_compatible_p,
2038         type_lists_compatible_p, lvalue_or_else, lvalue_p,
2039         comptypes_internal, struct tagged_tu_seen_cache,
2040         same_translation_unit_p, alloc_tagged_tu_seen_cache,
2041         c_size_in_bytes): Likewise.
2042         * ggc-common.c (compare_ptr_data, hash_descriptor, eq_descriptor,
2043         hash_ptr, eq_ptr): Likewise.
2044         * langhooks-def.h (lhd_decl_ok_for_sibcall,
2045         LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Likewise.
2046         * langhooks.c (lhd_decl_ok_for_sibcall): Likewise.
2047         * langhooks.h (ok_for_sibcall, omp_privatize_by_reference):
2048         Likewise.
2049         * optabs.c (optab_for_tree_code): Likewise.
2050         * optabs.h (optab_for_tree_code): Likewise.
2051         * rtl.h (simplify_rtx): Likewise.
2052         * simplify-rtx.c (simplify_rtx): Likewise.
2053         * tree-dump.c (queue, queue_and_dump_index, queue_and_dump_type,
2054         dump_flag, dump_node): Likewise.
2055         * tree-dump.h (struct dump_info, dump_stmt, queue_and_dump_index,
2056         queue_and_dump_type, dump_flag): Likewise.
2057         * tree-flow.h (vect_can_force_dr_alignment_p): Likewise.
2058         * tree-pass.h (dump_node): Likewise.
2059         * tree-vectorizer.c (vect_can_force_dr_alignment_p,
2060         supportable_narrowing_operation): Likewise.
2061         * tree-vectorizer.h (vect_can_force_dr_alignment_p,
2062         supportable_narrowing_operation): Likewise.
2063         * tree-vrp.c (needs_overflow_infinity, supports_overflow_infinity,
2064         is_negative_overflow_infinity, is_positive_overflow_infinity,
2065         is_overflow_infinity, vrp_val_is_max, vrp_val_is_min,
2066         nonnull_arg_p, get_value_range, vrp_operand_equal_p,
2067         update_value_range, add_equivalence, ssa_name_nonnegative_p,
2068         ssa_name_nonzero_p, fp_predicate): Likewise.
2069         * tree.c (auto_var_in_fn_p, empty_body_p): Likewise.
2070         * tree.h (empty_body_p, auto_var_in_fn_p, ssa_name_nonzero_p,
2071         ssa_name_nonnegative_p): Likewise.
2072
2073 2007-08-25  Hans Kester  <hans.kester@ellips.nl>
2074
2075         * config.gcc : Add x86_64-elf target.
2076
2077 2007-08-25  Jakub Jelinek  <jakub@redhat.com>
2078
2079         * expr.c (store_expr): Fix order of store_by_pieces arguments.
2080
2081 2007-08-24  Sandra Loosemore  <sandra@codesourcery.com>
2082             Nigel Stephens <nigel@mips.com>
2083
2084         PR target/11787
2085
2086         * doc/tm.texi (SET_RATIO, SET_BY_PIECES_P): Document new macros.
2087         (STORE_BY_PIECES_P): No longer applies to __builtin_memset.
2088         * expr.c (SET_BY_PIECES_P): Define.
2089         (can_store_by_pieces, store_by_pieces): Add MEMSETP argument; use
2090         it to decide whether to use SET_BY_PIECES_P or STORE_BY_PIECES_P.
2091         (store_expr): Pass MEMSETP argument to can_store_by_pieces and
2092         store_by_pieces.
2093         * expr.h (SET_RATIO): Define.
2094         (can_store_by_pieces, store_by_pieces): Update prototypes.
2095         * builtins.c (expand_builtin_memcpy): Pass MEMSETP argument to
2096         can_store_by_pieces/store_by_pieces.
2097         (expand_builtin_memcpy_args): Likewise.
2098         (expand_builtin_strncpy): Likewise.
2099         (expand_builtin_memset_args): Likewise.  Also remove special case
2100         for optimize_size so that can_store_by_pieces/SET_BY_PIECES_P can
2101         decide what to do instead.
2102         * value-prof.c (tree_stringops_transform): Pass MEMSETP argument
2103         to can_store_by_pieces.
2104
2105         * config/sh/sh.h (SET_BY_PIECES_P): Clone from STORE_BY_PIECES_P.
2106         * config/s390/s390.h (SET_BY_PIECES_P): Likewise.
2107
2108         * config/mips/mips.opt (mmemcpy): Change from Var to Mask.
2109         * config/mips/mips.c (override_options): Make -Os default to -mmemcpy.
2110         * config/mips/mips.h (MIPS_CALL_RATIO): Define.
2111         (MOVE_RATIO, CLEAR_RATIO, SET_RATIO): Define.
2112         (STORE_BY_PIECES_P): Define.
2113
2114 2007-08-24  Tom Tromey  <tromey@redhat.com>
2115
2116         * varpool.c (varpool_last_needed_node): Fix comment typo.
2117         * c-decl.c (duplicate_decls): Fix comment typo.
2118         (clone_underlying_type): Update comment.
2119
2120 2007-08-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2121
2122         * config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp,
2123         alpha_in_small_data_p, alpha_split_complex_arg,
2124         alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
2125         Constify.
2126         * config/arm/arm-protos.h (arm_mangle_type): Likewise.
2127         * config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type):
2128         Likewise.
2129         * config/bfin/bfin.c (funkind, bfin_comp_type_attributes,
2130         TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
2131         * config/darwin-protos.h (darwin_binds_local_p): Likewise.
2132         * config/darwin.c (darwin_binds_local_p): Likewise.
2133         * config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p):
2134         Likewise.
2135         * config/i386/i386-protos.h (i386_pe_binds_local_p,
2136         i386_pe_valid_dllimport_attribute_p): Likewise.
2137         * config/i386/i386.c (ix86_function_regparm,
2138         ix86_comp_type_attributes, ix86_ms_bitfield_layout_p,
2139         x86_can_output_mi_thunk, ix86_mangle_type,
2140         TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise.
2141         * config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p,
2142         i386_pe_binds_local_p): Likewise.
2143         * config/ia64/ia64.c
2144         (ia64_first_cycle_multipass_dfa_lookahead_guard_spec,
2145         ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type,
2146         ia64_invalid_conversion, ia64_invalid_unary_op,
2147         ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
2148         Likewise.
2149         * config/m32c/m32c.c (m32c_comp_type_attributes): Likewise.
2150         * config/m32r/m32r.c (m32r_in_small_data_p): Likewise.
2151         * config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
2152         * config/mips/mips.c (mips_use_blocks_for_constant_p,
2153         mips_in_small_data_p, mips_use_anchors_for_symbol_p,
2154         mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
2155         mips_near_type_p, mips_far_type_p, mips_global_symbol_p,
2156         mips_symbol_binds_local_p, mips_classify_symbol): Likewise.
2157         * config/pa/pa.c (pa_commutative_p): Likewise.
2158         * config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p):
2159         Likewise.
2160         * config/rs6000/rs6000.c (rs6000_invalid_within_doloop,
2161         rs6000_ms_bitfield_layout_p, rs6000_mangle_type,
2162         rs6000_use_blocks_for_constant_p,
2163         rs6000_vector_alignment_reachable, rs6000_is_opaque_type,
2164         invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
2165         TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise.
2166         * config/s390/s390.c (s390_mangle_type,
2167         TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP):
2168         Likewise.
2169         * config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
2170         th_in_small_data_p): Likewise.
2171         * config/sh/sh.c (sh_ms_bitfield_layout_p,
2172         sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
2173         Likewise.
2174         * config/sparc/sparc.c (sparc_can_output_mi_thunk,
2175         sparc_mangle_type): Likewise.
2176         * config/spu/spu.c (spu_vector_alignment_reachable): Likewise.
2177         * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise.
2178         * emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq):
2179         Likewise.
2180         * hooks.c (hook_bool_mode_const_rtx_false,
2181         hook_bool_mode_const_rtx_true,
2182         hook_bool_const_tree_hwi_hwi_const_tree_false,
2183         hook_bool_const_tree_hwi_hwi_const_tree_true,
2184         hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
2185         hook_constcharptr_const_tree_null,
2186         hook_constcharptr_const_rtx_null,
2187         hook_constcharptr_const_tree_const_tree_null,
2188         hook_constcharptr_int_const_tree_null,
2189         hook_constcharptr_int_const_tree_const_tree_null): New.
2190         (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
2191         hook_bool_tree_hwi_hwi_tree_false,
2192         hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
2193         hook_int_tree_tree_1, hook_constcharptr_tree_null,
2194         hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
2195         hook_constcharptr_int_tree_null,
2196         hook_constcharptr_int_tree_tree_null): Delete.
2197         (default_can_output_mi_thunk_no_vcall): Constify.
2198         * hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
2199         hook_bool_tree_hwi_hwi_tree_false,
2200         hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
2201         hook_int_tree_tree_1, hook_constcharptr_tree_null,
2202         hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
2203         hook_constcharptr_int_tree_null,
2204         hook_constcharptr_int_tree_tree_null): Delete.
2205         (hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true,
2206         hook_bool_const_tree_hwi_hwi_const_tree_false,
2207         hook_bool_const_tree_hwi_hwi_const_tree_true,
2208         hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
2209         hook_constcharptr_const_tree_null,
2210         hook_constcharptr_const_rtx_null,
2211         hook_constcharptr_const_tree_const_tree_null,
2212         hook_constcharptr_int_const_tree_null,
2213         hook_constcharptr_int_const_tree_const_tree_null): New.
2214         (default_can_output_mi_thunk_no_vcall): Constify.
2215         * integrate.c (function_attribute_inlinable_p): Likewise.
2216         * integrate.h (function_attribute_inlinable_p): Likewise.
2217         * jump.c (rtx_renumbered_equal_p): Likewise.
2218         * output.h (decl_readonly_section, categorize_decl_for_section,
2219         default_use_anchors_for_symbol_p, default_binds_local_p,
2220         default_binds_local_p_1): Likewise.
2221         * rtl.h (rtx_renumbered_equal_p, decl_default_tls_model):
2222         Likewise.
2223         * target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
2224         TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P,
2225         TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P,
2226         TARGET_COMP_TYPE_ATTRIBUTES,
2227         TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P,
2228         TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE,
2229         TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION,
2230         TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP,
2231         TARGET_DWARF_CALLING_CONVENTION): Likewise.
2232         * target.h (can_output_mi_thunk, needs_block_p,
2233         first_cycle_multipass_dfa_lookahead_guard_spec,
2234         vector_alignment_reachable, comp_type_attributes,
2235         function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type,
2236         commutative_p, use_blocks_for_constant_p,
2237         use_anchors_for_symbol_p, in_small_data_p, binds_local_p,
2238         vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook,
2239         invalid_within_doloop, valid_dllimport_attribute_p,
2240         split_complex_arg, invalid_arg_for_unprototyped_fn,
2241         invalid_conversion, invalid_unary_op, invalid_binary_op):
2242         Likewise.
2243         * targhooks.c (default_invalid_within_doloop,
2244         hook_invalid_arg_for_unprototyped_fn,
2245         default_builtin_vector_alignment_reachable): Likewise.
2246         (hook_bool_rtx_commutative_p): Delete.
2247         (hook_bool_const_rtx_commutative_p): New.
2248         * targhooks.h (default_invalid_within_doloop,
2249         default_builtin_vector_alignment_reachable,
2250         hook_invalid_arg_for_unprototyped_fn): Constify.
2251         (hook_bool_rtx_commutative_p): Delete.
2252         (hook_bool_const_rtx_commutative_p): New.
2253         * varasm.c (bss_initializer_p, decl_default_tls_model,
2254         categorize_decl_for_section, decl_readonly_section,
2255         default_use_anchors_for_symbol_p, default_binds_local_p,
2256         default_binds_local_p_1): Constify.
2257
2258 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
2259
2260         * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define
2261         __NO_BUILTIN if -fno-builtin.
2262
2263 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
2264
2265         * config/bfin/bfin.c (print_operand): Report error instead of
2266         ICE for wrong operand.
2267
2268 2007-08-24  Michael Matz  <matz@suse.de>
2269
2270         * Makefile.in (GTFILES_H): Use $(patsubst) instead of $(subst).
2271
2272 2007-08-24  Richard Guenther  <rguenther@suse.de>
2273
2274         PR middle-end/33166
2275         * tree-ssa.c (useless_type_conversion_p): Split into a
2276         recursive and a non-recursive part.
2277         (useless_type_conversion_p_1): New function.
2278         * tree-ssa-ccp.c (fold_stmt_r): Make sure that the result
2279         from maybe_fold_offset_to_reference is trivially convertible
2280         to the desired type before doing the simplification.
2281
2282 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
2283
2284         * expr.c (store_expr): Optimize initialization of an array
2285         with STRING_CST.
2286         * expr.h (builtin_strncpy_read_str): New prototype.
2287         * builtins.c (builtin_strncpy_read_str): Remove prototype.
2288         No longer static.
2289
2290 2007-08-24  Uros Bizjak  <ubizjak@gmail.com>
2291
2292         PR middle-end/33157
2293         * ifcvt.c (noce_find_if_block): Do not clear if_info.cond_earliest
2294         field when initializing if_info structure.
2295
2296 2007-08-24  Richard Guenther  <rguenther@suse.de>
2297
2298         * Makefile.in (tree-inline.o): Add $(TARGET_H) and $(INTEGRATE_H)
2299         dependencies.
2300         * c-objc-common.c (c_cannot_inline_tree_fn): Remove.
2301         * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Likewise.
2302         * tree-inline.c (inlinable_function_p): Fold in common parts of
2303         the cannot_inline_tree_fn langhook.
2304         * langhooks-def.h (lhd_tree_inlining_cannot_inline_tree_fn): Remove.
2305         (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN): Likewise.
2306         (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove initializer for
2307         cannot_inline_tree_fn langhook.
2308         * langhooks.h (struct lang_hooks_for_tree_inlining): Remove
2309         cannot_inline_tree_fn member.
2310
2311 2007-08-24  Richard Guenther  <rguenther@suse.de>
2312
2313         * expr.c (get_inner_reference): Do computation of bitoffset
2314         from offset in a way we can detect overflow reliably.
2315
2316 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
2317
2318         * crtstuff.c (USE_PT_GNU_EH_FRAME): Don't define for uClibc.
2319
2320 2007-08-24  Jie Zhang  <jie.zhang@analog.com>
2321
2322         * config/bfin/bfin.opt (mfast-fp): Add.
2323         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Let
2324         libbffastfp override libgcc if -mfast-fp.
2325         * config/bfin/bfin.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
2326         * doc/invoke.texi (Option Summary): Mention -mfast-fp.
2327         (Blackfin Options): Document -mfast-fp.
2328
2329 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
2330
2331         PR tree-optimization/32573
2332         PR middle-end/32946
2333         * tree-data-ref.c (initialize_data_dependence_relation): Clear
2334         DDR_SUBSCRIPTS, DDR_DIR_VECTS and DDR_DIST_VECTS at the beginning.
2335         (finalize_ddr_dependent): Clear DDR_SUBSCRIPTS after freeing it.
2336         (build_classic_dist_vector): Return false rather than true if
2337         DDR_ARE_DEPENDENT is non-NULL at the beginning.  Return false
2338         if either subscript_dependence_tester_1 or build_classic_dist_vector_1
2339         returned false.  Don't call save_dist_v before calling
2340         build_classic_dist_vector_1.
2341         (free_dependence_relation): Don't guard freeing DDR_SUBSCRIPTS
2342         with NULL DDR_ARE_DEPENDENT.  Also free DDR_DIST_VECTS and/or
2343         DDR_DIR_VECTS vectors.
2344
2345 2007-08-23  Brian Sidebotham  <brian.sidebotham@gmail.com>
2346
2347         * configure.ac (leb128): Modify sed statement to work with any
2348         binutils version string.
2349         * configure: Regenerate
2350
2351 2007-08-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2352
2353         * config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg):
2354         Wrap in RTX_CODE macro guard.
2355         * config/arm/pe.c (arm_dllexport_p, arm_dllimport_p,
2356         arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport,
2357         arm_mark_dllimport, arm_pe_encode_section_info,
2358         arm_pe_unique_section): Use ISO-C function declarations.
2359         * config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION,
2360         c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE,
2361         c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored):
2362         Likewise.
2363         * config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning.
2364         * config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before
2365         defining.
2366         * config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format
2367         warnings.
2368         * config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise.
2369         * config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise.
2370         (register_move_cost): Use ISO-C function declarations.
2371         * config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings.
2372         * config/score/score-protos.h (score_declare_object): Add
2373         ATTRIBUTE_PRINTF_4.
2374         * config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format
2375         warnings.
2376         * final.c (profile_function): Avoid empty if-bodies.
2377         
2378         
2379         * calls.c (must_pass_in_stack_var_size,
2380         must_pass_in_stack_var_size_or_pad): Constify.
2381         * config/alpha/alpha-protos.h (function_value): Likewise.
2382         * config/alpha/alpha.c (alpha_return_in_memory,
2383         alpha_pass_by_reference, function_value,
2384         unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS,
2385         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
2386         Likewise.
2387         * config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference,
2388         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
2389         TARGET_PROMOTE_PROTOTYPES): Likewise.
2390         * config/arm/arm-protos.h (arm_return_in_memory,
2391         arm_pad_arg_upward, arm_function_value): Likewise.
2392         * config/arm/arm.c (arm_pass_by_reference,
2393         arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack,
2394         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
2395         arm_function_value, arm_return_in_memory, arm_pad_arg_upward):
2396         Likewise.
2397         * config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise.
2398         * config/avr/avr-protos.h (avr_function_value): Likewise.
2399         * config/avr/avr.c (avr_return_in_memory,
2400         gas_output_limited_string, gas_output_ascii, avr_function_value,
2401         avr_return_in_memory): Likewise.
2402         * config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise.
2403         * config/bfin/bfin.c (bfin_pass_by_reference,
2404         bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES,
2405         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN):
2406         Likewise.
2407         * config/cris/cris.c (cris_pass_by_reference,
2408         TARGET_PROMOTE_FUNCTION_ARGS): Likewise.
2409         * config/crx/crx.c (crx_return_in_memory): Likewise.
2410         * config/darwin.c (function_base, machopic_function_base_name):
2411         Likewise.
2412         * config/fr30/fr30.c (fr30_must_pass_in_stack,
2413         TARGET_PROMOTE_PROTOTYPES): Likewise.
2414         * config/frv/frv.c (frv_must_pass_in_stack): Likewise.
2415         * config/h8300/h8300.c (h8300_return_in_memory): Likewise.
2416         * config/i386/i386-protos.h (ix86_return_in_memory,
2417         ix86_sol10_return_in_memory): Likewise.
2418         * config/i386/i386.c (ix86_function_value,
2419         ix86_function_sseregparm, ix86_must_pass_in_stack,
2420         type_natural_mode, classify_argument, examine_argument,
2421         construct_container, ix86_pass_by_reference, function_value_32,
2422         function_value_64, ix86_function_value_1, return_in_memory_32,
2423         return_in_memory_64, return_in_memory_ms_64,
2424         ix86_return_in_memory, ix86_sol10_return_in_memory,
2425         TARGET_PROMOTE_PROTOTYPES): Likewise.
2426         * config/ia64/ia64-protos.h (ia64_function_value,
2427         ia64_hpux_function_arg_padding): Likewise.
2428         * config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory,
2429         ia64_function_value, bundle_state_hash, bundle_state_eq_p,
2430         ia64_hpux_function_arg_padding): Likewise.
2431         * config/iq2000/iq2000-protos.h (function_arg,
2432         iq2000_function_value): Likewise.
2433         * config/iq2000/iq2000.c (iq2000_return_in_memory,
2434         iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS,
2435         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
2436         function_arg, iq2000_function_value): Likewise.
2437         * config/m32c/m32c-protos.h (m32c_function_value,
2438         m32c_promote_function_return): Likewise.
2439         * config/m32c/m32c.c (m32c_pass_by_reference,
2440         m32c_promote_prototypes, m32c_promote_function_return,
2441         m32c_function_value): Likewise.
2442         * config/m32r/m32r.c (m32r_return_in_memory,
2443         m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
2444         m32r_in_small_data_p): Likewise.
2445         * config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding):
2446         Likewise.
2447         * config/m68hc11/m68hc11.c (m68hc11_return_in_memory,
2448         m68hc11_function_arg_padding): Likewise.
2449         * config/m68k/m68k-protos.h (m68k_function_value): Likewise.
2450         * config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES,
2451         m68k_function_value): Likewise.
2452         * config/mcore/mcore-protos.h (mcore_num_arg_regs,
2453         mcore_function_value): Likewise.
2454         * config/mcore/mcore.c (handle_structs_in_regs,
2455         mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
2456         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
2457         mcore_num_arg_regs, mcore_function_value): Likewise.
2458         * config/mips/mips-protos.h (mips_pad_arg_upward,
2459         mips_function_value): Likewise.
2460         * config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb,
2461         mips_return_in_memory, mips_pass_by_reference, mips_callee_copies,
2462         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
2463         TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward,
2464         mips_function_value): Likewise.
2465         * config/mmix/mmix-protos.h (mmix_function_outgoing_value):
2466         Likewise.
2467         * config/mmix/mmix.c (mmix_pass_by_reference,
2468         TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value,
2469         mmix_encode_section_info): Likewise.
2470         * config/mn10300/mn10300-protos.h (mn10300_function_value):
2471         Likewise.
2472         * config/mn10300/mn10300.c (mn10300_return_in_memory,
2473         mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
2474         mn10300_function_value): Likewise.
2475         * config/mt/mt-protos.h (mt_function_value): Likewise.
2476         * config/mt/mt.c (mt_pass_by_reference, mt_function_value,
2477         mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise.
2478         * config/pa/pa-protos.h (function_arg_padding, function_value,
2479         pa_return_in_memory): Likewise.
2480         * config/pa/pa.c (pa_pass_by_reference,
2481         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
2482         function_arg_padding, function_value, pa_return_in_memory):
2483         Likewise.
2484         * config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise.
2485         * config/rs6000/rs6000-protos.h (rs6000_function_value,
2486         function_arg_padding): Likewise.
2487         * config/rs6000/rs6000.c (rs6000_return_in_memory,
2488         rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
2489         rs6000_pass_by_reference, rs6000_must_pass_in_stack,
2490         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
2491         function_arg_padding, altivec_expand_dst_builtin,
2492         altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins,
2493         altivec_init_builtins, rs6000_common_init_builtins,
2494         rs6000_function_value): Likewise.
2495         * s390/s390-protos.h (s390_function_value): Likewise.
2496         * config/s390/s390.c (s390_function_arg_size,
2497         s390_pass_by_reference, s390_return_in_memory,
2498         s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
2499         TARGET_PROMOTE_FUNCTION_RETURN): Likewise.
2500         * config/score/score-protos.h (score_function_value): Likewise.
2501         * config/score/score.c (score_arg_partial_bytes,
2502         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
2503         TARGET_PROMOTE_PROTOTYPES, score_return_in_memory,
2504         score_pass_by_reference, score_add_offset, score_function_value):
2505         Likewise.
2506         * config/sh/sh-protos.h (sh_attr_renesas_p,
2507         sh_promote_prototypes): Likewise.
2508         * config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference,
2509         sh_callee_copies, sh_promote_prototypes, shcompact_byref,
2510         sh_attr_renesas_p): Likewise.
2511         * config/sparc/sparc-protos.h (function_value,
2512         function_arg_padding): Likewise.
2513         * config/sparc/sparc.c (sparc_promote_prototypes,
2514         sparc_return_in_memory, sparc_pass_by_reference,
2515         TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
2516         function_arg_record_value_2, function_arg_record_value_1,
2517         function_arg_record_value, function_arg_record_value,
2518         function_arg_padding, function_value): Likewise.
2519         * config/spu/spu-protos.h (spu_function_value): Likewise.
2520         * config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory,
2521         spu_function_value): Likewise.
2522         * config/stormy16/stormy16-protos.h (xstormy16_function_value):
2523         Likewise.
2524         * config/stormy16/stormy16.c (xstormy16_return_in_memory,
2525         xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
2526         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
2527         Likewise.
2528         * config/v850/v850.c (v850_return_in_memory,
2529         v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise.
2530         * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise.
2531         * config/xtensa/xtensa.c (xtensa_return_in_msb,
2532         xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
2533         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
2534         Likewise.
2535         * explow.c (promote_mode, hard_function_value): Likewise.
2536         * expr.h (hard_function_value, promote_mode): Likewise.
2537         * function.c (aggregate_value_p): Likewise.
2538         * hooks.c (hook_bool_const_tree_true): New.
2539         * hooks.h (hook_bool_const_tree_true): New.
2540         * sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify.
2541         * target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
2542         TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
2543         TARGET_RETURN_IN_MSB): Likewise.
2544         * target.h (promote_function_args, promote_function_return,
2545         promote_prototypes, return_in_memory, return_in_msb,
2546         pass_by_reference, must_pass_in_stack, callee_copies,
2547         function_value): Likewise.
2548         * targhooks.c (default_return_in_memory,
2549         hook_pass_by_reference_must_pass_in_stack,
2550         hook_callee_copies_named,
2551         hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
2552         hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
2553         default_function_value): Likewise. 
2554         * targhooks.h (default_return_in_memory,
2555         hook_pass_by_reference_must_pass_in_stack,
2556         hook_callee_copies_named,
2557         hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
2558         hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
2559         default_function_value): Likewise.
2560         * tree-ssa-structalias.c (const_equiv_class_label_t): New.
2561         (equiv_class_label_hash, equiv_class_label_eq): Constify.
2562         * tree-vectorizer.c (bb_in_loop_p): Likewise.
2563         * tree.c (needs_to_live_in_memory): Likewise.
2564         * tree.h (struct tree_type, needs_to_live_in_memory,
2565         aggregate_value_p, must_pass_in_stack_var_size,
2566         must_pass_in_stack_var_size_or_pad): Likewise.
2567         * vmsdbgout.c (write_debug_addr, write_debug_delta4,
2568         write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg,
2569         lookup_filename): Likewise.
2570
2571 2007-08-23  Uros Bizjak  <ubizjak@gmail.com>
2572
2573         PR target/17390
2574         * config/i386/i386.c (ix86_expand_fp_compare): Expand fp comparison to
2575         fake fcomi i387 instruction for !TARGET_CMOVE.
2576         (ix86_expand_branch): Expand natural sequence with one jump for
2577         all targets, not only TARGET_CMOVE.
2578         * config/i386/i386.md (*cmpfp_0_cc): New define_insn_and_split
2579         pattern to implement fake fcomi sequence.  Split instruction after
2580         reload to correct compare sequences.
2581         (*cmpfp_xf_cc): Ditto.
2582         (*cmpfp_<mode>_cc): Ditto.
2583         (*cmpfp_u_cc): Ditto.
2584         (*cmpfp_<mode>_cc): Ditto.
2585
2586 2007-08-23  Richard Guenther  <rguenther@suse.de>
2587
2588         * tree-pretty-print.c (dump_generic_node): Annotate
2589         GIMPLE_MODIFY_STMTs with volatile ops with "{v}".
2590
2591 2007-08-23  Richard Guenther  <rguenther@suse.de>
2592
2593         * builtins.c (expand_builtin_mathfn): Wrap argument in
2594         save_expr directly instead of re-building the call.
2595         (expand_builtin_mathfn_2): Likewise.
2596         (expand_builtin_mathfn_3): Likewise.
2597         (expand_builtin_interclass_mathfn): Likewise.
2598         (expand_builtin_int_roundingfn): Set arg.
2599         (expand_builtin_int_roundingfn_2): Likewise.
2600
2601 2007-08-23  Paolo Bonzini  <bonzini@gnu.org>
2602
2603         * config/i386/sse.md (*sse_and<mode>3, *sse_ior<mode>3,
2604         *sse_nand<mode>3, *sse_xor<mode>3): New.
2605
2606 2007-08-23  Uros Bizjak  <ubizjak@gmail.com>
2607
2608         * config/i386/i386.h (PRINT_OPERAND_PUNCT_VALID_P): Add ';' code.
2609         * config/i386/i386.c (print_operand): Handle ';' code.  Output
2610         semicolon for TARGET_MACHO.
2611         * config/i386/sync.md (*sync_compare_and_swap<mode>): Use '%;' to
2612         emit semicolon after 'lock' prefix.
2613         (sync_double_compare_and_swap<mode>): Ditto.
2614         (*sync_double_compare_and_swapdi_pic): Ditto.
2615         (*sync_compare_and_swap_cc<mode>): Ditto.
2616         (sync_double_compare_and_swap_cc<mode>): Ditto.
2617         (*sync_double_compare_and_swap_ccdi_pic): Ditto.
2618         (sync_old_add<mode>): Ditto.
2619         (sync_add<mode>): Ditto.
2620         (sync_sub<mode>): Ditto.
2621         (sync_ior<mode>): Ditto.
2622         (sync_and<mode>): Ditto.
2623         (sync_xor<mode>): Ditto.
2624
2625 2007-08-22  Chao-ying Fu  <fu@mips.com>
2626
2627         * rtl.c (rtx_code_size): Check CONST_FIXED to calcualte correct sizes
2628         in DEF_RTL_EXPR.
2629         (copy_rtx): Handle CONST_FIXED.
2630         (rtx_equal_p): Likewise.
2631         * rtl.h (fixed_value.h): New include.
2632         (rtx_def): Add a new field of fixed_value to u.
2633         (XCNMPFV): Define for accessing fixed_value.
2634         (CONST_FIXED_VALUE, CONST_FIXED_VALUE_HIGH, CONST_FIXED_VALUE_LOW):
2635         Define.
2636         * rtl.def (CONST_FIXED): New constant.
2637         (SS_MULT, US_MULT, SS_DIV, US_DIV, FRACT_CONVERT,
2638         UNSIGNED_FRACT_CONVERT, SAT_FRACT, UNSIGNED_SAT_FRACT, US_NEG,
2639         US_ASHIFT): New codes.
2640         * doc/rtl.texi (Expressions): Document const_fixed, us_neg, ss_mult,
2641         us_mult, ss_div, us_div, us_ashift, fract_convert, sat_fract,
2642         unsigned_fract_convert, unsigned_sat_fract): Document them.
2643         * varasm.c (assemble_integer): Extend to support fixed-point constants
2644         by using different machine classes.
2645         (decode_addr_const): Handle FIXED_CST.
2646         (const_hash_1): Likewise.
2647         (compare_constant): Likewise.
2648         (copy_constant): Likewise.
2649         (const_rtx_hash_1): Handle CONST_FIXED.
2650         (output_constant_pool_2): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM,
2651         MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM,
2652         MODE_VECTOR_UACCUM.
2653         (initializer_constant_valid_p): Handle FIXED_CST.
2654         (output_constant): Support FIXED_POINT_TYPE.
2655         * gengenrtl.c (excluded_rtx): Check CONST_FIXED to exclude.
2656         * cse.c (hash_rtx): Support CONST_FIXED.
2657         (exp_equiv_p): Likewise.
2658         (cannon_reg): Likewise.
2659         (fold_rtx): Likewise.
2660         (equiv_constant): Likewise.
2661         (cse_process_notes_1): Likewise.
2662         (count_reg_usage): Likewise.
2663         * cselib.c (entry_and_rtx_equal_p): Check CONST_FIXED.
2664         (rtx_equal_for_cselib_p): Handle CONST_FIXED.
2665         (wrap_constant): Check CONST_FIXED.
2666         (cselib_hash_rtx): Support CONST_FIXED.
2667         (cselib_subst_to_values): Likewise.
2668         * df-scan.c (df_uses_record): Likewise.
2669         * gcse.c (want_to_gcse_p): Likewise.
2670         (oprs_unchanged_p): Likewise.
2671         (oprs_not_set_p): Likewise.
2672         (compute_transp): Likewise.
2673         (extract_mentioned_regs_helper): Likewise.
2674         * genemit.c (gen_exp): Likewise.
2675         * local-alloc.c (equiv_init_varies_p): Likewise.
2676         (contains_replace_regs): Likewise.
2677         (memref_referenced_p): Likewise.
2678         * loop-invariant.c (check_maybe_invariant): Likewise.
2679         (hash_invariant_expr_1): Likewise.
2680         (invariant_expr_equal_p): Likewise.
2681         * postreload-gcse.c (oprs_unchanged_p): Likewise.
2682         * regclass.c (reg_scan_mark_refs): Likewise.
2683         * regrename.c (scan_rtx): Likewise.
2684         * resource.c (mark_referenced_resources): Likewise.
2685         (mark_set_resources): Likewise.
2686         * rtlanal.c (rtx_unstable_p): Likewise.
2687         (rtx_varies_p): Likewise.
2688         (count_occurrences): Likewise.
2689         (reg_mentioned_p): Likewise.
2690         (modified_between_p): Likewise.
2691         (modified_in_p): Likewise.
2692         (volatile_insn_p): Likewise.
2693         (volatile_refs_p): Likewise.
2694         (side_effects_p): Likewise.
2695         (may_trap_p_1): Likewise.
2696         (inequality_comparisons_p): Likewise.
2697         (computed_jump_p_1): Likewise.
2698         (commutative_operand_precedence): Likewise.
2699         * sched-deps.c (sched_analyze_2): Likewise.
2700         * sched-vis.c (print_value): Likewise.
2701         * reload.c (operands_match_p): Likewise.
2702         (subst_reg_equivs): Likewise.
2703         * reload1.c (eliminate_regs_1): Likewise.
2704         (elimination_effects): Likewise.
2705         (scan_paradoxical_subregs): Likewise.
2706         * alias.c (rtx_equal_for_memref_p): Likewise.
2707         * Makefile.in (RTL_BASE_H): Add fixed-value.h.
2708         * emit-rtl.c (const_fixed_htab): New hash table.
2709         (const_fixed_htab_hash, const_fixed_htab_eq, lookup_const_fixed):
2710         Declare.
2711         (const_fixed_htab_hash, const_fixed_htab_eq, lookup_const_fixed,
2712         const_fixed_from_fixed_value): New functions.
2713         (verify_rtx_sharing): Handle CONST_FIXED.
2714         (copy_rtx_if_shared_1): Likewise.
2715         (reset_used_flags): Likewise.
2716         (set_used_flags): Likewise.
2717         (copy_insn_1): Likewise.
2718         (init_emit_once): Create const_fixed_htab.
2719         Store fixed-point scalar and vector zero and one to const_tiny_rtx.
2720
2721 2007-08-22  Zdenek Dvorak  <ook@ucw.cz>
2722
2723         PR tree-optimization/32949
2724         * tree-ssa-loop-niter.c (scev_probably_wraps_p): Test nowrap_type_p
2725         before failing for ivs with non-constant step.
2726
2727 2007-08-22  Hans-Peter Nilsson  <hp@axis.com>
2728
2729         * doc/md.texi (Iterators): Renamed from Macros.  All contents
2730         changed to reflect rename of respectively define_code_macro and
2731         define_mode_macro to define_code_iterator and define_mode_iterator.
2732         (Mode Iterators, Code Iterators): Similar.
2733         * read-rtl.c (struct iterator_group, struct iterator_traverse_data)
2734         (uses_mode_iterator_p, apply_mode_iterator, uses_code_iterator_p)
2735         (apply_iterator_to_string, uses_iterator_p, apply_iterator_traverse)
2736         (initialize_iterators, find_iterator, check_code_iterator)
2737         (map_attr_string, apply_mode_maps, apply_iterator_to_rtx, add_mapping)
2738         (read_mapping, read_rtx_1): Similar.
2739         * config/alpha/sync.md, config/alpha/alpha.md, config/frv/frv.md,
2740         config/s390/s390.md, config/m32c/blkmov.md, config/m32c/m32c.md,
2741         config/spu/spu.md, config/sparc/sparc.md, config/sparc/sync.md,
2742         config/i386/i386.md, config/i386/mmx.md, config/i386/sse.md,
2743         config/i386/sync.md, config/crx/crx.md, config/xtensa/xtensa.md,
2744         config/cris/cris.c, config/cris/cris.md, config/ia64/sync.md,
2745         config/ia64/div.md, config/ia64/vect.md, config/ia64/ia64.md,
2746         config/m68k/m68k.md, config/rs6000/spe.md, config/rs6000/altivec.md,
2747         config/rs6000/sync.md, config/rs6000/rs6000.md,
2748         config/arm/vec-common.md, config/arm/neon.md, config/arm/iwmmxt.md,
2749         config/arm/arm.md, config/mips/mips-dsp.md, config/mips/mips.md,
2750         config/vax/vax.md, config/bfin/bfin.md: Similar.
2751
2752 2007-08-22  David Daney  <ddaney@avtrex.com>
2753
2754         * doc/install.texi (Testing): Mention testing on a simulator.
2755
2756 2007-08-22  Janis Johnson  <janis187@us.ibm.com>
2757
2758         * config/dfp-bit.c (DFP_TO_DFP): Check for overflow.
2759
2760         * doc/libgcc.texi (Decimal float library routines): Fix formatting
2761         and rearrange floating point conversion functions into different
2762         categories.
2763
2764 2007-08-22  Maxim Kuvyrkov  <maxim@codesourcery.com>
2765
2766         * target.h (struct gcc_target.sched: dfa_pre_advance_cycle,
2767         dfa_post_advance_cycle): New scheduler hooks.
2768         * target-def.h (TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE,
2769         TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): New macros to initialize
2770         new hooks.
2771         (TARGET_SCHED): Use them.
2772         * doc/tm.texi (TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE,
2773         TARGET_SCHED_DFA_POST_ADVANCE_CYCLE): Document new hooks.
2774         * haifa-sched.c (advance_one_cycle): Invoke new hooks.
2775
2776         * genautomata.c (insn_has_dfa_reservation_p): New DFA interface
2777         function to facilitate debugging.
2778         (INSN_HAS_DFA_RESERVATION_P_FUNC_NAME): New macro.
2779         (output_insn_has_dfa_reservation_p): New static function to output
2780         insn_has_dfa_reservation_p ().
2781         (write_automata): Use it.
2782         * genattr.c (main): Output declaration for
2783         insn_has_dfa_reservation_p ().
2784
2785 2007-08-22  Christian Bruel  <christian.bruel@st.com>   
2786             Richard Guenther <rguenther@suse.de>
2787         
2788         * fold-const.c (fold_binary): Optimize A-A if -ffinite-math-only.
2789         * simplify_rtx (simplify_binary_operation_1): Likewise.
2790                 
2791 2007-08-22  Rask Ingemann Lambertsen  <rask@sygehus.dk>
2792
2793         PR rtl-optimization/32557
2794         * df-problems.c (df_note_bb_compute): Use mws->start_regno instead
2795         of REGNO (mws->mw_reg).
2796
2797 2007-08-22  Richard Guenther  <rguenther@suse.de>
2798
2799         PR middle-end/33007
2800         * builtins.c (expand_builtin_int_roundingfn): Replace call
2801         argument wrapped with SAVE_EXPR directly.
2802         (expand_builtin_int_roundingfn_2): Likewise.
2803
2804 2007-08-22  Richard Guenther  <rguenther@suse.de>
2805
2806         * tree-inline.c (inlinable_function_p): Restore disregarding
2807         inline limits for GNU extern inline functions.
2808
2809 2007-08-22  Richard Guenther  <rguenther@suse.de>
2810
2811         PR middle-end/32563
2812         * tree.c (host_integerp): Treat sizetype as signed as it is
2813         sign-extended.
2814
2815 2007-08-21  Ian Lance Taylor  <iant@google.com>
2816
2817         PR tree-optimization/33134
2818         * tree-vrp.c (adjust_range_with_scev): Call
2819         set_value_range_to_value.
2820
2821 2007-08-21  Aldy Hernandez  <aldyh@redhat.com>
2822
2823         * value-prof.h (gimple_remove_histogram_value): Remove duplicate
2824         prototype.
2825         
2826 2007-08-21  Aldy Hernandez  <aldyh@redhat.com>
2827
2828         * tree-flow-inline.h (next_imm_use_stmt): Remove unecessary
2829         whitespace.
2830
2831 2007-08-21  Nathan Froyd  <froydnj@codesourcery.com>
2832
2833         * config/rs6000/rs6000.c (expand_block_clear): Add TARGET_SPE
2834         cases to set eight bytes at a time.
2835         (expand_block_move): Likewise.
2836         
2837 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2838
2839         PR debug/32610
2840         * dwarf2out.c (gen_decl_die): Don't call
2841         gen_tagged_type_instantiation_die if decl doesn't have tagged type.
2842
2843 2007-08-21  Paul Brook  <paul@codesourcery.com>
2844             Nathan Sidwell  <nathan@codesourcery.com>
2845             Mark Mitchell  <mark@codesourcery.com>
2846             Joseph Myers  <joseph@codesourcery.com>
2847
2848         * configure.ac: Add --with-pkgversion and --with-bugurl.
2849         * configure: Regenerate.
2850         * doc/install.texi: Document them.
2851         * version.c (version_string): Remove VERSUFFIX.
2852         (VERSUFFIX): Remove.
2853         (pkgversion_string): New.
2854         (bug_report_url): Do not hard-code initializer.
2855         * version.h (pkgversion_string): Declare.
2856         * Makefile.in (PKGVERSION_s, BUGURL_s, PKGVERSION, BUGURL_TEXI):
2857         Define.
2858         (version.o): Define PKGVERSION and BUGURL.
2859         (gcc-vers.texi): Define VERSION_PACKAGE and BUGURL.
2860         (%.pod): Define BUGURL.
2861         * gcc.c (process_command, main): Use pkgversion_string.
2862         * toplev.c (compile_file, print_version): Likewise.
2863         * protoize.c (main): Likewise.
2864         * gcov.c (print_version): Likewise.  Update copyright date.
2865         * gcov-dump.c (print_version): Likewise.  Update copyright date.
2866         * mips-tdump.c (main): Likewise.  Update copyright date.
2867         * mips-tfile.c (main): Likewise.  Update copyright date.
2868         * doc/include/gcc-common.texi: Include VERSION_PACKAGE as subtitle.
2869         * doc/bugreport.texi: Use BUGURL for bug-reporting instructions;
2870         shorten description.
2871         * doc/gcc.texi: Include VERSION_PACKAGE in version description.
2872         * doc/gccint.texi: Likewise.
2873         * doc/invoke.texi: Use BUGURL for bug-reporting instructions.
2874         Update copyright date.
2875
2876 2007-08-21  Uros Bizjak  <ubizjak@gmail.com>
2877
2878         * config/i386/i386.c (ix86_expand_clear): Use FLAGS_REG.
2879         (ix86_expand_strlensi_unroll_1): Ditto.
2880         (ix86_expand_branch): Use FLAGS_REG and FPSR_REG.
2881         (ix86_expand_carry_flag_compare): Update comment.
2882
2883 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2884
2885         PR middle-end/32912
2886         * fold-const.c (fold_unary): Optimize BIT_NOT_EXPR of VECTOR_CST.
2887         (fold_binary): Handle vectors in X | ~X and X ^ ~X optimizations.
2888
2889 2007-08-21  Richard Guenther  <rguenther@suse.de>
2890
2891         * fold-const.c (fold_binary): Revert removing of index +p PTR folding.
2892
2893 2007-08-21  Richard Guenther  <rguenther@suse.de>
2894
2895         PR middle-end/33122
2896         * fold-const.c (fold_binary): Remove index +p PTR folding.
2897         Fix types of POINTER_PLUS_EXPR generated by folding of
2898         (PTR +p B) +p A.
2899
2900 2007-08-20  Chao-ying Fu  <fu@mips.com>
2901
2902         * c-common.h (enum rid): Add new enumeration values of RID_SAT,
2903         RID_FRACT, and RID_ACCUM.  RID_SAT needs to be inserted before
2904         RID_ONEWAY, so that it can be checked in declspecs_add_type.
2905         (c_common_fixed_point_type_for_size): Declare.
2906         * c-parser.c (reswords): Add _Fract, _Accum, and _Sat.
2907         (c_token_starts_typename): Handle RID_FRACT, RID_ACCUM, and RID_SAT.
2908         (c_token_starts_declspecs): Likewise.
2909         (c_parser_declspecs): Likewise.
2910         (c_parser_attributes): Likewise.
2911         * c-tree.h (enum c_typespec_keyword): Add cts_fract and cts_accum.
2912         (c_declspecs): Add saturating_p.
2913         * c-decl.c (build_null_declspecs): Initialize saturating_p.
2914         (declspecs_add_type): Avoid using complex with _Fract, _Accum, or
2915         _Sat.  Handle RID_SAT.
2916         Avoid using void, bool, char, int, float, double, _Decimal32,
2917         _Decimal64, _Decimal128, and complex with _Sat.
2918         Handle RID_FRACT and RID_ACCUM.
2919         Make sure _Sat is used with _Fract or _Accum.
2920         (finish_declspecs): Handle cts_fract and cts_accum.
2921         * c-common.c (fixed-value.h): New include.
2922         (constant_expression_warning): Handle FIXED_CST.
2923         (overflow_warning): Likewise.
2924         (warnings_for_convert_and_check): Likewise.
2925         (c_common_fixed_point_type_for_size): New.
2926         (c_common_type_for_mode): Handle fixed-point modes to
2927         return various saturating/non-saturating, signed/unsigned types.
2928         (c_common_signed_or_unsigned_type): Support fixed-point types.
2929         (shorten_compare): Check fixed-point zero.
2930         Handle FIXED_POINT_TYPE.
2931         (c_common_truthvalue_conversion): Handle FIXED_CST.
2932         Handle FIXED_POINT_TYPE.
2933         (c_common_nodes_and_builtins): Record builtin types for fixed-point
2934         types.
2935         (handle_mode_attribute): Handle fixed-point modes.  Need to check
2936         if the signness of base type and fixed-point modes are consistent.
2937         (handle_vector_size_attribute): Handle fixed-point modes.
2938         (same_scalar_type_ignoring_signedness): Handle FIXED_POINT_TYPE.
2939         (warn_for_div_by_zero): Check fixed-point zero.
2940         * c-typeck.c (c_common_type): Check FIXED_POINT_TYPE.  Build
2941         a common fixed-point type based on fbit, ibit, sign, and saturation.
2942         (build_unary_op): Allow FIXED_POINT_TYPE for CONVERT_EXPR,
2943         NEGATE_EXPR, TRUTH_NOT_EXPR, PREINCREMENT_EXPR, POSTINCREMENT_EXPR,
2944         PREDECREMENT_EXPR, and POSTDECREMENT_EXPR.
2945         (convert_for_assignment): Support FIXED_POINT_TYPE.
2946         (digest_init): Handle FIXED_POINT_TYPE.
2947         (build_binary_op): Support FIXED_POINT_TYPE in *_DIV_EXPR,
2948         TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR,
2949         TRUTH_XOR_EXPR, RSHIFT_EXPR, LSHIFT_EXPR, EQ_EXPR, NE_EXPR, LE_EXPR,
2950         GE_EXPR, LT_EXPR, GT_EXPR.
2951         * target-def.h (TARGET_FIXED_POINT_SUPPORTED_P): New.
2952         (TARGET_INITIALIZER): Add TARGET_FIXED_POINT_SUPPORTED_P.
2953         * target.h (gcc_target): Add fixed_point_supported_p.
2954         * targhooks.c (default_scalar_mode_supported_p): Handle MODE_FRACT,
2955         MODE_UFRACT, MODE_ACCUM, and MODE_UACCUM.
2956         (default_fixed_point_supported_p): Define.
2957         * targhooks.h (default_fixed_point_supported_p): Declare.
2958         * doc/tm.texi (TARGET_FIXED_POINT_SUPPORTED_P): Add.
2959         * doc/install.texi (Configuration): Add --enable-fixed-point.
2960         * configure.ac (--enable-fixed-point): New to enable fixed-point
2961         arithmetic extension to C.  For mips targets, we enable it by default.
2962         * configure, config.in: Regenerate.
2963
2964 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
2965
2966         * doc/invoke.texi (-Wnon-virtual-dtor): Update documentation.
2967
2968 2007-08-20  David Edelsohn  <edelsohn@gnu.org>
2969
2970         * dwarf2out.c (text_section_used): Move declaration outside ifdef
2971         DWARF2_DEBUGGING_INFO.
2972         (cold_text_section_used): Same.
2973         (cold_text_section): Same.
2974
2975 2007-08-20  Richard Guenther  <rguenther@suse.de>
2976
2977         * c-typeck.c (convert_for_assignment): Use the type of
2978         the member for the initialization.
2979
2980 2007-08-20  Richard Guenther  <rguenther@suse.de>
2981
2982         * c-objc-common.c (c_disregard_inline_limits): Remove.
2983         * c-objc-common.h (c_disregard_inline_limits): Likewise.
2984         * cgraphunit.c (cgraph_process_new_functions): Call
2985         disregard_inline_limits_p.
2986         (cgraph_preserve_function_body_p): Likewise.
2987         * ipa-inline.c (compute_inline_parameters): Likewise.
2988         * langhooks-def.h (lhd_tree_inlining_disregard_inline_limits):
2989         Remove.
2990         (LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS): Remove.
2991         (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove initializer for
2992         disregard_inline_limits langhook.
2993         * langhooks.c (lhd_tree_inlining_disregard_inline_limits):
2994         Remove.
2995         * langhooks.h (lang_hooks_for_tree_inlining): Remove
2996         disregard_inline_limits langhook.
2997         * tree-inline.c (disregard_inline_limits_p): New function.
2998         * tree-inline.h (disregard_inline_limits_p): Declare.
2999
3000 2007-08-20  Richard Guenther  <rguenther@suse.de>
3001
3002         * langhooks-def.h (lhd_tree_inlining_auto_var_in_fn_p): Remove.
3003         (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P): Likewise.
3004         (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove initializer for
3005         auto_var_in_fn_p langhook.
3006         * langhooks.c (lhd_tree_inlining_auto_var_in_fn_p): Rename and
3007         move ...
3008         * tree.c (auto_var_in_fn_p): ... here.
3009         (find_var_from_fn): Call auto_var_in_fn_p directly.
3010         * langhooks.h (lang_hooks_for_tree_inlining): Remove
3011         auto_var_in_fn_p langhook.
3012         * tree-inline.c (remap_decls): Call auto_var_in_fn_p directly.
3013         (copy_body_r): Likewise.
3014         (self_inlining_addr_expr): Likewise.
3015         * tree.h (auto_var_in_fn_p): Declare.
3016
3017 2007-08-20  Richard Guenther  <rguenther@suse.de>
3018
3019         * tree.c (WALK_SUBTREE): Call walk_tree_1.
3020         (walk_type_fields): Take lh parameter.
3021         (walk_tree): Rename to ...
3022         (walk_tree_1): ... this.  Do not call the walk_subtrees
3023         langhook but the now passed callback.  Pass lh on recursion.
3024         (walk_tree_without_duplicates): Rename to ...
3025         (walk_tree_without_duplicates_1): ... this.  Take lh parameter
3026         and call walk_tree_1.
3027         * tree.h (walk_tree_lh): New typedef.
3028         (walk_tree_1): Declare.
3029         (walk_tree_without_duplicates_1): Likewise.
3030         (walk_tree): New define to walk_tree_1 with NULL lh parameter.
3031         (walk_tree_without_duplicates): New define to
3032         walk_tree_without_duplicates_1 with NULL lh parameter.
3033         * langhooks.c (lhd_tree_inlining_walk_subtrees): Remove.
3034         * langhooks.h (lang_hooks_for_tree_inlining): Remove walk_subtrees
3035         langhook.
3036         * langhooks-def.h (lhd_tree_inlining_walk_subtrees): Remove.
3037         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise.
3038         (LANG_HOOKS_TREE_INLINING_INITIALIZER): Remove walk_subtrees
3039         initializer.
3040
3041 2007-08-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3042
3043         PR middle-end/30564
3044         * tree-inline.c (optimize_inline_calls): Move the cgraph checking
3045         code in front of the compacting of basic blocks.
3046         Move the folding of statements inbetween the cgraph checking
3047         and compacting of basic blocks.
3048
3049 2007-08-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3050            Serge Belyshev  <belyshev@depni.sinp.msu.ru>
3051
3052         PR target/32522
3053         * config/alpha/alpha.c (va_list_skip_additions): Check for
3054         POINTER_PLUS_EXPR in addition to PLUS_EXPR.
3055         (alpha_stdarg_optimize_hook): Look for POINTER_PLUS_EXPR instead of
3056         PLUS_EXPR when checking ap.__base.
3057         (alpha_va_start): Create POINTER_PLUS_EXPR instead of PLUS_EXPR
3058         when doing addition on pointer types.  Use size_int instead of
3059         build_int_cst.
3060         (alpha_gimplify_va_arg_1): Likewise, but use sizetype instead of
3061         ptr_type in the second operand.
3062
3063 2007-08-19  Andrew Pinski  <pinskia@gmail.com>
3064
3065         PR target/33115
3066         * config/i386/darwin.h (CC1_SPEC): Add %(cc1_cpu) in front.
3067
3068 2007-08-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3069
3070         PR middle-end/32940
3071         * cfgexpand.c  (expand_one_register_var): Mark pointer
3072         DECL_ARTIFICIAL as REG_POINTER also.
3073         * stmt.c (expand_decl): Likewise.
3074
3075 2007-08-19  Daniel Berlin  <dberlin@dberlin.org>
3076
3077         Fix PR 32772
3078         Fix PR 32716
3079         Fix PR 32328
3080         Fix PR 32303
3081
3082         * tree-flow.h (struct stmt_ann_d): Remove makes_clobbering_call.
3083         * tree-ssa-alias.c (init_transitive_clobber_worklist): Add
3084         on_worklist argument and avoid adding things to worklist multiple
3085         times.
3086         (add_to_worklist): Ditto.
3087         (mark_aliases_call_clobbered): Mark entire structure clobbered if
3088         single SFT is clobbered.
3089         (set_initial_properties): Ditto.
3090         (compute_call_clobbered): Update for changes to function
3091         arguments.
3092         (create_overlap_variables_for): Always create SFT for offset 0.
3093         (create_structure_vars): Handle PHI's, since we are in SSA form at
3094         this point.
3095         * tree-ssa-loop-ivopts.c (get_ref_tag): Don't return subvars.
3096         * tree-ssa-operands.c (access_can_touch_variable): Don't handle
3097         TARGET_MEM_REF.
3098         (add_vars_for_offset): Figure out aliases from access + points-to.
3099         (add_virtual_operand): Use add_vars-for_offset.
3100         (get_tmr_operands): Update for NMT changes, rewrite to be correct.
3101         (add_call_clobber_ops): Remove makes_clobbering_call set.
3102         (get_expr_operands): Always pass through the INDIRECT_REF
3103         reference.
3104         * tree-ssa-structalias.c (struct constraint_graph): Remove
3105         variables member.
3106         Add pe, pe_rep, pointer_label, loc_label, pointed_by, points_to,
3107         address_taken, pt_used, number_incoming.
3108         (FIRST_ADDR_NODE): Removed.
3109         (merge_graph_nodes): Remove broken code for the moment.
3110         (init_graph): New function.
3111         (build_pred_graph): Remove code to init_graph.
3112         Add location equivalence support.
3113         (struct scc_info): Rename roots to deleted.
3114         (scc_visit): Ditto.
3115         (init_scc_info): Ditto
3116         (init_topo_info): Use graph->size.
3117         (compute_topo_order): Ditto.
3118         (do_da_constraint): Removed.
3119         (do_sd_constraint): Remove calls to find().
3120         set_union_with_increment should always get 0 as last arg here.
3121         (do_complex_constraint): Replace do_da_constraint with assert.
3122         Stop calling find.
3123         (struct equiv_class_label): New.
3124         (pointer_equiv_class_table): Ditto.
3125         (location_equiv_class_table): Ditto.
3126         (equiv_class_label_hash): Ditto.
3127         (equiv_class_label_eq): Ditto
3128         (equiv_class_lookup): Ditto.
3129         (equiv_class_ladd): Ditto.
3130         (pointer_equiv_class): Ditto.
3131         (location_equiv_class): Ditto.
3132         (condense_visit): Rename and rewrite from label_visit to do only
3133         SCC related stuff for HU.
3134         (label_visit): Do HU work for HU.
3135         (perform_var_substitution): Update to do HU and location
3136         equivalence.
3137         (free_var_substitution_info): Update to free HU and location
3138         equivalence structures.  */
3139         (find_equivalent_node): Update for pointer but not location
3140         equivalence.
3141         (unite_pointer_equivalences): New function.
3142         (move_complex_constraints): Rewrite to only do moving.
3143         (rewrite_constraints): Split out of move_complex_constraints.
3144         (solve_graph): Use graph->size.
3145         (process_constraint_1): Add from_call argument, use it.
3146         Split *a = &b into two constraints.
3147         (process_constraint): Use new process_constraint_1.
3148         (get_constraint_for_component_ref): Handle bitmaxsize == -1 case.
3149         (get_constraint_for): Handle non-pointer integers properly.
3150         Remove code that used to handle structures.
3151         (handle_ptr_arith): Fix a few bugs in pointer arithmetic handling
3152         with unknown addends.
3153         (handle_rhs_call): New function.
3154         (find_func_aliases): Use handle_rhs_call.
3155         (set_uids_in_ptset): Add an assert.
3156         (set_used_smts): Fix bug in not considering unified vars.
3157         (compute_tbaa_pruning): Stop initing useless iteration_obstack.
3158         (compute_points_to_sets): Update for other function changes.
3159         (delete_points_to_sets): Ditto.
3160         (ipa_pta_execute): Ditto.
3161         (pass_ipa_pta): We need to update SSA after ipa_pta.
3162         
3163 2007-08-19  Jan Hubicka  <jh@suse.cz>
3164
3165         * i386.md: Replace "rim" and "mri" constraints by "g".
3166
3167 2007-08-19  Joseph Myers  <joseph@codesourcery.com>
3168
3169         * dwarf2out.c (text_section_used, cold_text_section_used,
3170         cold_text_section, dwarf2out_note_section_used): New.
3171         (dwarf2out_init): Initialize cold_text_section.
3172         (dwarf2out_switch_text_section, dwarf2out_begin_function): Call
3173         dwarf2out_note_section_used.
3174         (size_of_aranges): Only count entry for text section if it was
3175         used.  Count entry for cold text section if it was used.
3176         (output_aranges): Only output entries for text section and cold
3177         text section if they were used.
3178
3179 2007-08-19  Andrew Pinski  <pinskia@gmail.com>
3180
3181         * tree-pretty-print.c (debug_generic_expr): Add a comment about
3182         the function.
3183         (debug_generic_stmt): Likewise.
3184         (debug_tree_chain): Likewise.
3185
3186 2007-08-19  Dorit Nuzman  <dorit@il.ibm.com>
3187
3188         * tree-data-refs.c (split_constant_offset): Expose.
3189         * tree-data-refs.h (split_constant_offset): Add declaration.
3190
3191         * tree-vectorizer.h (dr_alignment_support): Renamed
3192         dr_unaligned_software_pipeline to dr_explicit_realign_optimized.
3193         Added a new value dr_explicit_realign.
3194         (_stmt_vec_info): Added new fields: dr_base_address, dr_init,
3195         dr_offset, dr_step, and dr_aligned_to, along with new access
3196         functions for these fields: STMT_VINFO_DR_BASE_ADDRESS,
3197         STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET, STMT_VINFO_DR_STEP, and
3198         STMT_VINFO_DR_ALIGNED_TO.
3199
3200         * tree-vectorizer.c (vect_supportable_dr_alignment): Add
3201         documentation.
3202         In case of outer-loop vectorization with non-fixed misalignment - use
3203         the dr_explicit_realign scheme instead of the optimized realignment
3204         scheme.
3205         (new_stmt_vec_info): Initialize new fields.
3206
3207         * tree-vect-analyze.c (vect_compute_data_ref_alignment): Handle the
3208         'nested_in_vect_loop' case. Change verbosity level.
3209         (vect_analyze_data_ref_access): Handle the 'nested_in_vect_loop' case.
3210         Don't fail on zero step in the outer-loop for loads.
3211         (vect_analyze_data_refs): Call split_constant_offset to calculate
3212         base, offset and init relative to the outer-loop.
3213
3214         * tree-vect-transform.c (vect_create_data_ref_ptr): Replace the unused
3215         BSI function argument with a new function argument - at_loop.
3216         Simplify the condition that determines STEP. Takes additional argument
3217         INV_P. Support outer-loop vectorization (handle the
3218         nested_in_vect_loop case), including zero step in the outer-loop. Call
3219         vect_create_addr_base_for_vector_ref with additional argument.
3220         (vect_create_addr_base_for_vector_ref): Takes additional argument LOOP.
3221         Updated function documentation. Handle the 'nested_in_vect_loop' case.
3222         Fixed and simplified calculation of step.
3223         (vectorizable_store): Call vect_create_data_ref_ptr with loop instead
3224         of bsi, and with additional argument. Call bump_vector_ptr with
3225         additional argument. Fix typos. Handle the 'nested_in_vect_loop' case.
3226         (vect_setup_realignment): Takes additional arguments INIT_ADDR and
3227         DR_ALIGNMENT_SUPPORT. Returns another value AT_LOOP. Handle the case
3228         when the realignment setup needs to take place inside the loop.
3229         Support the dr_explicit_realign scheme. Allow generating the optimized
3230         realignment scheme for outer-loop vectorization. Added documentation.
3231         (vectorizable_load): Support the dr_explicit_realign scheme. Handle
3232         the 'nested_in_vect_loop' case, including loads that are invariant in
3233         the outer-loop and the realignment schemes. Handle the case when the
3234         realignment setup needs to take place inside the loop. Call
3235         vect_setup_realignment with additional arguments.  Call
3236         vect_create_data_ref_ptr with additional argument and with loop instead
3237         of bsi. Fix 80-column overflow. Fix typos. Rename PHI_STMT to PHI.
3238         (vect_gen_niters_for_prolog_loop): Call
3239         vect_create_addr_base_for_vector_ref with additional arguments.
3240         (vect_create_cond_for_align_checks): Likewise.
3241         (bump_vector_ptr): Updated to support the new dr_explicit_realign
3242         scheme: takes additional argument bump; argument ptr_incr is now
3243         optional; updated documentation.
3244         (vect_init_vector): Takes additional argument (bsi). Use it, if
3245         available, to insert the vector initialization.
3246         (get_initial_def_for_induction): Pass additional argument in call to
3247         vect_init_vector.
3248         (vect_get_vec_def_for_operand): Likewise.
3249         (vect_setup_realignment): Likewise.
3250         (vectorizable_load): Likewise.
3251
3252 2007-08-19  Dorit Nuzman  <dorit@il.ibm.com>
3253
3254         * tree-vectorizer.h (vect_is_simple_reduction): Takes a loop_vec_info
3255         as argument instead of struct loop.
3256         (nested_in_vect_loop_p): New function.
3257         (vect_relevant): Add enum values vect_used_in_outer_by_reduction and
3258         vect_used_in_outer.
3259         (is_loop_header_bb_p): New. Used to differentiate loop-header phis
3260         from other phis in the loop.
3261         (destroy_loop_vec_info): Add additional argument to declaration.
3262
3263         * tree-vectorizer.c (supportable_widening_operation): Also check if
3264         nested_in_vect_loop_p (don't allow changing the order in this case).
3265         (vect_is_simple_reduction): Takes a loop_vec_info as argument instead
3266         of struct loop. Call nested_in_vect_loop_p and don't require
3267         flag_unsafe_math_optimizations if it returns true.
3268         (new_stmt_vec_info): When setting def_type for phis differentiate 
3269         loop-header phis from other phis.
3270         (bb_in_loop_p): New function.
3271         (new_loop_vec_info): Inner-loop phis already have a stmt_vinfo, so
3272         just update their loop_vinfo.  Order of BB traversal now matters -
3273         call dfs_enumerate_from with bb_in_loop_p.
3274         (destroy_loop_vec_info): Takes additional argument to control whether
3275         stmt_vinfo of the loop stmts should be destroyed as well.
3276         (vect_is_simple_reduction): Allow the "non-reduction" use of a
3277         reduction stmt to be defines by a non loop-header phi.
3278         (vectorize_loops): Call destroy_loop_vec_info with additional argument.
3279
3280         * tree-vect-transform.c (vectorizable_reduction): Call
3281         nested_in_vect_loop_p. Check for multitypes in the inner-loop.
3282         (vectorizable_call): Likewise.
3283         (vectorizable_conversion): Likewise.
3284         (vectorizable_operation): Likewise.
3285         (vectorizable_type_promotion): Likewise.
3286         (vectorizable_type_demotion): Likewise.
3287         (vectorizable_store): Likewise.
3288         (vectorizable_live_operation): Likewise.
3289         (vectorizable_reduction): Likewise. Also pass loop_info to
3290         vect_is_simple_reduction instead of loop.
3291         (vect_init_vector): Call nested_in_vect_loop_p.
3292         (get_initial_def_for_reduction): Likewise.
3293         (vect_create_epilog_for_reduction): Likewise.
3294         (vect_init_vector): Check which loop to work with, in case there's an
3295         inner-loop.
3296         (get_initial_def_for_inducion): Extend to handle outer-loop
3297         vectorization. Fix indentation.
3298         (vect_get_vec_def_for_operand): Support phis in the case vect_loop_def.
3299         In the case vect_induction_def get the vector def from the induction
3300         phi node, instead of calling get_initial_def_for_inducion.
3301         (get_initial_def_for_reduction): Extend to handle outer-loop 
3302         vectorization.
3303         (vect_create_epilog_for_reduction): Extend to handle outer-loop
3304         vectorization.
3305         (vect_transform_loop): Change assert to just skip this case.  Add a
3306         dump printout.
3307         (vect_finish_stmt_generation): Add a couple asserts.
3308
3309         (vect_estimate_min_profitable_iters): Multiply
3310         cost of inner-loop stmts (in outer-loop vectorization) by estimated
3311         inner-loop bound.
3312         (vect_model_reduction_cost): Don't add reduction epilogue cost in case
3313         this is an inner-loop reduction in outer-loop vectorization.
3314
3315         * tree-vect-analyze.c (vect_analyze_scalar_cycles_1): New function.
3316         Same code as what used to be vect_analyze_scalar_cycles, only with
3317         additional argument loop, and loop_info passed to
3318         vect_is_simple_reduction instead of loop.
3319         (vect_analyze_scalar_cycles): Code factored out into
3320         vect_analyze_scalar_cycles_1. Call it for each relevant loop-nest.
3321         Updated documentation.
3322         (analyze_operations): Check for inner-loop loop-closed exit-phis during
3323         outer-loop vectorization that are live or not used in the outerloop,
3324         cause this requires special handling.
3325         (vect_enhance_data_refs_alignment): Don't consider versioning for
3326         nested-loops.
3327         (vect_analyze_data_refs): Check that there are no datarefs in the
3328         inner-loop.
3329         (vect_mark_stmts_to_be_vectorized): Also consider vect_used_in_outer
3330         and vect_used_in_outer_by_reduction cases.
3331         (process_use): Also consider the case of outer-loop stmt defining an
3332         inner-loop stmt and vice versa.
3333         (vect_analyze_loop_1): New function.
3334         (vect_analyze_loop_form): Extend, to allow a restricted form of nested
3335         loops.  Call vect_analyze_loop_1.
3336         (vect_analyze_loop): Skip (inner-)loops within outer-loops that have
3337         been vectorized.  Call destroy_loop_vec_info with additional argument.
3338
3339         * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Don't allow
3340         in the inner-loop when doing outer-loop vectorization. Add
3341         documentation and printout.
3342         (vect_recog_dot_prod_pattern): Likewise. Also add check for
3343         GIMPLE_MODIFY_STMT (in case we encounter a phi in the loop).
3344
3345 2007-08-18  Andrew Pinski  <pinskia@gmail.com>
3346
3347         * tree-affine.h (print_aff): New prototype.
3348         (debug_aff): Likewise.
3349         * tree-affine.c (print_aff): New function.
3350         (debug_aff): Likewise.
3351
3352 2007-08-18  Paul Brook  <paul@codesourcery.com>
3353             Joseph Myers  <joseph@codesourcery.com>
3354
3355         * common.opt (-fdebug-prefix-map=): New option.
3356         * opts.c: Include debug.h.
3357         (common_handle_option): Handle -fdebug-prefix-map.
3358         * final.c: Include ggc.h.
3359         (struct debug_prefix_map, debug_prefix_maps, add_debug_prefix_map,
3360         remap_debug_filename): New.
3361         * Makefile.in (final.o, opts.o): Update dependencies.
3362         * debug.h (remap_debug_filename, add_debug_prefix_map): Declare.
3363         * configure.ac: Check for assembler --debug-prefix-map support.
3364         * configure, config.in: Regenerate.