OSDN Git Service

2005-07-25 Serge Belyshev <belyshev@depni.sinp.msu.ru>
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2005-07-25  Serge Belyshev  <belyshev@depni.sinp.msu.ru>
2
3         PR other/22337
4         * ggc-zone.c (ggc_alloc_zone_stat): Do not use CHUNK_OVERHEAD.
5         (ggc_print_statistics): Initialize variable before use.
6
7 2005-07-25  Richard Guenther  <rguenther@suse.de>
8
9         * tree-dfa.c (mark_new_vars_to_rename): Protect against
10         calling with a PHI_NODE argument.
11
12         * tree-flow-inline.h (overlap_subvar): Protect against
13         possible overflow.
14
15 2005-07-25  Paolo Bonzini  <bonzini@gnu.org>
16
17         * aclocal.m4 (gcc_AC_CHECK_TOOL): Add /bin to default directory.
18         * configure: Regenerate.
19
20 2005-07-25  Ira Rosen  <irar@il.ibm.com>
21
22         * expr.c (highest_pow2_factor): Make extern.
23         * tree-data-ref.c (ptr_decl_may_alias_p): New function.
24         (ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p,
25         record_array_differ_p, array_ptr_differ_p): Likewise.
26         (base_object_differ_p): Rename (from array_base_name_differ_p). Support
27         additional cases. Call the above functions.
28         (base_addr_differ_p): Moved from tree-vect-analyze.c. Call
29         base_object_differ_p when there are two base objects. Otherwise, compare
30         base address and offset. Call may_alias_p.
31         (dump_data_reference): Use a correct field name.
32         (analyze_array): Make static. Initialize new data-ref fields.
33         (analyze_indirect_ref): New function.
34         (init_data_ref): Initialize new data-ref fields.   
35         (strip_conversion): Moved from tree-vect-analyze.c. 
36         (analyze_offset_expr, get_ptr_offset, address_analysis,
37         object_analysis): Likewise.
38         (analyze_offset): New function.
39         (create_data_ref): Likewise.
40         (initialize_data_dependence_relation): Call base_addr_differ_p. Compare
41         dimensions for ARRAY_REFs only.
42         (build_classic_dist_vector): Make static.
43         (access_functions_are_affine_or_constant_p): Call macro to get the
44         address of access functions.
45         (compute_all_dependences): Add new parameter
46         compute_self_and_read_read_dependences. Compute self and read-read  
47         dependences if it is true.
48         (find_data_references_in_loop): Call create_data_ref. Initialize new
49         data-ref fields.
50         (compute_data_dependences_for_loop): Add new parameter
51         compute_self_and_read_read_dependences. Remove parameter nb_loops,
52         compute nb_loops. Call compute_all_dependences,
53         build_classic_dist_vector and build_classic_dir_vector with correct
54         parameters.
55         (analyze_all_data_dependences): Call compute_data_dependences_for_loop
56         with correct parameters. Compare dimensions for ARRAY_REFs only.
57         (free_data_refs): Call macro to free access functions.
58         * tree-data-ref.h (struct first_location_in_loop): New structure. Move
59         fields from stmt_vinfo.
60         (struct base_object_info): New structure.
61         (struct data_reference): Move fields to base_object_info. Add fields   
62         first_location and object_info for above structures. Move fields from
63         stmt_info: memtag, ptr_info, subvars, misalignment. Add new field
64         aligned_to.  Add macros to access the new fields.
65         Update functions declarations.
66         * tree-flow.h (is_aliased_with): Declare.
67         * tree-loop-linear.c (linear_transform_loops): Call
68         compute_data_dependences_for_loop with correct parameters.
69         * tree-ssa-alias.c (is_aliased_with): New function.
70         * tree-vect-analyze.c (vect_get_ptr_offset): Remove.
71         (vect_analyze_offset_expr, vect_base_addr_differ_p): Likewise.
72         (vect_analyze_data_ref_dependence): Get ddr. Remove call to
73         vect_base_addr_differ_p, compute_subscript_distance and
74         build_classic_dist_vector. Add printings. Check absolute value of
75         distance.
76         (vect_analyze_data_ref_dependences): Go through ddrs instead of
77         data-refs.
78         (vect_compute_data_ref_alignment): Get the fields of data-ref instead of
79         stmt. Check aligned_to. Check if the base is aligned. Remove conversion
80         to bytes. Add printing.
81         (vect_compute_data_refs_alignment): Go through loads and stores in one
82         loop.
83         (vect_enhance_data_refs_alignment, vect_analyze_data_refs_alignment,
84         vect_analyze_data_ref_access): Likewise.
85         (vect_analyze_pointer_ref_access): Remove.
86         (vect_address_analysis, vect_object_analysis): Likewise.
87         (vect_analyze_data_refs): Call compute_data_dependences_for_loop to find
88         and analyze data-refs in the loop.
89         * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Get the
90         fields of data-ref instead of stmt. Add init to the offset from the
91         base.
92         (vect_create_data_ref_ptr): Get the fields of data-ref instead of stmt.
93         (vect_update_init_of_dr): Likewise.
94         (vect_update_inits_of_drs): Go through loads and stores in one loop.
95         * tree-vectorizer.c (new_stmt_vec_info): Remove initialization of
96         removed fields.
97         (new_loop_vec_info): Initialize new fields.
98         (destroy_loop_vec_info): Free new fields.
99         (vect_strip_conversion): Remove.
100         * tree-vectorizer.h (enum verbosity_levels): Add new verbosity level.
101         (struct _loop_vec_info): Unify data_ref_writes and data_ref_reads into
102         datarefs. Add new field ddrs. 
103         Add macros for the new fields access.
104         (struct _stmt_vec_info): Remove: base_address, initial_offset, step,
105         base_aligned_p, misalignment, memtag, ptr_info and subvars.
106         Remove their macros.
107         * tree.h (highest_pow2_factor): Declare.
108
109 2005-07-25  Jakub Jelinek  <jakub@redhat.com>
110
111         * calls.c (store_one_arg): Check for sibling call MEM arguments
112         from already clobbered incoming argument area.
113
114 2005-07-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
115
116         * c-common.c (check_missing_format_attribute): New.
117         * c-common.h (check_missing_format_attribute): Likewise.
118         * c-typeck.c (convert_for_assignment): Use it.
119
120 2005-07-24  Andreas Schwab  <schwab@suse.de>
121
122         * config/m68k/m68k.md ("extendqidi2"): When source is an address
123         register use a word move.  Correct operand of ext.w in 68000 code.
124
125 2005-07-23  Mark Mitchell  <mark@codesourcery.com>
126
127         * dwarf2out.c (gen_variable_die): Treat un-emitted COMDAT
128         variables as declarations, rather than definitions.
129
130 2005-07-24  Ira Rosen  <irar@il.ibm.com>
131
132         PR tree-optimization/22526
133         * tree-vectorizer.c (slpeel_tree_peel_loop_to_edge): Match the type
134         of the zero node.
135
136 2005-07-24  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
137
138         * builtins.def: Add DEF_EXT_C99RES_BUILTIN to define builtins
139         that C99 reserve for future use. Use it to define clog10,
140         clog10f and clog10l.
141
142 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
143
144         * Makefile.in (STRICT2_WARN): Add -Wmissing-format-attribute.
145         * configure.ac: Check for -Wmissing-format-attribute.
146         
147         * configure: Regenerate.
148
149 2005-07-23  Richard Henderson  <rth@redhat.com>
150
151         PR tree-optimization/22623
152         * tree-complex.c (set_component_ssa_name): Use replace_ssa_name_symbol.
153
154 2005-07-23  Giovanni Bajo  <giovannibajo@libero.it>
155
156         PR target/22577
157         * config/pa/pa.c (reloc_needed): Updated for VECs inside CONSTRUCTOR.
158
159 2005-07-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
160
161         * Makefile.in (C_TREE_H): Update dependencies.
162         * c-tree.h: Include toplev.h.
163         * diagnostic.h (diagnostic_set_info): Add format attribute.
164         * rtl-error.c (diagnostic_for_asm): Likewise.
165
166 2005-07-23  Chao-ying Fu  <fu@mips.com>
167
168         * config/mips/mips-dsp.md: New file.
169         * config/mips/mips-modes.def (V4QI, V2HI, CCDSP): New modes.
170         * config/mips/mips.c (mips_function_type): Add types for DSP builtin
171         functions.
172         (mips_builtin_type): Add MIPS_BUILTIN_DIRECT_NO_TARGET and
173         MIPS_BUILTIN_BPOSGE32.
174         (mips_expand_builtin_direct): Add one parameter to indicate that
175         builtin functions need to return a value.
176         (mips_expand_builtin_bposge): New for expanding "bposge" builtin
177         functions.
178         (mips_regno_to_class): Add classes for 12 new DSP registers.
179         (mips_subword): Change to check four HI registers.
180         (mips_output_move): Output move to and from 6 new DSP accumulators.
181         (override_options): Make sure -mdsp and -mips16 are not used together.
182         Map 'A' to DSP_ACC_REGS and 'a' to ACC_REGS.  Enable DSP accumulators
183         for machine modes.
184         (mips_conditional_register_usage): Disable 6 new DSP accumulators
185         when !TARGET_DSP.
186         (print_operand): Add 'q' for printing DSP accumulators.
187         (mips_cannot_change_mode_class): Check ACC_REGS.
188         (mips_secondary_reload_class): Check ACC_REGS.
189         (mips_vector_mode_supported_p): Enable V2HI and V4QI when TARGET_DSP.
190         (mips_register_move_cost): Check ACC_REGS.
191         (CODE_FOR_mips_addq_ph, CODE_FOR_mips_addu_qb, CODE_FOR_mips_subq_ph)
192         (CODE_FOR_mips_subu_qb): New code-aliasing macros.
193         (DIRECT_NO_TARGET_BUILTIN, BPOSGE_BUILTIN): New macros.
194         (dsp_bdesc): New array.
195         (bdesc_arrays): Add DSP builtin function table.
196         (mips_prepare_builtin_arg): Check predicate again after
197         copy_to_mode_reg.
198         (mips_expand_builtin): Add one more parameter to
199         mips_expand_builtin_direct. Expand MIPS_BUILTIN_DIRECT_NO_TARGET and
200         MIPS_BUILTIN_BPOSGE32.
201         (mips_init_builtins): Initialize new function types.
202         (mips_expand_builtin_direct): Check if builtin functions need to
203         return a value and pass operands properly.
204         (mips_expand_builtin_bposge): New function.
205         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add __mips_dsp.
206         (ASM_SPEC): Map -mdsp to -mdsp in GAS.
207         (FIRST_PSEUDO_REGISTER): Increase to 188.
208         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
209         Update for 12 new DSP registers.
210         (DSP_ACC_REG_FIRST, DSP_ACC_REG_LAST, DSP_ACC_REG_NUM, AC1HI_REGNUM)
211         (AC1LO_REGNUM, AC2HI_REGNUM, AC2LO_REGNUM, AC3HI_REGNUM, AC3LO_REGNUM):
212         (DSP_ACC_REG_P, ACC_REG_P, ACC_HI_REG_P): New macros.
213         (reg_class): Add DSP_ACC_REGS and ACC_REGS.
214         (REG_CLASS_NAMES): Add names for DSP_ACC_REGS and ACC_REGS.
215         (REG_CLASS_CONTENTS): Update for DSP_ACC_REGS, ACC_REGS and ALL_REGS.
216         (REG_ALLOC_ORDER): Update for 12 new DSP registers.
217         (mips_char_to_class): Add 'A' for DSP_ACC_REGS and 'a' for ACC_REGS.
218         (UIMM6_OPERAND, IMM10_OPERAND): New macros.
219         (EXTRA_CONSTRAINT_Y): Add YA and YB extra constraints.
220         (REGISTER_NAMES): Add names for 12 new DSP registers.
221         * config/mips/mips.md: Include mips-dsp.md.
222         (UNSPEC_ADDQ, UNSPEC_ADDQ_S, UNSPEC_SUBQ, UNSPEC_SUBQ_S, UNSPEC_ADDSC)
223         (UNSPEC_ADDWC, UNSPEC_MODSUB, UNSPEC_RADDU_W_QB, UNSPEC_ABSQ_S)
224         (UNSPEC_PRECRQ_QB_PH, UNSPEC_PRECRQ_PH_W, UNSPEC_PRECRQ_RS_PH_W)
225         (UNSPEC_PRECRQU_S_QB_PH, UNSPEC_PRECEQ_W_PHL, UNSPEC_PRECEQ_W_PHR)
226         (UNSPEC_PRECEQU_PH_QBL, UNSPEC_PRECEQU_PH_QBR, UNSPEC_PRECEQU_PH_QBLA)
227         (UNSPEC_PRECEQU_PH_QBRA, UNSPEC_PRECEU_PH_QBL, UNSPEC_PRECEU_PH_QBR)
228         (UNSPEC_PRECEU_PH_QBLA, UNSPEC_PRECEU_PH_QBRA, UNSPEC_SHLL)
229         (UNSPEC_SHLL_S, UNSPEC_SHRL_QB, UNSPEC_SHRA_PH, UNSPEC_SHRA_R)
230         (UNSPEC_MULEU_S_PH_QBL, UNSPEC_MULEU_S_PH_QBR, UNSPEC_MULQ_RS_PH)
231         (UNSPEC_MULEQ_S_W_PHL, UNSPEC_MULEQ_S_W_PHR, UNSPEC_DPAU_H_QBL)
232         (UNSPEC_DPAU_H_QBR, UNSPEC_DPSU_H_QBL, UNSPEC_DPSU_H_QBR)
233         (UNSPEC_DPAQ_S_W_PH, UNSPEC_DPSQ_S_W_PH, UNSPEC_MULSAQ_S_W_PH)
234         (UNSPEC_DPAQ_SA_L_W, UNSPEC_DPSQ_SA_L_W, UNSPEC_MAQ_S_W_PHL)
235         (UNSPEC_MAQ_S_W_PHR, UNSPEC_MAQ_SA_W_PHL, UNSPEC_MAQ_SA_W_PHR)
236         (UNSPEC_BITREV, UNSPEC_INSV, UNSPEC_REPL_QB, UNSPEC_REPL_PH)
237         (UNSPEC_CMP_EQ, UNSPEC_CMP_LT, UNSPEC_CMP_LE, UNSPEC_CMPGU_EQ_QB)
238         (UNSPEC_CMPGU_LT_QB, UNSPEC_CMPGU_LE_QB, UNSPEC_PICK, UNSPEC_PACKRL_PH)
239         (UNSPEC_EXTR_W, UNSPEC_EXTR_R_W, UNSPEC_EXTR_RS_W, UNSPEC_EXTR_S_H)
240         (UNSPEC_EXTP, UNSPEC_EXTPDP, UNSPEC_SHILO, UNSPEC_MTHLIP, UNSPEC_WRDSP)
241         (UNSPEC_RDDSP): New constants.
242         (*movdi_32bit): Change 'x' to 'a' for ACC_REGS.
243         (*movsi_internal): Change 'x' to 'a' for ACC_REGS.  Add an
244         A<-d alternative.
245         * config/mips/mips.opt (-mdsp): New option.
246         * config/mips/predicates.md (const_uimm6_operand, const_imm10_operand)
247         (reg_imm10_operand): New predicates.
248         * doc/extend.texi (MIPS DSP Built-in Functions): New section.
249         * doc/invoke.texi (-mdsp): Document new option.
250
251 2005-07-22  DJ Delorie  <dj@redhat.com>
252
253         * c-objc-common.c (c_cannot_inline_tree_fn): Add warning control
254         to warning calls.
255         * tree-inline.c (inlinable_function_p): Likewise.
256
257 2005-07-22  Mark Mitchell  <mark@codesourcery.com>
258
259         PR debug/21828
260         * toplev.c (check_global_declarations): Do not mark undefined
261         variables as DECL_IGNORED_P.
262         * varasm.c (first_global_object_name): GTY it.
263         (weak_global_object_name): Likewise.
264         (notice_global_symbol): Use ggc_strdup, not xstrdup, when creating
265         a string to go into {weak,first}_global_object_name.
266
267 2005-07-22  DJ Delorie  <dj@redhat.com>
268
269         * c-format.c (check_function_format): Change warning control
270         option from OPT_Wattribute to OPT_Wmissing_format_attribute.
271
272 2005-07-22  Diego Novillo  <dnovillo@redhat.com>
273
274         * tree-ssa-alias.c (count_ptr_derefs): Do not consider
275         &PTR->FLD a dereference of PTR.
276         * tree-ssa-structalias.c (update_alias_info): Consider &PTR->FLD
277         a potential dereference of PTR.
278
279 2005-07-22  J"orn Rennecke <joern.rennecke@st.com>
280
281         PR rtl-optimization/20370
282         * ifcvt.c (dead_or_predicable): Before calling propagate_block,
283         call allocate_reg_info if necessary.
284
285         PR rtl-optimization/21848
286         * calls.c (emit_library_call_value_1): For const functions, add
287         USEs of the stack slots to CALL_INSN_FUNCTION_USAGE.
288
289         PR rtl-optimization/22445
290         * cselib.c (target.h): Include.
291         (rtx_equal_for_cselib_p): Allow commutative matches.
292         (cselib_hash_rtx): Don't use MODE for CONST_INT hashing.
293         Remove MODE parameter.  Changed all callers.
294
295         PR rtl-optimization/22258
296         * combine.c (likely_spilled_retval_1, likely_spilled_retval_p):
297         New functions.
298         (try_combine): Use likely_spilled_retval_p.
299
300 2005-07-22  Paul Woegerer  <paul.woegerer@nsc.com>
301
302         * config.gcc: Add crx-elf support.
303
304         * doc/contrib.texi: Mention crx.
305         * doc/extend.texi: Document crx extensions.
306         * doc/install.texi: Document crx install.
307         * doc/invoke.texi: Document crx options.
308         * doc/md.texi: Document crx constraints.
309
310         * config/crx/crx-protos.h: New file.
311         * config/crx/crx.c: New file.
312         * config/crx/crx.h: New file.
313         * config/crx/crx.md: New file.
314         * config/crx/crx.opt: New file.
315         * config/crx/t-crx: New file.
316         
317 2005-07-22  Manfred Hollstein  <mh@suse.com>
318
319         * tree-ssa-structalias.c (merge_graph_nodes): Fix uninitialised
320         warnings.
321         (int_add_graph_edge): Likewise.
322         (collapse_nodes): Likewise.
323         (process_unification_queue): Likewise.
324
325 2005-07-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
326             Laurent GUERBY  <laurent@guerby.net>
327
328         PR tree-optimization/22336
329         * function.c (record_block_change): Check for 
330         cfun->ib_boundaries_block.
331         
332 2005-07-21  James A. Morrison  <phython@gcc.gnu.org>
333
334         * fold-const.c (fold_unary): Don't strip signed nops from ABS_EXPRs.
335         (tree_expr_nonnegative_p): Return try for TYPE_UNSIGNED.
336
337 2005-07-21  DJ Delorie  <dj@redhat.com>
338
339         * toplev.c (warn_deprecated_use): Add warning control to warning
340         call.
341         * c-typeck.c (parser_build_binary_op): Likewise.
342         (c_finish_if_stmt): Likewise.
343         * c-common.c (check_function_sentinel): Likewise.
344         (check_nonnull_arg): Likewise.
345
346 2005-07-21  Richard Henderson  <rth@redhat.com>
347
348         PR tree-opt/22504
349         * tree-complex.c (complex_ssa_name_components): New.
350         (cvc_lookup): Allow entry not found.
351         (create_components): Remove.
352         (create_one_component_var, get_component_var): New.
353         (get_component_ssa_name, set_component_ssa_name): New.
354         (extract_component): Use get_component_ssa_name.
355         (update_complex_components): Use set_component_ssa_name.
356         (update_complex_components_on_edge): Likewise.
357         (update_phi_components): Create new PHI nodes directly, instead
358         of adding insns to edges.
359         (tree_lower_complex): Allocate and free complex_variable_components
360         and complex_ssa_name_components here.
361
362 2005-07-20  Daniel Berlin  <dberlin@dberlin.org>
363         
364         * alias.c (nonoverlapping_component_refs_p): Use TYPE_MAIN_VARIANT,
365         revert to returning false.
366
367 2005-07-21  Uros Bizjak  <uros@kss-loka.si>
368
369         PR target/21149
370         * config/i386/i386.md (sse_movhlps): Fix vec_select values.
371
372 2005-07-21  Uros Bizjak  <uros@kss-loka.si>
373
374         PR target/22576
375         * config/i386/i386.md (cmpxf): Change operand constraints
376         to "nonmemory_operand".
377
378 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
379
380         * config/i386/i386.md (trap): Use "".word/t0x0b0f" instead of ud2.
381
382 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
383
384         PR middle-end/21180
385         * fold-const.c (fold_build1): Add checksum for the operands.
386         (fold_build2): Likewise.        
387         (fold_build3): Likewise.
388
389 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
390
391         PR middle-end/19055
392         * fold-const.c (fold_binary): Transform "(X | Y) ^ X" to "Y & ~ X".
393
394 2005-07-21  Paolo Bonzini  <bonzini@gnu.org>
395
396         * common.opt (-fforward-propagate): Committed by mistake,
397         removed.
398
399 2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
400
401         * reg-stack.c: Fix comment typo(s).
402         * tree-ssa-operands.c: Likewise.
403         * tree-vectorizer: Likewise.
404
405 2005-07-21  Nick Clifton  <nickc@redhat.com>
406
407         * config/sh/symbian.c: Replace C++ style line comments with C
408         style line comments.
409         (symbian_add_attribute): Do not use a ? operator on the LHS of
410         an assignment.
411         (sh_symbian_handle_dll_attribute): Change the type of the
412         method vector to "VEC(tree,gc)*" and use vector accessor
413         macros to walk over the elements.
414         (symbian_export_vtable_and_rtti_p): Likewise.
415         (symbian_class_needs_attribute_p): Likewise.
416
417 2005-07-21  Paolo Bonzini  <bonzini@gnu.org>
418
419         PR target/22085
420         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
421         initialize targetm.resolve_overloaded_builtin here.
422         (altivec_expand_overloaded_builtin): Make it non-static.
423         * config/rs6000/rs6000-protos.h
424         (altivec_expand_overloaded_builtin): New prototype.
425         * config/rs6000/rs6000.h (REGISTER_TARGET_PRAGMAS): Initialize
426         targetm.resolve_overloaded_builtin here.
427         * config/rs6000/darwin.h (REGISTER_TARGET_PRAGMAS): Likewise.
428
429 2005-07-21  Paolo Bonzini  <bonzini@gnu.org>
430             Zdenek Dvorak  <dvorakz@suse.cz>
431
432         PR tree-optimization/19210
433         * common.opt (Wunsafe-loop-optimizations, funsafe-loop-optimizations):
434         New.
435         * Makefile.in (tree-ssa-loop-niter.o): Depend intl.o.
436         * loop-iv.c (get_simple_loop_desc): If -funsafe-loop-optimizations,
437         rely on unproven assumptions.
438         * predict.c (predict_loops): Adjust call to number_of_iterations_exit.
439         * tree-flow.h (number_of_iterations_exit): Add final parameter.
440         * tree-scalar-evolution.c (number_of_iterations_in_loop): Adjust call
441         to number_of_iterations_exit.
442         * tree-ssa-loop-ivcanon.c (empty_loop_p): Likewise.
443         * tree-ssa-loop-ivopts.c (niter_for_exit): Likewise.
444         * tree-ssa-loop-niter.c (find_loop_niter,
445         estimate_numbers_of_iterations_loop): Likewise.
446         (number_of_iterations_exit): Honor the new options.
447         * doc/invoke.texi (Wunsafe-loop-optimizations,
448         funsafe-loop-optimizations): Document them.
449
450 2005-07-21  Richard Sandiford  <richard@codesourcery.com>
451
452         PR rtl-optimization/22167
453         * gcse.c (hoist_code): Fix hoist_exprs[] check.
454
455 2005-07-20  Adam Nemet  <anemet@lnxw.com>
456
457         * config/rs6000/lynx.h: Mark __do_global_ctors_aux and
458         __do_global_dtors_aux longcall.
459
460 2005-07-20  Kazu Hirata  <kazu@cs.umass.edu>
461
462         * gensupport.c (old_preds): Don't reference PREDICATE_CODES.
463         (old_special_pred_table): Don't reference
464         SPECIAL_MODE_PREDICATES.
465         * system.h (PREDICATE_CODES, SPECIAL_MODE_PREDICATES): Poison.
466         * config/arc/arc.h: Don't mention PREDICATE_CODES.
467         * config/sh/predicates.h: Don't mention
468         SPECIAL_MODE_PREDICATES.
469         * doc/tm.texi (PREDICATE_CODES, SPECIAL_MODE_PREDICATES):
470         Remove.
471
472 2005-07-20  DJ Delorie  <dj@redhat.com>
473
474         * config.gcc: Add m32c-elf support.
475
476         * doc/contrib.texi: Mention m32c.
477         * doc/extend.texi: Document m32c extensions.
478         * doc/install.texi: Mention m32c.
479         * doc/invoke.texi: Document m32c options.
480         * doc/md.texi: Document m32c constraints.
481
482         * config/m32c/addsub.md: New file.
483         * config/m32c/bitops.md: New file.
484         * config/m32c/cond.md: New file.
485         * config/m32c/jump.md: New file.
486         * config/m32c/m32c-lib1.S: New file.
487         * config/m32c/m32c-lib2.c: New file.
488         * config/m32c/m32c-modes.def: New file.
489         * config/m32c/m32c-pragma.c: New file.
490         * config/m32c/m32c-protos.h: New file.
491         * config/m32c/m32c.abi: New file.
492         * config/m32c/m32c.c: New file.
493         * config/m32c/m32c.h: New file.
494         * config/m32c/m32c.md: New file.
495         * config/m32c/m32c.opt: New file.
496         * config/m32c/minmax.md: New file.
497         * config/m32c/mov.md: New file.
498         * config/m32c/muldiv.md: New file.
499         * config/m32c/predicates.md: New file.
500         * config/m32c/prologue.md: New file.
501         * config/m32c/shift.md: New file.
502         * config/m32c/t-m32c: New file.
503
504 2005-07-20  Kaz Kojima  <kkojima@gcc.gnu.org>
505
506         * config/sh/sh.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New constants.
507         (stack_protect_set, stack_protect_test): New expanders.
508         (stack_protect_set_si, stack_protect_set_si_media,
509         stack_protect_set_di_media, stack_protect_test_si,
510         stack_protect_test_si_media, stack_protect_test_di_media):
511         New insns.
512
513 2005-07-20  Andrew Pinski  <pinskia@physics.uc.edu>
514
515         * c-typeck.c (output_init_element): Don't copy the INTEGER_CST.
516
517 2005-07-20  James A. Morrison  <phython@gcc.gnu.org>
518
519         * tree.h (tree_expr_nonzero_p): Export.
520         * fold-const.c (tree_expr_nonzero_p): Likewise.
521         Return true for CALL_EXPRs that are alloca calls.
522         (fold_binary): Use omit_one_operand when checking EQ_EXPRs or NE_EXPRs
523         against zero.
524         * tree-flow.h (expr_computes_nonzero): Remove.
525         * tree-vrp.c (expr_computes_nonzero): Remove.
526         (vrp_expr_computes_nonzero): Use tree_expr_nonzero_p.
527         (extract_range_from_unary_expr): Likewise.
528         * tree-ssa-dom.c (record_equivalences_from_stmt): Use
529         tree_expr_nonzero_p.
530
531 2005-07-20  Bernd Schmidt  <bernd.schmidt@analog.com>
532
533         * config/bfin/bfin-protos.h (legitimize_pic_address): Don't declare.
534         * config/bfin/bfin.c (legitimize_pic_address): Now static.  Take
535         extra arg "picreg" and use it instead of pic_offset_table_rtx.
536         All callers changed.
537         (frame_related_constant_load): New arg "related" which controls
538         setting of RTX_FRAME_RELATED_P.  All callers changed.
539         (bfin_load_pic_reg): New function, broken out of bfin_expand_prologue.
540         (bfin_expand_prologue): Add stack limit checking.
541         * config/bfin/bfin.md (trapifcc): New pattern.
542
543         * config/bfin/bfin.c: Include "langhooks.h".
544         (def_builtin): Go through lang_hooks to call builtin_function.
545
546         * config/bfin/bfin-protos.h (bfin_longcall_p): Declare.
547         * config/bfin/predicates.md (symbol_ref_operand): New.
548         (call_insn_operand): Delete.  All callers changed to use
549         register_no_elim_operand.
550         * config/bfin/bfin.c (init_cumulative_args): Initialize the new
551         call_cookie field.
552         (function_arg): Use it to generate the call's operand 2.
553         (bfin_longcall_p): New function.
554         (bfin_expand_call): Extra arg "cookie".  All callers and declaration
555         changed.  Emit extra USE in the pattern.  Use bfin_longcall_p to
556         determine if the address needs to be in a REG.
557         (bfin_handle_longcall_attribute): New function.
558         (bfin_attribute_table): Add "longcall" and "shortcall".
559         * config/bfin/bfin.h (CALL_NORMAL, CALL_LONG, CALL_SHORT): New macros.
560         (CUMULATIVE_ARGS): New member call_cookie.
561         (PREDICATE_CODES): Add symbol_ref_operand.
562         * config/bfin/bfin.md (call, call_value, sibcall, sibcall_value): Add
563         extra USE to the pattern.
564         (call_symbol, sibcall_symbol, call_value_symbol, sibcall_value_symbol):
565         New patterns, split off call_insn, sibcall_insn, call_value_insn and
566         sibcall_value_insn; now the new patterns handle direct calls and the
567         old ones indirect calls.
568         * doc/extend.texi: Mention Blackfin in longcall/shortcall docs.
569
570 2005-07-20  Zdenek Dvorak  <dvorakz@suse.cz>
571
572         * doc/trouble.texi: Update section on handling of empty loops.
573
574 2005-07-20  Kazu Hirata  <kazu@codesourcery.com>
575
576         * config.gcc: Remove support for sparc-*-openbsd*,
577         i860-*-sysv4*, ip2k-*-elf, ns32k-*-netbsdelf*,
578         ns32k-*-netbsd*.
579         * config.host: Remove support for i860-*-sysv4* as a host.
580         * config/i860/*, config/ip2k/*, config/ns32k/*,
581         config/sparc/openbsd.h, config/sparc/t-openbsd: Remove.
582         * doc/install.texi, doc/invoke.texi, doc/md.texi: Don't
583         mention obsolete ports.
584
585 2005-07-20  Kaz Kojima  <kkojima@gcc.gnu.org>
586
587         * config/sh/sh.c (regno_reg_class): Add GENERAL_REGS for
588         soft frame pointer.
589         (sh_expand_prologue): Use hard_frame_pointer_rtx instead
590         of frame_pointer_rtx.
591         (sh_expand_epilogue): Likewise.
592         (sh_set_return_address): Likewise.
593         (initial_elimination_offset): Use HARD_FRAME_POINTER_REGNUM
594         instead of FRAME_POINTER_REGNUM if needed.  Add elimination
595         offsets from FRAME_POINTER_REGNUM.
596         * config/sh/sh.h (SH_REGISTER_NAMES_INITIALIZER): Add sfp.
597         (sh_register_names): Add initializer for sfp.
598         (GENERAL_OR_AP_REGISTER_P): Permit FRAME_POINTER_REGNUM.
599         (VALID_REGISTER_P): Likewise.
600         (FIRST_PSEUDO_REGISTER): Update.
601         (DWARF_FRAME_REGISTERS): Define.
602         (FIXED_REGISTERS, CALL_USED_REGISTERS): Add sfp.
603         (HARD_FRAME_POINTER_REGNUM): Define.
604         (FRAME_POINTER_REGNUM): Redefine.
605         (ELIMINABLE_REGS): Never eliminate to FRAME_POINTER_REGNUM,
606         but HARD_FRAME_POINTER_REGNUM instead.  Add eliminations
607         from FRAME_POINTER_REGNUM.
608         (CAN_ELIMINATE): Use HARD_FRAME_POINTER_REGNUM instead of
609         FRAME_POINTER_REGNUM.
610         (REG_CLASS_CONTENTS): Add sfp.
611         (REG_ALLOC_ORDER): Likewise.
612         (FRAME_GROWS_DOWNWARD): Set to 1.  Update comment.
613         (GO_IF_LEGITIMATE_ADDRESS): Use hard_frame_pointer_rtx instead
614         of frame_pointer_rtx.
615         (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
616
617 2005-07-19  James A. Morrison  <phython@gcc.gnu.org>
618
619         * fold-const.c (tree_expr_nonnegative_p): Only return true for
620         ABS_EXPR when flag_wrapv is false because of INT_MIN.
621         (tree_expr_nonzero_p): Always call tree_expr_nonzero_p on the argument
622         of an ABS_EXPR.
623         (fold_unary): Always fold ABS_EXPR<ABS_EXPR<x>> into
624         ABS_EXPR<x>.
625
626 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
627
628         Make CONSTRUCTOR use VEC to store initializers.
629         * c-common.c (complete_array_type): Update to cope with VEC in
630         CONSTRUCTOR_ELTS.
631         * c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts.
632         (pp_c_constructor_elts): New function.
633         * c-pretty-print.h (pp_c_constructor_elts): Declare.
634         * c-typeck.c (build_function_call, build_c_cast, digest_init,
635         struct constructor_stack, struct initializer_stack,
636         constructor_elements, push_init_level, pop_init_level,
637         add_pending_init, find_init_member, output_init_element): Update to
638         cope with VEC in CONSTRUCTOR_ELTS.
639         * coverage.c (build_fn_info_value, build_ctr_info_value,
640         build_gcov_info): Likewise.
641         * expr.c (categorize_ctor_elements_1, store_constructor,
642         expand_expr_real_1): Likewise.
643         * fold-const.c (fold_ternary): Likewise.
644         * gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl,
645         gimplify_init_constructor, gimplify_expr): Likewise.
646         * tree-dump.c (dequeue_and_dump): Likewise.
647         * tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR
648         node.
649         * tree-pretty-print.c (dump_generic_node): Update to cope with VEC in
650         CONSTRUCTOR_ELTS.
651         * tree-sra.c (generate_element_init_1): Likewise.
652         * tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise.
653         * tree-ssa-operands.c (get_expr_operands): Likewise.
654         * tree-vect-generic.c (expand_vector_piecewise): Likewise.
655         * tree-vect-transform.c (vect_get_vec_def_for_operand):
656         (get_initial_def_for_reduction): Likewise.
657         * tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses
658         value handle in annotations.
659         * tree.c (tree_node_kind, tree_code_size, make_node_stat,
660         tree_node_structure): Add support for constr_kind.
661         (build_vector_from_ctor, build_constructor_single,
662         build_constructor_from_list): New functions.
663         (build_constructor): Update to take a VEC instead of a TREE_LIST.
664         (simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree):
665         Update to cope with VEC in CONSTRUCTOR_ELTS.
666         * tree.def (CONSTRUCTOR): Make it a tcc_exceptional node.
667         * tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT,
668         CONSTRUCTOR_APPEND_ELT): New macros.
669         (struct constructor_elt, struct tree_constructor): New data types.
670         (union tree_node): Add tree_constructor field.
671         * treestruct.def: Define TS_CONSTRUCTOR.
672         * varasm.c (const_hash_1, compare_constant, copy_constant,
673         compute_reloc_for_constant, output_addressed_constants,
674         initializer_constant_valid_p, output_constant,
675         array_size_for_constructor, output_constructor): Update to cope with
676         VEC in CONSTRUCTOR_ELTS.
677         * vec.h (VEC_empty, VEC_copy): New macros.
678
679 2005-07-19  Devang Patel  <dpatel@apple.com>
680
681         * dbxout.c (dbxout_type): Check Objective-C++ lang.
682         
683 2005-07-19  Richard Henderson  <rth@redhat.com>
684
685         PR tree-opt/22278
686         * gimplify.c (gimplify_expr): Use main variant type for the temp
687         destination for a discarded volatile read.
688         * tree-ssa.c (tree_ssa_useless_type_conversion_1): Don't elide
689         casts between non-void types that change volatility.
690
691 2005-07-15  DJ Delorie  <dj@redhat.com>
692
693         * toplev.h: Add comment about the first parameter for warning().
694         * errors.h: Likewise.
695
696         * c.opt (Wpragmas): New.
697         * doc/invoke.texi: Document it.
698         
699         * function.c (do_warn_unused_parameter): Add warning control to
700         warning call.
701         * c-decl.c (warn_if_shadowing): Likewise.
702         * c-lex.c (cb_def_pragma): Likewise.
703         * c-pragma.c (GCC_BAD, GCC_BAD2): Likewise.
704         (pop_alignment): Likewise.
705         (handle_pragma_pack): Likewise.
706         (apply_pragma_weak): Likewise.
707         (handle_pragma_weak): Likewise.
708         (handle_pragma_redefine_extname): Likewise.
709         (add_to_renaming_pragma_list): Likewise.
710         (handle_pragma_extern_prefix): Likewise.
711         (maybe_apply_renaming_pragma): Likewise.
712         (handle_pragma_visibility): Likewise.
713         
714         * config/c4x/c4x-c.c (BAD): Likewise.
715         (c4x_parse_pragma): Likewise.
716         * config/ia64/ia64-c.c (ia64_hpux_handle_builtin_pragma): Likewise.
717         * config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise.
718         (rs6000_pragma_longcall): Likewise.
719         * config/v850/v850-c.c (pop_data_area): Likewise.
720         (ghs_pragma_section): Likewise.
721         (ghs_pragma_section): Likewise.
722         (ghs_pragma_interrupt): Likewise.
723         (ghs_pragma_starttda): Likewise.
724         (ghs_pragma_startsda): Likewise.
725         (ghs_pragma_startzda): Likewise.
726         (ghs_pragma_endtda): Likewise.
727         (ghs_pragma_endsda): Likewise.
728         (ghs_pragma_endzda): Likewise.
729
730 2005-07-19  Danny Berlin <dberlin@dberlin.org>
731             Kenneth Zadeck <zadeck@naturalbridge.com>
732
733         * Makefile.in: Removed tree-promote-statics.c
734         * tree-promote-statics.c: Removed.
735         * common.opt: Removed flag-promote-statics.
736         * opts.c: Ditto.
737         * passes.c: Removed tree-promote-statics pass. 
738         * tree-pass.h: Ditto.
739         * timevar.def: Removed TV_PROMOTE_STATICS.
740
741
742 2005-07-19  Gerald Pfeifer  <gerald@pfeifer.com>
743
744         * config.gcc: Add support for *-*-freebsd7, *-*-freebsd8,
745         and *-*-freebsd9.
746         * config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Ditto.
747         
748 2005-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
749
750         PR c/22476
751         * c-common.c (check_function_arguments): Call
752         'check_function_format' if either -Wformat or
753         -Wmissing-format-attribute are specified.
754         * c-format.c (check_function_format): Check -Wformat before
755         calling 'check_format_info'.
756         * c-opts.c (c_common_post_options): Don't warn for
757         -Wmissing-format-attribute without -Wformat.
758         * c-typeck.c (convert_for_assignment): Detect additional cases for
759         -Wmissing-format-attribute.
760         * doc/invoke.texi (-Wmissing-format-attribute): Document new
761         behavior.
762
763 2005-07-19  Richard Guenther  <rguenther@suse.de>
764
765         * config/i386/i386.md (lrint<mode>2): Use temporary
766         instead of clobbering non-existent memory.
767
768 2005-07-19  Nick Clifton  <nickc@redhat.com>
769
770         * config/avr/avr.c (legitimate_address_p): Fix debugging print
771         statement to avoid displaying ASCII control characters.
772
773 2005-07-19  Ben Elliston  <bje@au.ibm.com>
774
775         * bt-load.c (link_btr_uses): Fix uninitialised warnings.
776         * cfganal.c (find_edge_index): Ditto.
777         * combine.c (combine_instructions): Ditto.
778         * ddg.c (create_scc): Ditto.
779         (find_successors): Ditto.
780         (find_predecessors): Ditto.
781         (find_nodes_on_paths): Ditto.
782         (longest_simple_path): Ditto.
783         * flow.c (update_life_info): Ditto.
784         (count_or_remove_death_notes): Ditto.
785         (clear_log_links): Ditto.
786         * modulo-sched.c (generate_reg_moves): Ditto.
787         (find_max_asap): Ditto.
788         (find_max_hv_min_mob): Ditto.
789         (find_max_dv_min_mob): Ditto.
790         * sbitmap.c (sbitmap_first_set_bit): Ditto.
791         * sched-rgn.c (extract_edgelst): Ditto.
792         * tree-into-ssa.c (prepare_names_to_update): Ditto.
793         (dump_update_ssa): Ditto.
794         (ssa_names_to_replace) Ditto.
795         (switch_virtuals_to_full_rewrite): Ditto.
796         (update_ssa): Ditto.
797         * tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto.
798
799 2005-07-18  Daniel Berlin  <dberlin@dberlin.org>
800
801         Fix PR tree-optimization/22483
802         
803         * tree-complex.c (create_components): Use
804         safe_referenced_var_iterator and FOR_EACH_REFERENCED_VAR_SAFE.
805         * tree-flow-inline.h (fill_referenced_var_vec): New function.
806         * tree-flow.h (safe_referenced_var_iterator): New structure.
807         (FOR_EACH_REFERENCED_VAR_SAFE): New macro.
808         * tree-ssa-alias.c (setup_pointers_and_addressables): Use
809         safe_referenced_var iterator.
810         (add_type_alias): Ditto.
811
812 2005-07-19  Steven Bosscher  <stevenb@suse.de>
813
814         * loop-init.c (rest_of_handle_loop2): Remove.
815         (rtl_loop_init, rtl_loop_done, rtl_move_loop_invariants,
816         rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): New functions.
817         (pass_rtl_loop_init, pass_rtl_loop_done,
818         pass_rtl_move_loop_invariants, pass_rtl_unswitch,
819         pass_rtl_unroll_and_peel_loops, pass_rtl_doloop): New passes.
820         * tree-ssa-loop.c (pass_loop, pass_loop_init, pass_loop_done,
821         pass_unswitch): Rename to pass_tree_loop, pass_tree_loop_init,
822         pass_tree_loop_done, and pass_tree_unswitch.
823         (gate_loop): Rename to gate_tree_loop.
824         * passes.c (init_optimization_passes): Update for renamed tree
825         loop passes.  Add the new loop2 passes as subpasses of loop2.
826         * tree-pass.h: Add extern declarations for the new loop2 subpasses.
827         Update for the renamed tree loop passes.
828
829 2005-07-18  Ian Lance Taylor  <ian@airs.com>
830
831         PR middle-end/22057
832         * tree-cfgcleanup.c (cleanup_tree_cfg): Only remove forwarder
833         blocks when optimizing.
834
835 2005-07-18  Steve Ellcey  <sje@cup.hp.com>
836
837         * common.opt (frename-registers): Initialize to 2.
838         (fweb): Ditto.
839         (fgcse-after-reload): Ditto.
840         * toplev.c (AUTODETECT_FLAG_VAR_TRACKING): Rename to AUTODETECT_VALUE.
841         (process_options): Only change flag_web, flag_rename_registers,
842         and flag_rerun_cse_after_loop if not explicitly set by user.
843
844 2005-07-18  Jan Beulich  <jbeulich@novell.com>
845
846         * config/i386/i386.c (ix86_expand_branch, ix86_expand_setcc,
847         ix86_expand_carry_flag_compare, ix86_expand_int_movcc): Handle TImode
848         in 64-bit mode the same as DImode in 32-bit mode.
849         (ix86_expand_ashl_const, ix86_split_ashl, ix86_split_ashr,
850         ix86_split_lshr): Likewise. Rename to no longer refer to a specific
851         mode. Add new mode parameter. 
852         * config/i386/i386.h (CONST_OK_FOR_LETTER_P): Describe and handle 'O'.
853         * config/i386/i386.md (cmpti, addti3, subti3, negti2, ashlti3, ashrti3,
854         x86_64_shift_adj): New expanders.
855         (*addti3_1, *subti3_1, *negti2_1, ashlti3_1, *ashlti3_2, ashrti3_1,
856         *ashrti3_2, lshrti3_1, *lshrti3_2, x86_64_shld, x86_64_shrd): New
857         insns.
858         Respective new splitters. Use renamed shift splitter helpers in 32-bit
859         DImode shift splitters.
860         * config/i386/i386-protos.h (ix86_split_ashl, ix86_split_ashr,
861         ix86_split_lshr): Renamed from ix86_split_[al]sh[rl]di. Added new
862         mode parameter.
863
864 2005-07-18  Jan Beulich  <jbeulich@novell.com>
865
866         * i386.md (movdi_extzv_1): New.
867         (zero_extendhidi2): Combine alternatives and never force use of
868         REX64 prefix.
869         (zero_extendqidi2): Likewise. Don't restrict input selection.
870
871 2005-07-17  Daniel Berlin  <dberlin@dberlin.org>
872
873         Fix PR tree-optimization/22531
874         * tree-ssa-pre.c (do_eustores):  Make sure LHS is a decl for the
875          moment.
876
877 2005-07-17  Daniel Berlin  <dberlin@dberlin.org>
878
879         * tree-promote-statics.c (pass_promote_statics): Change dump file
880          name.
881
882 2005-07-17  Daniel Berlin  <dberlin@dberlin.org>
883
884         * tree-optimize.c (init_tree_optimization_passes): Add
885         pass_eliminate_useless_stores pass.
886         * tree-pass.h (pass_eliminate_useless_stores): New pass structure.
887         * tree-ssa-pre.c (is_copy_stmt): New function.
888         (follow_copies_till_vuse): Ditto.
889         (do_eustores): Ditto.
890         (gate_eustores): Ditto. 
891         
892 2005-07-16  Richard Henderson  <rth@redhat.com>
893
894         * gcc.c (MFWRAP_SPEC): Don't wrap pthread_join or pthread_exit.
895
896 2005-07-16 Danny Berlin <dberlin@dberlin.org>
897            Kenneth Zadeck <zadeck@naturalbridge.com>
898
899         * Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c,
900         ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c,
901         ipa-type-escape.h, tree-promote-statics.c
902         * ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c,
903         ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h, 
904         tree-promote-statics.c: new files.
905         * alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p,
906         nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1,
907         int nonlocal_set_p, mark_constant_function): Deleted.
908         (rest_of_handle_cfg): Removed call to mark_constant_function. 
909         (nonoverlapping_component_refs_p): Added calls to support
910         type based aliasing.    
911         * tree-ssa-alias.c (may_alias_p,
912         compute_flow_insensitive_aliasing): Ditto.
913         * calls.c (flags_from_decl_or_type): Removed reference to
914         cgraph_rtl_info. 
915         * c-typeck.c (convert_arguments): Make builtins tolerant of having
916         too many arguments.  This is necessary for Spec 2000.
917         * cgraph.h (const_function, pure_function): Removed.
918         * common.opt: Added "fipa-pure-const", "fipa-reference",  
919         "fipa-type-escape", and "ftree-promote-static".
920         * opts.c: Ditto.
921         * passes.c: Added ipa and tree-promote-statics passes. 
922         * timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE,
923         TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS.
924         * tree-dfa.c (referenced_var_lookup_if_exists): New function.
925         * tree-flow.h: Added exposed sra calls and addition of 
926         reference_vars_info field for FUNCTION_DECLS.
927         * tree-pass.h: Added passes.
928         * tree-sra.c: (sra_init_cache): New function.
929         (sra_insert_before, sra_insert_after) Made public.
930         (type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p
931         and made public.
932         * tree-ssa-alias.c (dump_alias_stats): Added stats for type based
933         aliasing. (may_alias_p): Added code to use type escape analysis to
934         improve alias sets.
935         * tree-ssa-operands.c (add_call_clobber_ops): Added parameter and
936         code to prune clobbers of static variables based on information
937         produced in ipa-reference pass.  Changed call clobbering so that
938         statics are not marked as clobbered if the call does not clobber
939         them.
940
941 2005-07-16  Daniel Berlin  <dberlin@dberlin.org>
942
943         * tree-ssa-structalias.c (need_to_solve): Need to check for preds,
944         too.
945
946 2005-07-16  Eric Botcazou <ebotcazou@libertysurf.fr>
947
948         * doc/install.texi (*-*-solaris2*): Document recommended version
949         of GNU binutils and mention GNU linker problem on Solaris 10.
950
951 2005-07-16  Joseph S. Myers  <joseph@codesourcery.com>
952
953         PR c/22421
954         * c-decl.c (c_build_bitfield_integer_type): New function.
955         (finish_struct): Call it.
956         * c-pretty-print.c (pp_c_type_specifier): Handle bit-field types.
957
958 2005-07-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
959
960         * c-typeck.c (digest_init): Call 'convert_for_assignment'
961         before returning.
962
963 2005-07-16  Jan Hubicka  <jh@suse.cz>
964
965         * cfg.c (update_bb_profile_for_threading): Fix profile updating.
966         (scale_bbs_frequencies_int): Watch roundoff errors.
967         * predict.c (return_prediction): Initialize return_stmt.
968
969 2005-07-16  Jan Hubicka  <jh@suse.cz>
970
971         * profile.c (rest_of_handle_branch_prob): Fix handling of estimation
972         after RTL profiling.
973
974 2005-07-11  Andrew Pinski  <pinskia@physics.uc.edu>
975
976         PR middle-end/22398
977         * fold-const.c (build_range_check): Convert high/low to etype
978         if we are only comparing against exp.
979
980 2005-07-13  Daniel Berlin  <dberlin@dberlin.org>
981
982         Fix PR tree-optimization/22376
983         * tree-ssa-structalias.c (build_constraint_graph): We really meant
984         special var here.
985         (need_to_solve): New function.
986         (compute_points_to_sets): Use it.
987         
988 2005-07-15  Jan Hubicka  <jh@suse.cz>
989
990         * cfg.c (update_bb_profile_for_threading): More diagnostic.
991         * tree-ssa-threadupdate.c (redirect_edges): Update profile of dup_block.
992
993 2005-07-15  Richard Guenther  <rguenther@suse.de>
994
995         * c-common.c (handle_flatten_attribute): New function.
996         Add flatten function attribute.
997         * doc/extend.texi: Document flatten function attribute.
998         * Makefile.in (ipa-inline.o): Depend on hashtab.h.
999         * ipa-inline.c (cgraph_find_cycles, cgraph_flatten_node):
1000         New functions.
1001         (cgraph_decide_inlining): Handle functions with flatten
1002         attribute.
1003
1004 2005-07-14  David Edelsohn  <edelsohn@gnu.org>
1005
1006         * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_LWSYNC,
1007         UNSPEC_ISYNC, UNSPEC_SYNC_OP, UNSPEC_ATOMIC, UNSPEC_CMPXCHG,
1008         UNSPEC_XCHG, UNSPEC_AND): New.
1009         (UNSPECV_ATOMIC, UNSPECV_SYNC, UNSPECV_SYNC_OP, UNSPECV_CMPXCHG,
1010         UNSPECV_LWSYNC, UNSPECV_ISYNC): Delete.
1011         * config/rs6000/sync.md (FETCHOP): New code macro.
1012         (fetchop_name, fetchop_pred, fetchopsi_constr, fetchopdi_constr):
1013         New code attrs.
1014         (memory_barrier, sync_internal): Use unspec instead of unspec_volatile.
1015         (sync_compare_and_swap<mode>): Same.
1016         (sync_lock_test_and_set<mode>): Same.
1017         (sync_<fetchop><mode>, sync_nand<mode>): Only use rs6000_emit_sync
1018         for QImode and HImode, and not PPC405.
1019         (sync_old_<fetchop><mode>, sync_old_nand<mode>): Same.
1020         (sync_new_<fetchop><mode>, sync_new_nand<mode>): Same.
1021         (sync_<fetchop>{si,di}_internal): New.
1022         (sync_nand{si,di}_internal): New.
1023         (sync_old_<fetchop>{si,di}_internal): New.
1024         (sync_old_nand{si,di}_internal): New
1025         (sync_new_<fetchop>{si,di}_internal): New.
1026         (sync_new_nand{si,di}_internal): New.
1027         (atomic_and{si,di}): New.
1028         (sync_new_nand{si,di}_internal): New.
1029         (atomic_and{si,di}): New.
1030         (sync_add<mode>_internal): Delete.
1031         (sync_addshort_internal): Use unspec instead of unspec_volatile.
1032         (sync_sub<mode>_internal): Delte.
1033         (sync_subshort_internal): New.
1034         (sync_andsi_internal): Use unspec instead of unspec_volatile.
1035         (sync_anddi_internal): Delete.
1036         (sync_boolsi_internal): Use unspec instead of unspec_volatile.
1037         (sync_booldi_internal): Delete.
1038         (sync_boolc<mode>_internal): Delete.
1039         (sync_boolcshort_internal): Use unspec instead of unspec_volatile.
1040         (sync_boolc<mode>_internal2): Delete.
1041         (sync_boolcc<mode>_internal): Delete.
1042         (isync, lwsync): Use unspec instead of unspec_volatile.
1043         * config/rs6000/rs6000.c (rs6000_emit_sync): Implement MINUS.
1044         Revert UNSPEC_VOLATILE.
1045         (rs6000_split_atomic_op): New.
1046         * config/rs6000/rs6000-protos.h (rs6000_split_atomic_op): Declare.
1047
1048 2005-07-14  Eric Christopher  <echristo@redhat.com>
1049
1050         * config/mips/mips.c (mips_canonicalize_comparison): Cast
1051         argument of trunc_int_for_mode to unsigned HOST_WIDE_INT.
1052
1053 2005-07-14  Eric Christopher  <echristo@redhat.com>
1054
1055         * config/s390/t-tpf (SHLIB_MAPFILES): Remove.
1056
1057 2005-07-14  Steven Bosscher  <stevenb@suse.de>
1058
1059         PR tree-optimization/22230
1060         * tree-vrp.c (extract_range_from_binary_expr): Fix logics thinko in
1061         the computation of the four cross productions for "range op range".
1062
1063 2005-07-14  Alexandre Oliva  <aoliva@redhat.com>
1064             Ulrich Weigand  <uweigand@de.ibm.com>
1065
1066         PR target/20126
1067         * loop.c (loop_givs_rescan): Do not ICE if unable to reduce an IV
1068         in some insn.
1069
1070 2005-07-14  Ulrich Weigand  <uweigand@de.ibm.com>
1071
1072         * config/s390/s390.h (TARGET_TPF_PROFILING): Add default definition.
1073
1074 2005-07-14  Steve Ellcey  <sje@cup.hp.com>
1075
1076         * config/ia64/ia64.c (ia64_output_dwarf_dtprel): Support ILP32 mode.
1077
1078 2005-07-14  Richard Guenther  <rguenther@suse.de>
1079
1080         PR middle-end/22347
1081         * config/i386/i386-protos.h (ix86_function_value): Change
1082         prototype to match new target hook.
1083         * config/i386/i386.c (ix86_value_regno): Change prototype
1084         to take extra type argument.
1085         (TARGET_FUNCTION_VALUE): Define.
1086         (ix86_function_ok_for_sibcall): Pass extra argument to
1087         ix86_value_regno, check return slot rtx for exact match.
1088         (ix86_function_value): Take extra parameter.  Dispatch to
1089         ix86_value_regno with fndecl/fntype as provided.
1090         (ix86_value_regno): Handle extra type argument.
1091         * config/i386/i386.h (FUNCTION_VALUE): No longer define.
1092
1093         * testsuite/gcc.target/i386/sseregparm-3.c: New testcase.
1094         * testsuite/gcc.target/i386/sseregparm-4.c: New testcase.
1095         * testsuite/gcc.target/i386/sseregparm-5.c: New testcase.
1096         * testsuite/gcc.target/i386/sseregparm-6.c: New testcase.
1097         * testsuite/gcc.target/i386/sseregparm-7.c: New testcase.
1098
1099 2005-07-14  Richard Guenther  <rguenther@suse.de>
1100
1101         * Makefile.in (explow.o, reg-stack.o): Depend on target.h.
1102         * calls.c (expand_call): Pass fntype to hard_function_value.
1103         (emit_library_call_value_1): Likewise.
1104         * explow.c: Include target.h.
1105         (hard_function_value): Take extra argument, the fntype.
1106         Use new target hook for function_value.
1107         * expr.h (hard_function_value): Change prototype.
1108         * function.c (aggregate_value_p): Pass 0 as fntype to
1109         hard_function_value.
1110         (assign_parms): Use new target hook for function_value.
1111         Pass 0 as fntype to hard_function_value.
1112         (expand_function_end): Likewise.
1113         * reg-stack.c: Include target.h.
1114         (stack_result): Use new target hook for function_value.
1115         * target-def.h: New target hook function_value.
1116         * target.h: Likewise.
1117         * targhooks.c (default_function_value): New function.
1118         * targhooks.h (default_function_value): Declare.
1119
1120 2005-07-13  Ian Lance Taylor  <ian@airs.com>
1121
1122         * config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
1123
1124 2005-07-14  Jan Hubicka  <jh@suse.cz>
1125
1126         * tree-dfa.c (dump_variable): Use default_def function.
1127         * tree-ssa-alias.c (dump_points_to_info): Likewise.
1128         * tree-ssa.c (verify_use): Likewise.
1129         * tree-ssanames.c (release_ssa_name): Likewise.
1130         * tree-tailcall.c (eliminate_tail_call): Likewise.
1131         (tree_optimize_tail_calls_1): Likewise.
1132         * tree-vrp.c (get_value_range): Likewise.
1133
1134 2005-07-14  Ben Elliston  <bje@au.ibm.com>
1135
1136         * gcc.c (main): Compare language[0] with '*' when iterating over
1137         the infiles.
1138
1139 2005-07-13  Adrian Strae½tling  <straetling@de.ibm.com>
1140
1141         * config/s390/s390.c: (s390_cc_modes_compatible): Move before
1142         "s390_emit_compare".  Add handling of CCZ1mode.
1143         (s390_canonicalize_comparison): Simplify cascaded EQ, NE.
1144         (390_emit_compare): Use "s390_cc_modes_compatible" for mode
1145         checking.
1146         (s390_branch_condition_mask): Add CCZ1mode handling.
1147         * config/s390/s390.md: ("seq", "*seq"): New pattern.
1148         ("sync_compare_and_swap_cc<mode>", "*sync_compare_and_swap_cc<mode>"):
1149         Use CCZ1mode instead of CCZmode.
1150         * config/s390/s390-modes.def: Add CCZ1mode.  Comment new mode.
1151
1152 2006-07-13  Adrian Strae½tling  <straetling@de.ibm.com>
1153
1154         * config/s390/s390.md: ("cmpstrsi", "*cmpstr<mode>"): New
1155         pattern.
1156         ("strlen<mode>", "*strlen<mode>"): Use hard reg 0 in SImode.
1157
1158 2005-07-13  Eric Christopher  <echristo@redhat.com>
1159
1160         * config/mips/mips.c (mips_canonicalize_comparison): New.
1161         (mips_emit_int_relational): Use.
1162
1163 2005-07-13  Eric Christopher  <echristo@redhat.com>
1164
1165         * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove
1166         static extra parts.
1167         * config/s390/s390.md: Include tpf.md. Move tpf specific
1168         patterns...
1169         * config/s390/tpf.md: To here.
1170         * config/s390/s390.opt: Move tpf specific options...
1171         * config/s390/tpf.opt: to here. Add mmain option.
1172         * config/s390/tpf-unwind.h: Remove unnecessary defines.
1173         * config/s390/tpf.h: Rewrite.
1174
1175 2005-07-13  H.J. Lu  <hongjiu.lu@intel.com>
1176
1177         * doc/tm.texi: Remove @xref{Cross-profiling}.
1178
1179 2005-07-13  Jeff Law  <law@redhat.com>
1180
1181         * fold-const.c (fold_binary): When comparing two simple ADDR_EXPR
1182         expressions, test their _DECL operands for pointer equality rather
1183         than using operand_equal_p.
1184
1185 2005-07-13  H.J. Lu  <hongjiu.lu@intel.com>
1186
1187         * config/alpha/linux.h (TARGET_HAS_F_SETLKW): Renamed to ...
1188         (TARGET_POSIX_IO): This.
1189         * config/darwin.h: Likewise.
1190         * config/freebsd.h: Likewise.
1191         * config/linux.h: Likewise.
1192         * config/lynx.h: Likewise.
1193         * config/netbsd.h: Likewise.
1194         * config/rs6000/linux64.h: Likewise.
1195         * config/rs6000/linux.h: Likewise.
1196         * config/s390/tpf.h: Likewise.
1197         * config/sh/embed-elf.h: Likewise.
1198         * config/sparc/linux64.h: Likewise.
1199         * config/sparc/linux.h: Likewise.
1200         * config/svr4.h: Likewise.
1201         * gcov-io.h: Likewise.
1202
1203         * doc/tm.texi: Updated.
1204
1205         * libgcov.c (create_file_directory): Defined only if
1206         TARGET_POSIX_IO is defined.
1207         (gcov_exit): Call create_file_directory only if TARGET_POSIX_IO
1208         is defined.
1209
1210 2005-07-13  Jan Hubicka  <jh@suse.cz>
1211
1212         * tree-ssa-operands.c (get_expr_operands): Fix typo in previous patch.
1213
1214 2005-07-13  David Edelsohn  <edelsohn@gnu.org>
1215
1216         * tree-ssa-dom.c (lookup_avail_expr): Do not pass member in freed
1217         structure as argument.
1218
1219 2005-07-13  Paolo Bonzini  <bonzini@gnu.org>
1220
1221         PR tree-optimization/21921
1222         * tree-iterator.c (tsi_link_before): Support the case when
1223         tsi_end_p (tsi) == true.
1224
1225 2005-07-12  Zdenek Dvorak  <dvorakz@suse.cz>
1226
1227         PR tree-optimization/22442
1228         * tree-chrec.c (chrec_fold_multiply_poly_poly): Associate chrecs
1229         correctly.
1230
1231 2005-07-12  Zdenek Dvorak  <dvorakz@suse.cz>
1232
1233         PR rtl-optimization/20376
1234         * toplev.c (process_options): Enable -fweb and -frename-registers when
1235         unrolling.
1236         * doc/invoke.texi: Update the information about when -fweb and
1237         -frename-registers are enabled.
1238
1239 2005-07-12  Andrew Pinski  <pinskia@physics.uc.edu>
1240
1241         PR tree-opt/21840
1242         * tree-ssa-pre.c (eliminate): Convert the sprime to the correct type
1243         if *rhs_p is not a SSA_NAME.
1244
1245 2005-07-12  Daniel Berlin  <dberlin@dberlin.org>
1246         
1247         Fix PR tree-optimization/22422 
1248         * tree-ssa-structalias.c (struct variable_info): Add flag for
1249         special vars.
1250         (get_varinfo): Now a static function.
1251         (new_varinfo): init has_union and is_special_var to false.
1252         (solution_set_add): Check has_union.
1253         (do_da_constraint): Move temporary variable so it gets reset
1254         properly.
1255         Also check for special variable.
1256         (do_ds_constraint): Ditto.
1257         (do_sd_constraint): Ditto.
1258         (do_structure_copy): Check for special variable.
1259         (find_func_aliases): Ditto.
1260         (init_base_vars): Set special vars properly.    
1261
1262 2005-07-13  Jan Hubicka  <jh@suse.cz>
1263
1264         * cfgexpand.c (expand_one_stack_var): Do not expand variables when we
1265         do unit-at-a-time.
1266
1267         * tree-ssa-operands.c (parse_ssa_operands): Fix formatting.
1268         (get_expr_operands): Fix thinko wrt flags and subvars.
1269
1270         PR tree-optimize/22379
1271         * tree-inline.c (expand_call_inline): Do not output sorry in early
1272         inlining.
1273
1274 2005-07-12  Dale Johannesen  <dalej@apple.com>
1275
1276         * config/rs6000.c (rs6000_rtx_cost):  Move FLOAT_EXTEND.
1277
1278 2005-07-12  Andrew Pinski  <pinskia@physics.uc.edu>
1279
1280         PR bootstrap/21704
1281         * host-linux.h: Include limits.h.
1282
1283 2005-07-12  Dale Johannesen  <dalej@apple.com>
1284
1285         * expr.c (compress_float_constant):  Add cost check.
1286         * config/rs6000.c (rs6000_rtx_cost):  Adjust FLOAT_EXTEND cost.
1287
1288 2005-07-12  Dale Johannesen  <dalej@apple.com>
1289
1290         * gcc.target/i386/compress-float-sse.c:  New.
1291         * gcc.target/i386/compress-float-sse-pic.c:  New.
1292         * gcc.target/i386/compress-float-387.c:  New.
1293         * gcc.target/i386/compress-float-387-pic.c:  New.
1294         * gcc.dg/compress-float-ppc.c:  New.
1295         * gcc.dg/compress-float-ppc-pic.c:  New.
1296
1297 2005-07-12  Eric Christopher  <echristo@redhat.com>
1298
1299         * config.gcc (s390x-ibm-tpf*): Add extra_options. Remove
1300         static extra parts.
1301         * config/s390/s390.md: Include tpf.md. Move tpf specific
1302         patterns...
1303         * config/s390/tpf.md: To here.
1304         * config/s390/s390.opt: Move tpf specific options...
1305         * config/s390/tpf.opt: to here. Add mmain option.
1306         * config/s390/tpf-unwind.h: Remove unnecessary defines.
1307         * config/s390/tpf.h: Rewrite.
1308
1309 2005-07-12  Eric Christopher  <echristo@redhat.com>
1310
1311         * gcc.c (struct infile): Update comment for language.
1312         (main): Rewrite input file resetting code.
1313
1314 2005-07-12  Andrew Pinski  <pinskia@physics.uc.edu>
1315
1316         PR tree-opt/22335
1317         * tree-ssa-dom.c (eliminate_redundant_computations): Reject the prop if
1318         requiring a cast in a non RHS of modify_expr.  Add a cast when required.
1319         (lookup_avail_expr): Use constant_boolean_node instead
1320         of boolean_false_node/boolean_true_node.
1321
1322 2005-07-12  Ben Elliston  <bje@au.ibm.com>
1323
1324         * tree-cfg.c (dump_cfg_stats): Add a new fmt_str_2 format string
1325         and use it when printing num_edges.
1326
1327 2005-07-12  Bernd Schmidt  <bernd.schmidt@analog.com>
1328
1329         * doc/extend.texi (Blackfin Built-in Functions): New section.
1330         * doc/invoke.texi (mcsync-anomaly, mno-csync-anomaly): Fix the
1331         @opindex.
1332
1333 2005-07-12  Adrian Straetling  <straetling@de.ibm.com>
1334
1335         * builtins.c: (expand_builtin_memcmp, expand_builtin_strncmp):
1336         s/cmpstrsi/cmpstrnsi
1337         (expand_builtin_strcmp): Rewrite to support both 'cmpstrsi' and
1338         'cmpstrnsi'.
1339         * optabs.c: (prepare_cmp_insn): Add availability of 'cmpstrn'.
1340         (init_optabs): Initialize cmpstrn_optab.
1341         * optabs.h: (enum insn_code cmpstrn_optab): Declare.
1342         * genopinit.c: (optabs[]): Add 'cmpstrn' to initialisation.
1343         * expr.c: (enum insn_code cmpstrn_optab): Declare.
1344         * config/i386/i386.md: s/cmpstr/cmpstrn
1345         * config/c4x/c4x.md: s/cmpstr/cmpstrn
1346         * doc/md.texi: Update documentation.
1347
1348 2005-07-11  Richard Henderson  <rth@redhat.com>
1349
1350         * config/alpha/alpha.c (alpha_gimplify_va_arg_1): Use
1351         build_va_arg_indirect_ref.
1352         (alpha_gimplify_va_arg): Likewise.
1353         * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
1354         * config/i860/i860.c (i860_gimplify_va_arg_expr): Likewise.
1355         * config/mips/mips.c (mips_gimplify_va_arg_expr): Likewise.
1356         * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
1357         * config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise.
1358         * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_arg):
1359         Likewise.
1360         * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise.
1361
1362 2005-07-12  Zdenek Dvorak  <dvorakz@suse.cz>
1363
1364         * tree-flow.h (remove_empty_loops, single_dom_exit): Declare.
1365         * passes.c (init_optimization_passes): Add pass_empty_loop.
1366         * tree-pass.h (pass_empty_loop): Declare.
1367         * tree-ssa-loop-ivcanon.c (empty_loop_p, remove_empty_loop,
1368         try_remove_empty_loop, remove_empty_loops): New functions.
1369         * tree-ssa-loop-ivopts.c (single_dom_exit): Export.
1370         * tree-ssa-loop.c (tree_ssa_empty_loop, pass_empty_loop): New.
1371
1372 2005-07-12  Peter Barada  <peter@the-baradas.com>
1373
1374         PR middle-end/16719
1375         PR middle-end/18421
1376         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Disallow bytes
1377         in address registers.
1378         * config/m68k/m68k.c (hard_regno_mode_ok): Likewise.
1379         * config/m68k/m68k.md: Replace 's' with 'i' in 4th
1380         alternative of addsi3_5200.
1381
1382 2005-07-11  Ian Lance Taylor  <ian@airs.com>
1383
1384         * config/mips/mips.md (ffs<mode>2): Remove.
1385
1386 2005-07-11  Ian Lance Taylor  <ian@airs.com>
1387
1388         * doc/tree-ssa.texi (Cleanups): Improve description of
1389         TRY_FINALLY_EXPR.
1390         (GIMPLE Exception Handling): Clarify TRY_CATCH_EXPR cases.
1391
1392 2005-07-11  Daniel Berlin  <dberlin@dberlin.org>
1393         
1394         * print-tree.c (print_node): Use DECL_ARGUMENT_FLD.
1395         * tree.h (DECL_ARGUMENT_FLD): New macro.
1396
1397 2005-07-11  Daniel Berlin  <dberlin@dberlin.org>
1398         
1399         Fix PR tree-optimization/22404
1400
1401         * tree-ssa-structalias.c (create_variable_info_for): Use
1402         correct offset.
1403
1404 2005-07-11  Bernd Schmidt  <bernd.schmidt@analog.com>
1405
1406         * config/bfin/bfin.md (cmpsi, compare_eq, compare_ne, compare_lt,
1407         compare_le, compare_leu, compare_ltu): Use reg_or_const_int_operand
1408         for second comparison operand.
1409         * config/bfin/predicates.md (reg_or_const_int_operand): New.
1410
1411         * config/bfin/bfin.md (define_attr "type"): Add "sync".
1412         (define_insn_reservation "alu"): Likewise.
1413         (csync, ssync): Now of type sync.
1414         * config/bfin/bfin.h (TARGET_DEFAULT): Defaults to
1415         -mcsync-anomaly -mspecld-anomaly.
1416         * config/bfin/bfin.opt (mcsync): Remove.
1417         (mcsync-anomaly, mspecld-anomaly): Add.
1418         * config/bfin/bfin.c: Include "insn-codes.h".
1419         (bfin_reorg): Extend to handle the CSYNC anomaly as well.
1420         (TARGET_DEFAULT_TARGET_FLAGS): New.
1421         * doc/invoke.texi: Document -mcsync-anomaly, -mspecld-anomaly.
1422
1423 2005-07-11  Steven Bosscher  <stevenb@suse.de>
1424
1425         * basic-block.h: Give the BB flags enum a name, bb_flags.
1426         Add new flags BB_FORWARDER_BLOCK, and BB_NONTHREADABLE_BLOCK.
1427         * cfgcleanup.c (enum bb_flags): Remove here.
1428         (BB_FLAGS, BB_SET_FLAG, BB_CLEAR_FLAG): Remove.
1429         (notice_new_block): Set/test bb->flags instead of aux via BB_FLAGS.
1430         (update_forwarder_flag): Likewise.
1431         (thread_jump): Likewise.
1432         (try_forward_edges): Likewise.
1433         (try_optimize_cfg): Likewise.  Clear bb->flags before updating the
1434         forwarder flags.  Don't clear bb->aux for all basic blocks.  Only
1435         reset the BB_FORWARDER_BLOCK and BB_NONTHREADABLE_BLOCK flags.
1436
1437 2005-07-11  Richard Guenther  <rguenther@suse.de>
1438
1439         * config/i386/i386.opt: New target option -msseregparm.
1440         * config/i386/i386.c (override_options): Error out for
1441         -msseregparm but no SSE support.
1442         (ix86_function_sseregparm): Check for global sseregparm.
1443         * doc/invoke.texi: Document -msseregparm.
1444
1445 2005-07-11  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1446
1447         * config.gcc (m32r-*-linux*): Use the default extra_parts.
1448         (m32rle-*-linux*): Ditto.
1449
1450 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1451
1452         * cfgexpand.c (stack_protect_classify_type): Use TYPE_SIZE_UNIT (type)
1453         instead of TYPE_MAX_VALUE (TYPE_DOMAIN (type)) to get array size in
1454         bytes.
1455
1456 2005-07-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1457
1458         PR middle-end/22239
1459         PR target/20126
1460         * loop.c (loop_givs_rescan): Use expand_simple_binop instead of
1461         gen_rtx_MINUS to handle non-replaceable (plus ((x) (const)).
1462
1463 2005-07-07  Daniel Berlin  <dberlin@dberlin.org>
1464
1465         * tree-ssa-structalias.c (struct variable_info): Heapify complex.
1466         (varmap): Heapify varmap.
1467         (constraints): Heapify constraints.
1468         (struct constraint_graph): Heapify succs and preds.
1469         (constraint_vec_find): Update for heapification.
1470         (constraint_set_union): Ditto.
1471         (insert_into_complex): Ditto.
1472         (constraint_edge_vec_find): Ditto.
1473         (erase_graph_self_edge): Ditto.
1474         (add_graph_edge): Ditto.
1475         (get_graph_weights): Ditto.
1476         (merge_graph_nodes): Ditto.
1477         (build_constraint_graph): Ditto.
1478         (topo_visit): Ditto.
1479         (solve_graph): Ditto.
1480         (create_variable_info_for): Ditto.
1481         (init_base_vars): Ditto.
1482         (delete_points_to_sets): Free graph, varmap, and complex constraints.
1483         (condese_varmap_nodes): Free complex vector.
1484         (clear_edges_for_node): Clear succs and preds vector.
1485
1486 2005-07-10  Daniel Berlin  <dberlin@dberlin.org>
1487
1488         * tree-ssa-structalias.c (update_alias_info): Change counting of
1489         references to not include vdefs.
1490         
1491 2005-07-10  Daniel Berlin  <dberlin@dberlin.org>
1492
1493         * tree-ssa-alias.c (free_used_part_map): Add missing free.
1494         (up_insert): Ditto.
1495
1496 2005-07-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1497
1498         * pa.c (pa_commutative_p): Make PLUS commutative when
1499         TARGET_NO_SPACE_REGS is true.
1500
1501 2005-07-09  Diego Novillo  <dnovillo@redhat.com>
1502
1503         * Makefile.in (tree-ssa-alias.o): Depend on tree-ssa-structalias.h
1504         * tree-cfg.c (CHECK_OP): Only test for is_gimple_val.
1505         * tree-dfa.c (dump_subvars_for): New.
1506         (debug_subvars_for): New.
1507         (dump_variable): Show subvariables if VAR has them.
1508         * tree-flow-inline.h (get_subvar_at): New.
1509         (overlap_subvar): Change offset and size to unsigned HOST_WIDE_INT.
1510         * tree-flow.h (struct ptr_info_def): Remove field pt_malloc.
1511         Update all users.
1512         (struct subvar): Change fields offset and size to unsigned
1513         HOST_WIDE_INT.
1514         (dump_subvars_for): Declare.
1515         (debug_subvars_for): Declare.
1516         (get_subvar_at): Declare.
1517         (okay_component_ref_for_subvars): Change 2nd and 3rd argument
1518         to unsigned HOST_WIDE_INT *.
1519         (overlap_subvar): Likewise.
1520         * tree-gimple.c (is_gimple_reg): Always return false for
1521         SFTs and memory tags.
1522         * tree-pass.h (pass_build_pta, pass_del_pta): Remove.
1523         Update all callers.
1524         * tree-ssa-alias.c: Include tree-ssa-structalias.h.
1525         (compute_may_aliases): Call compute_points_to_sets.
1526         (collect_points_to_info_for): Remove.
1527         (compute_points_to_and_addr_escape): Remove.
1528         (delete_alias_info): Call delete_points_to_sets.
1529         (compute_flow_sensitive_aliasing): If the call to
1530         find_what_p_points_to returns false, call set_pt_anything.
1531         (add_may_alias): Set TREE_ADDRESSABLE when adding a new alias.
1532         (set_pt_anything): Clear pi->pt_vars.
1533         (set_pt_malloc): Remove.
1534         (merge_pointed_to_info): Remove.
1535         (add_pointed_to_expr): Remove.
1536         (add_pointed_to_var): Remove.
1537         (collect_points_to_info_r): Remove.
1538         (is_escape_site): Make extern.
1539         (create_sft): New.
1540         (create_overlap_variables_for): Call it.
1541         * tree-ssa-copy.c (merge_alias_info): Never merge
1542         flow-sensitive alias information.
1543         * tree-ssa-operands.c (get_expr_operands): Adjust variables
1544         offset and size to be unsigned HOST_WIDE_INT.
1545         (add_to_addressable_set): Rename from note_addressable.
1546         Set TREE_ADDRESSABLE as the variables are added to the set.
1547         Update all users.
1548         (add_stmt_operand): Do not try to micro-optimize unmodifiable
1549         operands into VUSEs when adding V_MAY_DEFs for members in an
1550         alias set.
1551         * tree-ssa-operands.h (add_to_addressable_set): Declare.
1552         * tree-ssa-structalias.c: Include tree-ssa-structalias.h last.
1553         (struct variable_info): Add bitfield is_heap_var.
1554         (var_anyoffset, anyoffset_tree, anyoffset_id): Declare.
1555         (new_var_info): Initialize is_heap_var.
1556         (get_constraint_for): Add HEAP variables to the symbol table.
1557         Mark them with is_heap_var.
1558         (update_alias_info): New.  Taken mostly from the old
1559         compute_points_to_and_addr_escape.
1560         (handle_ptr_arith): New.
1561         (find_func_aliases): Call update_alias_info.
1562         Call handle_ptr_info for tcc_binary expressions.
1563         Call mark_stmt_modified.
1564         (create_variable_info_for): If DECL has subvars, do not create
1565         variables for its subvars.  Always add all the fields.
1566         (set_uids_in_ptset): If the solution includes ANYOFFSET and
1567         SFTs, then add all the SFTs of the structure.
1568         If VI->DECL is an aggregate with subvariables, add the SFT at
1569         VI->OFFSET.
1570         (find_what_p_points_to): If VI is an artificial variable,
1571         translate to bitfields in SSA_NAME_PTR_INFO.
1572         If the solution is empty, set pi->pt_vars to NULL
1573         (init_base_vars): Create ANYOFFSET.
1574         (compute_points_to_sets): Rename from create_alias_vars.
1575         Make extern.
1576         (pass_build_pta): Remove.
1577         (delete_points_to_sets): Rename from delete_alias_vars.
1578         (pass_del_pta): Remove.
1579         * tree-ssa-structalias.h (struct alias_info): Move from
1580         tree-ssa-alias.h.
1581         (NUM_REFERENCES, NUM_REFERENCES_CLEAR, NUM_REFERENCES_INC,
1582         NUM_REFERENCES_SET): Likewise.
1583         (compute_points_to_sets, delete_points_to_sets): Declare.
1584
1585 2005-07-09  Richard Henderson  <rth@redhat.com>
1586
1587         * config/alpha/alpha.c (emit_insxl, alpha_expand_compare_and_swap_12,
1588         alpha_split_compare_and_swap_12, alpha_expand_lock_test_and_set_12,
1589         alpha_split_lock_test_and_set_12): New functions.
1590         * config/alpha/alpha-protos.h: Update.
1591         * config/alpha/alpha.md (UNSPEC_MB, UNSPEC_ATOMIC,
1592         UNSPEC_CMPXCHG, UNSPEC_XCHG): Rename from UNSPECV_FOO.
1593         * config/alpha/sync.md (I12MODE): New.
1594         (memory_barrier, mb_internal): Use unspec instead of unspec_volatile.
1595         (sync_<fetchop_name><I48MODE>): Likewise.
1596         (sync_nand<I48MODE>): Likewise.
1597         (sync_old_<fetchop_name><I48MODE>): Likewise.
1598         (sync_new_<fetchop_name><I48MODE>): Likewise.
1599         (sync_old_nand<I48MODE>, sync_new_nand<I48MODE>): Likewise.
1600         (sync_compare_and_swap<I48MODE>): Likewise.
1601         (sync_lock_test_and_set<I48MODE>): Likewise.
1602         (sync_compare_and_swap<I12MODE>): New.
1603         (sync_compare_and_swap<I12MODE>_1): New.
1604         (sync_lock_test_and_set<I12MODE>): New.
1605         (sync_lock_test_and_set<I12MODE>_1): New.
1606
1607 2005-07-09  Diego Novillo  <dnovillo@redhat.com>
1608
1609         PR 21356
1610         PR 22332
1611         * passes.c (execute_todo): Cleanup the CFG before updating SSA.
1612
1613 2005-07-09  Jakub Jelinek  <jakub@redhat.com>
1614
1615         * config/i386/i386.c (output_set_got): Don't omit OFFSET FLAT:
1616         in Intel syntax add %reg, OFFSET FLAT:_GLOBAL_OFFSET_TABLE_+(.-.Lx).
1617
1618 2005-07-09  Richard SAndiford  <richard@codesourcery.com>
1619
1620         PR target/21656
1621         * config/mips/elf.h (NO_IMPLICIT_EXTERN_C): Define.
1622
1623 2005-07-08  David Edelsohn  <edelsohn@gnu.org>
1624
1625         * config/rs6000/sync.md (load_locked_<mode>): Use Z for
1626         memory_operand constraint.
1627         (store_conditional_<mode>): Same.
1628         (sync_compare_and_swap<mode>): Same.
1629         (sync_lock_test_and_set<mode>): Same.
1630
1631 2005-07-08  Hans-Peter Nilsson  <hp@axis.com>
1632
1633         Rewrite PIC support to more closely model actual instructions.
1634         * config/cris/cris-protos.h (cris_gotless_symbol, cris_got_symbol)
1635         (cris_symbol): Remove prototypes for removed functions.
1636         (cris_pic_symbol_type_of, cris_valid_pic_const)
1637         (cris_expand_pic_call_address): Prototypes for new functions.
1638         * config/cris/cris/cris.c (cris_pic_sympart_only): Remove unused
1639         variable.
1640         (cris_print_operand) <case 'v', 'P'>: Remove cases for unused
1641         modifiers.
1642         <case ':'>: Add case for new punctuation character.
1643         <case 'd'>: Temporarily set flag_pic = 2 instead of incorrectly
1644         emitting (extra) PIC modifier.
1645         <case UNSPEC>: Do not assert for PLT.
1646         (cris_initial_frame_pointer_offset, cris_simple_epilogue)
1647         (cris_expand_prologue, cris_expand_epilogue): Check
1648         for pic_offset_table_rtx usage instead of taking
1649         current_function_uses_pic_offset_table as the final word.
1650         (cris_rtx_costs, cris_address_cost, cris_side_effect_mode_ok):
1651         Remove flag_pic difference.
1652         (cris_valid_pic_const, cris_pic_symbol_type_of): New functions,
1653         the moral equivalents of...
1654         (cris_symbol, cris_gotless_symbol, cris_got_symbol): Remove
1655         functions.
1656         (cris_legitimate_pic_operand): Just call cris_valid_pic_const.
1657         (cris_handle_option): Mark ARG as unused.
1658         (cris_expand_pic_call_address): New worker function for "call",
1659         "call_value".
1660         (cris_asm_output_symbol_ref, cris_asm_output_label_ref): Do not
1661         output PIC constructs here.
1662         (cris_output_addr_const_extra): Changes for emitting PIC modifiers
1663         as symbol-specific modifers, not whole or part of operands.
1664         * config/cris/cris/cris.h (EXTRA_CONSTRAINT): Remove 'U' case.
1665         (EXTRA_CONSTRAINT_S): Changed semantics: allow only CONST-wrapped
1666         constants and flag_pic.
1667         (CONSTANT_INDEX_P): Adjust for new functions.
1668         (enum cris_pic_symbol_type): New helper type.
1669         (PRINT_OPERAND_PUNCT_VALID_P): Add ':'.
1670         * config/cris/cris/cris.md (CRIS_UNSPEC_GOTREL)
1671         (CRIS_UNSPEC_GOTREAD, CRIS_UNSPEC_PLTGOTREAD): New
1672         define_constants.
1673         ("movsi"): Emit actual instructions for GOT and relative access.
1674         ("*movsi_got_load"): New pattern to set up the register holding
1675         the GOT pointer.
1676         ("*movsi_internal"): Operand 1 is not a plain general_operand.
1677         Adjust FIXME for 'S'.
1678         <output for 'S' alternative>: Sanity-check UNSPEC types for PIC.
1679         Use "movs" for -fpic cases.
1680         ("addsi3"): Add alternative for 'S'; use adds.w when possible.
1681         ("uminsi3","*expanded_call_value"): Remove 'S' alternative.
1682         ("call", "call_value"): Just call cris_expand_pic_call_address for
1683         PIC addresses.
1684         ("*expanded_call_no_gotplt", "*expanded_call_value_no_gotplt"):
1685         Remove special pattern.
1686         ("*expanded_call_side", "*expanded_call_value_side"): New
1687         patterns.
1688         (gotplt-to-plt, gotplt-to-plt-side-call)
1689         (gotplt-to-plt-side-call-value, gotplt-to-plt-side): New
1690         peephole2:s.
1691         * config/cris/cris/predicates.md
1692         ("cris_general_operand_or_gotless_symbol"): Remove unused
1693         predicate.
1694         ("cris_general_operand_or_symbol"): Adjust for new functions.
1695
1696 2005-07-08  Andrew Pinski  <pinskia@physics.uc.edu>
1697
1698         * config/darwin.h (TARGET_C99_FUNCTIONS): Define to 1.
1699
1700 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1701
1702         * Makefile.in (TREE_H): Add treestruct.def.
1703         (c-decl.o): Add pointer-set.h
1704         * c-decl.c (diagnose_mismatched_decls): Don't attempt to look at
1705         visibility on regular DECL's.
1706         (merge_decls): Fix the copying of decl nodes of various types for
1707         the new structures.  Don't update RTL, section name, weak status,
1708         etc, on DECL's without RTL.     
1709         (grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone.
1710         Don't check volatile on non-variable types.
1711         (store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK
1712         to check whether we have seen arguments.
1713         * c-objc-common.c (c_tree_printer): Reverse order of tests so that
1714         flag is checked before field (flag is common, field is not).    
1715         * dwarf2out.c (decl_ultimate_origin):  Only DECL's with
1716         TS_DECL_COMMON could have an origin.
1717         (add_location_or_const_value_attribute): Don't check section name
1718         on non-var/function decls.
1719         (dwarf2out_var_location): Reverse order of tests.
1720         * emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace
1721         with DECL_WRTL_CHECK.
1722         * expmed.c (make_tree): rtl is now in decl_with_rtl.
1723         * fold-const.c (fold_binary): Don't check weakness on
1724         non-var/function decls.
1725         (tree_expr_nonzero_p): Ditto.
1726         (fold_checksum_tree): Use tree_decl_extra as sizeof
1727         buffer.
1728         * ggc-page.c (extra_order_size_table): Add sizes for
1729         tree_decl_non_common, tree_parm_decl,  tree_var_decl, and
1730         tree_field_decl.
1731         * gimplify.c (gimplify_bind_expr): Only set
1732         DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL.
1733         * integrate.c (copy_decl_for_inlining): Don't set RTL on decl's
1734         without RTL.
1735         * langhooks-def.h (LANG_HOOK_INIT_TS): New.
1736         * langhooks.h (init_ts). New langhook.
1737         * passes.c (rest_of_decl_compilation): Reverse order of tests.
1738         * print-tree.c (print_node): Update to only print fields that
1739         exist in the structures the passed decl has.
1740         * toplev.c (wrapup_global_declarations): Don't reset
1741         DECL_DEFER_OUTPUT on DECL's that don't contain it.
1742         * tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed.
1743         * tree-inline.c (remap_decl): Ditto.
1744         * tree-outof-ssa.c (create_temp): Reverse order of tests.
1745         * tree-pretty-print.c (print_declaration): Don't print
1746         DECL_REGISTER on things that don't contain it.
1747         * tree-vrp.c (expr_computes_nonzero): Don't check weakness on
1748         non-var/function decls.
1749         * tree.c (tree_contains_struct): New structure.
1750         (init_priority_for_decl): New hashtable.
1751         (tree_int_map): New structure.
1752         (tree_int_map_eq): New function.
1753         (tree_int_map_marked_p): Ditto.
1754         (tree_int_map_hash): Ditto.
1755         (tree_map): Move to tree.h.
1756         (tree_map_eq): Externalize.
1757         (tree_map_hash): Ditto.
1758         (tree_map_marked_p): Ditto.
1759         (init_ttree): Set up tree_contains_struct and call langhook.
1760         (decl_assembler_name): Use DECL_NON_COMMON_CHECK..
1761         (tree_code_size): Update for new structures.
1762         (tree_node_structure): Update for new structures.
1763         (make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls
1764         without the field.
1765         (copy_node_stat):  Copy init priority.
1766         (build_decl_stat): Ditto for visibility.
1767         (ts_enum_names): New.
1768         (tree_contains_struct_check_failed): New function.
1769         (decl_init_priority_lookup): Ditto.
1770         (decl_init_priority_insert): Ditto.
1771         * treestruct.def: New file.
1772         * tree.h (CODE_CONTAINS_STRUCT): New macro.
1773         (CONTAINS_STRUCT_CHECK): Ditto.
1774         (tree_contains_struct_check_failed): New prototype.
1775         (DECL_CHECK): Removed.
1776         (DECL_MINIMAL_CHECK): New.
1777         (DECL_COMMON_CHECK): Ditto.
1778         (DECL_WRTL_CHECK): Ditto.
1779         (DECL_NON_COMMON_CHECK): Ditto.
1780         (DECL_WITH_VIS_CHECK): Ditto.
1781         (VAR_OR_FUNCTION_DECL_P): Ditto
1782         (struct tree_decl_minimal): New structure.
1783         (struct tree_decl_common): Ditto.
1784         (struct tree_decl_with_rtl): Ditto.
1785         (struct tree_decl_with_vis): Ditto.
1786         (struct tree_decl_non_common): Ditto.
1787         (struct tree_field_decl): Ditto.
1788         (struct tree_parm_decl): Ditto.
1789         (struct tree_var_decl): Ditto.
1790         (struct tree_function_decl): Ditto.
1791         (struct tree_const_decl): Ditto.
1792         (struct tree_result_decl): Ditto.
1793         (union tree_node): Add new structures.
1794         * var-tracking.c (track_expr_p): Reverse order of tests.
1795         
1796         * doc/c-tree.texi: Add documentation on DECL node internal structure.
1797
1798 2005-07-08  Kazu Hirata  <kazu@codesourcery.com>
1799
1800         * cfgexpand.c (tree_expand_cfg): Don't use FINALIZE_PIC.
1801         * system.h: Poison FINALIZE_PIC.
1802         * doc/tm.texi (FINALIZE_PIC): Remove.
1803
1804 2005-07-08  Andrew Pinski  <pinskia@physics.uc.edu>
1805
1806         PR tree-opt/22329
1807         * tree-ssa-propagate.c (fold_predicate_in): Convert the value
1808         to the correct type if we have a MODIFY_EXPR.
1809
1810 2005-07-08  Kazu Hirata  <kazu@codesourcery.com>
1811
1812         PR tree-optimization/22360
1813         * tree.c (upper_bound_in_type): Fix calculations for casting
1814         to a non-wider signed type and casting a signed value to a
1815         wider unsigned type.
1816         (lower_bound_in_type): Fix calculations for casting to a
1817         non-wider signed type.
1818
1819         PR tree-optimization/20139
1820         * tree-cfg.c (remove_bb): Check in_ssa_p before calling
1821         release_defs.
1822         * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call
1823         fold_cond_expr_cond.
1824         * tree-ssanames.c (release_defs): Assert in_ssa_p.
1825         * tree.c (upper_bound_in_type, lower_bound_in_type): Rewrite.
1826
1827 2005-07-08  Andrew Pinski  <pinskia@physics.uc.edu>
1828
1829         PR tree-opt/22356
1830         * tree-complex.c (expand_complex_libcall): Produce
1831         REALPART_EXPR/IMAGPART_EXPR with the correct type.
1832
1833 2005-07-08  Kenneth Zadeck <zadeck@naturalbridge.com>
1834
1835         * bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl,
1836         bitmap_and_compl_into, bitmap_xor, bitmap_xor_into): Removed "a !=
1837         b" assert and inserted fastpath code for this case.
1838         (bitmap_ior): Removed "a != b" assert.
1839
1840 2005-07-08  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1841
1842         * config/m32r/linux.h (STARTFILE_SPEC): Support PIE.
1843         (ENDFILE_SPEC): Likewise.
1844         * config/m32r/m32r.h (ASM_SPEC): Likewise.
1845
1846         * config/m32r/m32r.c (m32r_output_function_epilogue): Care for
1847         a large stack frame at epilogue.
1848
1849 2005-07-08  David Billinghurst  <David.Billinghurst@riotinto.com>
1850
1851         * final.c: Include sdbout.h when required.
1852
1853 2005-07-07  Geoffrey Keating  <geoffk@apple.com>
1854
1855         * config.gcc (*-*-darwin*): Only one target-specific header file
1856         for generic darwin.
1857         (powerpc-*-darwin*): Add version-specific header files.
1858         * configure.in (gcc_AC_CHECK_DECLS): Add strverscmp.
1859         * config.in: Regenerate.
1860         * configure: Regenerate.
1861         * gcc.c: Include xregex.h.
1862         (version_compare_spec_function): New.
1863         (spec_function): Add version-compare.
1864         (replace_outfile_spec_function): Reformat comment.
1865         (compare_version_strings): New.
1866         * config/darwin-c.c (version_as_macro): New.
1867         (builtin_define): New.
1868         (darwin_cpp_builtins): New.
1869         * config/darwin-protos.h (darwin_cpp_builtins): New.
1870         * config/darwin.h (CPP_SPEC): Don't define APPLE_CC here.
1871         (LIB_SPEC): Make unconditional, update comment.
1872         (TARGET_C99_FUNCTIONS): Define.
1873         * config/darwin.opt: Sort.
1874         (mmacosx-version-min=): New.
1875         * config/darwin7.h: Delete.
1876         * config/darwin8.h: Delete.
1877         * config/i386/darwin.h (): Call darwin_cpp_builtins.
1878         * config/rs6000/darwin.h (): Call darwin_cpp_builtins.
1879         (TARGET_C99_FUNCTIONS): Define.
1880         * config/rs6000/darwin7.h: New.
1881         * config/rs6000/darwin8.h: New.
1882         * doc/invoke.texi (Darwin Options): Add -mmacosx-version-min=
1883         (-mmacosx-version-min): Document.
1884
1885 2005-07-07  Ian Lance Taylor  <ian@airs.com>
1886
1887         * config/mips/mips.md (abs<mode>2) [GPR]: Remove.
1888
1889 2005-07-07  John David Anglin  <dave.anglin@nrc-crc.gc.ca>
1890
1891         PR middle-end/22239
1892         * loop.c (loop_givs_rescan): Check that v->new_reg is a REG.
1893
1894 2005-07-07  Khem Raj  <kraj@mvista.com>
1895
1896         * config/arm/arm.c (thumb_output_function_prologue): Calculate offset
1897         in bytes, not words.
1898
1899 2005-07-07  Paul Brook  <paul@codesourcery.com>
1900
1901         * config/arm/arm.c (arm_pad_arg_upward): Compare return value of
1902         DEFAULT_FUNCTION_ARG_PADDING to upward.
1903
1904 2005-07-07  Richard Henderson  <rth@redhat.com>
1905
1906         * function.c (locate_and_pad_parm): Record parameter alignment in
1907         stack_alignment_needed.
1908
1909 2005-07-07  David Edelsohn  <edelsohn@gnu.org>
1910
1911         * config/rs6000/rs6000.md (UNSPEC_SYNC, UNSPEC_SYNC_OP,
1912         UNSPEC_SYNC_SWAP, UNSPEC_LWSYNC, UNSPEC_ISYNC): Delete.
1913         (UNSPECV_LL, UNSPECV_SC, UNSPECV_ATOMIC, UNSPECV_SYNC,
1914         UNSPECV_SYNC_OP, UNSPECV_CMPXCHG, UNSPECV_LWSYNC, UNSPECV_ISYNC): New.
1915         (define_attr "type"): Add isync, sync, load_l, store_c.
1916         * config/rs6000/sync.md (memory_barrier): Change to define_expand.
1917         Create scratch volatile MEM.
1918         (sync_internal): New.  POWER mnemonic is dcs, not ics.  Attribute
1919         sync.
1920         (load_locked_<mode>): New.
1921         (store_conditional_<mode>): New.
1922         (sync_compare_and_swap<mode>): Replace with splitter.
1923         (sync_lock_test_and_set<mode>): Replace with splitter.
1924         (sync_<fetchop><mode>): Change to unspec_volatile UNSPECV_SYNC_OP
1925         and UNSPECV_ISYNC.
1926         (isync): Change to unspec_volatile UNSPECV_ISYNC.  POWER mnemonic
1927         is ics.  Attribute isync.
1928         (lwsync): Change to unspec_volatile UNSPECV_LWSYNC.  Attribute
1929         lwsync.
1930         * config/rs6000/rs6000.c (rs6000_emit_sync): Use UNSPEC_VOLATILE
1931         and UNSPECV_SYNC_OP.
1932         (emit_unlikely_jump): New.
1933         (emit_load_locked): New.
1934         (emit_store_conditional): New.
1935         (rs6000_split_compare_and_swap): New.
1936         (rs6000_split_lock_test_and_set): New.
1937         (is_dispatch_slot_restricted): Return 4 for TYPE_LOAD_L,
1938         TYPE_STORE_C, TYPE_ISYNC, TYPE_SYNC.
1939         * config/rs6000/rs6000-protos.h (rs6000_split_compare_and_swap,
1940         rs6000_split_lock_test_and_set): Declare.
1941         * config/rs6000/{40x.md,440.md,603.md,6xx.md,7450.md,7xx.md,8540.md,
1942         mpc.md,power4.md,power5.md,rios1.md,rios2.md,rs64.md): Add load_l,
1943         store_c, isync, sync.
1944
1945 2005-07-07  Kelley Cook  <kcook@gcc.gnu.org>
1946
1947         * Makefile.in (echo_quoted_to_gtyp): New template for outputing
1948         filenames to gtyp-gen.h.
1949         (s-typ-gen): Use it in place of for loops.
1950
1951 2005-07-07  J"orn Rennecke <joern.rennecke@st.com>
1952
1953         * hooks.c (hook_bool_rtx_int_false): New function.
1954         * hooks.h (hook_bool_rtx_int_false): Declare.
1955         * target-def.h (TARGET_COMMUTATIVE_P): Define.
1956         (TARGET_INITIALIZER): Add TARGET_COMMUTATIVE_P.
1957         * target.h (struct gcc_target): Add commutative_p member.
1958         * targhooks.c (hook_bool_rtx_commutative_p): New function.
1959         * targhooks.h (hook_bool_rtx_commutative_p): Declare.
1960         * pa.c (TARGET_COMMUTATIVE_P): Redefine.
1961         (pa_commutative_p): New function.
1962         * jump.c (target.h): Include.
1963         (rtx_renumbered_equal_p): Use targetm.commutative_p.
1964         * doc/tm.texi: Document TARGET_COMMUTATIVE_P.
1965
1966 2005-07-07  Adrian Straetling  <straetling@de.ibm.com>
1967
1968         * config/s390/s390-protos.h (s390_expand_clrmem): Delete.
1969         (s390_expand_setmem): New.
1970         * config/s390/s390.c: Likewise. 
1971         (print_shift_count_operand): Truncate to 12 bits instead of 6.
1972         Adapt comments.
1973         * config/s390/s390.md: ("setmem<mode>"): Accept character as
1974         general_operand.  Call new function "s390_expand_setmem".
1975         ("clrmem_long", "*clrmem_long"): Rewrite to ...
1976         ("setmem_long", "*setmem_long"): ... this.
1977
1978 2005-07-07  Adrian Straetling  <straetling@de.ibm.com>
1979         
1980         * config/s390/s390.c: (optimization_options): Enable
1981         TARGET_MVCLE at -Os.
1982         * doc/invoke.texi: Document changes in default behaviour.
1983         * config/s390/s390.opt: ("mvcle"): Fix typo: is "mmvcle".
1984
1985 2005-07-07  Adrian Straetling  <straetling@de.ibm.com>
1986
1987         * expr.c: (set_storage_via_setmem): Convert opchar to mode
1988         defined by back-end.
1989
1990 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
1991
1992         * config/sparc/sparc.md (stack_protect_testsi): Put clobbers after
1993         all sets in the pattern.
1994         * config/rs6000/rs6000.md (stack_protect_testsi,
1995         stack_protect_testdi): Likewise.
1996
1997 2005-07-06  Jeff Law  <law@redhat.com>
1998
1999         * tree-vrp.c (simplify_using_ranges): Kill.
2000         (vrp_finalize): Remove call to simplify_using_ranges.
2001         (simplify_stmt_using_ranges): New function extracted from
2002         simplify_using_ranges.
2003         (simplify_div_or_mod_using_ranges): Likewise.
2004         (simplify_abs_using_ranges): Likewise.
2005         (simplify_cond_using_ranges): New function.
2006         * tree-flow.h (simplify_stmt_using_ranges): Prototype.
2007         * tree-ssa-propagate.c (substitute_and_fold): Call
2008         simplify_stmt_using_ranges if we have range information.
2009
2010 2005-07-06  James E. Wilson  <wilson@specifixinc.com>
2011
2012         * config/ia64/ia64.c (ia64_reorg): Check optimize before
2013         ia64_flag_schedule_isns2.
2014
2015         * config/ia64/ia64.c (ia64_expand_movxf_movrf): Don't word swap when
2016         reading/writing general registers.
2017         (ia64_function_arg): Revert 2005-06-18 change.
2018
2019 2005-07-06  John David Anglin  <dave.anglin@nrc-crnc.gc.ca>
2020
2021         * pa.c (legitimize_pic_address): Use gcc_assert instead of abort.
2022         (legitimize_tls_address): Use gcc_unreachable instead of abort.
2023
2024 2005-07-06  Kaz Kojima  <kkojima@gcc.gnu.org>
2025
2026         * function.c (expand_function_end): Revert part of 2005-06-27
2027         patch.  Do sjlj_emit_function_exit_after after return_label.
2028
2029 2005-07-06  Kazu Hirata  <kazu@codesourcery.com>
2030
2031         * doc/install.texi (--disable-libssp): New.
2032
2033 2005-07-06  Fariborz Jahanian <fjahanian@apple.com>
2034
2035         * doc/invoke.texi: Update -fforce-mem documentation.
2036         * dojump.c (compare_from_rtx,do_compare_rtx_and_jump): Remove 
2037         code for -fforce-mem.
2038         * expmed.c: (store_bit_field,store_fixed_bit_field,
2039         extract_bit_field): Ditto.
2040         * expr.c: (convert_move): Ditto.
2041         * optabs.c: (expand_binop,expand_twoval_unop,expand_twoval_binop,
2042         expand_unop,emit_unop_insn,prepare_cmp_insn,emit_conditional_move,
2043         emit_conditional_add,expand_float,expand_fix): Ditto.
2044         * opts.c: (decode_options): Remove setting of flag_force_mem flag.
2045         (common_handle_option): Issue warning when -fforce-mem specified.
2046
2047 2005-07-06  Paul Brook  <paul@codesourcery.com>
2048
2049         * aclocal.m4: Work around a bug in AC_PATH_PROGS when its last
2050         argument is empty.
2051         * configure: Regenerate.
2052
2053 2005-07-06  J"orn Rennecke <joern.rennecke@st.com>
2054
2055         * sh.c (final_prescan_insn): Undo bogus change from 2005-05-09.
2056
2057 2005-07-06  Daniel Berlin  <dberlin@dberlin.org>
2058
2059         Fix PR tree-optimization/22319
2060         Fix PR tree-optimization/22140
2061         Fix PR tree-optimization/22310
2062
2063         * tree-ssa-structalias.c (do_structure_copy): Give up earlier on
2064         variable sized types.
2065         Use correct type for intermediate structure on *a = *b structure
2066         copies.
2067                 
2068 2005-07-06  Jakub Jelinek  <jakub@redhat.com>
2069
2070         * config/rs6000/rs6000.h (RS6000_VARARGS_AREA, RS6000_VARARGS_SIZE):
2071         Remove.
2072         (STARTING_FRAME_OFFSET): Don't add RS6000_VARARGS_AREA.
2073         (machine_function): Move typedef to...
2074         * config/rs6000/rs6000.c (machine_function): ... here.  Add
2075         varargs_save_offset field.
2076         (rs6000_stack_t): Remove varargs_size field.
2077         (setup_incoming_varargs): Allocate varargs save area using
2078         assign_stack_local, try to make it as small as possible.
2079         Save offset from virtual_stack_vars_rtx to the save area
2080         in cfun->machine->varargs_save_offset.  Use UNITS_PER_FP_WORD
2081         instead of magic 8 when fp word byte size is used.
2082         (rs6000_va_start): Use cfun->machine->varargs_save_offset
2083         instead of -RS6000_VARARGS_SIZE.
2084         (rs6000_stack_info, debug_stack_info,
2085         rs6000_initial_elimination_offset): Remove all traces of
2086         varargs_size.
2087         * config/rs6000/sysv4.h (RS6000_VARARGS_AREA): Remove.
2088         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Don't add
2089         RS6000_VARARGS_AREA.
2090
2091 2005-07-06  Zdenek Dvorak  <dvorakz@suse.cz>
2092
2093         PR tree-optimization/21963
2094         * tree-ssa-loop-ivopts.c (get_computation_aff): Use
2095         constant_multiple_of in the same way get_computation_cost_at does.
2096
2097 2005-07-06  Jakub Jelinek  <jakub@redhat.com>
2098
2099         * config/sparc/sparc.h (sparc_compare_emitted): New extern.
2100         * config/sparc/sparc.c (sparc_compare_emitted): New variable.
2101         (gen_compare_reg): If sparc_compare_emitted is set, clear it
2102         and return its previous value.
2103         (emit_v9_brxx_insn): Assert sparc_compare_emitted is NULL.
2104         * config/sparc/sparc.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New
2105         constants.
2106         (stack_protect_set, stack_protect_test): New expanders.
2107         (stack_protect_setsi, stack_protect_setdi, stack_protect_testsi,
2108         stack_protect_testdi): New insns.
2109         * config/sparc/linux.h (TARGET_THREAD_SSP_OFFSET): Define.
2110         * config/sparc/linux64.h (TARGET_THREAD_SSP_OFFSET): Define.
2111
2112 2005-07-06  Jeff Law  <law@redhat.com>
2113
2114         * tree-ssa-dce.c (cfg_altered): New global.
2115         (tree_dce_init): Initialize cfg_altered.
2116         (remove_dead_stmt): If we remove an edge in the CFG, then set
2117         CFG_ALTERED.
2118         (perform_tree_ssa_dce): If we altered the CFG, then invalidate
2119         the dominators.
2120
2121 2005-07-06  Kazu Hirata  <kazu@codesourcery.com>
2122
2123         * Makefile.in (stamp-collect-ld): Use
2124         $(ORIGINAL_LD_FOR_TARGET) instead of $<.  Don't remove
2125         ./collect-ld if it already exists.
2126         (stamp-nm): Use $(ORIGINAL_NM_FOR_TARGET) instead of $<.
2127         Don't remove ./nm if it already exists.
2128
2129 2005-07-05  Devang Patel  <dpatel@apple.com>
2130
2131         * tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number.
2132         (LOOP_VINFO_LOC, LOOP_LOC): Remove.
2133         * tree-vectorizer.c (vect_loop_location): New.
2134         (vect_print_dump_info): Use vect_loop_location.
2135         (new_loop_vec_info): Do not set LOOP_VINFO_LOC.
2136         (vectorize_loops): Set vect_loop_location.
2137         * tree-vect-analyze.c (vect_analyze_offset_expr, 
2138         vect_determin_vectorization_factor, vect_analyze_operations,
2139         vect_analyze_scalar_cycles, vect_analyze_data_ref_dependence,
2140         vect_analyze_data_ref_dependences, vect_compute_data_ref_alignment,
2141         vect_analyze_data_refs_alignment, vect_analyze_data_ref_access,
2142         vect_analyze_data_ref_accesses, vect_analyze_pointer_ref_access,
2143         vect_object_analysis, vect_analyze_data_refs, vect_mark_relevant,
2144         vect_stmt_relevant_p, vect_mark_stmts_to_be_vectorized,
2145         vect_can_advance_ivs_p, vect_get_loop_niters, vect_analyze_loop_form,
2146         vect_analyze_loop): Adjust vect_print_dump_info API.
2147         * tree-vect-transform.c (vect_create_addr_base_for_vector_ref,
2148         vect_create_data_ref_ptr, vect_init_vector, vect_get_vec_def_for_operand,
2149         vect_finish_stmt_generation, vectorizable_assignment, 
2150         vectorizable_operation, vectorizable_store, vectorizable_load, 
2151         vectorizable_live_operation, vectorizable_condition, vect_transform_stmt,
2152         vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound,
2153         vect_gen_ninters_for_prolog_loop, vect_do_peeling_for_alignment,
2154         vect_transform_loop): Same.
2155         * tree-vectorizer.c (get_vectype_for_scalar_type, vect_is_simple_use,
2156         vect_is_simple_reduction, vect_is_simple_iv_evolution, vectorize_loops):
2157         Same.
2158
2159 2005-07-05  Randolph Chung  <tausq@debian.org>
2160
2161         * configure.ac (hppa*-*-linux*: Check for a TLS capable gas.
2162         * configure: Regenerate.
2163         * config/pa/pa-protos.h (tls_symbolic_operand): Declare.
2164         (pa_tls_referenced_p): Declare.
2165         * config/pa/pa.c (legitimize_pic_address): Reject TLS operands.
2166         (gen_tls_tga, gen_tls_get_addr, hppa_tls_call): New.
2167         (legitimize_tls_address): New.
2168         (hppa_legitimize_address): Handle TLS addresses.
2169         (pa_tls_symbol_ref_1, pa_tls_referenced_p): New.
2170         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
2171         (emit_move_sequence): Handle TLS addresses.
2172         (pa_encode_section_info): Call default handler to handle common 
2173         sections.
2174         * config/pa/pa.h (PA_SYMBOL_REF_TLS_P): New.
2175         (CONSTANT_ADDRESS_P): Reject TLS operands.
2176         (TARGET_HAVE_TLS) [HAVE_AS_TLS]: Define.
2177         * config/pa/pa.md (UNSPEC_TP, UNSPEC_TLSGD, UNSPEC_TLSLDM)
2178         (UNSPEC_TLSLDO, UNSPEC_TLSLDBASE, UNSPEC_TLSIE)
2179         (UNSPEC_TLSLE): Define new constants. 
2180         (tgd_load, tld_load, tld_offset_load, tp_load, tie_load, tle_load): New.
2181         * config/pa/predicates.md (symbolic_operand): Reject TLS operands.
2182         (tls_symbolic_operand, tgd_symbolic_operand, tld_symbolic_operand)
2183         (tie_symbolic_operand, tle_symbolic_operand): New
2184
2185 2005-07-06  Kelley Cook  <kcook@gcc.gnu.org>
2186
2187         * aclocal.m4: Update macros for autoconf 2.59 style.
2188         * configure.ac: Likewise.
2189
2190 2005-07-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2191
2192         * pa.c (function_value): Handle small aggregates on 32-bit targets.
2193         (function_arg): Pass small aggregates in general registers on 32-bit
2194         targets.
2195         * som.h (MEMBER_TYPE_FORCES_BLK): Delete define.
2196
2197 2005-07-05  Andrew Pinski  <pinskia@physics.uc.edu>
2198
2199         * Makefile.in (final.o): Fix dependencies.
2200
2201 2005-07-05  Joseph S. Myers  <joseph@codesourcery.com>
2202
2203         PR c/22013
2204         PR c/22098
2205         * langhooks.h (struct lang_hooks): Add expr_to_decl.
2206         * langhooks.c (lhd_expr_to_decl): New.
2207         * langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL):
2208         New.
2209         (LANG_HOOKS_INITIALIZER): Update.
2210         * tree.c (recompute_tree_invarant_for_addr_expr): Call
2211         expr_to_decl langhook.
2212         * c-tree.h (c_expr_to_decl): Declare.
2213         * c-typeck.c (c_expr_to_decl): New.
2214         (build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR
2215         specially.
2216         * c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define.
2217
2218 2005-07-05  Joseph S. Myers  <joseph@codesourcery.com>
2219
2220         PR c/22308
2221         * c-decl.c (finish_struct): Also copy C_TYPE_FIELDS_READONLY,
2222         C_TYPE_FIELDS_VOLATILE and C_TYPE_VARIABLE_SIZE to type variants.
2223
2224 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2225
2226         * Makefile.in: Adjust dependencies.
2227         * tree-pass.h: Add new passes and passes formerly in tree-optimize.c.
2228         * basic-block.h (duplicate_computed_gotos): Remove, it is now static.
2229         * alias.c (rest_of_handle_cfg, pass_cfg): New.
2230         * bb-reorder.c (duplicate_computed_gotos): Make it static.
2231         * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of
2232         rest_of_compilation.
2233
2234         * bb-reorder.c (gate_duplicate_computed_gotos,
2235         pass_duplicate_computed_gotos, gate_handle_reorder_blocks,
2236         rest_of_handle_reorder_blocks, pass_reorder_blocks,
2237         gate_handle_partition_blocks, rest_of_handle_partition_blocks,
2238         pass_partition_blocks): New.
2239         * bt-load.c (gate_handle_branch_target_load_optimize,
2240         rest_of_handle_branch_target_load_optimize,
2241         pass_branch_target_load_optimize): New.
2242         * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2,
2243         pass_jump2): New.
2244         * cfglayout.c (pass_insn_locators_initialize): New.
2245         * cfgrtl.c (pass_free_cfg): New.
2246         * combine.c (gate_handle_combine, rest_of_handle_combine,
2247         pass_combine): New.
2248         * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse,
2249         gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New.
2250         * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New.
2251         * except.c (pass_set_nothrow_function_flags,
2252         pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh,
2253         pass_rtl_eh): New.
2254         * final.c (pass_compute_alignments, rest_of_handle_final, pass_final,
2255         rest_of_handle_shorten_branches, pass_shorten_branches,
2256         rest_of_clean_state, pass_clean_state): New.
2257         * flow.c (pass_recompute_reg_usage, gate_remove_death_notes,
2258         rest_of_handle_remove_death_notes, pass_remove_death_notes,
2259         rest_of_handle_life, pass_life, rest_of_handle_flow2,
2260         pass_flow2): New.
2261         * function.c (pass_instantiate_virtual_regs, pass_init_function,
2262         rest_of_handle_check_leaf_regs, pass_leaf_regs): New.
2263         * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass,
2264         pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse,
2265         pass_gcse): New.
2266         * global.c (rest_of_handle_global_alloc, pass_global_alloc): New.
2267         * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion,
2268         pass_rtl_ifcvt, gate_handle_if_after_combine,
2269         rest_of_handle_if_after_combine, pass_if_after_combine,
2270         gate_handle_if_after_reload, rest_of_handle_if_after_reload,
2271         pass_if_after_reload): New.
2272         * integrate.c (pass_initial_value_sets): New.
2273         * jump.c (pass_cleanup_barriers, purge_line_number_notes,
2274         pass_purge_lineno_notes): New.
2275         * mode-switching.c (rest_of_handle_mode_switching,
2276         pass_mode_switching): New.
2277         * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New.
2278         * loop-init.c (gate_handle_loop2, rest_of_handle_loop2,
2279         pass_loop2): New.
2280         * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize,
2281         pass_loop_optimize): New.
2282         * modulo-sched.c (gate_handle_sms, rest_of_handle_sms,
2283         pass_sms): New.
2284         * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2,
2285         pass_gcse2): New.
2286         * postreload.c (gate_handle_postreload, rest_of_handle_postreload,
2287         pass_postreload_cse): New.
2288         * profile.c (gate_handle_profiling, pass_profiling,
2289         rest_of_handle_branch_prob, pass_branch_prob): New.
2290         * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, 
2291         pass_split_before_regstack, gate_handle_split_before_regstack,
2292         gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2,
2293         rest_of_handle_split_all_insns, pass_split_all_insns): New.
2294         * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs,
2295         pass_stack_regs): New.
2296         * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove,
2297         gate_handle_stack_adjustments, rest_of_handle_stack_adjustments,
2298         pass_stack_adjustments): New.
2299         * regrename.c (gate_handle_regrename, rest_of_handle_regrename,
2300         pass_regrename): New.
2301         * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots,
2302         pass_delay_slots, gate_handle_machine_reorg,
2303         rest_of_handle_machine_reorg, pass_machine_reorg): New.
2304         * rtl.h (extern void purge_line_number_notes): New.
2305         * sched-rgn.c (gate_handle_sched, rest_of_handle_sched,
2306         gate_handle_sched2, rest_of_handle_sched2, pass_sched,
2307         pass_sched2): New.
2308         * tracer.c (gate_handle_tracer, rest_of_handle_tracer,
2309         pass_tracer): New.
2310         * value-prof.c (gate_handle_value_profile_transformations,
2311         rest_of_handle_value_profile_transformations,
2312         pass_value_profile_transformations): New.
2313         * var-tracking.c (gate_handle_var_tracking,
2314         pass_variable_tracking): New.
2315         * web.c (gate_handle_web, rest_of_handle_web, pass_web): New.
2316
2317         * passes.c (open_dump_file, close_dump_file, rest_of_handle_final,
2318         rest_of_handle_delay_slots, rest_of_handle_stack_regs,
2319         rest_of_handle_variable_tracking, rest_of_handle_machine_reorg,
2320         rest_of_handle_old_regalloc, rest_of_handle_regrename,
2321         rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks,
2322         rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2,
2323         rest_of_handle_gcse2, rest_of_handle_regmove,
2324         rest_of_handle_tracer, rest_of_handle_if_conversion,
2325         rest_of_handle_if_after_combine, rest_of_handle_if_after_reload,
2326         rest_of_handle_web, rest_of_handle_branch_prob,
2327         rest_of_handle_value_profile_transformations, rest_of_handle_cfg,
2328         rest_of_handle_jump_bypass, rest_of_handle_combine,
2329         rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2,
2330         rest_of_handle_gcse, rest_of_handle_loop_optimize,
2331         rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize,
2332         rest_of_handle_mode_switching, rest_of_handle_jump,
2333         rest_of_handle_eh, rest_of_handle_stack_adjustments,
2334         rest_of_handle_flow2, rest_of_handle_jump2,
2335         rest_of_handle_peephole2, rest_of_handle_postreload,
2336         rest_of_handle_shorten_branches, rest_of_clean_state,
2337         rest_of_compilation): Remove.
2338
2339         * cgraphunit.c (ipa_passes): Moved from tree-optimize.c.
2340         * passes.c (dump_flags, in_gimple_form, all_passes,
2341         all_ipa_passes, all_lowering_passes, register_one_dump_file,
2342         register_dump_files, next_pass_1, last_verified, execute_todo,
2343         execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved
2344         from tree-optimize.c.
2345         (init_optimization_passes): Moved from tree-optimize.c,
2346         adding the RTL optimizations.
2347         * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h.
2348         * tree-optimize.c (dump_flags, in_gimple_form, all_passes,
2349         all_ipa_passes, all_lowering_passes, register_one_dump_file,
2350         register_dump_files, next_pass_1, last_verified, execute_todo,
2351         execute_one_pass, execute_pass_list, execute_ipa_pass_list,
2352         init_tree_optimization_passes, ipa_passes): Delete.
2353         * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing
2354         the RTL dumps.
2355         (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p,
2356         dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved
2357         from tree.h.
2358         (ipa_passes): Remove.
2359         (all_passes, all_ipa_passes, all_lowering_passes): Now extern.
2360         * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name,
2361         dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node,
2362         dump_switch_p, dump_flag_name): Moved to tree-pass.h.
2363         (dump_info_p, dump_flag): Moved to tree-dump.h.
2364         
2365         * Makefile.in: Adjust dependencies for tree-pretty-print.c,
2366         cgraph.c, opts.c.
2367         * passes.c (finish_optimization_passes): Use dump_begin
2368         and dump_end, TDI_end.
2369         (gate_rest_of_compilation): New.
2370         (pass_rest_of_compilation): Use it.
2371         (gate_postreload, pass_postreload): New.
2372         * toplev.c (general_init): Rename init_tree_optimization_passes.
2373         * toplev.h (init_tree_optimization_passes): Rename to
2374         init_optimizations_passes.
2375         * tree-dump.c (dump_flag): Make static.
2376         (dump_files): Remove RTL dumps.
2377         * tree-optimize.c (pass_all_optimizations, pass_early_local_passes,
2378         pass_cleanup_cfg, pass_free_cfg_annotations,
2379         pass_cleanup_cfg_post_optimizing, pass_free_datastructures,
2380         pass_init_datastructures, pass_fixup_cfg): Make non-static.
2381         * tree-pretty-print.c: Include tree-pass.h.
2382         * cgraph.c: Include tree-dump.h.
2383         
2384 2005-07-04  Daniel Berlin  <dberlin@dberlin.org>
2385
2386         * tree-ssa-structalias.c (get_constraint_exp_from_ssa_var):
2387         Only fall back to saying it points to readonly memory if
2388         we can't do better.
2389
2390 2005-07-05  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
2391
2392         * config/m32r/m32r-protos.h: Remove m32r_finalize_pic.
2393         * config/m32r/m32r.c (m32r_compute_frame_size,
2394         m32r_expand_prologue): Take current_function_profile into
2395         account whenever we reference
2396         current_function_uses_pic_offset_table.
2397         (m32r_finalize_pic): Remove.
2398         * config/m32r/m32r.h (FINALIZE_PIC): Likewise.
2399
2400 2005-07-05  Kazu Hirata  <kazu@codesourcery.com>
2401
2402         * Makefile.in (stamp-as): Use $(ORIGINAL_AS_FOR_TARGET)
2403         instead of $<.  Don't remove ./as if it already exists.
2404
2405 2005-07-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2406
2407         PR target/21723
2408         * pa.md: Remove fcpy alternative from movhi and movqi patterns.
2409         * pa32-regs.h (HARD_REGNO_NREGS): Return two floating point registers
2410         for complex modes when generating code for PA 1.0.
2411         (VALID_FP_MODE_P): New macro.
2412         (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P.  Use non-overlapping register
2413         sets for all general and floating point modes.  Align wide floating
2414         point modes to even register boundaries to comply with architectural
2415         requirements.
2416         (CLASS_MAX_NREGS): Update to align with change to HARD_REGNO_NREGS.
2417         * pa64-regs.h (HARD_REGNO_NREGS): Update comment and formatting.
2418         (VALID_FP_MODE_P): New macro.
2419         (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P.  Use non-overlapping register
2420         sets for all general and floating point modes.  Align wide floating
2421         point modes to even register boundaries to comply with architectural
2422         requirements.
2423
2424 2005-07-04  Diego Novillo  <dnovillo@redhat.com>
2425
2426         * tree-dump.c (dump_files): Initialize dump number for .cgraph
2427         to 0.
2428
2429 2005-07-04  Diego Novillo  <dnovillo@redhat.com>
2430
2431         * tree-ssa-structalias.c: Don't include expr.h.
2432
2433 2005-07-04  Diego Novillo  <dnovillo@redhat.com>
2434
2435         * tree-iterator.h (TSI_NEW_STMT, TSI_SAME_STMT): Fix
2436         comments.
2437
2438 2005-07-04  Daniel Berlin  <dberlin@dberlin.org>
2439
2440         Fix PR tree-optimization/22279
2441         
2442         * tree-ssa-structalias.c (offset_overlaps_with_access): Use
2443         correct operator.
2444         
2445 2005-07-04  J"orn Rennecke <joern.rennecke@st.com>
2446
2447         * sh.c (output_ieee_ccmpeq): Replace "\\;" with "\n\t".
2448
2449 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
2450
2451         * bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c,
2452         cfgrtl.c, cgraphunit.c, config/c4x/c4x.c, config/cris/cris.c,
2453         config/frv/frv.c, config/host-darwin.c, config/iq2000/iq2000.c,
2454         config/lynx.h, config/m68k/m68k.c, config/pa/pa.c, config/sh/sh.h,
2455         config/stormy16/stormy16.c, config/v850/v850.c,
2456         config/vax/netbsd-elf.h, coverage.c, dwarf2out.c, emit-rtl.c,
2457         except.c, gcc.c, tree-cfg.c, tree-eh.c, tree-ssa.c, xcoffout.c:
2458         Avoid "." or "\n" at end of diagnostics and capital letters at
2459         start of diagnostics.
2460         * combine.c, cse.c: Don't translate dump file output.
2461         * toplev.c (print_version): Only translate output if going to
2462         stderr.
2463
2464 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
2465
2466         * c-decl.c, tree-object-size.c, tree-vectorizer.c,
2467         config/arm/unwind-arm.c, config/arm/unwind-arm.h: Fix comment
2468         typos.
2469
2470 2005-07-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2471
2472         * pa.c (fix_range): Fix typo in comment.
2473
2474 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
2475
2476         * tree-vrp.c (extract_range_from_assert): Replace
2477         fold (build (...)) with fold_build2.
2478
2479 2005-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2480
2481         * c-format.c (gcc_gfc_format_type, gcc_gfc_flag_pairs,
2482         gcc_gfc_char_table, init_dynamic_gfc_info): New.
2483         (format_types_orig, handle_format_attribute): Add support for
2484         format "gcc_gfc".
2485
2486 2005-07-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2487
2488         * varasm.c (assemble_variable): Fix format specifier thinko.
2489
2490 2005-07-03  Ira Rosen  <irar@il.ibm.com>
2491
2492         PR tree-optimization/22029 (and 22135)
2493         * tree-pretty-print.c (dump_generic_node): Check that the node is not
2494         a phi node before calling dump_vops.
2495
2496 2005-07-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2497
2498         * tree-dump.h (dump_string_field): Declare.
2499         * tree-dump.c: Use it instead of dump_string.
2500         (dump_string_field): Make non-static.
2501
2502 2005-07-03  Kaz Kojima  <kkojima@gcc.gnu.org>
2503
2504         * config/sh/sh.c (sh_output_mi_thunk): Initialize and clean
2505         up the minimal CFG stuff always when optimize > 0.  Call
2506         split_all_insns_noflow in PIC case if needed.
2507
2508 2005-07-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2509             Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
2510
2511         PR c++/18279
2512         * c-decl.c (c_write_global_declarations): Dump contents of
2513         external scope to.
2514         * tree-dump.c (dequeue_and_dump): Dump abstract origin of a decl.
2515         <TRY_FINALLY_EXPR>, <RETURN_EXPR>, <CASE_LABEL_EXPR>, <LABEL_EXPR>,
2516         <GOTO_EXPR>, <SWITCH_EXPR>: Add.
2517         (dump_enabled_p): Return TRUE if PHASE is TDI_all and any dump
2518         is enabled.
2519         
2520 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
2521
2522         * c-common.h (GCC_DIAG_STYLE): Define.
2523         * c-tree.h (GCC_DIAG_STYLE): Do not define.  Change minimum GCC
2524         version for format checking to 4.1.
2525         * c-format.c: Include toplev.h after c-common.h.
2526         (enum format_type): Add gcc_tdiag_format_type.
2527         (gcc_tdiag_length_specs, gcc_tdiag_flag_pairs,
2528         gcc_tdiag_flag_specs, gcc_tdiag_char_table): New.
2529         (format_types_orig): Add gcc_tdiag.
2530         (init_dynamic_diag_info): Support gcc_tdiag formats.
2531         (handle_format_attribute): Likewise.
2532         * toplev.h (NO_FRONT_END_DIAG, ATTRIBUTE_GCC_FE_DIAG): Remove.
2533         (GCC_DIAG_STYLE): Default to __gcc_tdiag__.  Change minimum GCC
2534         version for format checking to 4.1.
2535         (warning0, warning, error, pedwarn, sorry): Use
2536         ATTRIBUTE_GCC_DIAG.
2537         * config/rs6000/rs6000.c (altivec_expand_builtin), varasm.c
2538         (finish_aliases_1): Do not use %qE.
2539         * config/arm/arm.c, config/i386/i386.c, config/mmix/mmix.c,
2540         config/pdp11/pdp11.c, stor-layout.c, tree-eh.c, tree-ssa.c:
2541         Correct format bugs.
2542         * config/v850/v850-protos.h (v850_output_aligned_bss): Change size
2543         parameter to unsigned HOST_WIDE_INT.
2544         * config/v850/v850.c (v850_output_aligned_bss): Likewise.
2545
2546 2005-07-02  David Edelsohn  <edelsohn@gnu.org>
2547
2548         PR middle-end/21742
2549         * expr.c (write_complex_part): Use adjust_address for MEM.
2550         (read_complex_part): Same.
2551
2552 2005-07-02  Daniel Berlin  <dberlin@dberlin.org>
2553
2554         Fix PR tree-optimization/22280
2555
2556         * tree-sra.c (generate_element_init): Remove useless loop.
2557
2558 2005-07-02  Richard Henderson  <rth@redhat.com>
2559
2560         * config/alpha/alpha.c (alpha_legitimize_address): Check for
2561         TLS_MODEL_NONE.
2562         (alpha_stdarg_optimize_hook): Use DECL_UID with va_list_vars.
2563
2564 2005-07-02  Andrew Pinski  <pinskia@physics.uc.edu>
2565
2566         PR middle-end/14490
2567         * fold-const.c (fold_binary): Handle the return value of
2568         fold_to_nonsharp_ineq_using_bound if we get back the same operand back.
2569         Implement "X +- C1 CMP C2" folding to "X CMP C2 -+ C1".
2570
2571 2005-07-02  Jeff Law  <law@redhat.com>
2572
2573         * tree-ssa-dom.c (find_equivalent_equality_comparison): Do not
2574         a eliminate type conversion which feeds an equality comparison
2575         if the original type or either operand in the comparison is a
2576         function pointer.
2577
2578 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2579
2580         * c.opt, common.opt, config/bfin/bfin.opt, config/pa/pa.opt,
2581         config/rs6000/rs6000.opt, params.def: Remove "." from end of help
2582         texts.
2583         * config/avr/avr.c: Do not use '`' as left quote.
2584         * config/rs6000/rs6000.c, config/s390/s390.c, opts.c, tree.c:
2585         Remove "." from end of diagnostics.  Make diagnostics start with
2586         lowercase letter.
2587
2588 2005-07-02  Zack Weinberg  <zack@codesourcery.com>
2589             Joseph S. Myers  <joseph@codesourcery.com>
2590
2591         * toplev.c (default_tree_printer): Handle setting location with
2592         '+' flag.
2593         * c-objc.common.c (c_tree_printer): Likewise.
2594         * c-format.c (gcc_diag_flag_specs): Add '+'.
2595         (gcc_cdiag_char_table): Allow '+' flag for tree formats.
2596         (format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag
2597         formats.
2598         * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c,
2599         config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c,
2600         config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c,
2601         config/v850/v850.c, function.c, stor-layout.c, toplev.c,
2602         tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag
2603         instead of %J or %H.  Use 'q' flag for quoting.  Avoid '.' at end
2604         of diagnostics.  Use %q+D not %s for a decl.  Do not pass excess
2605         format arguments where %J is used without %D.
2606
2607 2005-07-02  Jakub Jelinek  <jakub@redhat.com>
2608
2609         * gcc.c (LINK_SSP_SPEC): Define.
2610         (link_ssp_spec): New variable.
2611         (LINK_COMMAND_SPEC): Add %(link_ssp).
2612         (static_specs): Add link_ssp_spec.
2613         * configure.ac (TARGET_LIBC_PROVIDES_SSP): New test.
2614         * configure: Rebuilt.
2615         * config.in: Rebuilt.
2616
2617         * config/rs6000/linux.h (TARGET_THREAD_SSP_OFFSET): Define.
2618         * config/rs6000/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise.
2619         * config/i386/linux.h (TARGET_THREAD_SSP_OFFSET): Likewise.
2620         * config/i386/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise.
2621         * config/rs6000/rs6000.md (stack_protect_set, stack_protect_test):
2622         If TARGET_THREAD_SSP_OFFSET is defined, use -0x7010(13) resp.
2623         -0x7008(2) instead of reading __stack_chk_guard variable.
2624         * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): Change
2625         number.
2626         (UNSPEC_SP_TLS_SET, UNSPEC_SP_TLS_TEST): New constants.
2627         (stack_protect_set, stack_protect_test): Use *_tls* patterns
2628         if TARGET_THREAD_SSP_OFFSET is defined.
2629         (stack_tls_protect_set_si, stack_tls_protect_set_di,
2630         stack_tls_protect_test_si, stack_tls_protect_test_di): New insns.
2631
2632         Revert:
2633         2005-06-27  Richard Henderson  <rth@redhat.com>
2634         * libgcc-std.ver (GCC_4.1.0): New.
2635         * libgcc.h (__stack_chk_guard): Declare.
2636         (__stack_chk_fail, __stack_chk_fail_local): Declare.
2637         * libgcc2.c (L_stack_chk, L_stack_chk_local): New.
2638         * mklibgcc.in (lib2funcs): Add them.
2639
2640 2005-07-01  Richard Henderson  <rth@redhat.com>
2641
2642         * config/i386/linux-unwind.h (x86_64_fallback_frame_state): Cast to
2643         void * before struct sigcontext *.
2644         (x86_fallback_frame_state): Likewise.
2645
2646 2005-07-01  James E. Wilson  <wilson@specifixinc.com>
2647
2648         * doc/invoke.texi (-funit-at-a-time): Correct grammar in second bullet.
2649
2650 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2651
2652         PR tree-opt/22269
2653         * tree-ssa-reassoc.c (should_transpose): Fix which operand
2654         we check for SSA_NAME for.
2655
2656 2005-07-01  Daniel Berlin  <dberlin@dberlin.org>
2657
2658         Fix PR tree-optimization/22071
2659
2660         * tree-ssa-structalias.c (offset_overlaps_with_access): New
2661         function.
2662         (get_constraint_for_component_ref): Use it.
2663
2664 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2665
2666         PR other/22264
2667         * diagnostic.c (diagnostic_report_current_module): Use pp_newline to
2668         print out the last new line.
2669
2670 2005-07-01  Hans-Peter Nilsson  <hp@axis.se>
2671
2672         * config/cris/cris.md (CRIS_CC0_REGNUM): New constant.
2673         Swap numbers for CRIS_AP_REGNUM and CRIS_MOF_REGNUM.
2674         * config/cris/cris.c (cris_conditional_register_usage): Adjust
2675         reg_names[CRIS_CC0_REGNUM] for early CRIS versions.
2676         (cris_print_operand) <case REG>: Handle CRIS_CC0_REGNUM.
2677         (cris_md_asm_clobbers): Clobber CRIS_CC0_REGNUM for all asms.
2678         * config/cris/cris.h (CRIS_CANONICAL_CC0_REGNUM): New macro.
2679         (enum reg_class): New member CC0_REGS.
2680         (REG_CLASS_FROM_LETTER): Add 'c' for CC0_REGS.
2681         (FIRST_PSEUDO_REGISTER, CALL_USED_REGISTERS, REG_ALLOC_ORDER)
2682         (HARD_REGNO_MODE_OK, MODES_TIEABLE_P, REG_CLASS_NAMES)
2683         (CRIS_SPECIAL_REGS_CONTENTS, REG_CLASS_CONTENTS, REGNO_REG_CLASS)
2684         (PREFERRED_RELOAD_CLASS, REGISTER_NAMES, DBX_REGISTER_NUMBER):
2685         Adjust for register now described.
2686
2687 2005-07-01  Jakub Jelinek  <jakub@redhat.com>
2688
2689         PR target/22262
2690         * config/i386/i386.md (stack_protect_test_si,
2691         stack_protect_test_di): Add earlyclobber for scratch 3.
2692         * config/rs6000/rs6000.md (stack_protect_testsi,
2693         stack_protect_testdi): Add earlyclobber for scratch 3,
2694         remove earlyclobber from scratch 4.
2695
2696 Older entries for 2005 can be found in ChangeLog-2005.