OSDN Git Service

5696b43b4ca27e1488f87c81b0bd3b3ba9b58490
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2009-05-25  Ira Rosen  <irar@il.ibm.com>
2
3         PR tree-optimization/40238
4         * tree-vect-stmts.c (vect_init_vector): Insert initialization
5         statements after basic block's labels.
6         * tree-vect-slp.c (vect_slp_transform_bb): Call destroy_bb_vec_info() 
7         to free the allocated memory.
8
9 2009-05-24  Kaz Kojima  <kkojima@gcc.gnu.org>
10
11         * gcc/config/sh/sh.c (sh_set_return_address): Mark store of
12         return address with a USE.
13
14 2009-05-24  Richard Guenther  <rguenther@suse.de>
15
16         PR middle-end/40233
17         * tree.c (make_vector_type): Build the TYPE_DEBUG_REPRESENTATION_TYPEs
18         array type from the main variant of the inner type.
19
20 2009-05-24  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
21
22         * config/vax/vax-protos.h (legitimate_constant_address_p): Change
23         definition to bool (from int) to un-break build.
24         (legitimate_constant_p, vax_mode_dependent_address_p): Likewise.
25
26 2009-05-24  Paolo Bonzini  <bonzini@gnu.org>
27
28         * tree-ssa-operands.h (push_stmt_changes, pop_stmt_changes,
29         discard_stmt_changes): Delete.
30         * tree-ssa-operands.c (scb_stack): Delete.
31         (init_ssa_operands): Do not initialize it.
32         (fini_ssa_operands): Do not free it.
33         (push_stmt_changes, pop_stmt_changes, discard_stmt_changes): Delete.
34
35         * tree-cfg.c (replace_uses_by): Replace pop_stmt_changes with 
36         update_stmt, remove the others.  Fix comments.
37         * tree-dfa.c (optimize_stack_restore): Likewise.
38         * tree-ssa-forwprop.c (forward_propagate_addr_expr): Likewise.
39         * tree-ssa-loop-ivopts.c (rewrite_use): Likewise.
40         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise.
41         * tree-ssa-ccp.c (optimize_stack_restore, execute_fold_all_builtins):
42         Likewise.
43         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
44         * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
45         (dom_opt_finalize_block): Likewise, adjusting access to stmts_to_rescan.
46         (optimize_stmt): Likewise, adjusting access to stmts_to_rescan.
47         (stmts_to_rescan): Change item type to gimple.
48         (tree_ssa_dominator_optimize): Change type of stmts_to_rescan.
49
50 2009-05-24  Ira Rosen  <irar@il.ibm.com>
51
52         * doc/passes.texi (Tree-SSA passes): Document SLP pass.
53         * tree-pass.h (pass_slp_vectorize): New pass.
54         * params.h (SLP_MAX_INSNS_IN_BB): Define.
55         * timevar.def (TV_TREE_SLP_VECTORIZATION): Define.
56         * tree-vectorizer.c (timevar.h): Include.
57         (user_vect_verbosity_level): Declare.
58         (vect_location): Fix comment.
59         (vect_set_verbosity_level): Update user_vect_verbosity_level
60         instead of vect_verbosity_level.
61         (vect_set_dump_settings): Add an argument. Ignore user defined
62         verbosity if dump flags require higher level of verbosity. Print to
63         stderr only for loop vectorization.
64         (vectorize_loops): Update call to vect_set_dump_settings.
65         (execute_vect_slp): New function.
66         (gate_vect_slp): Likewise.
67         (struct gimple_opt_pass pass_slp_vectorize): New.
68         * tree-vectorizer.h (struct _bb_vec_info): Define along macros to
69         access its members.
70         (vec_info_for_bb): New function.
71         (struct _stmt_vec_info): Add bb_vinfo and a macro for its access.
72         (VECTORIZATION_ENABLED): New macro.
73         (SLP_ENABLED, SLP_DISABLED): Likewise.
74         (vect_is_simple_use): Add bb_vec_info argument.
75         (new_stmt_vec_info, vect_analyze_data_ref_dependences,
76         vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment,
77         vect_analyze_data_ref_accesses, vect_analyze_data_refs,
78         vect_schedule_slp, vect_analyze_slp): Likewise.
79         (vect_analyze_stmt): Add slp_tree argument.
80         (find_bb_location): Declare.
81         (vect_slp_analyze_bb, vect_slp_transform_bb): Likewise.
82         * tree-vect-loop.c (new_loop_vec_info): Adjust function calls.
83         (vect_analyze_loop_operations, vect_analyze_loop,
84         get_initial_def_for_induction, vect_create_epilog_for_reduction,
85         vect_finalize_reduction, vectorizable_reduction,
86         vectorizable_live_operation, vect_transform_loop): Likewise.
87         * tree-data-ref.c (dr_analyze_innermost): Update comment,
88         skip evolution analysis if analyzing a basic block.
89         (dr_analyze_indices): Likewise.
90         (initialize_data_dependence_relation): Skip the test whether the
91         object is invariant for basic blocks.
92         (compute_all_dependences): Skip dependence analysis for data
93         references in basic blocks.
94         (find_data_references_in_stmt): Don't fail in case of invariant
95         access in basic block.
96         (find_data_references_in_bb): New function.
97         (find_data_references_in_loop): Move code to
98         find_data_references_in_bb and add a call to it.
99         (compute_data_dependences_for_bb): New function.
100         * tree-data-ref.h (compute_data_dependences_for_bb): Declare.
101         * tree-vect-data-refs.c (vect_check_interleaving): Adjust to the case
102         that STEP is 0.
103         (vect_analyze_data_ref_dependence): Check for interleaving in case of
104         unknown dependence in basic block and fail in case of dependence in
105         basic block.
106         (vect_analyze_data_ref_dependences): Add bb_vinfo argument, get data
107         dependence instances from either loop or basic block vectorization
108         info.
109         (vect_compute_data_ref_alignment): Check if it is loop vectorization
110         before calling nested_in_vect_loop_p.
111         (vect_compute_data_refs_alignment): Add bb_vinfo argument, get data
112         dependence instances from either loop or basic block vectorization
113         info.
114         (vect_verify_datarefs_alignment): Likewise.
115         (vect_enhance_data_refs_alignment): Adjust function calls.
116         (vect_analyze_data_refs_alignment): Likewise.
117         (vect_analyze_group_access): Fix printing. Skip different checks if
118         DR_STEP is 0. Keep strided stores either in loop or basic block
119         vectorization data structure. Fix indentation.
120         (vect_analyze_data_ref_access): Fix comments, allow zero step in
121         basic blocks.
122         (vect_analyze_data_ref_accesses): Add bb_vinfo argument, get data
123         dependence instances from either loop or basic block vectorization
124         info.
125         (vect_analyze_data_refs): Update comment. Call
126         compute_data_dependences_for_bb to analyze basic blocks.
127         (vect_create_addr_base_for_vector_ref): Check for outer loop only in
128         case of loop vectorization. In case of basic block vectorization use
129         data-ref itself as a base.
130         (vect_create_data_ref_ptr): In case of basic block vectorization:
131         don't advance the pointer, add new statements before the current
132         statement.  Adjust function calls.
133         (vect_supportable_dr_alignment): Support only aligned accesses in
134         basic block vectorization.
135         * common.opt (ftree-slp-vectorize): New flag.
136         * tree-vect-patterns.c (widened_name_p): Adjust function calls.
137         (vect_pattern_recog_1): Likewise.
138         * tree-vect-stmts.c (process_use): Likewise.
139         (vect_init_vector): Add new statements in the beginning of the basic
140         block in case of basic block SLP.
141         (vect_get_vec_def_for_operand): Adjust function calls.
142         (vect_finish_stmt_generation): Likewise.
143         (vectorizable_call): Add assert that it is loop vectorization, adjust
144         function calls.
145         (vectorizable_conversion, vectorizable_assignment): Likewise.
146         (vectorizable_operation): In case of basic block SLP, take
147         vectorization factor from statement's type and skip the relevance
148         check. Adjust function calls.
149         (vectorizable_type_demotion): Add assert that it is loop
150         vectorization, adjust function calls.
151         (vectorizable_type_promotion): Likewise.
152         (vectorizable_store): Check for outer loop only in case of loop
153         vectorization. Adjust function calls. For basic blocks, skip the
154         relevance check and don't advance pointers.
155         (vectorizable_load): Likewise.
156         (vectorizable_condition): Add assert that it is loop vectorization,
157         adjust function calls.
158         (vect_analyze_stmt): Add argument. In case of basic block SLP, check
159         that it is not reduction, get vector type, call only supported
160         functions, skip loop specific parts.
161         (vect_transform_stmt): Check for outer loop only in case of loop
162         vectorization.
163         (new_stmt_vec_info): Add new argument and initialize bb_vinfo.
164         (vect_is_simple_use): Fix comment, add new argument, fix conditions
165         for external definition.
166         * passes.c (pass_slp_vectorize): New pass.
167         * tree-vect-slp.c (find_bb_location): New function.
168         (vect_get_and_check_slp_defs): Add argument, adjust function calls,
169         check for patterns only in loops.
170         (vect_build_slp_tree): Add argument, adjust function calls, fail in
171         case of multiple types in basic block SLP.
172         (vect_mark_slp_stmts_relevant): New function.
173         (vect_supported_load_permutation_p): Fix comment.
174         (vect_analyze_slp_instance): Add argument. In case of basic block
175         SLP, take vectorization factor from statement's type, check that
176         unrolling factor is 1. Adjust function call. Save SLP instance in
177         either loop or basic block vectorization structure. Return FALSE,
178         if SLP failed.
179         (vect_analyze_slp): Add argument. Get strided stores groups from
180         either loop or basic block vectorization structure. Return FALSE
181         if basic block SLP failed.
182         (new_bb_vec_info): New function.
183         (destroy_bb_vec_info, vect_slp_analyze_node_operations,
184         vect_slp_analyze_operations, vect_slp_analyze_bb): Likewise.
185         (vect_schedule_slp): Add argument. Get SLP instances from either
186         loop or basic block vectorization structure. Set vectorization factor
187         to be 1 for basic block SLP.
188         (vect_slp_transform_bb): New function.
189         * params.def (PARAM_SLP_MAX_INSNS_IN_BB): Define.
190
191 2009-05-23  Mark Mitchell  <mark@codesourcery.com>
192
193         * final.c (shorten_branches): Do not align labels for jump tables.
194         (final_scan_insn): Use JUMP_TABLE_DATA_P.
195
196 2009-05-23  Eric Botcazou  <ebotcazou@adacore.com>
197
198         * doc/passes.texi: Standardize spelling of RTL, Tree and Tree SSA.
199         Remove outdated reference to flow.c and fix nits.
200         * doc/gccint.texi: Tweak RTL description.
201         * doc/rtl.texi: Likewise.
202
203 2009-05-23  Denis Chertykov  <chertykov@gmail.com>
204
205         * config/avr/avr.c: Change my email address.
206         * config/avr/avr.h: Likewise.
207         * config/avr/avr.md: Likewise.
208         * config/avr/avr-protos.h: Likewise.
209         * config/avr/libgcc.S: Likewise.
210
211 2009-05-22  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
212
213         * config/spu/spu-protos.h (aligned_mem_p, spu_valid_mov): Remove.
214         (spu_split_load, spu_split_store): Change return type to int.
215         (spu_split_convert): Declare.
216         * config/spu/predicates.md (spu_mem_operand): Remove.
217         (spu_mov_operand): Update.
218         (spu_dest_operand, shiftrt_operator, extend_operator): Define.
219         * config/spu/spu.c (regno_aligned_for_load): Remove.
220         (reg_aligned_for_addr, spu_expand_load): Define.
221         (spu_expand_extv): Reimplement and handle MEM.
222         (spu_expand_insv): Handle MEM.
223         (spu_sched_reorder): Handle insn's with length 0.
224         (spu_legitimate_address_p): Reimplement.
225         (store_with_one_insn_p): Return TRUE for any mode with size
226         larger than 16 bytes.
227         (address_needs_split): Define.
228         (spu_expand_mov): Call spu_split_load and spu_split_store for MEM
229         operands.
230         (spu_convert_move): Define.
231         (spu_split_load): Use spu_expand_load and change all MEM's to TImode.
232         (spu_split_store): Change all MEM's to TImode.
233         (spu_init_expanders): Preallocate registers that correspond to
234         LAST_VIRTUAL_REG+1 and LAST_VIRTUAL_REG+2 and set them with
235         mark_reg_pointer.
236         (spu_split_convert): Define.
237         * config/spu/spu.md (QHSI, QHSDI): New mode iterators.
238         (_move<mode>, _movdi, _movti): Update predicate and condition.
239         (load, store): Change to define_split.
240         (extendqiti2, extendhiti2, extendsiti2, extendditi2): Simplify to
241         extend<mode>ti2.
242         (zero_extendqiti2, zero_extendhiti2, <v>lshr<mode>3_imm): Define.
243         (lshr<mode>3, lshr<mode>3_imm, lshr<mode>3_re): Simplify to one
244         define_insn_and_split of lshr<mode>3.
245         (shrqbybi_<mode>, shrqby_<mode>): Simplify to define_expand.
246         (<v>ashr<mode>3_imm): Define.
247         (extv, extzv, insv): Allow MEM operands.
248         (trunc_shr_ti<mode>, trunc_shr_tidi, shl_ext_<mode>ti,
249         shl_ext_diti, sext_trunc_lshr_tiqisi, zext_trunc_lshr_tiqisi,
250         sext_trunc_lshr_tihisi, zext_trunc_lshr_tihisi): Define for combine.
251         (_spu_convert2): Change to define_insn_and_split and remove the
252         corresponding define_peephole2.
253         (stack_protect_set, stack_protect_test, stack_protect_test_si):
254         Change predicates to memory_operand.
255
256 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
257
258         * config/arm/thumb2.md: Add 16-bit multiply instructions.
259
260 2009-05-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
261
262         PR tree-optimization/40219
263         * tree.c (iterative_hash_expr): Make sure the builtin function is
264         a normal builtin function and not a front end or back end builtin
265         before indexing into the built_in_decls array.
266
267 2009-05-22  Richard Guenther  <rguenther@suse.de>
268
269         PR middle-end/38964
270         * alias.c (write_dependence_p): Do not use TBAA for answering
271         anti-dependence or output-dependence.
272         * tree-ssa-structalias.c (set_uids_in_ptset): Remove TBAA pruning code.
273         (emit_pointer_definition): Remove.
274         (emit_alias_warning): Likewise.
275         (find_what_var_points_to): Remove TBAA pruning code.
276         (find_what_p_points_to): Likewise.  Do not warn about strict-aliasing
277         violations.
278         (compute_points_to_sets): Remove code computing the set of
279         dereferenced pointers.
280         * tree-data-ref.c (dr_may_alias_p): Properly use the split
281         oracle for querying anti and output dependencies.
282         * tree-ssa-alias.c (refs_may_alias_p_1): Add argument specifying
283         if TBAA may be applied.
284         (refs_anti_dependent_p): New function.
285         (refs_output_dependent_p): Likewise.
286         * tree-ssa-alias.h (refs_anti_dependent_p): Declare.
287         (refs_output_dependent_p): Likewise.
288         * doc/tree-ssa.texi (Memory model): New section.
289         * doc/c-tree.texi (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
290         * doc/gimple.texi (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
291         * cfgexpand.c (expand_gimple_basic_block): Do not handle
292         GIMPLE_CHANGE_DYNAMIC_TYPE or CHANGE_DYNAMIC_TYPE_EXPR.
293         * expr.c (expand_expr_real_1): Likewise.
294         * gimple-low.c (lower_stmt): Likewise.
295         * gimple-pretty-print.c (dump_gimple_stmt): Likewise.
296         (dump_gimple_cdt): Remove.
297         * gimple.c (gss_for_code): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
298         (gimple_size): Likewise.
299         (walk_gimple_op): Likewise.
300         (is_gimple_stmt): Likewise.
301         (walk_stmt_load_store_addr_ops): Likewise.
302         (gimple_build_cdt): Remove.
303         * gimple.def (GIMPLE_CHANGE_DYNAMIC_TYPE): Remove.
304         * gimple.h (gimple_cdt_new_type): Remove.
305         (gimple_cdt_new_type_ptr): Likewise.
306         (gimple_cdt_set_new_type): Likewise.
307         (gimple_cdt_location): Likewise.
308         (gimple_cdt_location_ptr): Likewise.
309         (gimple_cdt_set_location): Likewise.
310         * gimplify.c (gimplify_expr): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
311         * tree-cfg.c (remove_useless_stmts_1): Do not handle
312         GIMPLE_CHANGE_DYNAMIC_TYPE.
313         (verify_types_in_gimple_stmt): Likewise.
314         * tree-inline.c (estimate_num_insns): Likewise.
315         (expand_call_inline): Do not copy DECL_NO_TBAA_P.
316         (copy_decl_to_var): Likewise.
317         (copy_result_decl_to_var): Likewise.
318         * tree-pretty-print.c (dump_generic_node): Do not handle
319         CHANGE_DYNAMIC_TYPE_EXPR.
320         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
321         * tree-ssa-operands.c (get_expr_operands): Likewise.
322         * tree-ssa-structalias.c (struct variable_info): Remove
323         no_tbaa_pruning member.
324         (new_var_info): Do not set it based on DECL_NO_TBAA_P.
325         (unify_nodes): Do not copy it.
326         (find_func_aliases): Do not handle GIMPLE_CHANGE_DYNAMIC_TYPE.
327         (dump_solution_for_var): Do not dump no_tbaa_pruning state.
328         (set_uids_in_ptset): Do not check it.
329         (find_what_var_points_to): Likewise.
330         (compute_tbaa_pruning): Remove.
331         (compute_points_to_sets): Do not call it.
332         * tree.c (walk_tree_1): Do not handle CHANGE_DYNAMIC_TYPE_EXPR.
333         * tree.def (CHANGE_DYNAMIC_TYPE_EXPR): Remove.
334         * tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Remove.
335         (CHANGE_DYNAMIC_TYPE_LOCATION): Likewise.
336         (DECL_NO_TBAA_P): Likewise.
337         (struct tree_decl_common): Move no_tbaa_flag to unused flags section.
338         * omp-low.c (copy_var_decl): Do not copy DECL_NO_TBAA_P.
339         (expand_omp_atomic_pipeline): Do not set it.
340         * print-tree.c (print_node): Do not dump it.
341         * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
342         redundant check.
343
344 2009-05-22 Vladimir Makarov <vmakarov@redhat.com>
345
346         PR target/39856
347         * reg-stack.c (subst_stack_regs_pat): Remove gcc_assert for note
348         for clobber.
349
350 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
351
352         * tree.c (handle_dll_attribute): Mark dllexport'd inlines as
353         non-external.
354
355 2009-05-22  Ben Elliston  <bje@au.ibm.com>
356
357         * Makefile.in (bversion.h, s-bversion): New targets.
358         (TOPLEV_H): Add bversion.h.
359         * toplev.h: Include "bversion.h".
360         (ATTRIBUTE_GCC_DIAG): When building with checking disabled, use
361         the __format__ attribute only if compiling with the same version
362         of GCC as the sources (the "build version").
363
364 2009-05-22  Ben Elliston  <bje@au.ibm.com>
365
366         * c-format.c (handle_format_attribute): Fix comment typo.
367
368 2009-05-21  Steve Ellcey  <sje@cup.hp.com>
369
370         PR target/37846
371         * config/ia64/ia64.opt (mfused-madd): New.
372         * config/ia64/ia64.h (TARGET_DEFAULT): Set MASK_FUSED_MADD.
373         * config/ia64/hpux.h (TARGET_DEFAULT): Ditto.
374         * config/ia64/ia64.md (maddsf4, msubsf4, nmaddsf4,
375         madddf4, madddf4_trunc, msubdf4, msubdf4_trunc, nmadddf4,
376         nmadddf4_truncsf, maddxf4, maddxf4_truncsf, maddxf4_truncdf,
377         msubxf4, msubxf4_truncsf msubxf4_truncdf, nmaddxf4,
378         nmaddxf4_truncsf, nmaddxf4_truncdf): Check TARGET_FUSED_MADD.
379         * config/ia64/vect.md (addv2sf3, subv2sf3): Force fpma/fpms 
380         instruction if !TARGET_FUSED_MADD.
381         (fpma, fpms): Remove colon from name.
382
383 2009-05-22  Richard Guenther  <rguenther@suse.de>
384
385         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record
386         TMR_ORIGINAL.  Always either record TMR_SYMBOL or TMR_BASE.
387         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Handle
388         TARGET_MEM_REF.
389         (create_expression_by_pieces): Only convert if necessary.
390         * gimplify.c (gimplify_expr): Handle TARGET_MEM_REF.
391         * tree-ssa-loop-im.c (gen_lsm_tmp_name): Handle INTEGER_CST.
392
393 2009-05-21  Adam Nemet  <anemet@caviumnetworks.com>
394
395         * config/mips/mips.md (*extzv_trunc<mode>_exts): Turn into a
396         regular pattern from a template and rename it ...
397         (*extzv_truncsi_exts): ... to this.
398
399 2009-05-21  Richard Guenther  <rguenther@suse.de>
400
401         * cgraph.h (struct cgraph_node): Remove inline_decl member.
402         * ipa-inline.c (cgraph_mark_inline_edge): Do not check it.
403         (cgraph_default_inline_p): Likewise.
404         (cgraph_decide_inlining_incrementally): Likewise.
405
406 2009-05-21  H.J. Lu  <hongjiu.lu@intel.com>
407             Uros Bizjak  <ubizjak@gmail.com>
408
409         * config/i386/cpuid.h (bit_MOVBE): New.
410
411         * config/i386/driver-i386.c (host_detect_local_cpu): Check movbe.
412
413         * config/i386/i386.c (OPTION_MASK_ISA_MOVBE_SET): New.
414         (OPTION_MASK_ISA_MOVBE_UNSET): Likewise.
415         (ix86_handle_option): Handle OPT_mmovbe.
416         (ix86_target_string): Add -mmovbe.
417         (pta_flags): Add PTA_MOVBE.
418         (processor_alias_table): Add PTA_MOVBE to "atom".
419         (override_options): Handle PTA_MOVBE.
420
421         * config/i386/i386.h (TARGET_MOVBE): New.
422
423         * config/i386/i386.md (bswapsi2): Check TARGET_MOVBE.
424         (*bswapsi_movbe): New.
425         (*bswapdi_movbe): Likewise.
426         (bswapdi2): Renamed to ...
427         (*bswapdi_1): This.
428         (bswapdi2): New expander.
429
430         * config/i386/i386.opt (mmovbe): New.
431
432         * doc/invoke.texi: Document -mmovbe.
433
434 2009-05-21  Taras Glek  <tglek@mozilla.com>
435
436         * plugin.c (try_init_one_plugin): Updated to new plugin_init API.
437         * gcc-plugin.h (plugin_init): Updated signature.
438         * gcc-plugin.h (plugin_name_args): Moved to this header.
439         * doc/plugins.texi (plugin_init): Updated documention to reflect
440         API change.
441         * doc/plugins.texi (plugin_name_args): Added to documention.
442
443 2009-05-21  Mark Mitchell  <mark@codesourcery.com>
444
445         * config/arm/neon.md (*mul<mode>3add<mode>_neon): New pattern.
446         (*mul<mode>3neg<mode>add<mode>_neon): Likewise.
447
448 2009-05-21  Shujing Zhao  <pearly.zhao@oracle.com>
449
450         * config/i386/i386.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P and
451         JUMP_TABLE_DATA_P predicates where applicable.
452         * config/i386/predicates.md: Ditto.
453         * config/i386/sse.md: Ditto.
454
455 2009-05-21  Jakub Jelinek  <jakub@redhat.com>
456
457         * config/i386/i386.md (adddi_4_rex64, addsi_4, addhi_4): For
458         operand2 -128 override length_immediate attribute to 1.
459         * config/i386/predicates.md (constm128_operand): New predicate.
460
461         * config/i386/i386.c (memory_address_length): Handle %r12
462         the same as %rsp and %r13 the same as %rbp.  For %rsp and %rbp
463         also check REGNO.
464         (ix86_attr_length_address_default): For MODE_SI lea in 64-bit
465         mode look through optional ZERO_EXTEND and SUBREG.
466         * config/i386/i386.md (R12_REG): New define_constant.
467         (prefix_data16): For sse unit set also for MODE_TI insns.
468         (prefix_rex): For -m32 always return 0.  For TYPE_IMOVX
469         insns set if operand 1 is ext_QIreg_operand.
470         (modrm): For TYPE_IMOV clear only if not MODE_DI.  For
471         TYPE_{ALU{,1},ICMP,TEST} insn clear if there is non-shortened
472         immediate.
473         (*movdi_extzv_1, zero_extendhidi2, zero_extendqidi2): Change
474         mode from MODE_DI to MODE_SI.
475         (movdi_1_rex64): Override modrm and length_immediate attributes
476         only for movabs (TYPE_IMOV, alternative 2).
477         (zero_extendsidi2_rex64): Clear prefix_0f attribute if TYPE_IMOVX.
478         (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit,
479         *float<SSEMODEI24:mode><MODEF:mode>2_mixed_nointerunit,
480         *float<SSEMODEI24:mode><MODEF:mode>2_sse_interunit,
481         *float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit): Set
482         prefix_rex attribute if DImode.
483         (*adddi_1_rex64, *adddi_2_rex64, *adddi_3_rex64, *adddi_5_rex64,
484         *addsi_1, *addsi_1_zext, *addsi_2, *addsi_2_zext, *addsi_3,
485         *addsi_3_zext, *addsi_5, *addhi_1_lea, *addhi_1, *addhi_2, *addhi_3,
486         *addhi_5, *addqi_1_lea, *addqi_1): Override length_immediate
487         attribute to 1 if TYPE_ALU and operand 2 is const128_operand.
488         (pro_epilogue_adjust_stack_1, pro_epilogue_adjust_stack_rex64):
489         Likewise.  For TYPE_IMOV clear length_immediate attribute.
490         (*ashldi3_1_rex64, *ashldi3_cmp_rex64, *ashldi3_cconly_rex64,
491         *ashlsi3_1, *ashlsi3_1_zext, *ashlsi3_cmp, **ashlsi3_cconly,
492         *ashlsi3_cmp_zext, *ashlhi3_1_lea, *ashlhi3_1, *ashlhi3_cmp,
493         *ashlhi3_cconly, *ashlqi3_1_lea, *ashlqi3_1, *ashlqi3_cmp,
494         *ashlqi3_cconly): Override length_immediate attribute to 0 if TYPE_ALU
495         or one operand TYPE_ISHIFT.
496         (*ashrdi3_1_one_bit_rex64, *ashrdi3_one_bit_cmp_rex64,
497         *ashrdi3_one_bit_cconly_rex64, *ashrsi3_1_one_bit,
498         *ashrsi3_1_one_bit_zext, *ashrsi3_one_bit_cmp,
499         *ashrsi3_one_bit_cconly, *ashrsi3_one_bit_cmp_zext,
500         *ashrhi3_1_one_bit, *ashrhi3_one_bit_cmp, *ashrhi3_one_bit_cconly,
501         *ashrqi3_1_one_bit, *ashrqi3_1_one_bit_slp, *ashrqi3_one_bit_cmp,
502         *ashrqi3_one_bit_cconly, *lshrdi3_1_one_bit_rex64,
503         *lshrdi3_cmp_one_bit_rex64, *lshrdi3_cconly_one_bit_rex64,
504         *lshrsi3_1_one_bit, *lshrsi3_1_one_bit_zext, *lshrsi3_one_bit_cmp,
505         *lshrsi3_one_bit_cconly, *lshrsi3_cmp_one_bit_zext,
506         *lshrhi3_1_one_bit, *lshrhi3_one_bit_cmp, *lshrhi3_one_bit_cconly,
507         *lshrqi3_1_one_bit, *lshrqi3_1_one_bit_slp, *lshrqi2_one_bit_cmp,
508         *lshrqi2_one_bit_cconly, *rotlsi3_1_one_bit_rex64, *rotlsi3_1_one_bit,
509         *rotlsi3_1_one_bit_zext, *rotlhi3_1_one_bit, *rotlqi3_1_one_bit_slp,
510         *rotlqi3_1_one_bit, *rotrdi3_1_one_bit_rex64, *rotrsi3_1_one_bit,
511         *rotrsi3_1_one_bit_zext, *rotrhi3_one_bit, *rotrqi3_1_one_bit,
512         *rotrqi3_1_one_bit_slp): Override length_immediate attribute to 0,
513         set mode attribute, don't override length attribute.
514         (*btsq, *btrq, *btcq, *btdi_rex64, *btsi): Set prefix_0f attribute
515         to 1.
516         (return_internal_long): Set length attribute to 2 instead of 1.
517         (*strmovqi_rex_1, *strsetqi_rex_1, *rep_stosqi_rex64,
518         *cmpstrnqi_nz_rex_1, *cmpstrnqi_rex_1, *strlenqi_rex_1): Clear
519         prefix_rex attribute.
520         * config/i386/predicates.md (ext_QIreg_operand, const128_operand):
521         New predicates.
522         (memory_displacement_only_operand): Always return 0 for TARGET_64BIT.
523
524 2009-05-21  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
525
526         * config/arm/thumb2.md (orsi_notsi_si): Fix typo in pattern.
527
528 2009-05-20  Ian Lance Taylor  <iant@google.com>
529
530         * tree.c (build_tree_list_vec_stat): New function.
531         (ctor_to_vec): New function.
532         (build_nt_call_vec): New function.
533         (build_call_array): Change args to be a const pointer.
534         (build_call_vec): New function.
535         * tree.h (build_nt_call_vec): Declare.
536         (build_tree_list_vec_stat): Declare.
537         (build_tree_list_vec): Define.
538         (build_call_array): Update declaration.
539         (build_call_vec): Declare.
540         (ctor_to_vec): Declare.
541         * c-common.c (tree_vector_cache): New static variable.
542         (make_tree_vector): New function.
543         (release_tree_vector): New function.
544         (make_tree_vector_single): New function.
545         (make_tree_vector_copy): New function.
546         * c-common.h (tree_vector_cache, make_tree_vector): Declare.
547         (make_tree_vector_single, make_tree_vector_copy): Declare.
548         * c-parser.c (cached_expr_list_1, cached_expr_list_2): Remove.
549         (c_parser_expr_list): Don't manage cache here, instead call
550         make_tree_vector.
551         (c_parser_release_expr_list): Remove static function.
552         (c_parser_vec_to_tree_list): Remove static function.
553         (c_parser_attributes): Call build_tree_list_vec instead of
554         c_parser_vec_to_tree_list.  Call release_tree_vector instead of
555         c_parser_release_expr_list.
556         (c_parser_postfix_expression_after_primary): Likewise.
557         (c_parser_objc_keywordexpr): Likewise.
558
559 2009-05-20  Sandra Loosemore  <sandra@codesourcery.com>
560
561         * doc/tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE,
562         TARGET_INVALID_RETURN_TYPE, TARGET_PROMOTED_TYPE, and
563         TARGET_CONVERT_TO_TYPE.
564         * hooks.c (hook_tree_const_tree_null): Define.
565         * hooks.h (hook_tree_const_tree_null): Declare.
566         * target.h (struct gcc_target):  Add invalid_parameter_type,
567         invalid_return_type, promoted_type, and convert_to_type fields.
568         * target-def.h: (TARGET_INVALID_PARAMETER_TYPE): Define.
569         (TARGET_INVALID_RETURN_TYPE): Define.
570         (TARGET_PROMOTED_TYPE): Define.
571         (TARGET_CONVERT_TO_TYPE): Define.
572         (TARGET_INITIALIZER): Update for new fields.
573         * c-decl.c (grokdeclarator): Check targetm.invalid_return_type.
574         (grokparms): Check targetm.invalid_parameter_type.
575         * c-typeck.c (default_conversion): Check targetm.promoted_type.
576         * c-convert.c (convert): Check targetm.convert_to_type.
577
578 2009-05-20  Adam Nemet  <anemet@caviumnetworks.com>
579
580         * config/mips/mips.md (*extenddi_truncate<mode>,
581         *extendsi_truncate<mode>): Emit exts if supported.  Add attribute
582         defintions.
583         (*extendhi_truncateqi): New define_insn_and_sptit.
584
585 2009-05-20  Jakub Jelinek  <jakub@redhat.com>
586
587         PR middle-end/40204
588         * fold-const.c (fold_binary) <case BIT_AND_EXPR>: Avoid infinite
589         recursion if build_int_cst_type returns the same INTEGER_CST as arg1.
590
591 2009-05-20  Eric Botcazou  <ebotcazou@adacore.com>
592
593         * fold-const.c (build_fold_addr_expr_with_type): Take the address of
594         the operand of VIEW_CONVERT_EXPR.
595
596 2009-05-20  H.J. Lu  <hongjiu.lu@intel.com>
597
598         * config/i386/driver-i386.c (host_detect_local_cpu): Check
599         extended family and model for Intel processors.  Support Intel
600         Atom.
601
602 2009-05-20  Olivier Hainque  <hainque@adacore.com>
603
604         * gstab.h (stab_code_type): Define, to be used instead of the
605         __stab_debug_code enum, made anonymous.  Add 2009 to the copyright
606         notice.
607         * dbxout.c (STAB_CODE_TYPE): Remove #define and replace use
608         occurrences by stab_code_type.
609         * mips-tfile.c (STAB_CODE_TYPE): Remove #define, unused.
610
611 2009-05-20  Martin Jambor  <mjambor@suse.cz>
612
613         * tree-flow.h (insert_edge_copies_seq): Undeclare.
614         (sra_insert_before): Likewise.
615         (sra_insert_after): Likewise.
616         (sra_init_cache): Likewise.
617         (sra_type_can_be_decomposed_p): Likewise.
618         * tree-mudflap.c (insert_edge_copies_seq): Copied here from tree-sra.c
619         * tree-sra.c (sra_type_can_be_decomposed_p): Made static.
620         (sra_insert_before): Likewise.
621         (sra_insert_after): Likewise.
622         (sra_init_cache): Likewise.
623         (insert_edge_copies_seq): Made static and moved upwards.
624
625         * tree-complex.c (extract_component): Added VIEW_CONVERT_EXPR switch
626         case.
627
628         * tree-flow-inline.h (contains_view_convert_expr_p): New function.
629
630         * ipa-prop.c (get_ssa_def_if_simple_copy): New function.
631         (determine_cst_member_ptr): Call get_ssa_def_if_simple_copy to skip
632         simple copies.
633
634 2009-05-20  Richard Guenther  <rguenther@suse.de>
635
636         * expr.c (expand_expr_real_1): Avoid calling do_store_flag
637         with mismatched comparison modes.
638
639 2009-05-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
640
641         * config/arm/arm.md (*arm_iorsi3): Refactored for only ARM.
642         (peephole ior (reg, int) -> mov, ior): Refactored for only ARM.
643         * config/arm/thumb2.md (*thumb_andsi_not_shiftsi_si): Allow bic
644         with shifts for Thumb2.
645         (orsi_notsi): New for orn.
646         (*thumb_orsi_notshiftsi_si): Allow orn with shifts.
647         (*thumb2_iorsi3): Rewrite support for iorsi for Thumb2.
648         * config/arm/arm.c (const_ok_for_op): Split case for IOR for Thumb2.
649         (arm_gen_constant): Set can_invert for IOR and Thumb2, Add comments.
650         Don't invert remainder for IOR.
651         
652 2009-05-19  Zdenek Dvorak  <ook@ucw.cz>
653
654         PR tree-optimization/40087
655         * tree-ssa-loop-niter.c (number_of_iterations_ne_max,
656         number_of_iterations_ne): Rename never_infinite argument.
657         (number_of_iterations_lt_to_ne, number_of_iterations_lt,
658         number_of_iterations_le): Handle pointer-type ivs when
659         exit_must_be_taken is false.
660         (number_of_iterations_cond):  Do not always assume that
661         exit_must_be_taken if the control variable is a pointer.
662
663 2009-05-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
664
665         * c-typeck.c (build_binary_op): Allow % on integal vectors.
666         * doc/extend.texi (Vector Extension): Document that % is allowed too.
667
668 2009-05-19  H.J. Lu  <hongjiu.lu@intel.com>
669
670         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Check
671         ASM_OUTPUT_MAX_SKIP_PAD instead of ASM_OUTPUT_MAX_SKIP_ALIGN.
672
673 2009-05-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
674
675         PR c/40172
676         * c.opt (Wlogical-op): Disabled by default.
677         * c-opt (c_common_post_options): Do not enable Wlogical-op with
678         Wextra.
679         * doc/invoke.texi (Wlogical-op): Likewise.
680         
681 2009-05-19  Eric Botcazou  <ebotcazou@adacore.com>
682
683         * tree-scalar-evolution.c (follow_ssa_edge_expr) <NOP_EXPR>: Turn
684         into CASE_CONVERT.
685         <PLUS_EXPR>: Strip useless type conversions instead of type nops.
686         Propagate the type of the first operand.
687         <ASSERT_EXPR>: Simplify.
688         (follow_ssa_edge_in_rhs): Use gimple_expr_type to get the type.
689         Rewrite using the RHS code as discriminant.
690         <NOP_EXPR>: Turn into CASE_CONVERT.
691         <PLUS_EXPR>: Propagate the type of the first operand.
692
693 2009-05-19  Steve Ellcey  <sje@cup.hp.com>
694
695         * config/ia64/ia64-protos.h (ia64_dconst_0_5): New.
696         (ia64_dconst_0_375): New.
697         * config/ia64/ia64.c (ia64_override_options): Remove
698         -minline-sqrt-min-latency warning.
699         (ia64_dconst_0_5_rtx, ia64_dconst_0_5): New.
700         (ia64_dconst_0_375_rtx, ia64_dconst_0_375): New
701         * config/ia64/ia64.md (*sqrt_approx): Remove.
702         (sqrtsf2): Remove #if 0.
703         (sqrtsf2_internal_thr): Rewrite and move to div.md.
704         (sqrtdf): Remove assert.
705         (sqrtdf2_internal_thr): Rewrite and move to div.md.
706         (sqrtxf2): Remove #if 0.
707         (sqrtxf2_internal_thr): Rewrite and move to div.md.
708         * div.md (sqrt_approx_rf): New.
709         (sqrtsf2_internal_thr): New implementation.
710         (sqrtsf2_internal_lat): New.
711         (sqrtdf2_internal_thr: New implementation.
712         (sqrtxf2_internal): New implementation.
713
714 2009-05-19  Francois-Xavier Coudert  <fxcoudert@gmail.com>
715             Hans-Peter Nilsson  <hp@axis.com>
716
717         * defaults.h (UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE)
718         (WCHAR_TYPE, MODIFIED_WCHAR_TYPE, PTRDIFF_TYPE, WINT_TYPE)
719         (INTMAX_TYPE, UINTMAX_TYPE, SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE)
720         (INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE)
721         (UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE)
722         (INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE)
723         (UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE)
724         (INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE)
725         (UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE)
726         (SIZE_TYPE, PID_TYPE, CHAR16_TYPE, CHAR32_TYPE): Move defaults here...
727         * c-common.c: ...from here.
728
729 2009-05-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
730
731         * c-common.c (warn_logical_operator): Remove unnecessary
732         conditionals.
733
734 2009-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
735
736         * builtins.c (do_mpc_arg1): Separate MPFR/MPC C rounding types.
737
738 2009-05-19  Ben Elliston  <bje@au.ibm.com>
739
740         * unwind-dw2-fde.c (fde_unencoded_compare): Replace type punning
741         assignments with memcpy calls.
742         (add_fdes): Likewise.
743         (binary_search_unencoded_fdes): Likewise.
744         (linear_search_fdes): Eliminate type puns.
745         
746 2009-05-19  Richard Guenther  <rguenther@suse.de>
747
748         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do
749         not falsely claim to have propagated into all uses.
750
751 2009-05-19  Ben Elliston  <bje@au.ibm.com>
752
753         * doc/invoke.texi (C Dialect Options): Update OpenMP specification
754         version to v3.0.
755
756 2009-05-18  Kaz Kojima  <kkojima@gcc.gnu.org>
757
758         * config/sh/sh-protos.h (sh_legitimate_address_p): Remove.
759         * config/sh/sh.c (sh_legitimate_address_p): Make static.
760         (TARGET_LEGITIMATE_ADDRESS_P): New.
761         * config/sh/sh.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
762         * config/sh/sh.md: Clean up references to GO_IF_LEGITIMATE_ADDRESS.
763         
764 2009-05-18  Dodji Seketeli  <dodji@redhat.com>
765
766         PR debug/40109
767         * dwarf2out.c (gen_type_die_with_usage): Generate the DIE as a
768         child of the containing namespace's DIE.
769
770 2009-05-18  Adam Nemet  <anemet@caviumnetworks.com>
771
772         * config/mips/mips.md (*zero_extend<GPR:mode>_trunc<SHORT:mode>,
773         *zero_extendhi_truncqi):  Move after the zero_extend patterns.
774         (*extenddi_truncate<mode>, *extendsi_truncate<mode>): Move after the
775         extend patterns.
776
777 2009-05-18  H.J. Lu  <hongjiu.lu@intel.com>
778
779         PR target/39942
780         * config/i386/i386.c (ix86_avoid_jump_misspredicts): Replace
781         gen_align with gen_pad.
782         (ix86_reorg): Check ASM_OUTPUT_MAX_SKIP_PAD instead of
783         #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN.
784
785         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): New.
786         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
787
788         * config/i386/i386.md (align): Renamed to ...
789         (pad): This.  Replace ASM_OUTPUT_MAX_SKIP_ALIGN with
790         ASM_OUTPUT_MAX_SKIP_PAD.
791
792 2009-05-18  Andreas Schwab  <schwab@linux-m68k.org>
793
794         * config.gcc: Fix variable syntax.
795
796         PR target/39531
797         * config/m68k/m68k.c (output_andsi3): Mask off sign bit copies
798         before calling exact_log2.
799         (output_iorsi3): Likewise.
800         (output_xorsi3): Likewise.
801
802 2009-05-18  Kaz Kojima  <kkojima@gcc.gnu.org>
803
804         * config/sh/sh.c (expand_cbranchdi4): Use a scratch register
805         for the none zero constant operand except for EQ and NE
806         comprisons even when the first operand is R0.
807
808 2009-05-18  Andreas Krebbel  <krebbel1@de.ibm.com>
809
810         * config/s390/2064.md: Remove trailing whitespaces.
811         * config/s390/2084.md: Likewise.
812         * config/s390/constraints.md: Likewise.
813         * config/s390/fixdfdi.h: Likewise.
814         * config/s390/libgcc-glibc.ver: Likewise.
815         * config/s390/s390-modes.def: Likewise.
816         * config/s390/s390-protos.h: Likewise.
817         * config/s390/s390.c: Likewise.
818         * config/s390/s390.h: Likewise.
819         * config/s390/s390.md: Likewise.
820         * config/s390/tpf-unwind.h: Likewise.
821
822 2009-05-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
823
824         * config/m68k/m68k.c (m68k_legitimize_address): Fix typo in signature.
825
826 2009-05-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
827
828         M68K TLS support.
829         * configure.ac (m68k-*-*): Check if binutils support TLS.
830         * configure: Regenerate.
831         * config/m68k/predicates.md (symbolic_operand): Extend comment.
832         * config/m68k/constraints.md (Cu): New constraint.
833         * config/m68k/m68k.md (UNSPEC_GOTOFF): Remove.
834         (UNSPEC_RELOC16, UNSPEC_RELOC32): New constants.
835         (movsi): Handle TLS symbols.
836         (addsi3_5200): Handle XTLS symbols, indent.
837         * config/m68k/m68k-protos.h (m68k_legitimize_tls_address): Declare.
838         (m68k_tls_reference_p): Declare.
839         (m68k_legitimize_address): Declare.
840         (m68k_unwrap_symbol): Declare.
841         * config/m68k/m68k.opt (mxtls): New option.
842         * config/m68k/m68k.c (ggc.h): Include.
843         (m68k_output_dwarf_dtprel): Implement hook.
844         (TARGET_HAVE_TLS, TARGET_ASM_OUTPUT_DWARF_DTPREL): Define.
845         (m68k_expand_prologue): Load GOT pointer when function needs it.
846         (m68k_illegitimate_symbolic_constant_p): Handle TLS symbols.
847         (m68k_legitimate_constant_address_p): Same.
848         (m68k_decompose_address): Handle TLS references.
849         (m68k_get_gp): New static function.
850         (enum m68k_reloc): New contants.
851         (TLS_RELOC_P): New macro.
852         (m68k_wrap_symbol): New static function.
853         (m68k_unwrap_symbol): New function.
854         (m68k_final_prescan_insn_1): New static function.
855         (m68k_final_prescan_insn): New function.
856         (m68k_move_to_reg, m68k_wrap_symbol_into_got_ref): New static
857         functions.
858         (legitimize_pic_address): Handle TLS references..
859         (m68k_tls_get_addr, m68k_get_tls_get_addr)
860         (m68k_libcall_value_in_a0_p)
861         (m68k_call_tls_get_addr, m68k_read_tp, m68k_get_m68k_read_tp)
862         (m68k_call_m68k_read_tp): Helper variables and functions for ...
863         (m68k_legitimize_tls_address): Handle TLS references.
864         (m68k_tls_symbol_p, m68k_tls_reference_p_1, m68k_tls_reference_p):
865         New functions.
866         (m68k_legitimize_address): Handle TLS symbols.
867         (m68k_get_reloc_decoration): New static function.
868         (m68k_output_addr_const_extra): Handle UNSPEC_RELOC16 and
869         UNSPEC_RELOC32.
870         (m68k_output_dwarf_dtprel): Implement hook.
871         (print_operand_address): Handle UNSPEC_RELOC16 adn UNSPEC_RELOC32.
872         (m68k_libcall_value): Return result in A0 instead of D0 when asked by
873         m68k_call_* routines.
874         (sched_attr_op_type): Handle TLS symbols.
875         (gt-m68k.h): Include.
876         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Define.
877         (LEGITIMATE_PIC_OPERAND_P): Support TLS.
878
879 2009-05-18  Martin Jambor  <mjambor@suse.cz>
880
881         * ipa-prop.c (ipa_check_stmt_modifications): Removed.
882         (visit_store_addr_for_mod_analysis): New function.
883         (ipa_detect_param_modifications): Use walk_stmt_load_store_addr_ops.
884         (determine_cst_member_ptr): Use gimple_assign_single_p.
885         (ipa_get_stmt_member_ptr_load_param): Use gimple_assign_single_p.
886         (ipa_analyze_call_uses): Use !gimple_assign_rhs2 rather than number of
887         operands.  Don't check number of operands of a NOP_EXPR.
888
889 2009-05-18  Eric Fisher  <joefoxreal@gmail.com>
890
891         * doc/tree-ssa.texi (SSA Operands): Fix a mistake.
892
893 2009-05-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
894
895         PR c/40172
896         * c-common.c (warn_logical_operator): Don't warn if one of
897         expression isn't always true or false.
898
899 2009-05-17  Kai Tietz  <kai.tietz@onevision.com>
900
901         * config/i386/biarch32.h: New file.
902         * config.gcc: Add for target i386-w64-* the biarch32.h to tm_file.
903
904 2009-05-17  Adam Nemet  <anemet@caviumnetworks.com>
905
906         * config/mips/mips.md (*zero_extend<mode>_trunchi,
907         *zero_extend<mode>_truncqi): Merge these into ...
908         (*zero_extend<GPR:mode>_trunc<SHORT:mode>): ... this new pattern.
909         Name the pattern following this as *zero_extendhi_truncqi.
910
911 2009-05-16  Brad Lucier  <lucier@math.purdue.edu>
912
913         PR middle-end/39301
914         * hwint.h: Add macro HOST_WIDEST_INT_PRINT.
915         * bitmap.c (bitmap_descriptor): Make fields HOST_WIDEST_INT.
916         (output_info): Make field HOST_WIDEST_INT.
917         (print_statistics): Use HOST_WIDEST_INT_PRINT.
918         (dump_bitmat_statistics): Same.
919
920 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gmail.com>
921
922         * config.gcc (use_gcc_stdint):  Set to wrap.
923         * config/darwin.h (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE,
924         INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE,
925         UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
926         INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
927         UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
928         INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
929         UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
930         UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define.
931
932 2009-05-16  Joseph Myers  <joseph@codesourcery.com>
933
934         * config.gcc (mips*-*-*): Support arch_32, arch_64, tune_32 and
935         tune_64.
936         * config/mips/mips.h (MIPS_ABI_DEFAULT, MULTILIB_ABI_DEFAULT):
937         Move definitions earlier.
938         (OPT_ARCH64, OPT_ARCH32): Define.
939         (OPTION_DEFAULT_SPECS): Add entries for arch_32, arch_64, tune_32
940         and tune_64.
941
942 2009-05-16  Richard Earnshaw  <rearnsha@arm.com>
943
944         PR target/40153
945         * arm.md (cstoresi_nltu_thumb1): Use a neg of ltu as the pattern name
946         implies.
947
948 2009-05-16  Richard Earnshaw  <rearnsha@arm.com>
949
950         * arm.md (movdi2): Copy non-reg values to DImode registers.
951
952 2009-05-16  Jakub Jelinek  <jakub@redhat.com>
953
954         PR target/39942
955         * final.c (label_to_max_skip): New function.
956         (label_to_alignment): Only use LABEL_TO_ALIGNMENT if
957         CODE_LABEL_NUMBER <= max_labelno.
958         * output.h (label_to_max_skip): New prototype.
959         * config/i386/i386.c (ix86_avoid_jump_misspredicts): Renamed to...
960         (ix86_avoid_jump_mispredicts): ... this.  Don't define if
961         ASM_OUTPUT_MAX_SKIP_ALIGN isn't defined.  Update comment.
962         Handle CODE_LABELs with >= 16 byte alignment or with
963         max_skip == (1 << align) - 1.
964         (ix86_reorg): Don't call ix86_avoid_jump_mispredicts if
965         ASM_OUTPUT_MAX_SKIP_ALIGN isn't defined.
966
967         PR target/39942
968         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Don't emit second
969         .p2align 3 if MAX_SKIP is smaller than 7.
970         * config/i386/linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
971
972 2009-05-15  Ian Lance Taylor  <iant@google.com>
973
974         * alias.c (struct alias_set_entry_d): Rename from struct
975         alias_set_entry.  Change all uses.
976         * except.c (struct call_site_record_d): Rename from struct
977         call_site_record.  Change all uses.
978         * except.h (struct eh_region_d): Rename from struct eh_region.
979         Change all uses.
980         * gcse.c (struct hash_table_d): Rename from struct hash_table.
981         Change all uses.
982         * graphite.c (struct ivtype_map_elt_d): Rename fromstruct
983         ivtype_map_elt.  Change all uses.
984         (struct rename_map_elt_d): Rename fromstruct rename_map_elt.
985         Change all uses.
986         (struct ifsese_d): Rename fromstruct ifsese.  Change all uses.
987         * graphite.h (struct name_tree_d): Rename from struct name_tree.
988         Change all uses.
989         (struct sese_d): Rename from struct sese.  Change all uses.
990         * omega.h (struct eqn_d): Rename from struct eqn.  Change all uses.
991         (struct omega_pb_d): Rename from struct omega_pb.  Change all uses.
992         * optabs.h (struct optab_d): Rename from struct optab.  Change all
993         uses.
994         (struct convert_optab_d): Rename from struct convert_optab.
995         Change all uses.
996         * tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct
997         ipa_opt_pass.  Change all uses.
998         * tree-predcom.c (struct dref_d): Rename from struct dref.  Change
999         all uses.
1000
1001         * c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already
1002         defined as a typedef.
1003         (grokdeclarator): If -Wc++-compat, warn if a typedef is already
1004         defined as a tag.
1005
1006 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1007
1008         PR 16302
1009         * fold-const.c (make_range,build_range_check,merge_ranges): Move
1010         declaration to...
1011         (merge_ranges): Returns bool. 
1012         * tree.h (make_range): .. to here.
1013         (build_range_check): Likewise.
1014         (merge_ranges): Likewise. Renamed from merge_ranges.
1015         * c-typeck.c (parser_build_binary_op): Update calls to
1016         warn_logical_operator.
1017         * c-common.c (warn_logical_operator): Add new warning.
1018         * c-common.h (warn_logical_operator): Update declaration.
1019         
1020 2009-05-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1021
1022         * ira-conflicts.c (add_insn_allocno_copies): Fix wrong conditional.
1023         
1024 2009-05-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1025
1026         * doc/install.texi: Document MPC requirements, flags etc.
1027
1028         * builtins.c (do_mpc_arg1, fold_builtin_ccos): New.
1029         (fold_builtin_cexp): Ensure we get a complex REAL_TYPE.
1030         Evaluate constant arguments.
1031         (fold_builtin_carg): Ensure we get a complex REAL_TYPE.
1032         (fold_builtin_1): Likewise, also evaluate constant arguments.
1033         Remove superfluous break.
1034         (do_mpc_ckconv): New.
1035         * real.h: Include mpc.h.
1036         * toplev.c (print_version): Output MPC version info if available.
1037
1038 2009-05-15  Sandra Loosemore  <sandra@codesourcery.com>
1039
1040         * fold-const.c (fold_convert_const_real_from_real): Check for overflow.
1041
1042 2009-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1043
1044         * config/i386/i386.c (ix86_reorg): Call optimize_function_for_speed_p
1045         only once.
1046
1047 2009-05-15  Jan Hubicka  <jh@suse.cz>
1048
1049         * doc/invoke.texi (max-early-inliner-iterations): New flag.
1050         * ipa-inline.c (enum inlining_mode): New INLINE_SIZE_NORECURSIVE.
1051         (try_inline): Fix return value.
1052         (cgraph_decide_inlining_incrementally): Honor new value.
1053         (cgraph_early_inlining): Handle indirect inlining.
1054         * params.def (PARAM_EARLY_INLINER_MAX_ITERATIONS): New.
1055
1056 2009-05-15  Jan Hubicka  <jh@suse.cz>
1057
1058         * cgraph.h (struct cgraph_node): Add finalized_by_frotnend flag.
1059         * cgraphunit.c (cgraph_finalize_function): Set it.
1060         (cgraph_expand_function): Use it.
1061
1062 2009-05-15  Sandra Loosemore  <sandra@codesourcery.com>
1063
1064         * real.c (encode_ieee_half): Define.
1065         (decode_ieee_half): Define.
1066         (ieee_half_format): Define.
1067         (arm_half_format): Define.
1068         * real.h (ieee_half_format): Declare.
1069         (arm_half_format): Declare.
1070
1071 2009-05-15  Sandra Loosemore  <sandra@codesourcery.com>
1072
1073         * optabs.c (prepare_float_lib_cmp):  Test that the comparison,
1074         swapped, and reversed optabs exist before trying to use them.
1075
1076 2009-05-15  Paul Brook  <paul@codesourcery.com>
1077             Sandra Loosemore  <sandra@codesourcery.com>
1078
1079         * config/arm/arm.c (neon_vector_mem_operand): Handle element/structure
1080         loads.  Allow PRE_DEC.
1081         (output_move_neon): Handle PRE_DEC.
1082         (arm_print_operand): Add 'A' for neon structure loads.
1083         * config/arm/arm-protos.h (neon_vector_mem_operand): Update prototype.
1084         * config/arm/neon.md (neon_mov): Update comment.
1085         * config/arm/constraints.md (Un, Us): Update neon_vector_mem_operand
1086         calls.
1087         (Um): New constraint.
1088
1089 2009-05-15  Jan Hubicka  <jh@suse.cz>
1090
1091         Revert the following patch until testsuite fallout is fixed:
1092         * cgraph.c (dump_cgraph_node): Dump size/time/benefit.
1093         * cgraph.h (struct inline_summary): New filed self_wize,
1094         size_inlining_benefit, self_time and time_inlining_benefit.
1095         (struct cgraph_global_info): Replace insns by time ans size fields.
1096         * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size
1097         (ipcp_estimate_growth, ipcp_insert_stage): Likewise.
1098         (ipcp_update_callgraph): Do not touch function bodies.
1099         * ipa-inline.c: Include except.h
1100         (MAX_TIME): New constant.
1101         (overall_insns): Remove
1102         (overall_size, max_benefit): New static variables.
1103         (cgraph_estimate_time_after_inlining): New function.
1104         (cgraph_estimate_size_after_inlining): Rewrite using benefits.
1105         (cgraph_clone_inlined_nodes): Update size.
1106         (cgraph_mark_inline_edge): Update size.
1107         (cgraph_estimate_growth): Use size info.
1108         (cgraph_check_inline_limits): Check size.
1109         (cgraph_default_inline_p): Likewise.
1110         (cgraph_edge_badness): Compute badness based on benefit and size cost.
1111         (cgraph_decide_recursive_inlining): Check size.
1112         (cgraph_decide_inlining_of_small_function): Update size; dump sizes and
1113         times.
1114         (cgraph_decide_inlining): Likewise.
1115         (cgraph_decide_inlining_incrementally): Likewise; honor
1116         PARAM_EARLY_INLINING_INSNS.
1117         (likely_eliminated_by_inlining_p): New predicate.
1118         (estimate_function_body_sizes): New function.
1119         (compute_inline_parameters): Use it.
1120         * except.c (must_not_throw_labels): New function.
1121         * except.h (must_not_throw_labels): Declare.
1122         * tree-inline.c (init_inline_once): Kill inlining_weigths
1123         * tree-ssa-structalias.c: Avoid uninitialized warning.
1124         * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300.
1125         (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60.
1126         (PARAM_INLINE_CALL_COST): Remove.
1127         (PARAM_EARLY_INLINING_INSNS): New.
1128
1129 2009-05-15  Richard Guenther  <rguenther@suse.de>
1130
1131         * tree-ssa-pre.c (eliminate): Use TODO_update_ssa_only_virtuals,
1132         not TODO_update_ssa.
1133
1134 2009-05-15  Richard Guenther  <rguenther@suse.de>
1135
1136         PR tree-optimization/39999
1137         * gimple.h (gimple_expr_type): Use the expression type looking
1138         through useless conversions.
1139         * tree-ssa-sccvn.c (vn_nary_op_lookup_stmt): Use gimple_expr_type.
1140         (vn_nary_op_insert_stmt): Likewise.
1141         (simplify_binary_expression): Likewise.
1142
1143 2009-05-15  Richard Guenther  <rguenther@suse.de>
1144
1145         * common.opt (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
1146         New options, enabled by default.
1147         * doc/invoke.texi (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
1148         Document.
1149         * tree-ssa-forwprop.c (gate_forwprop): Use flag_tree_forwprop.
1150         * tree-ssa-phiprop.c (gate_phiprop): Use flag_tree_phiprop.
1151         * tree-ssa-structalias.c (gate_tree_pta): New function.
1152         (pass_build_alias): Use it.
1153
1154 2009-05-15  Joseph Myers  <joseph@codesourcery.com>
1155
1156         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also
1157         recurse on an invariant address if a conversion from a pointer
1158         type to a wider integer type is involved.
1159
1160 2009-05-15  Jan Hubicka  <jh@suse.cz>
1161
1162         * cgraph.c (dump_cgraph_node): Dump size/time/benefit.
1163         * cgraph.h (struct inline_summary): New filed self_wize,
1164         size_inlining_benefit, self_time and time_inlining_benefit.
1165         (struct cgraph_global_info): Replace insns by time ans size fields.
1166         * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size
1167         (ipcp_estimate_growth, ipcp_insert_stage): Likewise.
1168         (ipcp_update_callgraph): Do not touch function bodies.
1169         * ipa-inline.c: Include except.h
1170         (MAX_TIME): New constant.
1171         (overall_insns): Remove
1172         (overall_size, max_benefit): New static variables.
1173         (cgraph_estimate_time_after_inlining): New function.
1174         (cgraph_estimate_size_after_inlining): Rewrite using benefits.
1175         (cgraph_clone_inlined_nodes): Update size.
1176         (cgraph_mark_inline_edge): Update size.
1177         (cgraph_estimate_growth): Use size info.
1178         (cgraph_check_inline_limits): Check size.
1179         (cgraph_default_inline_p): Likewise.
1180         (cgraph_edge_badness): Compute badness based on benefit and size cost.
1181         (cgraph_decide_recursive_inlining): Check size.
1182         (cgraph_decide_inlining_of_small_function): Update size; dump sizes and
1183         times.
1184         (cgraph_decide_inlining): Likewise.
1185         (cgraph_decide_inlining_incrementally): Likewise; honor
1186         PARAM_EARLY_INLINING_INSNS.
1187         (likely_eliminated_by_inlining_p): New predicate.
1188         (estimate_function_body_sizes): New function.
1189         (compute_inline_parameters): Use it.
1190         * except.c (must_not_throw_labels): New function.
1191         * except.h (must_not_throw_labels): Declare.
1192         * tree-inline.c (init_inline_once): Kill inlining_weigths
1193         * tree-ssa-structalias.c: Avoid uninitialized warning.
1194         * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300.
1195         (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60.
1196         (PARAM_INLINE_CALL_COST): Remove.
1197         (PARAM_EARLY_INLINING_INSNS): New.
1198         doc/invoke.texi (max-inline-insns-auto, early-inlining-insns): Update.
1199         (inline-call-cost): Remove.
1200         (early-inlining-insns): New.
1201
1202 2009-05-15  Eric Botcazou  <ebotcazou@adacore.com>
1203
1204         * dbxout.c (dbxout_range_type): Add LOW and HIGH parameters.  Use them
1205         for bounds.
1206         (print_int_cst_bounds_in_octal_p): Likewise.
1207         (dbxout_type): Adjust calls to above functions.  Be prepared to deal
1208         with subtypes.
1209         * dwarf2out.c (base_type_die): Likewise.
1210         (is_subrange_type): Delete.
1211         (subrange_type_die): Add LOW and HIGH parameters.  Use them for bounds.
1212         (modified_type_die): Call subrange_type_for_debug_p on subtypes.
1213         * fold-const.c (fold_truth_not_expr) <CONVERT_EXPR>: Do not strip it if
1214         the destination type is boolean.
1215         (build_range_check): Do not special-case subtypes.
1216         (fold_sign_changed_comparison): Likewise.
1217         (fold_unary): Likewise.
1218         * langhooks-def.h (LANG_HOOKS_GET_SUBRANGE_BOUNDS): Define.
1219         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_GET_SUBRANGE_BOUNDS.
1220         * langhooks.h (lang_hooks_for_types): Add get_subrange_bounds.
1221         * tree.c (subrange_type_for_debug_p): New predicate based on the former
1222         is_subrange_type.
1223         * tree.h (subrange_type_for_debug_p): Declare.
1224         * tree-chrec.c (avoid_arithmetics_in_type_p): Delete.
1225         (convert_affine_scev): Remove call to above function.
1226         (chrec_convert_aggressive): Likewise.
1227         * tree-ssa.c (useless_type_conversion_p_1): Do not specifically return
1228         false for conversions involving subtypes.
1229         * tree-vrp.c (vrp_val_max): Do not special-case subtypes.
1230         (vrp_val_min): Likewise.
1231         (needs_overflow_infinity): Likewise.
1232         (extract_range_from_unary_expr): Likewise.
1233
1234 2009-05-15  Paolo Bonzini  <bonzini@gnu.org>
1235
1236         * config/frv/frv.h: Clean up references to GO_IF_LEGITIMATE_ADDRESS.
1237         * config/frv/frv.c: Likewise.
1238         * config/s390/s390.c: Likewise.
1239         * config/sparc/sparc.h: Likewise.
1240         * config/i386/i386.h: Likewise.
1241         * config/i386/i386.c: Likewise.
1242         * config/crx/crx.c: Likewise.
1243         * config/m68hc11/m68hc11.h: Likewise.
1244         * config/iq2000/iq2000.c: Likewise.
1245         * config/mn10300/mn10300.h: Likewise.
1246         * config/mn10300/mn10300.c: Likewise.
1247         * config/m68k/m68k.c: Likewise.
1248         * config/rs6000/rs6000.c: Likewise.
1249         * config/rs6000/xcoff.h: Likewise.
1250         * config/rs6000/linux64.h: Likewise.
1251         * config/rs6000/sysv4.h: Likewise.
1252         * config/score/score3.c: Likewise.
1253         * config/score/score7.c: Likewise.
1254         * config/score/score.c: Likewise.
1255         * config/arm/arm.md: Likewise.
1256         * config/mips/mips.c: Likewise.
1257         * config/mips/mips.md: Likewise.
1258         * config/bfin/bfin.h: Likewise.
1259         * config/pa/pa.c: Likewise.
1260         * config/pa/constraints.md: Likewise.
1261
1262         * config/pdp11/pdp11-protos.h (legitimate_address_p): Delete.
1263         * config/pdp11/pdp11.c (legitimate_address_p): Delete.
1264         * config/pdp11/pdp11.h: Use memory_address_p instead.
1265
1266 2009-05-14  Ian Lance Taylor  <iant@google.com>
1267
1268         * passes.c (finish_optimization_passes): Change i to int.
1269         * plugin.c (plugins_active_p): Change event to int.
1270         (dump_active_plugins): Likewise.
1271         * reginfo.c (invalid_mode_change_p): Change to to unsigned int.
1272         Add cast.
1273         * tree.c (tree_range_check_failed): Change c to unsigned int.
1274         (omp_clause_range_check_failed): Likewise.
1275         (build_common_builtin_nodes): Change mode to int.  Add cast.
1276         * config/ia64/ia64.c (is_emitted): Change r to unsigned int.
1277         (ia64_hard_regno_rename_ok, ia64_eh_uses): Likewise.
1278
1279         * c-typeck.c (build_unary_op): If -Wc++-compat, warn about using
1280         ++ or -- with a variable of enum type.
1281
1282 2009-05-14  Steven Bosscher  <steven@gcc.gnu.org>
1283
1284         PR driver/40144
1285         * opts.c (common_handle_option): Add OPT_fcse_skip_blocks as a no-op.
1286
1287 2009-05-14  Steven Bosscher  <steven@gcc.gnu.org>
1288
1289         * store-motion.c: Do not include params.h
1290         * Makefile.in: Fix dependencies for various files.
1291
1292 2009-05-14  Steven Bosscher  <steven@gcc.gnu.org>
1293
1294         * auto-inc-dec.c: Fix pass description, remove apparent
1295         accidental duplication.
1296
1297 2009-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1298
1299         PR middle-end/40147
1300         * ipa-utils.h (memory_identifier_string): Moved to ...
1301         * tree.h (memory_identifier_string): Here.  Add GTY(()).
1302
1303 2009-05-14  Paolo Bonzini  <bonzini@gnu.org>
1304
1305         * doc/tm.texi (TARGET_LEGITIMATE_ADDRESS_P): Refer mainly to this
1306         in the former documentation of...
1307         (GO_IF_LEGITIMATE_ADDRESS): ... this.
1308         * ira-conflicts.c (get_dup_num): Use address_operand.
1309         * targhooks.c (default_legitimate_address_p): New.
1310         * targhooks.h (default_legitimate_address_p): New.
1311         * reload.c (strict_memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]:
1312         Call hook.
1313         * recog.c (memory_address_p) [!GO_IF_LEGITIMATE_ADDRESS]: Call hook.
1314         * target.h (struct target): Add legitimate_address_p.
1315         * target-def.h (TARGET_LEGITIMATE_ADDRESS_P): New.
1316         (TARGET_INITIALIZER): Include it.
1317
1318         * config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1319         * config/alpha/alpha-protos.h (alpha_legitimate_address_p): Remove.
1320         * config/alpha/alpha.c (alpha_legitimate_address_p): Make static.
1321         (TARGET_LEGITIMATE_ADDRESS_P): New.
1322
1323         * config/frv/frv.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1324         (REG_OK_STRICT_P): Delete.
1325         * config/frv/frv-protos.h (frv_legitimate_address_p): Rename to...
1326         (frv_legitimate_address_p_1): ... this.
1327         * config/frv/frv.c (frv_legitimate_address_p): Forward to...
1328         (frv_legitimate_address_p_1): ... the renamed old
1329         frv_legitimate_address_p.
1330         * config/frv/predicates.md: Adjust calls to frv_legitimate_address_p.
1331         (TARGET_LEGITIMATE_ADDRESS_P): New.
1332
1333         * config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1334         * config/s390/s390-protos.h (legitimate_address_p): Remove.
1335         * config/s390/s390.c (legitimate_address_p): Rename to...
1336         (s390_legitimate_address_p): ... this, make static.
1337         (legitimize_address): Adjust call.
1338         (TARGET_LEGITIMATE_ADDRESS_P): New.
1339         * config/s390/constraints.md ("e"): Call strict_memory_address_p.
1340
1341         * config/m32c/m32c.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1342         * config/m32c/m32c-protos.h (m32c_legitimate_address_p): Remove.
1343         * config/m32c/m32c.c (m32c_legitimate_address_p): Make static.
1344         (TARGET_LEGITIMATE_ADDRESS_P): New.
1345
1346         * config/spu/spu.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1347         * config/spu/spu-protos.h (spu_legitimate_address): Remove.
1348         * config/spu/spu.c (spu_legitimate_address): Rename to...
1349         (spu_legitimate_address_p): ... this, make static.
1350         (TARGET_LEGITIMATE_ADDRESS_P): New.
1351
1352         * config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1353         * config/sparc/sparc-protos.h (legitimate_address_p): Remove.
1354         * config/sparc/sparc.c (legitimate_address_p): Rename to...
1355         (sparc_legitimate_address_p): ... this, make static and return bool.
1356         (legitimize_address): Adjust call.
1357         (TARGET_LEGITIMATE_ADDRESS_P): New.
1358
1359         * config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1360         * config/i386/i386-protos.h (legitimate_address_p): Remove.
1361         * config/i386/i386.c (legitimate_address_p): Rename to...
1362         (ix86_legitimate_address_p): ... this, make static.
1363         (constant_address_p): Move after it, adjust call.
1364         (TARGET_LEGITIMATE_ADDRESS_P): New.
1365
1366         * config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1367         * config/avr/avr-protos.h (legitimate_address_p): Remove.
1368         * config/avr/avr.c (legitimate_address_p): Rename to...
1369         (avr_legitimate_address_p): ... this, make static.
1370         (legitimize_address): Adjust call.
1371         (TARGET_LEGITIMATE_ADDRESS_P): New.
1372
1373         * config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1374         * config/crx/crx-protos.h (crx_legitimate_address_p): Remove.
1375         * config/crx/crx.c (crx_legitimate_address_p): Make static.
1376         (TARGET_LEGITIMATE_ADDRESS_P): New.
1377
1378         * config/xtensa/xtensa.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1379         * config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): Remove.
1380         * config/xtensa/xtensa.c (xtensa_legitimate_address_p): Make static.
1381         (TARGET_LEGITIMATE_ADDRESS_P): New.
1382
1383         * config/stormy16/stormy16.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1384         * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p):
1385         Remove.
1386         * config/stormy16/stormy16.c (xstormy16_legitimate_address_p):
1387         Make static.
1388         (TARGET_LEGITIMATE_ADDRESS_P): New.
1389
1390         * config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1391         * config/m68hc11/m68hc11-protos.h (m68hc11_go_if_legitimate_address):
1392         Remove.
1393         * config/m68hc11/m68hc11.c (m68hc11_go_if_legitimate_address):
1394         Rename to...
1395         (m68hc11_legitimate_address_p): ... this, make static.
1396         (go_if_legitimate_address_internal): Rename to...
1397         (m68hc11_legitimate_address_p_1): ... this.
1398         (legitimize_address): Adjust call.
1399         (TARGET_LEGITIMATE_ADDRESS_P): New.
1400
1401         * config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1402         * config/iq2000/iq2000-protos.h (iq2000_legitimate_address_p): Remove.
1403         * config/iq2000/iq2000.c (iq2000_legitimate_address_p): Make static.
1404         (TARGET_LEGITIMATE_ADDRESS_P): New.
1405
1406         * config/mn10300/mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1407         * config/mn10300/mn10300-protos.h (legitimate_address_p): Remove.
1408         * config/mn10300/mn10300.c (legitimate_address_p): Rename to...
1409         (mn10300_legitimate_address_p): ... this, make static.
1410         (TARGET_LEGITIMATE_ADDRESS_P): New.
1411
1412         * config/m68k/m68k.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1413         * config/m68k/m68k-protos.h (m68k_legitimate_address_p): Remove.
1414         * config/m68k/m68k.c (m68k_legitimate_address_p): Make static.
1415         (TARGET_LEGITIMATE_ADDRESS_P): New.
1416
1417         * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1418         (REG_OK_STRICT_FLAG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Delete.
1419         (INT_REG_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P): Move above.
1420         * config/rs6000/rs6000.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1421         * config/rs6000/rs6000-protos.h (rs6000_legitimate_address): Remove.
1422         * config/rs6000/rs6000.c (rs6000_legitimate_address): Rename to...
1423         (rs6000_legitimate_address_p): ... this, make static.
1424         (TARGET_LEGITIMATE_ADDRESS_P): New.
1425         (REG_MODE_OK_FOR_BASE_P): Delete.
1426         (rs6000_legitimize_reload_address): Use INT_REG_OK_FOR_BASE_P.
1427
1428         * config/picochip/picochip.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1429         * config/picochip/picochip-protos.h (picochip_legitimate_address_p):
1430         Delete.
1431         * config/picochip/picochip.c (picochip_legitimate_address_p): Make
1432         static, adjust types.
1433         (TARGET_LEGITIMATE_ADDRESS_P): New.
1434
1435         * config/score/score.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1436         * config/score/score.c (score_address_p): Rename to...
1437         (score_legitimate_address_p): ... this.
1438         (TARGET_LEGITIMATE_ADDRESS_P): New.
1439         * config/score/score3.c (score3_address_p): Rename to...
1440         (score3_legitimate_address_p): ... this.
1441         * config/score/score7.c (score7_address_p): Rename to...
1442         (score7_legitimate_address_p): ... this.
1443
1444         * config/arm/arm.h (ARM_GO_IF_LEGITIMATE_ADDRESS,
1445         THUMB2_GO_IF_LEGITIMATE_ADDRESS, THUMB1_GO_IF_LEGITIMATE_ADDRESS,
1446         GO_IF_LEGITIMATE_ADDRESS): Delete.
1447         * config/arm/arm-protos.h (thumb1_legitimate_address_p,
1448         thumb2_legitimate_address_p): Delete.
1449         (arm_legitimate_address_p): Rename to...
1450         (arm_legitimate_address_outer_p): ... this.
1451         * config/arm/constraints.md ("Uq"): Adjust call.
1452         * config/arm/predicates.md (arm_extendqisi_mem_op): Likewise.
1453         * config/arm/arm.c (arm_legitimate_address_p): New, rename old one to...
1454         (arm_legitimate_address_outer_p): ... this.
1455         (thumb1_legitimate_address_p, thumb2_legitimate_address_p): Make static.
1456         (TARGET_LEGITIMATE_ADDRESS_P): New.
1457
1458         * config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1459         * config/mips/mips-protos.h (mips_legitimate_address_p): Remove.
1460         * config/mips/mips.c (mips_legitimate_address_p): ... Make static.
1461         (TARGET_LEGITIMATE_ADDRESS_P): New.
1462
1463         * config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1464         * config/vax/vax-protos.h (legitimate_address_p): Remove.
1465         * config/vax/vax.c (legitimate_address_p): Rename to...
1466         (vax_legitimate_address_p): ... this, make static.
1467         (TARGET_LEGITIMATE_ADDRESS_P): New.
1468
1469         * config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1470         * config/h8300/h8300-protos.h (h8300_legitimate_address_p): Remove.
1471         * config/h8300/h8300.c (h8300_legitimate_address_p): ... Make static.
1472         (TARGET_LEGITIMATE_ADDRESS_P): New.
1473
1474         * config/mmix/mmix.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1475         * config/mmix/mmix-protos.h (mmix_legitimize_address): Remove.
1476         * config/mmix/mmix.c (mmix_legitimate_address): Rename to...
1477         (mmix_legitimate_address_p): ... this, make static.
1478         (TARGET_LEGITIMATE_ADDRESS_P): New.
1479
1480         * config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Delete.
1481         * config/bfin/bfin-protos.h (bfin_legitimate_address_p): Remove.
1482         * config/bfin/bfin.c (bfin_legitimate_address_p): ... Make static.
1483         (TARGET_LEGITIMATE_ADDRESS_P): New.
1484
1485 2009-05-14  Paolo Bonzini  <bonzini@gnu.org>
1486
1487         * config/arm/arm.h (PROMOTE_FUNCTION_MODE): Remove handling
1488         of MODE_COMPLEX_INT.
1489
1490 2009-05-14  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1491
1492         * config/alpha/alpha.c (alpha_initialize_trampoline): Change 0 to
1493         LCT_NORMAL in function call.
1494         * mips-tdump.c (print_file_desc): Add cast to enum type.
1495         * mips-tfile.c (add_ext_symbol): Add casts to enum types.
1496         (mark_stabs): Add casts to enum types.
1497         (parse_stabs_common): Add casts to enum types.
1498
1499 2009-05-13  Adam Nemet  <anemet@caviumnetworks.com>
1500
1501         * config/mips/mips.c (mips_print_operand) <REG, MEM, default>:
1502         Check for invalid values of LETTER.
1503
1504 2009-05-13  Taras Glek  <tglek@mozilla.com>
1505
1506         * attribs.c (register_attribute): moved out attribute registration into
1507         register_attribute.
1508         * doc/plugins.texi: Documented register_attribute and PLUGIN_ATTRIBUTES.
1509         * gcc-plugin.h: Added forward decl for register_attribute.
1510         * gcc-plugin.h (plugins_event): Added PLUGIN_ATTRIBUTES.
1511         * plugin.c (register_callback, invoke_plugin_callbacks): Added
1512         PLUGIN_ATTRIBUTES boilerplate.
1513
1514 2009-05-14  Dave Korn  <dave.korn.cygwin@gmail.com>
1515
1516         * config/i386/msformat-c.c (ms_printf_length_specs):  Use enumeration
1517         values even in sentinel and empty entries.
1518         (ms_printf_flag_specs):  Likewise.
1519         (ms_scanf_flag_specs):  Likewise.
1520         (ms_strftime_flag_specs):  Likewise.
1521         (ms_print_char_table):  Likewise.
1522         (ms_scan_char_table):  Likewise.
1523         (ms_time_char_table):  Likewise.
1524
1525 2009-05-13  Doug Kwan  <dougkwan@google.com>
1526
1527         * tree-ssa-sccvn.c (compare_ops): Stabilize qsort.
1528
1529 2009-05-13  Adam Nemet  <anemet@caviumnetworks.com>
1530
1531         * config/mips/mips.md (store): Add attributes for QI and HI.
1532         Update comment.
1533         (truncdisi2, truncdihi2, truncdiqi2): Merge these into ...
1534         (truncdi<mode>2): ... this new pattern.
1535
1536 2009-05-13  Brad Hards  <bradh@kde.org>
1537
1538         * Makefile.in (TEXI_GCCINT_FILES): Add plugins.texi.
1539
1540 2009-05-14  Jakub Jelinek  <jakub@redhat.com>
1541             Ben Elliston <bje@au.ibm.com>
1542
1543         PR middle-end/40035
1544         * dse.c (check_mem_read_rtx): Guard against width == -1.
1545
1546 2009-05-13  Michael Matz  <matz@suse.de>
1547
1548         PR middle-end/39976
1549         * tree-outof-ssa.c (maybe_renumber_stmts_bb): New function.
1550         (trivially_conflicts_p): New function.
1551         (insert_backedge_copies): Use it.
1552
1553 2009-05-13  Janis Johnson  <janis187@us.ibm.com>
1554
1555         * c-pragma.c (enum pragma_switch_t): Prefix constants with PRAGMA_.
1556         (handle_stdc_pragma): Use new enum constant names.
1557         (handle_pragma_float_const_decimal64): Ditto.
1558
1559 2009-05-13  Ian Lance Taylor  <iant@google.com>
1560
1561         * Makefile.in (build/gencheck.o): Depend upon all-tree.def, not
1562         tree.def.
1563
1564 2009-05-13  Nathan Sidwell  <nathan@codesourcery.com>
1565
1566         * config/m68k/t-uclinux (M68K_MLIB_CPU): Check for FL_UCLINUX.
1567         * config/m68k/m68k-devices.def: Add FL_UCLINUX to 68020 and 54455
1568         multilibs.
1569         * config/m68k/m68k.h (FL_UCLINUX): Define.
1570
1571 2009-05-13  Jan Hubicka  <jh@suse.cz>
1572
1573         * options.c (gfc_post_options): -fwhole-program imply -fwhole-file.
1574
1575 2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
1576
1577         * config/sh/sh.h (OVERRIDE_OPTIONS): Clear flag_schedule_insns
1578         unless -fschedule-insns is specified.
1579
1580 2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
1581
1582         PR target/39561
1583         * config/sh/sh.h (OPTIMIZATION_OPTIONS): Don't set
1584         TARGET_EXPAND_CBRANCHDI4.
1585         * config/sh/sh.md (cbranchdi4): Don't check TARGET_EXPAND_CBRANCHDI4.
1586         * config/sh/sh.opt (mexpand-cbranchdi): Remove.
1587         (cmpeqdi): Fix comment.
1588
1589 2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
1590
1591         * config/sh/sh-protos.h (sh_legitimate_index_p): Declare.
1592         (sh_legitimate_address_p): Likewise.
1593         * config/sh/sh.c (sh_legitimate_index_p): New.
1594         (sh_legitimate_address_p): Likewise.
1595         * config/sh/sh.h (REG_OK_FOR_BASE_P): Add STRICT parameter.
1596         (REG_OK_FOR_INDEX_P, SUBREG_OK_FOR_INDEX_P): Likewise.
1597         (MODE_DISP_OK_4, MODE_DISP_OK_8): Remove.
1598         (MAYBE_BASE_REGISTER_RTX_P): New macro.
1599         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
1600         (BASE_REGISTER_RTX_P): Use MAYBE_BASE_REGISTER_RTX_P.
1601         (INDEX_REGISTER_RTX_P): Use MAYBE_INDEX_REGISTER_RTX_P.
1602         (GO_IF_LEGITIMATE_INDEX): Use sh_legitimate_index_p.
1603         (GO_IF_LEGITIMATE_ADDRESS): Use sh_legitimate_address_p.
1604
1605 2009-05-12  Jan Hubicka  <jh@suse.cz>
1606
1607         * tree-inline.c (estimate_operator_cost): Add operands;
1608         when division happens by constant, it is cheap.
1609         (estimate_num_insns): Loads and stores are not having cost of 0;
1610         EH magic stuff is cheap; when computing runtime cost of switch,
1611         use log2 base of amount of its cases; builtin_expect has cost of 0;
1612         compute cost for moving return value of call.
1613         (init_inline_once): Initialize time_based flags.
1614         * tree-inline.h (eni_weights_d): Add time_based flag.
1615
1616 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
1617
1618         * df-core.c: Update head documentation.
1619
1620 2009-05-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
1621
1622         PR bootstrap/40118
1623         * rs6000.c (rs6000_generate_compare): Use op1b instead of
1624         shadowing exisiting variable op1.
1625
1626 2009-05-12  Uros Bizjak  <ubizjak@gmail.com>
1627
1628         PR target/37179
1629         * config/i386/driver-i386.c (processor_signatures): New enum.
1630         (SIG_GEODE): Move from vendor_signatures to processor_signatures.
1631         (host_detect_local_cpu): For SIG_AMD vendor, check for SIG_GEODE
1632         processor signature to detect geode processor.
1633
1634 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
1635
1636         Revert:
1637
1638         2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
1639
1640         * optabs.c (prepare_cmp_insn): Temporarily disable test that
1641         causes spurious differences between trunk and cond-optab branch.
1642
1643 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
1644
1645         * dojump.c (compare_from_rtx): Delete.
1646         * expmed.c (emit_store_flag): Only try cstore_optab.  Canonicalize
1647         any MODE_CC mode to the cstorecc4 pattern.  Use prepare_operand, fail
1648         if the comparison does not satisfy the predicate; test predicates for
1649         operands 2 and 3 of a cstore pattern.  Don't try cstore optab
1650         further if one existing pattern fails.
1651         * expr.h (compare_from_rtx): Delete.
1652         (prepare_operand): Declare it.
1653         * optabs.c: Change "lib call" to "libcall" throughout.
1654         (bcc_gen_fctn, setcc_gen_code, trap_rtx,
1655         HAVE_conditional_trap, emit_cmp_insn): Delete.
1656         (can_compare_p): Delete cmp_optab case.
1657         (prepare_float_lib_cmp): Return an rtx and a machine mode.
1658         Accept other parameters by value.
1659         (prepare_operand): Make non-static.
1660         (prepare_cmp_insn): Return an rtx and a machine mode.  Accept
1661         other parameters by value.  Try to widen operands here based on
1662         an optab_methods argument and looking at cbranch_optab.
1663         (emit_cmp_and_jump_insn_1): Accept test and mode, remove widening
1664         loop.  Use cbranch_optab directly.
1665         (emit_cmp_and_jump_insns): Fix comment.  Adjust call to
1666         prepare_cmp_insn and emit_cmp_and_jump_insn_1, remove obsolete
1667         assertion.
1668         (emit_conditional_move, emit_conditional_add): Inline what's needed
1669         of compare_from_rtx, using new prepare_cmp_insn for the rest.
1670         (init_optabs): Init cmp_optab with UNKNOWN, cbranch_optab
1671         with COMPARE.  Move cmov_optab and cstore_optab above
1672         with cbranch_optab, move cmp_optab down with ucmp_optab,
1673         remove tst_otpab.  Do not initialize trap_rtx.
1674         (gen_cond_trap): Do it here.  Use ctrap_optab.  Test predicate
1675         for trap code.  Do not check HAVE_conditional_trap.  Use
1676         prepare_cmp_insn.  Accept no predicate for operand 3.
1677         * optabs.h (OTI_cmp): Mark as used only for libcalls.
1678         (OTI_ctrap, ctrap_optab): New.
1679         (tst_optab): Delete.
1680         (bcc_gen_fctn, setcc_gen_code, emit_cmp_insn): Delete.
1681         * ifcvt.c (find_if_header): Replace HAVE_conditional_trap
1682         with lookup of ctrap_optab.
1683         * genopinit.c (cmp_optab, tst_optab, bcc_gen_fctn,
1684         setcc_gen_code): Delete.
1685         (ctrap_optab): New.
1686
1687         * combine.c (combine_simplify_rtx, simplify_set): Do not
1688         special case comparing against zero for cc0 machines.
1689         * simplify-rtx.c (simplify_binary_operation_1): Never remove
1690         COMPARE on cc0 machines.
1691         (simplify_relational_operation): Return a new expression when
1692         a COMPARE could be removed.
1693         * final.c (final_scan_insn): Compare cc_status values
1694         against LHS of a (compare FOO (const_int 0)) cc0 source.
1695         Also check if cc_status.value is the full compare.
1696
1697         * doc/md.texi (bCC, sCC, tstMM, cmpMM): Delete.
1698         (cstoreMM4): Document.
1699         (conditional_trap): Document ctrapMM4 instead.
1700         (sync_compare_and_swapMM): Refer to cbranchcc4.
1701         (Dependent Patterns): Eliminate obsolete information referring to
1702         the old jump optimization phase.
1703         (Canonicalization): Include cbranchcc4 case, omit canonicalization
1704         of compares with 0 on cc0 machines.
1705         (Jump Patterns): Refer to MODE_CC jump patterns preferably,
1706         avoiding references to cc0.  Remove text about storing operands
1707         in cmpMM.
1708         * doc/tm.texi (Condition Codes): Include blurb on different
1709         condition code representations, separate into subsections for
1710         CC0, MODE_CC and conditional execution.
1711
1712         * config/alpha/alpha-protos.h (alpha_emit_conditional_branch,
1713         alpha_emit_setcc): Accept operands and a machine mode.
1714         * config/alpha/alpha.c (alpha_emit_conditional_branch):
1715         Get code/op0/op1 from operands, use machine mode argument
1716         instead of alpha_compare.fp_p.  Emit the branch here.
1717         (alpha_emit_setcc): Likewise, and return boolean.
1718         (alpha_emit_conditional_move): Likewise.  Assert that
1719         cmp_op_mode == cmp_mode, and simplify accordingly.
1720         * config/alpha/alpha.h (struct alpha_compare, alpha_compare): Delete.
1721         * config/alpha/alpha.md (cmpdf, cmptf, cmpdi, bCC, sCC): Delete.
1722         (cbranchdf4, cbranchtf4, cbranchdi4, cstoredf4, cstoretf4,cstoredi4):
1723         Delete.
1724         (stack probe test): Use cbranchdi4.
1725         * config/alpha/predicates.md (alpha_cbranch_operator): New.
1726
1727         * config/arc/arc.c (gen_compare_reg): Do not emit cmp. 
1728         * config/arc/arc.h (movsicc, movsfcc): Use it.
1729         (movdicc, *movdicc_insn, movdfcc, *movdfcc_insn): Remove.
1730         (cbranchsi4, cstoresi4): New.
1731         (cmpsi, bCC and sCC expanders): Remove. 
1732
1733         * config/arm/arm.c (arm_compare_op0, arm_compare_op1): Delete.
1734         * config/arm/arm.h (arm_compare_op0, arm_compare_op1): Delete.
1735         * config/arm/predicates.md (arm_comparison_operator): Only include
1736         floating-point operators if there is a hardware floating-point unit.
1737         * config/arm/arm.md (cbranchsi4, cstoresi4): Enable for TARGET_32BIT,
1738         deferring to cbranch_cc and cstore_cc respectively.
1739         (cbranchsf4, cbranchdf4, cbranchdi4, cstoresf4, cstoredf4, cstoredi4,
1740         cbranch_cc, cstore_cc): New.
1741         (movsicc, movsfcc, movdfcc): Do not use arm_compare_op0 and
1742         arm_compare_op1.
1743         (bCC, sCC, cmpsi, cmpsf, cmpdf, cmpdi): Delete.
1744
1745         * config/avr/avr-protos.h (out_tstsi, out_tsthi): Adjust prototype.
1746         * config/avr/avr.c (out_tstsi, out_tsthi): Get the tested operand
1747         as an argument.
1748         (adjust_insn_length): Adjust calls.
1749         (avr_reorg): Handle (compare (foo) (const_int 0)).
1750         * config/avr/avr.md (tstqi, tsthi, tstsi): Remove.
1751         (*negated_tstqi, *negated_tsthi, *negated_tstsi): Unmacroize.
1752         (*reversed_tsthi, *reversed_tstsi): Add a scratch for simplicity.
1753         (cmpqi, cmphi, cmpsi): Prepend asterisk, fuse tst[qhs]i here.
1754         (bCC): Remove.
1755         (cbranchqi4, cbranchhi4, cbranchsi4): New.
1756         (tst -> sbrc/sbrs peephole2, cpse peephole): Wrap RHS with COMPARE.
1757
1758         * config/bfin/bfin.md (cmpbi, cmpsi, bCC, sCC): Delete.
1759         (cbranchsi4, cstorebi4, cstoresi4): New.
1760         (movbisi): This insn is duplicate, split it to zero_extend.
1761         * config/bfin/bfin.c (bfin_compare_op0, bfin_compare_op1): Delete
1762         (bfin_gen_compare): Do not use them.  Emit VOIDmode SET, not BImode.
1763         (bfin_optimize_loop): Use cbranch expander.
1764         * config/bfin/bfin.h (bfin_compare_op0, bfin_compare_op1): Delete.
1765         * config/bfin/predicates.md (bfin_cbranch_operator): Rename to...
1766         (bfin_bimode_comparison_operator): ... this.
1767         (bfin_direct_comparison_operator): New.
1768  
1769         * config/cris/cris.c (cris_normal_notice_update_cc): Look
1770         inside (compare FOO (const_int 0)).
1771         (cris_rtx_costs): Handle ZERO_EXTRACT.
1772         * config/cris/cris.md (tstdi, tst<mode>, cmpdi): Delete.
1773         (*tstdi_non_v32): Fold in *cmpdi_non_v32.
1774         (*tstdi_v32): Delete.
1775         (*cmpdi_non_v32): Add M alternative for operand 1.
1776         (cmpsi, cmp<mode>): Make private.
1777         (*tstsi, *tst<mode>_cmp, *tst<mode>_non_cmp, *btst): Wrap LHS
1778         with COMPARE.
1779         (cbranch<mode>4, cbranchdi4, cstore<mode>4): New.
1780
1781         * config/crx/crx.md (cstore<mode>4, cbranchcc4): New.
1782         (cmp<mode>, bCOND_internal, b<code>, s<code>): Delete.
1783         (cbranch<mode>4, sCOND_internal): Use ordered_comparison_operator.
1784         (cc_reg_operand): New.
1785         (any_cond): Delete.
1786         * config/crx/crx.c (crx_compare_op0, crx_compare_op1,
1787         crx_expand_compare, crx_expand_branch, crx_expand_scond): Delete.
1788         * config/crx/crx.h (crx_compare_op0, crx_compare_op1): Delete.
1789         * config/crx/crx-protos.h (crx_expand_compare, crx_expand_branch,
1790         crx_expand_scond): Delete.
1791
1792         * config/fr30/fr30.md (cmp<mode>, bCC): Delete.
1793         (cbranchsi4): New.
1794         * config/fr30/fr30.c (fr30_compare_op0, fr30_compare_op1): Delete
1795         * config/fr30/fr30.h (fr30_compare_op0, fr30_compare_op1): Delete.
1796
1797         * config/frv/frv.md (cbranchsi4, cbranchsf4, cbranchdf4,
1798         cstoresi4, cstoresf4, cstoredf4): New.
1799         (cmpdi, cmpsi, cmpsf, cmpdf, bCC, sCC): Remove.
1800         * config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc):
1801         Receive the entire operands array.
1802         * config/frv/frv.h (frv_compare_op0, frv_compare_op1): Delete.
1803         * config/frv/frv.c (frv_compare_op0, frv_compare_op1): Delete.
1804         * config/frv/frv-protos.h (frv_emit_cbranch, frv_emit_scc):
1805         Get test/op0/op1 from the operands array.
1806         (frv_emit_cond_move): Get test/op0/op1 from the test_rtx.
1807
1808         * config/h8300/h8300-protos.h (h8300_expand_branch): Accept operands.
1809         (h8300_expand_store): New.
1810         * config/h8300/h8300.c (h8300_rtx_costs): Handle (compare FOO
1811         (const_int 0)).
1812         (h8300_expand_branch): Emit compare here.  Adjust for new arguments.
1813         (h8300_expand_store): New.
1814         * config/h8300/h8300.md (btst combine patterns): Wrap with COMPARE
1815         or do not try to produce (set (cc0) REG).
1816         (peepholes): Wrap arguments with COMPARE.  Add a peephole to
1817         change a compare into a move to a scratch register.  Disable some
1818         peepholes when comparing with zero.
1819         (tstsi, tsthi, tstsi, cmpqi): Make private.
1820         (cmphi): Delete.
1821         (bCC, sCC): Delete.
1822         (cbranchqi4, cbranchhi4, cbranchsi4, cstoreqi4, cstorehi4,
1823         cstoresi4): New.
1824
1825         * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_int_addcc,
1826         ix86_expand_fp_movcc): Set ix86_compare_op0 and ix86_compare_op1.
1827         (ix86_emit_i387_log1p): Use gen_cbranchxf4.
1828         (ix86_emit_i387_log1p): Use cbranchxf2.
1829         (ix86_expand_setcc): Return void.
1830         * config/i386/i386-protos.h (ix86_expand_setcc): Return void.
1831         * config/i386/i386.md (cmpti, cmpdi, cmpsi, cmphi, cmpqi, cmpxf,
1832         cmp<MODEF>, cmpcc): Remove.
1833         (cbranchti4, cbranchdi4, cbranchsi4, cbranchhi4, cbranchqi4,
1834         cbranchxf4, cbranch<MODEF>4, cbranchcc4, cstoredi4, cstoresi4,
1835         cstorehi4, cstoreqi4, cstorexf4, cstore<MODEF>4, cstorecc): New.
1836         (sCC and bCC expanders): Remove.
1837         (stack_protect_test): Use cbranchcc4.
1838
1839         * config/ia64/ia64-protos.h (ia64_compare_op0, ia64_compare_op1):
1840         Delete.
1841         (ia64_expand_compare): Accept three rtx by reference and return void.
1842         * config/ia64/ia64.c (ia64_compare_op0, ia64_compare_op1): Delete.
1843         (ia64_expand_compare): Replace op0/op1 with *op0/*op1.  Get code
1844         from *expr.  Update *expr with the BImode comparison to do.
1845         * config/ia64/ia64.md (cmpbi, cmpsi, cmpdi, cmpsf, cmpdf, cmpxf,
1846         cmptf, bCC, sCC, conditional_trap): Delete.
1847         (cbranchbi4, cbranchsi4, cbranchdi4, cbranchsf4, cbranchdf4, 
1848         cbranchxf4, cbranchtf4, cstorebi4, cstoresi4, cstoredi4, cstoresf4,
1849         cstoredf4, cstorexf4, cstoretf4, ctrapbi4, ctrapsi4, ctrapdi4,
1850         ctrapsf4, ctrapdf4, ctrapxf4, ctraptf4): New.
1851         * config/ia64/predicates.md (ia64_cbranch_operator): New.
1852
1853         * config/iq2000/iq2000-protos.h (gen_conditional_branch): Change
1854         type of last argument.
1855         * config/iq2000/iq2000.c (branch_cmp, branch_type): Remove.
1856         (gen_conditional_branch): Get code/cmp0/cmp1 from operands,
1857         use machine mode argument instead of branch_type.  Remove dead
1858         code for floating-point comparisons.
1859         * config/iq2000/iq2000.h (branch_cmp, branch_type): Remove.
1860         * config/iq2000/iq2000.md (cmpsi, cmpdi, cmpsf, cmpdf, tstsi, bCC):
1861         Remove.
1862         (cbranchsi4, cstoresi4): New.
1863         * config/iq2000/predicates.md (reg_or_const_operand): New.
1864
1865         * config/m32c/m32c.md (cbranch splitter): Use match_op_dup.
1866         * config/m32c/m32c.md (any_cond, gl_cond): Delete.
1867         (b<code>_op): Rewrite to...
1868         (bcc_op): ... this, using match_operator.
1869         (s<code>_op): Rewrite to...
1870         (scc_op): ... this, using match_operator.
1871         (s<code>_24_op): Rewrite to...
1872         (scc_op_24): ... this, using match_operator.
1873         (s<code>_<mode>): Rewrite to...
1874         (cstore<mode>4): ... this, using match_operator.
1875         (s<code>_<mode>_24): Rewrite to...
1876         (cstore<mode>4_24): ... this, using match_operator.
1877         * config/m32c/m32c-protos.h (m32c_cmp_flg_0, m32c_pend_compare,
1878         m32c_unpend_compare, m32c_expand_scc): Delete.
1879         * config/m32c/m32c.c (compare_op0, compare_op1, m32c_cmp_flg_0,
1880         m32c_pend_compare, m32c_unpend_compare, m32c_expand_scc): Delete.
1881         (m32c_expand_movcc): Change NE to EQ if necessary.
1882         (m32c_init_libfuncs): Modify cstore optab instead of setcc_gen_code.
1883
1884         * config/m32r/m32r-protos.h (gen_cond_store): New.
1885         * config/m32r/m32r.c (m32r_compare_op0, m32r_compare_op1): Delete.
1886         (gen_cond_store): New, from sCC patterns.
1887         (m32r_expand_block_move): Use cbranchsi4.
1888         * config/m32r/m32r.h (m32r_compare_op0, m32r_compare_op1): Delete.
1889         * config/m32r/m32r.md (cmpsi, bCC, sCC): Delete.
1890         (cbranchsi4, cstoresi4): New.
1891         
1892         * config/m68hc11/m68hc11.c (m68hc11_compare_op0, m68hc11_compare_op1):
1893         Delete.
1894         (m68hc11_rtx_costs_1, m68hc11_rtx_costs): Handle ZERO_EXTRACT.
1895         (m68hc11_notice_update_cc): Look into a compare with 0.
1896         * config/m68hc11/m68hc11.h (m68hc11_compare_op0, m68hc11_compare_op1):
1897         Delete.
1898         * config/m68hc11/m68hc11.md (tstsi, tsthi, tstqi, cmpsi,
1899         cmphi, cmpqi, bCC): Delete.
1900         (cbranchsi4, cbranchhi4, cbranchqi4): New.
1901         (tstqi_1, tstqi_z_used, tstqi_1, bitcmpqi, bitcmpqi_z_used,
1902         bitcmpqi_12, bitcmphi, various splits and peephole2s): Wrap cc0<-reg
1903         sets with COMPARE.
1904
1905         * config/m68k/predicates.md (m68k_cstore_comparison_operator,
1906         const0_operand, const1_operand, m68k_subword_comparison_operand): New.
1907         * config/m68k/constraints.md (H): New.
1908         * config/m68k/m68k.md (tstdi): Remove define_expand, use name for
1909         the define_insn below.
1910         (tstsi, tsthi, tst<FP:mode>, cmphi, cmpqi, cmp<FP:mode>): Delete.
1911         (*tstsi_internal_68020_cf, *tstsi_internal, *tsthi_internal,
1912         *tstqi_internal, tst<mode>_6881, tst<mode>_cf, many unnamed
1913         patterns): Wrap RHS with COMPARE.
1914         (tst<FP>_68881, tst<FP>_cf): Use const0_operand.
1915         (*cmpdi_internal): Name this pattern.
1916         (cmpdi): Change to define_insn.
1917         (cbranchdi4, cstoredi4, cbranchsi4, cstoresi4, cbranchhi4, cstorehi4,
1918         cbranchqi4, cstoreqi4, cbranch<FP:mode>4, cstore<FP:mode>4): New.
1919         (scc0_di, scc0_di_5200, scc_di): Use the ordered_comparison_operator
1920         predicate.
1921         (seq, sne, sgt, sgtu, slt, sltu, sge, sgeu, sle, sleu, sordered,
1922         sunordered, suneq, sunge, sungt, sunle, sunlt, sltgt): Delete
1923         (conditional_trap): Change to...
1924         (ctrapdi4, ctrapsi4, ctraphi4, ctrapqi4): ... these.
1925         (*conditional_trap): Use the ordered_comparison_operator and
1926         const1_operand predicates.
1927         * config/m68k/m68k.c (m68k_last_compare_had_fp_operands): Delete.
1928         (m68k_expand_prologue): Use ctrapsi4 instead of cmpsi+conditional_trap.
1929         (m68k_rtx_costs): Look for ZERO_EXTRACT in a COMPARE.
1930         * config/m68k/m68k.h (m68k_last_compare_had_fp_operands): Delete.
1931
1932         * config/mcore/mcore-protos.h (arch_compare_op0, arch_compare_op1,
1933         mcore_modify_comparison, mcore_gen_compare_reg): Remove.
1934         (mcore_gen_compare): New. 
1935         * config/mcore/mcore.c (arch_compare_op0, arch_compare_op1): Delete.
1936         (mcore_modify_comparison, mcore_gen_compare_reg): Fold into...
1937         (mcore_gen_compare): ... this.
1938         * config/mcore/mcore.md (cmpsi, bCC, sCC): Remove.
1939         (cbranchsi4, cstoresi4): New, using mcore_gen_compare.
1940         (stack probe pattern): Use cbranchsi4.
1941
1942         * config/mips/predicates.md (mips_cstore_operator): New.
1943         * config/mips/mips-ps-3d.md (movv2sfcc): Do not use cmp_operands.
1944         * config/mips/mips.md (any_cond): Delete.
1945         (conditional_trap): Rename to ctrap<GPR:mode>4.  Adjust predicates,
1946         always succeed.
1947         (fixuns_truncdfsi2, fixuns_truncdfdi2, fixuns_truncsfsi2,
1948         fixuns_truncsfdi2): Use cbranch patterns.
1949         (cmp<GPR:mode>, cmp<SCALARF:mode>): Delete. 
1950         (b<code>): Change to cbranch<GPR:mode>4 and cbranch<SCALARF:mode>4.
1951         Adjust call to mips_expand_conditional_branch.
1952         (seq, sne, slt<u>, sle<u>, sgt<u>, sge<u>): Change to
1953         cstore<GPR:mode>4.
1954         * config/mips/mips-protos.h (mips_expand_conditional_branch,
1955         mips_expand_scc, mips_expand_conditional_trap): Adjust prototypes.
1956         * config/mips/mips.c (cmp_operands): Delete.
1957         (mips_emit_compare): Get comparison operands from *op0/*op1.
1958         (mips_expand_scc): Get code/op0/op1/target from operands.  Assert
1959         that it succeeds.  Use op0/op1 instead of cmp_operands.
1960         (mips_expand_conditional_branch, mips_expand_conditional_move,
1961         mips_expand_conditional_trap): Likewise.
1962         (mips_block_move_loop): Use cbranch patterns. 
1963         * config/mips/mips.h (cmp_operands): Delete.
1964
1965         * config/mmix/mmix.c (mmix_valid_comparison): Delete.
1966         (mmix_gen_compare_reg): Just return a register in the right CC mode.
1967         * config/mmix/mmix.h (mmix_compare_op0, mmix_compare_op1): New.
1968         * config/mmix/mmix.md (cmpdi, cmpdf): Remove.
1969         (*cmpcc_folded): Rename to...
1970         (*cmpdi_folded): this.
1971         (*cmpcc): Rename to...
1972         (*cmps): ... this.
1973         (movdfcc, movdicc): Adjust for new semantics of mmix_gen_compare_reg.
1974         (bCC): Remove.
1975         (cbranchdi4): New.
1976         (cbranchdf4): New.  Handle invalid comparisons here.
1977         * config/mmix/predicates.md (float_comparison_operator): New.
1978
1979         * config/mn10300/mn10300.c (mn10300_rtx_costs): Consider 0 and
1980         zero_extract to be cheap in (compare (zero_extract) (const_int 0).
1981         * config/mn10300/mn10300.md (tst): Delete.
1982         (*tst_extqisi_am33, *tst_extqisi, *tst_exthisi_am33, *tst_exthisi):
1983         Name these patterns and wrap RHS in a compare.
1984         (*cmpsi): Make this pattern private.  Include tst.
1985         (*cmpsf): Make this pattern private.
1986         (and and zero_extract cc0 set): Wrap RHS in a COMPARE.
1987         (compare with zero peepholes): Likewise.
1988         (bCC): Remove.
1989         (cbranchsi4, cbranchsf4): New.
1990         (casesi): Use cbranchsi4.
1991
1992         * config/pa/pa.c (hppa_compare_op0, hppa_compare_op1,
1993         hppa_branch_type): Delete.
1994         (return_addr_rtx): Use cbranchsi4.
1995         (emit_bcond_fp): Accept all operands.  Replace CODE with NE.
1996         Emit CCFPmode comparison here.
1997         (gen_cmp_fp): Delete, now part of emit_bcond_fp.
1998         * config/pa/pa.h (enum cmp_type, hppa_compare_op0, hppa_compare_op1,
1999         hppa_branch_type): Delete.
2000         * config/pa/pa.md (cmpdi, cmpsi, cmpsf, cmpdf, sCC, bCC): Delete.
2001         (movsicc, movdicc): Remove references to hppa_compare_op0,
2002         hppa_compare_op1 and compare_from_rtx.
2003         (cbranchdi4, cbranchsi4, cbranchsf4, cbranchdf4, cstoresi4): New.
2004         (casesi): Use cbranchsi4.
2005
2006         * config/pdp11/pdp11-protos.h (output_jump): Change prototype.
2007         * config/pdp11/pdp11.c (output_jump): Embed opcodes here.
2008         * config/pdp11/pdp11.md (register_or_const0_operand): New.
2009         (cmpdf, cmphi, cmpqi): Make private.  Add tst alternatives.
2010         (cmpsi, tstsi, tstdf, tsthi, tstqi): Delete.
2011         (bCC): Delete.
2012         (cbranchdf4, cbranchhi4, cbranchqi4): New.
2013         (*branch, *branch_inverted): New.
2014
2015         * config/picochip/picochip.md (cbranchhi4): Use
2016         ordered_comparison_operator.
2017         (cmphi, bCC): Remove.
2018
2019         * config/rs6000/predicates.md (rs6000_cbranch_operator): New.
2020         (trap_comparison_operator): Delete.
2021         * config/rs6000/rs6000-protos.h (rs6000_emit_sCOND,
2022         rs6000_emit_cbranch): Accept mode and operands.
2023         * config/rs6000/rs6000.c (rs6000_compare_op0, rs6000_compare_op1,
2024         rs6000_compare_fp_p): Delete.   
2025         (rs6000_generate_compare): Accept mode and comparison.  Extract code
2026         and op0/op1 from there.  Replace references to rs6000_compare_op0
2027         and rs6000_compare_op1.
2028         (rs6000_emit_sCOND): Adjust call to rs6000_generate_compare and
2029         extract result from passed operands.
2030         (rs6000_emit_cbranch): Adjust call to rs6000_generate_compare and
2031         extract loc from passed operands.
2032         (rs6000_emit_cmove): Likewise.
2033         * config/rs6000/rs6000.h (rs6000_compare_op0, rs6000_compare_op1,
2034         rs6000_compare_fp_p): Delete.
2035         * config/rs6000/rs6000.md (cmp<GPR>, cmp<FP>, bCC, sCC): Delete.
2036         (cbranch<GPR>4, cbranch<FP>4): New.
2037         (cstore<mode>4): New.  Consolidate here all choices about when to use
2038         portable or specialized sCC sequences.
2039         (stack_protect_test): Use cbranchsi4.
2040         (conditional_trap): Replace with ctrap<GPR>4.
2041         (conditional trap insn): Replace trap_comparison_operator with
2042         ordered_comparison_operator. 
2043
2044         * config/s390/s390.c (s390_compare_op0, s390_compare_op1): Delete.
2045         (s390_emit_prologue): Use ctrap.
2046         * config/s390/s390.h (s390_compare_op0, s390_compare_op1): Delete.
2047         * config/s390/predicates.md (s390_eqne_operator, s390_scond_operator):
2048         New predicates replacing...
2049         * config/s390/s390.md (COMPARE, SCOND): ... these iterators.
2050         (cmp<GPR>, cmp<FP>, cmpcc): Delete.
2051         (trunc patterns): Use emit_cmp_and_jump_insns instead of cmp/branch.
2052         (add<mode>cc): Do not use s390_compare_op0/op1.
2053         (s<code>): Change to...
2054         (cstore<mode>4): ... this. Do not use s390_compare_op0/op1.
2055         (seq): Change to...
2056         (cstorecc4): ... this.  Handle EQ or NE equally.
2057         (*sne): Un-privatize for use in cstorecc4.
2058         (b<code>): Change to...
2059         (cbranch<GPR>4, cbranch<FP>4, cbranchcc4): ... these.
2060         (conditional_trap): Replace with...
2061         (ctrap<GPR>4, ctrap<FP>4): ... these.
2062         (stack_protect): Use cbranchcc4.
2063
2064         * config/score/score-conv.h (cmp_op0, cmp_op1): Delete.
2065         * config/score/score-protos.h (score_gen_cmp): Delete.
2066         * config/score/score.c (cmp_op0, cmp_op1, score_gen_cmp): Delete.
2067         (score_block_move-loop): Use cbranchsi4.
2068         * config/score/score.md (cbranchsi4): New.
2069         (cmpsi, bCC): Delete.
2070         * config/score/score3.c (cmp_op0, cmp_op1, score3_gen_cmp): Delete.
2071         (score3_movsicc): Use ops[1] operands instead of cmp_op0/cmp_op1.
2072         * config/score/score7.c (cmp_op0, cmp_op1, score7_gen_cmp): Delete.
2073         (score7_movsicc): Use ops[1] operands instead of cmp_op0/cmp_op1.
2074         * config/score/score3.h (score3_gen_cmp): Delete.
2075         * config/score/score7.h (score7_gen_cmp): Delete.
2076
2077         * config/sh/sh-protos.h (prepare_scc_operands): Rename to...
2078         (sh_emit_scc_to_t): ... this.  Return void.
2079         (from_compare): Rename to...
2080         (sh_emit_compare_and_branch): ... this.
2081         (sh_emit_compare_and_set): New.
2082         (sh_expand_t_scc): Accept operands.
2083         * config/sh/predicates.md (sh_float_comparison_operator): New.
2084         * config/sh/sh.c (sh_compare_op0, sh_compare_op1): Delete.
2085         (prepare_scc_operands): Rename to...
2086         (sh_emit_scc_to_t): ... this.  Return void.  Get op0/op1 from
2087         arguments.
2088         (sh_emit_cheap_store_flag): New.
2089         (sh_emit_set_t_insn): New.
2090         (from_compare): Rename to...
2091         (sh_emit_compare_and_branch): ... this.  Accept mode.  Rewrite
2092         handling of TARGET_SH2E floating point to avoid recursive call.
2093         Generate branch here.
2094         (sh_emit_compare_and_set): New.
2095         (sh_expand_t_scc): Get op0/op1 from arguments.
2096         (sh_emit_cheap_store_flag): New.
2097         * config/sh/sh.md (cbranchdi4, cbranchsi4): Include -mno-cbranchdi
2098         cases.
2099         (cbranchdi4_i): Use an "I08" constraint instead of an "i" constraint.
2100         (cmpsi, cmpdi, cmpsf, cmpdf): Delete.
2101         (movsicc, movdicc): Do nothing when it recreated operands from
2102         sh_compare_*. Use sh_emit_cheap_store_flag.  Adjust call to
2103         prepare_scc_operands (now sh_emit_scc_to_t).
2104         (udivdi3): Use cstoresi4.
2105         (beq_media, bne_media, bge_media, bgtu_media, bgeu_media, beq,
2106         bne, bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu, bunordered): Delete.
2107         (cbranchint4_media, cbranchfp4_media): New.
2108         (casesi): Use cbranchdi4.
2109         (seq, slt, sle, sgt, sge, sgtu, sltu, sgeu, sne, sleu, sunordered):
2110         Delete.
2111         (cstore4_media, cstoresi4, cstoredi4, cstoresf4, cstoredf4): New.
2112         (movnegt): Remove second operand.
2113         (cbranchsf4, cbranchdf4): New.
2114         (stack_protect): Use cbranchdi4/cbranchsi4.
2115
2116         * config/sparc/sparc.c (sparc_compare_op0, sparc_compare_op1): Delete.
2117         (gen_compare_reg): Accept comparison, extract part of it to...
2118         (gen_compare_reg_1): ... this. 
2119         (gen_compare_operator): Delete.
2120         (gen_v9_scc): Accept separate destination, comparison code and arms.
2121         Do not use sparc_compare_op0/sparc_compare_op1.
2122         (emit_scc_insn, emit_conditional_branch_insn): New.
2123         (emit_v9_brxx): Make static.  Remove useless assertion.
2124         (sparc_emit_float_lib_cmp): Return RTL instead of calling
2125         emit_cmp_insn.
2126         (sparc_expand_compare_and_swap_12): Use gen_compare_reg_1+cbranchcc4.
2127         * config/sparc/sparc-protos.h (gen_compare_reg,
2128         sparc_emit_float_lib_cmp): Adjust prototype.
2129         (emit_scc_insn, emit_conditional_branch_insn): New.
2130         (gen_v9_scc, emit_v9_brxx_insn, gen_compare_operator): Delete.
2131         * config/sparc/sparc.h (sparc_compare_op0, sparc_compare_op1): Delete.
2132         * config/sparc/sparc.md (P, I, F, V32, V32I, V64, V64I): Move all
2133         iterators to the top.
2134         (cmpsi, cmpdi, cmpsf, cmpdf, cmptf, seqsi_special_extend,
2135         snesi_special_extend, sCC, bCC, seqdi_special_trunc,
2136         snedi_special_trunc): Delete.
2137         (seqdi_special, snedi_special): Use expansion of seqdi_special_trunc
2138         and snedi_special_trunc.
2139         (cstoresi4, cstoredi4, cstore<F:mode>4, cbranchcc4, cbranchsi4,
2140         cbranchdi4, cbranch<F:mode>4): New.
2141         (mov<I:mode>cc, mov<F:mode>cc): Handle sparc_emit_float_lib_cmp
2142         here.  Use gen_compare_reg instead of gen_compare_operator.
2143         (conditional_trap): Replace with...
2144         (ctrapsi4, ctrapdi4): ... this.
2145         (stack_protect_test): Use cbranchcc4.
2146
2147         * config/spu/spu-protos.h (spu_emit_branch_or_set): Change second
2148         argument to rtx.
2149         * config/spu/spu.c (spu_compare_op0, spu_compare_op1): Remove. 
2150         (spu_emit_branch_or_set): Get code/op0/op1 from second argument.
2151         Change spu_compare_op0/op1 to op0/op1 throughout.  Get target
2152         from operands[0] or operands[3] depending on is_set.
2153         * config/spu/spu.h (spu_compare_op0, spu_compare_op1): Remove.
2154         * config/spu/spu.md (cmp<mode:VQHSI>, cmp<mode:DTI>, cmp<mode:VSF>,
2155         cmpdf, bCC), sCC: Remove.
2156         (cbranch<mode:VQHSI>4, cbranch<mode:DTI>, cbranch<mode:VSF>4, 
2157         cbranchdf4, cstore<mode:VQHSI>4, cstore<mode:DTI>, cstore<mode:VSF>4,
2158         cstoredf4): New.
2159         (mov<mode>cc): Accept ordered_comparison_operator, adjust call to
2160         spu_emit_branch_or_set.
2161
2162         * config/stormy16/stormy16-protos.h (xstormy16_emit_cbranch):
2163         Add two arguments.
2164         * config/stormy16/stormy16.h (xstormy16_compare_op0,
2165         xstormy16_compare_op1): Delete.
2166         * config/stormy16/stormy16.c (xstormy16_compare_op0,
2167         xstormy16_compare_op1): Delete. 
2168         (xstormy16_emit_cbranch): Get op0/op1 from the new arguments.
2169         Adjust calls.
2170         * config/stormy16/stormy16.md (cbranchsi4, cbranchhi4): New.
2171         (cmphi, cmpsi, bCC): Remove.
2172
2173         * config/v850/v850.md (tstsi, cmpsi): Fold into...
2174         (*cmpsi): ... this one.
2175         (cbranchsi4, cstoresi4): New.
2176         (bCC expanders): Delete.
2177         (sCC insns): Fold into...
2178         (*setcc): ... this one.
2179         (casesi): Do not use gen_cmpsi and gen_bgtu. 
2180         (various splits): Wrap "naked" RHS of a cc0 set with COMPARE.
2181         (movsicc): Simplify.
2182         * config/v850/v850.c (v850_rtx_costs): Handle ZERO_EXTRACT in COMPARE.
2183
2184         * config/vax/vax-protos.h (cond_name): New.
2185         (vax_output_conditional_branch): Remove.
2186         * config/vax/vax.c (cond_name): New.
2187         (vax_output_conditional_branch): Remove.
2188         * config/vax/vax.h (PRINT_OPERAND): Dispatch %c to cond_name.
2189         * config/vax/vax.md (tst<VAXint>, tst<VAXfp>): Remove.
2190         (cmp<VAXint>, cmp<VAXfp>): Privatize.  Add constraints for tst.
2191         (bit<VAXint>): Wrap source with (compare).
2192         (b<code> and following unnamed pattern): Rename to *branch and
2193         *branch_reversed.  Change macroization to match_operator.
2194         (cbranch<VAXint>4, cbranch<VAXfp>4): New.
2195
2196         * config/xtensa/predicates.md (xtensa_cstoresi_operator): New.
2197         * config/xtensa/xtensa-protos.h (xtensa_expand_conditional_branch):
2198         Change last argument to machine_mode.
2199         (xtensa_expand_scc): Add machine_mode argument.
2200         * config/xtensa/xtensa.c (branch_cmp, branch_type): Remove.
2201         (gen_conditional_move, xtensa_expand_conditional_branch,
2202         xtensa_expand_scc, xtensa_expand_conditional_move): Use mode
2203         instead of branch_type, fetch cmp0/cmp1/test_code from operands[].
2204         Adjust operand numbers.
2205         * config/xtensa/xtensa.h (enum cmp_type, branch_cmp, branch_type):
2206         Delete.
2207         * config/xtensa/xtensa.md (any_cond, any_scc): Delete.
2208         (cmpsi, cmpsf, b<code>, s<code>): Delete.
2209         (cbranchsi4, cbranchsf4, cstoresi4, cstoresf4): New.
2210
2211 2009-05-12  Paolo Bonzini  <bonzini@gnu.org>
2212
2213         * optabs.c (prepare_cmp_insn): Temporarily disable test that
2214         causes spurious differences between trunk and cond-optab branch.
2215
2216 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
2217
2218         PR target/37137
2219         * doc/install.texi (STAGE1_TFLAGS, BUILD_CONFIG): Document.
2220
2221 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
2222
2223         * tree.c (iterative_hash_pointer): Delete.
2224         (iterative_hash_expr): Short-circuit handling of NULL pointer.
2225         Hash UIDs and versions of SSA names.  Don't special-case built-in
2226         function declarations.
2227
2228 2009-05-11  Ian Lance Taylor  <iant@google.com>
2229
2230         PR bootstrap/40103
2231         * graphite.c: Force -Wc++-compat to only be a warning before
2232         #including "cloog/cloog.h".
2233
2234 2009-05-11  Martin Jambor  <mjambor@suse.cz>
2235
2236         * ipa-cp.c (ipcp_cloning_candidate_p): Add missing return false.
2237         
2238 2009-05-11  Jan Hubicka  <jh@suse.cz>
2239
2240         * tree-ssa-loop-ivcanon.c: Include target.h
2241         (struct loop_size): new structure.
2242         (constant_after_peeling): New predicate.
2243         (tree_estimate_loop_size): New function.
2244         (estimated_unrolled_size): Rewrite for new estimates.
2245         (try_unroll_loop_completely): Use new estimates.
2246         * Makefile.in (tree-ssa-loop-ivcanon.o): Add dependenc on target.h
2247
2248 2009-05-11  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2249
2250         * config/spu/spu-c.c (spu_categorize_keyword): Update for recent
2251         libcpp interface change.
2252         (spu_macro_to_expand): Likewise.
2253
2254 2009-05-11  Paolo Bonzini  <bonzini@gnu.org>
2255
2256         PR tree-optimization/40026
2257         * gimplify.c (gimplify_init_constructor): Change initial conditional
2258         to assertion.  Rewrite TREE_OPERAND (*expr_p, 1) after
2259         optimize_compound_literals_in_ctor.
2260
2261 2009-05-11  Nathan Sidwell  <nathan@codesourcery.com>
2262
2263         * config/m68k/m68k-devices.def (52274, 52277, 5301x, 5225x, 51xx):
2264         New devices.
2265         * doc/invoke.texi (M680x0 Options): Document new coldfire cpus.
2266
2267 2009-05-11  H.J. Lu  <hongjiu.lu@intel.com>
2268
2269         * tree-vect-data-refs.c (vect_analyze_group_access): Use
2270         HOST_WIDE_INT for gap.
2271
2272 2009-05-11  Ira Rosen  <irar@il.ibm.com>
2273
2274         PR tree-optimization/40074
2275         * tree-vect-data-refs.c (vect_analyze_group_access): Take gaps into
2276         account in group size and step comparison.
2277
2278 2009-05-11  Richard Guenther  <rguenther@suse.de>
2279
2280         * passes.c (init_optimization_passes): Strip now incorrect comment.
2281         (execute_function_todo): Do not set PROP_alias.
2282         * tree-pass.h (PROP_alias): Remove.
2283         * tree-ssa-structalias.c (pass_build_alias): Do not provide PROP_alias.
2284         * tree-if-conv.c (pass_if_conversion): Do not require PROP_alias.
2285         * tree-nrv.c (pass_return_slot): Likewise.
2286         * tree-object-size.c (pass_object_sizes): Likewise.
2287         * tree-ssa-dom.c (pass_dominator): Likewise.
2288         (pass_phi_only_cprop): Likewise.
2289         * tree-ssa-dse.c (pass_dse): Likewise.
2290         * tree-ssa-phiopt.c (pass_phiopt): Likewise.
2291         (pass_cselim): Likewise.
2292         * tree-ssa-pre.c (pass_pre): Likewise.
2293         (pass_fre): Likewise.
2294         * tree-ssa-reassoc.c (pass_reassoc): Likewise.
2295         * tree-ssa-sink.c (pass_sink_code): Likewise.
2296         * tree-stdarg.c (pass_stdarg): Likewise.
2297         * tree-tailcall.c (pass_tail_calls): Likewise.
2298         * tree-vrp.c (pass_vrp): Likewise.
2299
2300 2009-05-10  Ian Lance Taylor  <iant@google.com>
2301
2302         * basic-block.h (enum profile_status): Break out of struct
2303         control_flow_graph.
2304         * cgraph.h (struct inline_summary): Break out of struct
2305         cgraph_local_info.
2306         * cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out
2307         of struct cgraph_order_sort.
2308         * combine.c (enum undo_kind): New enum, broken out of struct undo.
2309         * cse.c (struct branch_path): Break out of struct
2310         cse_basic_block_data.
2311         * except.h (enum eh_region_type): Break out of struct eh_region.
2312         * gcc.c (enum add_del): Break out of struct modify_target.
2313         * genrecog.c (enum decision_type): Break out of struct decision_test.
2314         * ggc-page.c (struct ggc_pch_ondisk): Break out of struct
2315         ggc_pch_data.
2316         * matrix-reorg.c (struct free_info): Break out of struct matrix_info.
2317         * regmove.c (enum match_use): New enum, broken out of struct match.
2318         * sched-int.h (enum post_call_group): New enum, broken out of
2319         struct deps.
2320         (struct deps_reg): Break out of struct deps.
2321         * target.h (struct asm_int_op): Break out of struct gcc_target.
2322         * tree-eh.c (struct goto_queue_node): Break out of struct
2323         leh_tf_state.
2324         * tree-inline.h (enum copy_body_cge_which): Break out of
2325         copy_body_data.
2326         * tree-pass.h (enum opt_pass_type): Break out of struct opt_pass.
2327
2328         * c-decl.c (in_struct, struct_types): New static variables.
2329         (pushtag): Add loc parameter.  Change all callers.
2330         (lookup_tag): Add ploc parameter.  Change all callers.
2331         (check_compound_literal_type): New function.
2332         (parser_xref_tag): Add loc parameter.  Change all callers.  If
2333         -Wc++-compat, warn about struct/union/enum types defined within a
2334         struct or union.
2335         (start_struct): Add enclosing_in_struct, enclosing_struct_types,
2336         and loc parameters.  Change all callers.  Change error calls to
2337         error_at, using loc.  For a redefinition, if the location of the
2338         original definition is known, report it.  Set in_struct and
2339         struct_types.  If -Wc++-compat warn if in sizeof, typeof, or alignof.
2340         (finish_struct): Add new parameters enclosing_in_struct and
2341         enclosing_struct_types.  Change all callers.  Set
2342         C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined
2343         in the struct.  If in a struct, add this struct to struct_types.
2344         (start_enum): Add loc parameter.  Change all callers.  Use
2345         error_at for errors, using loc.  For a redefinition, if the
2346         location of the original definition is known, report it.  If in a
2347         struct, add this enum type to struct_types.  If -Wc++-compat warn
2348         if in sizeof, typeof, or alignof.
2349         * c-parser.c (disable_extension_diagnostics): Disable -Wc++-compat.
2350         (enable_extension_diagnostics): Reenable -Wc++-compat if appropriate.
2351         (c_parser_enum_specifier): Get enum location for start_enum.
2352         (c_parser_struct_or_union_specifier): Get struct location for
2353         start_struct.  Save in_struct and struct_types status between
2354         start_struct and finish_struct.
2355         (c_parser_cast_expression): Get location of cast.
2356         (c_parser_alignof_expression): Get location of type.
2357         (c_parser_postfix_expression): Likewise.
2358         (c_parser_postfix_expression_after_paren_type): Add type_loc
2359         parameter.  Change all callers.  Call check_compound_literal_type.
2360         Use type_loc for error about variable size type.
2361         * c-typeck.c (build_external_ref): If -Wc++-compat, warn about a use
2362         of an enum constant from an enum type defined in a struct or union.
2363         (c_cast_expr): Add loc parameter.  Change all callers.  If
2364         -Wc++-compat, warn about defining a type in a cast.
2365         * c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define.
2366         (start_enum, start_struct, finish_struct): Update declarations.
2367         (parser_xref_tag, c_cast_expr): Update declarations.
2368         (check_compound_literal_type): Declare.
2369
2370 2009-05-11  Ben Elliston  <bje@au.ibm.com>
2371
2372         * config/rs6000/rs6000-c.c (altivec_categorize_keyword): Update
2373         for recent libcpp interface change.
2374         (rs6000_macro_to_expand): Likewise.
2375
2376 2009-05-10  Michael Matz  <matz@suse.de>
2377
2378         PR target/40031
2379         * config/arm/arm.c (require_pic_register): Emit on entry edge,
2380         not at entry of function.
2381
2382 2009-05-10  Richard Guenther  <rguenther@suse.de>
2383
2384         PR tree-optimization/40081
2385         Revert
2386         * tree-sra.c (instantiate_element): Instantiate scalar replacements
2387         using the main variant of the element type.  Do not fiddle with
2388         TREE_THIS_VOLATILE or TREE_SIDE_EFFECTS.
2389
2390         * tree-sra.c (sra_type_can_be_decomposed_p): Do not decompose
2391         structs with volatile fields.
2392
2393 2009-05-10  Jan Hubicka  <jh@suse.cz>
2394
2395         * tree-inline.c (delete_unreachable_blocks_update_callgraph): Declare.
2396         (estimate_move_cost): Assert that it does not get called for
2397         VOID_TYPE_P.
2398         (estimate_num_insns): Skip VOID types in argument handling.
2399         (optimize_inline_calls): Delete unreachable blocks and verify that
2400         callgraph is valid.
2401
2402 2009-05-10  Jan Hubicka  <jh@suse.cz>
2403
2404         * cgraphbuild.c (record_reference): Use cgraph_mark_address_taken_node.
2405         * cgraph.c (cgraph_mark_address_taken_node): New function.
2406         (dump_cgraph_node): Dump new flag.
2407         * cgraph.h (struct cgraph_node): Add address_taken.
2408         (cgraph_mark_address_taken_node): New function.
2409         * ipa.c (cgraph_postorder): Prioritize functions with address taken
2410         since new direct calls can be born.
2411
2412 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
2413
2414         * c-lex.c (c_lex_with_flags): Expect cpp_hashnode in
2415         tok->val.node.node.
2416
2417 2009-05-10  Jan Hubicka  <jh@suse.cz>
2418
2419         PR middle-end/40084
2420         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Take old_call
2421         argument; rewrite.
2422         (cgraph_update_edges_for_call_stmt): Take old_decl argument.
2423         * cgraph.h (cgraph_update_edges_for_call_stmt): Update prototype.
2424         * tree-inline.c (copy_bb): Set frequency correctly.
2425         (fold_marked_statements): Update call to
2426         cgraph_update_edges_for_call_stmt.
2427
2428 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
2429
2430         * config/arc/arc.c (arc_handle_interrupt_attribute): Use %qE for
2431         identifiers in diagnostics.
2432         * config/arm/arm.c (arm_handle_fndecl_attribute,
2433         arm_handle_isr_attribute): Likewise.
2434         * config/avr/avr.c (avr_handle_progmem_attribute,
2435         avr_handle_fndecl_attribute, avr_handle_fntype_attribute): Likewise.
2436         * config/bfin/bfin.c (handle_int_attribute,
2437         bfin_handle_longcall_attribute, bfin_handle_l1_text_attribute,
2438         bfin_handle_l1_data_attribute, bfin_handle_longcall_attribute,
2439         bfin_handle_l1_text_attribute, bfin_handle_l1_data_attribute):
2440         Likewise.
2441         * config/darwin.c (darwin_handle_kext_attribute,
2442         darwin_handle_weak_import_attribute): Likewise.
2443         * config/h8300/h8300.c (h8300_handle_fndecl_attribute,
2444         h8300_handle_eightbit_data_attribute,
2445         h8300_handle_tiny_data_attribute): Likewise.
2446         * config/i386/i386.c (ix86_handle_cconv_attribute,
2447         ix86_handle_abi_attribute, ix86_handle_struct_attribute): Likewise.
2448         * config/i386/winnt.c (ix86_handle_shared_attribute,
2449         ix86_handle_selectany_attribute): Likewise.
2450         * config/ia64/ia64.c (ia64_handle_model_attribute): Likewise.
2451         * config/m32c/m32c.c (function_vector_handler): Likewise.
2452         * config/m68hc11/m68hc11.c (m68hc11_handle_page0_attribute,
2453         m68hc11_handle_fntype_attribute): Likewise.
2454         * config/m68k/m68k.c (m68k_handle_fndecl_attribute): Likewise.
2455         * config/mcore/mcore.c (mcore_handle_naked_attribute): Likewise.
2456         * config/mips/mips.c (mips_insert_attributes,
2457         mips_merge_decl_attributes, mips_expand_builtin): Likewise.
2458         * config/rs6000/rs6000.c (rs6000_handle_longcall_attribute,
2459         rs6000_handle_struct_attribute): Likewise.
2460         * config/sh/sh.c (sh_insert_attributes,
2461         sh_handle_resbank_handler_attribute,
2462         sh_handle_interrupt_handler_attribute,
2463         sh2a_handle_function_vector_handler_attribute,
2464         sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
2465         Likewise.
2466         * config/sh/symbian.c (sh_symbian_mark_dllimport): Likewise.
2467         * config/spu/spu.c (spu_handle_fndecl_attribute,
2468         spu_handle_vector_attribute): Likewise.
2469         * config/stormy16/stormy16.c
2470         (xstormy16_handle_interrupt_attribute): Likewise.
2471         * config/v850/v850-c.c (ghs_pragma_section): Likewise.
2472         * config/v850/v850.c (v850_handle_interrupt_attribute): Likewise.
2473
2474 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
2475
2476         * pretty-print.h (struct pretty_print_info): Add translate_identifiers.
2477         (pp_translate_identifiers): New.
2478         (pp_identifier): Only conditionally translate identifier to locale
2479         character set.
2480         * pretty-print.c (pp_construct): Set pp_translate_identifiers.
2481         (pp_base_tree_identifier): Only conditionally translate identifier
2482         to locale character set.
2483         * c-pretty-print.c (M_): Define.
2484         (pp_c_type_specifier, pp_c_primary_expression): Mark English
2485         fragments for conditional translation with M_.
2486         * tree-pretty-print.c (maybe_init_pretty_print): Disable
2487         identifier translation.
2488
2489 2009-05-10  Richard Guenther  <rguenther@suse.de>
2490
2491         PR tree-optimization/40081
2492         * tree-sra.c (instantiate_element): Instantiate scalar replacements
2493         using the main variant of the element type.  Do not fiddle with
2494         TREE_THIS_VOLATILE or TREE_SIDE_EFFECTS.
2495
2496 2009-05-09  Jan Hubicka  <jh@suse.cz>
2497
2498         PR middle-end/40080
2499         * cgraphunit.c (cgraph_materialize_all_clones): Do not redirect
2500         indirect calls; verify cgraph afterwards.
2501
2502 2009-05-09  Jan Hubicka  <jh@suse.cz>
2503
2504         PR bootstrap/40082
2505         * ipa.c (update_inlined_to_pointer): New function.
2506         (cgraph_remove_unreachable_nodes): Use it.
2507
2508 2009-05-09  Jan Hubicka  <jh@suse.cz>
2509
2510         * tree-eh.c (struct leh_state): Remove prev_try.
2511         (lower_try_finally, lower_catch, lower_eh_filter, lower_cleanup): Do
2512         not track prev_try.
2513         * except.c (gen_eh_region_cleanup, duplicate_eh_regions, 
2514         copy_eh_region_1, copy_eh_region, redirect_eh_edge_to_label,
2515         remove_eh_handler_and_replace, foreach_reachable_handler,
2516         verify_eh_region, verify_eh_tree): Remove tracking of prev_try pointer.
2517         * except.h (struct eh_region): Remove eh_region_u_cleanup.
2518         (gen_eh_region_cleanup): Update prototype.
2519
2520 2009-05-09  Jan Hubicka  <jh@suse.cz>
2521
2522         PR middle-end/40043
2523         * except.c (copy_eh_region): Always set prev_try.
2524         (redirect_eh_edge_to_label): Find outer try.
2525         (foreach_reachable_handler): When looking for prev try
2526         handle case where previous try is not going to be taken.
2527
2528 2009-05-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
2529
2530         PR tree-optimization/40049
2531         * tree-vect-stmts.c (vectorizable_operation): If the machine has
2532         only vector/vector shifts, convert the type of the constant to the
2533         appropriate type to avoid building incorrect trees, which
2534         eventually have problems with garbage collection.
2535
2536 2009-05-08  Joseph Myers  <joseph@codesourcery.com>
2537
2538         * fold-const.c (fold_binary): Do not fold multiplication by 1 or
2539         -1 for complex floating-point types if honoring signed zeros.
2540
2541 2009-05-08  Jan Hubicka  <jh@suse.cz>
2542
2543         * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function
2544         argument; handle correctly when profile is absent.
2545         (build_cgraph_edges): Update.
2546         (rebuild_cgraph_edges): Update.
2547         * cgraph.c: Do not include varray.h.
2548         (cgraph_set_call_stmt_including_clones): New function.
2549         (cgraph_create_edge_including_clones): Likewise
2550         (cgraph_update_edges_for_call_stmt_node): New static cfunction.
2551         (cgraph_update_edges_for_call_stmt): Handle clones.
2552         (cgraph_remove_node): Handle clone tree.
2553         (cgraph_remove_node_and_inline_clones): New function.
2554         (dump_cgraph_node): Dump clone tree.
2555         (cgraph_clone_node): Handle clone tree.
2556         (clone_function_name): Bring here from tree-inline.c.
2557         (cgraph_create_virtual_clone): New function.
2558         * cgraph.h (ipa_replace_map): Move here from ipa.h.
2559         (cgraph_clone_info): New function.
2560         (strut cgraph_node): Add clone_info and new clone tree pointers.
2561         (cgraph_remove_node_and_inline_clones,
2562         cgraph_set_call_stmt_including_clones,
2563         cgraph_create_edge_including_clones,
2564         cgraph_create_virtual_clone): Declare.
2565         (cgraph_function_versioning): Use VEC argument.
2566         (compute_call_stmt_bb_frequency): Update prototype.
2567         (cgraph_materialize_all_clones): New function.
2568         * ipa-cp.c (ipcp_update_cloned_node): Remove.
2569         (ipcp_create_replace_map): Update to VECtors.
2570         (ipcp_update_callgraph): Use virtual clones.
2571         (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove.
2572         (ipcp_update_profiling): Do not update local profiling.
2573         (ipcp_insert_stage): Use VECtors and virtual clones.
2574         * cgraphunit.c (verify_cgraph_node): Verify clone tree.
2575         (clone_of_p): New function.
2576         (cgraph_preserve_function_body_p): Use clone tree.
2577         (cgraph_optimize): Materialize clones.
2578         (cgraph_function_versioning): Update for VECtors.
2579         (save_inline_function_body): Use clone tree.
2580         (cgraph_materialize_clone): New function.
2581         (cgraph_materialize_all_clones): Likewise.
2582         * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags.
2583         * ipa.c: Include gimple.h.
2584         (cgraph_remove_unreachable_nodes): Use clone tree.
2585         * ipa-prop.c (ipa_note_param_call): Update call to
2586         compute_call_stmt_bb_frequencycall.
2587         * ipa-prop.h (ipa_replace_map): Move to cgraph.h.
2588         * tree-inline.c: Do not include varray.h or gt-tree-inline.h.
2589         (copy_bb): Handle updating of clone tree; add new edge when new call
2590         appears.
2591         (expand_call_inline): Be strict about every call having edge.
2592         (clone_fn_id_num, clone_function_name): Move to cgraph.c.
2593         (delete_unreachable_blocks_update_callgraph): New function.
2594         (tree_function_versioning): Use VECtors; always remove unreachable
2595         blocks and fold conditionals.
2596         * tree-inline.h: Do not include varray.h.
2597         (tree_function_versioning): Remove.
2598         * Makefile.in (GTFILES): Remove tree-inline.c
2599         * passes.c (do_per_function): Do only functions having body.
2600         * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle clone
2601         tree.
2602
2603 2009-05-08  H.J. Lu  <hongjiu.lu@intel.com>
2604             Andrew Morrow  <acm@google.com>
2605
2606         PR c/36892
2607         * c-common.c (c_common_attribute_table): Permit deprecated
2608         attribute to take an optional argument.
2609         (handle_deprecated_attribute): If the optional argument to
2610         __attribute__((deprecated)) is not a string ignore the attribute
2611         and emit a warning.
2612
2613         * c-decl.c (grokdeclarator): Updated warn_deprecated_use call.
2614         * c-typeck.c (build_component_ref): Likewise.
2615         (build_external_ref): Likewise.
2616
2617         * toplev.c (warn_deprecated_use): Add an attribute argument.
2618         Emit the message associated with __attribute__((deprecated)).
2619
2620         * toplev.h (warn_deprecated_use): Updated.
2621
2622         * doc/extend.texi: Document new optional parameter to
2623         __attribute__((deprecated))
2624
2625 2009-05-08  Michael Eager <eager@eagercon.com>
2626
2627         * config/rs6000/rs6000.md (*movdf_softfloat32): replace
2628         !TARGET_DOUBLE_FLOAT with TARGET_SINGLE_FLOAT.
2629
2630 2009-05-08  Richard Guenther  <rguenther@suse.de>
2631
2632         PR tree-optimization/40062
2633         * tree-scalar-evolution.c (follow_ssa_edge_in_condition_phi):
2634         Avoid exponential behavior.
2635
2636 2009-05-08  Paolo Bonzini  <bonzini@gnu.org>
2637
2638         PR rtl-optimization/33928
2639         PR 26854
2640         * fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
2641         process_uses, build_single_def_use_links): New.
2642         (update_df): Update use_def_ref.
2643         (forward_propagate_into): Use get_def_for_use instead of use-def
2644         chains.
2645         (fwprop_init): Call build_single_def_use_links and let it initialize
2646         dataflow.
2647         (fwprop_done): Free use_def_ref.
2648         (fwprop_addr): Eliminate duplicate call to df_set_flags.
2649         * df-problems.c (df_rd_simulate_artificial_defs_at_top, 
2650         df_rd_simulate_one_insn): New.
2651         (df_rd_bb_local_compute_process_def): Update head comment.
2652         (df_chain_create_bb): Use the new RD simulation functions.
2653         * df.h (df_rd_simulate_artificial_defs_at_top, 
2654         df_rd_simulate_one_insn): New.
2655         * opts.c (decode_options): Enable fwprop at -O1.
2656         * doc/invoke.texi (-fforward-propagate): Document this.
2657
2658 2009-05-08  Joseph Myers  <joseph@codesourcery.com>
2659
2660         PR c/24581
2661         * c-typeck.c (build_binary_op): Handle arithmetic between one real
2662         and one complex operand specially.
2663         * tree-complex.c (some_nonzerop): Do not identify a real value as
2664         zero if flag_signed_zeros.
2665
2666 2009-05-08  Paolo Bonzini  <bonzini@gnu.org>
2667
2668         PR rtl-optimization/33928
2669         * loop-invariant.c (record_use): Fix && vs. || mishap.
2670
2671 2009-05-08  Paolo Bonzini  <bonzini@gnu.org>
2672
2673         PR rtl-optimization/33928
2674         * loop-invariant.c (struct use): Add addr_use_p.
2675         (struct def): Add n_addr_uses.
2676         (struct invariant): Add cheap_address.
2677         (create_new_invariant): Set cheap_address.
2678         (record_use): Accept df_ref.  Set addr_use_p and update n_addr_uses.
2679         (record_uses): Pass df_ref to record_use.
2680         (get_inv_cost): Do not add inv->cost to comp_cost for cheap addresses
2681         used only as such.
2682
2683 2009-05-08  Kaz Kojima  <kkojima@gcc.gnu.org>
2684
2685         * config/sh/sh.c: Do not include c-pragma.h.
2686
2687 2009-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2688
2689         * config/spu/spu.c: Remove include of c-common.h.
2690
2691 2009-05-07  Janis Johnson  <janis187@us.ibm.com>
2692
2693         PR c/39037
2694         * c-common.h (mark_valid_location_for_stdc_pragma,
2695         valid_location_for_stdc_pragma_p, set_float_const_decimal64,
2696         clear_float_const_decimal64, float_const_decimal64_p): New.
2697         * c.opt (Wunsuffixed-float-constants): New.
2698         * c-lex.c (interpret_float): Use pragma FLOAT_CONST_DECIMAL64 for
2699         unsuffixed float constant, handle new warning.
2700         * c-cppbuiltin.c (c_cpp_builtins): Use cast for double constants.
2701         * c-decl.c (c_scope): New flag float_const_decimal64.
2702         (set_float_const_decimal64, clear_float_const_decimal64,
2703         float_const_decimal64_p): New.
2704         (push_scope): Set new flag.
2705         * c-parser.c (c_parser_translation_unit): Mark when it's valid
2706         to use STDC pragmas.
2707         (c_parser_external_declaration): Ditto.
2708         (c_parser_compound_statement_nostart): Ditto.
2709         * c-pragma.c (valid_location_for_stdc_pragma,
2710         mark_valid_location_for_stdc_pragma,
2711         valid_location_for_stdc_pragma_p, handle_stdc_pragma,
2712         handle_pragma_float_const_decimal64): New.
2713         (init_pragma): Register new pragma FLOAT_CONST_DECIMAL64.
2714         * cp/semantics.c (valid_location_for_stdc_pragma_p,
2715         set_float_const_decimal64, clear_float_const_decimal64,
2716         float_const_decimal64_p): New dummy functions.
2717         * doc/extend.texi (Decimal Float): Remove statement that the
2718         pragma, and suffix for double constants, are not supported.
2719         * doc/invoke.texi (Warning Options): List new option.
2720         (-Wunsuffixed-float-constants): New.
2721
2722 2009-05-08  Steven Bosscher  <steven@gcc.gnu.org>
2723
2724         * config/i386/i386.c: Do not include c-common.h.
2725
2726 2009-05-07  Mark Heffernan  <meheff@google.com>
2727
2728         * doc/invoke.texi (Debugging Options): Document change of debugging
2729         dump location.
2730         * opts.c (decode_options): Make dump_base_name relative to
2731         aux_base_name directory.
2732
2733 2009-05-07  Hariharan Sandanagobalane <hariharan@picochip.com>
2734
2735         * config/picochip/picochip.h (NO_DOLLAR_IN_LABEL): Added.
2736         * config/picochip/libgccExtras/divmod15.asm : Removed redefiniton.
2737
2738 2009-05-07  Rafael Avila de Espindola  <espindola@google.com>
2739
2740         * Makefile.in (install-plugin): Simplify a bit.
2741
2742 2009-05-07  Paolo Bonzini  <bonzini@gnu.org>
2743
2744         * Makefile.in (OBJS-common): Add regcprop.o.
2745         (regcprop.o): New.
2746         * timevar.def (TV_CPROP_REGISTERS): New.
2747         * regrename.c (regrename_optimize): Return 0.
2748         (rest_of_handle_regrename): Delete.
2749         (pass_rename_registers): Point to regrename_optimize.
2750         (struct value_data_entry, struct value_data, 
2751         kill_value_one_regno, kill_value_regno, kill_value,
2752         set_value_regno, init_value_data, kill_clobbered_value,
2753         kill_set_value, kill_autoinc_value, copy_value,
2754         mode_change_ok, maybe_mode_change, find_oldest_value_reg,
2755         replace_oldest_value_reg, replace_oldest_value_addr,
2756         replace_oldest_value_mem, copyprop_hardreg_forward_1,
2757         debug_value_data, validate_value_data): Move...
2758         * regcprop.c: ... here.
2759         (rest_of_handle_cprop): Delete.
2760         (pass_cprop_hardreg): Point to copyprop_hardreg_forward.
2761
2762 2009-05-07  Jakub Jelinek  <jakub@redhat.com>
2763
2764         PR middle-end/40057
2765         * dojump.c (prefer_and_bit_test): Use immed_double_const instead of
2766         GEN_INT for 1 << bitnum.
2767         (do_jump) <case BIT_AND_EXPR>: Use build_int_cst_wide_type instead of
2768         build_int_cst_type.
2769
2770 2009-05-07  Uros Bizjak  <ubizjak@gmail.com>
2771
2772         * doc/md.texi (Standard Pattern Names For Generation) [sync_nand]:
2773         Remove wrong description of "nand" operation.
2774
2775 2009-05-06  Richard Guenther  <rguenther@suse.de>
2776             Adam Nemet  <anemet@caviumnetworks.com>
2777
2778         * gimple.def (GIMPLE_ASSIGN): Fix incorrect information in the
2779         comment.  Add that if LHS is not a gimple register, then RHS1 has
2780         to be a single object (GIMPLE_SINGLE_RHS).
2781
2782 2009-05-06  Adam Nemet  <anemet@caviumnetworks.com>
2783
2784         * expr.c (get_def_for_expr): Move it up in the file.
2785         (store_field): When expanding a bit-field store, look at the
2786         defining gimple stmt for the masking conversion.
2787
2788 2009-05-06  Janis Johnson  <janis187@us.ibm.com>
2789
2790         PR middle-end/39986
2791         * dfp.c (encode_decimal32, decode_decimal32, encode_decimal64,
2792         decode_decimal64, encode_decimal128, decode_decimal128): Avoid
2793         32-bit memcpy into long.
2794
2795 2009-05-06  Jakub Jelinek  <jakub@redhat.com>
2796
2797         * dwarf2out.c (new_reg_loc_descr): Don't ever create DW_OP_regX.
2798         (one_reg_loc_descriptor): Create DW_OP_regX here instead of calling
2799         new_reg_loc_descr.
2800         (loc_by_reference): If loc is DW_OP_regX, change it into DW_OP_bregX 0
2801         instead of appending DW_OP_deref*.
2802
2803 2009-05-06  Michael Matz  <matz@suse.de>
2804
2805         PR middle-end/40021
2806         * cfgexpand.c (maybe_cleanup_end_of_block): New static function.
2807         (expand_gimple_cond): Use it to cleanup CFG and superfluous jumps.
2808
2809 2009-05-06  Rafael Avila de Espindola  <espindola@google.com>
2810
2811         * Makefile.in (install-plugin): Fix srcdir handling.
2812
2813 2009-05-06  Andrey Belevantsev  <abel@ispras.ru>
2814
2815         * tree-ssa.c (execute_update_address_taken): Handle TARGET_MEM_REF
2816         when processing for not_regs_needed bitmap.
2817         * gimple.c (walk_stmt_load_store_addr_ops): When visiting address,
2818         handle TARGET_MEM_REF in lhs.  Check TMR_BASE for NULL while 
2819         handling it for rhs. 
2820
2821 2009-05-06  H.J. Lu  <hongjiu.lu@intel.com>
2822
2823         * config/i386/i386.md (unnamed inc/dec peephole): Use
2824         optimize_insn_for_size_p instead of optimize_size.
2825         * config/i386/predicates.md (incdec_operand): Likewise.
2826         (aligned_operand): Likewise.
2827         * config/i386/sse.md (divv8sf3): Likewise.
2828         (sqrtv8sf2): Likewise.
2829
2830 2009-05-06  H.J. Lu  <hongjiu.lu@intel.com>
2831
2832         * config/i386/i386.c (ix86_build_signbit_mask): Make it static.
2833
2834         * config/i386/i386-protos.h (ix86_build_signbit_mask): Removed.
2835
2836 2009-05-06  H.J. Lu  <hongjiu.lu@intel.com>
2837
2838         * config/i386/i386.md (*avx_<code><mode>3_finite): Replace
2839         ssemodesuffixf2c with avxmodesuffixf2c.
2840
2841 2009-05-06  Joseph Myers  <joseph@codesourcery.com>
2842
2843         PR c/40032
2844         * c-decl.c (grokdeclarator): Handle incomplete type of unnamed field.
2845
2846 2009-05-05  Jakub Jelinek  <jakub@redhat.com>
2847
2848         * tree.h: Remove DECL_BY_REFERENCE from private_flag comment.
2849         (struct tree_base): Adjust spacing for 8 bit boundaries.
2850         (struct tree_decl_common): Add decl_by_reference_flag bit.
2851         (DECL_BY_REFERENCE): Adjust.
2852         * print-tree.c (print_node): For VAR_DECL, PARM_DECL or RESULT_DECL,
2853         print DECL_BY_REFERENCE bit.
2854         * dbxout.c (DECL_ACCESSIBILITY_CHAR): Revert last change.
2855         * dwarf2out.c (loc_by_reference, gen_decl_die): Check
2856         DECL_BY_REFERENCE for all VAR_DECLs, not just non-static ones.
2857         (gen_variable_die): Likewise.  Check TREE_PRIVATE/TREE_PROTECTED
2858         unconditionally.
2859
2860         PR middle-end/39666
2861         * gimplify.c (gimplify_switch_expr): If case labels cover the whole
2862         range of the type, but default label is missing, add it with one
2863         of the existing labels instead of adding a new label for it.
2864
2865 2009-05-05  Joseph Myers  <joseph@codesourcery.com>
2866
2867         * dwarf.h: Remove.
2868
2869 2009-05-05  Rafael Avila de Espindola  <espindola@google.com>
2870
2871         * Makefile.in (enable_plugin, plugin_includedir): New.
2872         (install): Depend on install-plugin.
2873         (PLUGIN_HEADERS): New.
2874         (install-plugin): New.
2875         * config.gcc: Add vxworks-dummy.h to tm_file for x86 and x86-64.
2876
2877 2009-05-05  Richard Guenther  <rguenther@suse.de>
2878
2879         PR tree-optimization/40022
2880         * tree-ssa-phiprop.c (struct phiprop_d): Exchange vop_stmt for
2881         the only vuse.
2882         (phivn_valid_p): Fix tuplification error, simplify.
2883         (phiprop_insert_phi): Add dumps.
2884         (propagate_with_phi): Simplify.
2885
2886 2009-05-05  Richard Guenther  <rguenther@suse.de>
2887
2888         PR middle-end/40023
2889         * builtins.c (gimplify_va_arg_expr): Properly build the address.
2890
2891 2009-05-05  Shujing Zhao  <pearly.zhao@oracle.com>
2892
2893         * tree.h (strip_float_extensions): Remove duplicate declaration.
2894         (build_low_bits_mask, debug_fold_checksum, expand_function_end,
2895         expand_function_start, stack_protect_prologue, stack_protect_epilogue,
2896         block_ultimate_origin): Rearrange the declarations line to match the
2897         comment that indicates the .c file which the functions are defined.
2898         (dwarf2out_*, set_decl_rtl): Add comment.
2899         (get_base_address): Adjust comment.
2900         (change_decl_assembler_name, maybe_fold_*, build_addr): Rearrange the
2901         declarations line and add comment.
2902         (is_builtin_name): Add blank after function name, for clarity.
2903
2904 2009-05-04  Joseph Myers  <joseph@codesourcery.com>
2905
2906         * attribs.c (decl_attributes): Use %qE for identifiers in
2907         diagnostics.
2908         * cgraphunit.c (verify_cgraph_node): Translate function names to
2909         locale character set in diagnostics.
2910         * coverage.c (get_coverage_counts): Use %qE for identifiers in
2911         diagnostics.
2912         * doc/invoke.texi (-finstrument-functions-exclude-function-list):
2913         Document that functions are named in UTF-8.
2914         * expr.c (expand_expr_real_1): Translate function names to locale
2915         character set in diagnostics.
2916         * gimplify.c (omp_notice_variable, omp_is_private,
2917         gimplify_scan_omp_clauses): Use %qE for identifiers in
2918         diagnostics.
2919         * langhooks.c (lhd_print_error_function): Translate function names
2920         to locale character set.
2921         * langhooks.h (decl_printable_name): Document that return value is
2922         in internal character set.
2923         * stmt.c: Include pretty-print.h
2924         (tree_conflicts_with_clobbers_p): Use %qE for identifiers in
2925         diagnostics.
2926         (resolve_operand_name_1): Translate named operand name to locale
2927         character set.
2928         * stor-layout.c (finalize_record_size): Use %qE for identifiers in
2929         diagnostics.
2930         * toplev.c (announce_function): Translate function names to locale
2931         character set.
2932         (warn_deprecated_use): Use %qE for identifiers in diagnostics.
2933         (default_tree_printer): Use pp_identifier or translate identifiers
2934         to locale character set.  Mark "<anonymous>" for translation.
2935         * tree-mudflap.c (mx_register_decls, mudflap_finish_file): Use %qE
2936         for identifiers in diagnostics.
2937         * tree.c (handle_dll_attribute): Use %qE for identifiers in
2938         diagnostics.
2939         * varasm.c (output_constructor): Use %qE for identifiers in
2940         diagnostics.
2941
2942 2009-05-04  Rafael Avila de Espindola  <espindola@google.com>
2943
2944         * configure.ac: use ` ` instead of $()
2945         * configure: Regenerate.
2946
2947 2009-05-05  Ben Elliston  <bje@au.ibm.com>
2948
2949         * config/pa/linux-atomic.c: Eliminate conditional include of
2950         errno.h on non-LP64 systems to simplify build requirements.
2951
2952 2009-05-04  Joseph Myers  <joseph@codesourcery.com>
2953
2954         * c-common.c (handle_mode_attribute): Use %qE for identifiers in
2955         diagnostics.
2956         * c-decl.c (check_bitfield_type_and_width): Make orig_name a tree
2957         and pass value to identifier_to_locale.
2958         (warn_variable_length_array): Make name a tree.
2959         (grokdeclarator): Separate diagnostic texts for named and unnamed
2960         declarators.  Use %qE for named declarators.
2961         * c-parser.c (c_lex_one_token): Use %qE for identifiers in
2962         diagnostics.
2963         * c-pragma.c (pop_alignment, handle_pragma_pack): Use %qE for
2964         identifiers in diagnostics.
2965         * c-typeck.c (push_member_name, start_init): Pass identifiers to
2966         identifier_to_locale.  Mark "anonymous" strings for translation.
2967
2968 2009-05-04  Michael Eager <eager@eagercon.com>
2969
2970         * config/rs6000/rs6000.c (rs6000_legitimate_address): Allow
2971         address for DImode/DFmode only if double-precision FP regs.
2972
2973 2009-05-04  Michael Eager <eager@eagercon.com>
2974
2975         * config/rs6000/rs6000.c (rs6000_libcall_value): Add
2976         TARGET_SINGLE_FLOAT check.
2977
2978 2009-05-04  Michael Eager <eager@eagercon.com>
2979
2980         * config/rs6000/xilinx.h: Add CPP_SPEC for -mxilinx-fpu options.
2981
2982 2009-05-04  Michael Eager <eager@eagercon.com>
2983
2984         * gcc/config.gcc: (powerpc-xilinx-eabi*): Add tm t-xilinx
2985         * config/rs6000/t-xilinx: New
2986
2987 2009-05-04  Paolo Bonzini  <bonzini@gnu.org>
2988
2989         * doc/tm.texi (LEGITIMIZE_ADDRESS): Revise documentation.
2990         * gcc/defaults.h (LEGITIMIZE_ADDRESS): Delete.
2991         * gcc/explow.c (memory_address): Use target hook.
2992         * gcc/targhooks.c (default_legitimize_address): New.
2993         * gcc/targhooks.h (default_legitimize_address): New.
2994         * gcc/target.h (legitimize_address): New.
2995         * gcc/target-def.h (TARGET_LEGITIMIZE_ADDRESS): New.
2996         (TARGET_INITIALIZER): Include it.
2997         * gcc/system.h (LEGITIMIZE_ADDRESS): Poison.
2998
2999         * config/bfin/bfin-protos.h (legitimize_address): Remove.
3000         * config/bfin/bfin.c (legitimize_address): Remove.
3001         * config/bfin/bfin.h (LEGITIMIZE_ADDRESS): Remove.
3002         * config/m68hc11/m68hc11-protos.h (m68hc11_legitimize_address):
3003         Remove.
3004         * config/m68hc11/m68hc11.c (m68hc11_legitimize_address): Remove.
3005         * config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Remove.
3006
3007         * gcc/config/arm/arm.h (LEGITIMIZE_ADDRESS, ARM_LEGITIMIZE_ADDRESS,
3008         THUMB_LEGITIMIZE_ADDRESS, THUMB2_LEGITIMIZE_ADDRESS): Delete.
3009         * gcc/config/s390/s390.h (LEGITIMIZE_ADDRESS): Delete.
3010         * gcc/config/m32c/m32c.h (LEGITIMIZE_ADDRESS): Delete.
3011         * gcc/config/sparc/sparc.h (LEGITIMIZE_ADDRESS): Delete.
3012         * gcc/config/m32r/m32r.h (LEGITIMIZE_ADDRESS): Delete.
3013         * gcc/config/i386/i386.h (LEGITIMIZE_ADDRESS): Delete.
3014         * gcc/config/sh/sh.h (LEGITIMIZE_ADDRESS): Delete.
3015         * gcc/config/avr/avr.h (LEGITIMIZE_ADDRESS): Delete.
3016         * gcc/config/m68hc11/m68hc11.h (LEGITIMIZE_ADDRESS): Delete.
3017         * gcc/config/iq2000/iq2000.h (LEGITIMIZE_ADDRESS): Delete.
3018         * gcc/config/mn10300/mn10300.h (LEGITIMIZE_ADDRESS): Delete.
3019         * gcc/config/m68k/m68k.h (LEGITIMIZE_ADDRESS): Delete.
3020         * gcc/config/score/score.h (LEGITIMIZE_ADDRESS): Delete.
3021         * gcc/config/pa/pa.h (LEGITIMIZE_ADDRESS): Delete.
3022         * gcc/config/mips/mips.h (LEGITIMIZE_ADDRESS): Delete.
3023         * gcc/config/alpha/alpha.h (LEGITIMIZE_ADDRESS): Delete.
3024         * gcc/config/frv/frv.h (LEGITIMIZE_ADDRESS): Delete.
3025         * gcc/config/spu/spu.h (LEGITIMIZE_ADDRESS): Delete.
3026         * gcc/config/xtensa/xtensa.h (LEGITIMIZE_ADDRESS): Delete.
3027         * gcc/config/cris/cris.h (LEGITIMIZE_ADDRESS): Delete.
3028         * gcc/config/rs6000/rs6000.h (LEGITIMIZE_ADDRESS): Delete.
3029         * gcc/config/picochip/picochip.h (LEGITIMIZE_ADDRESS): Delete.
3030
3031         * gcc/config/s390/s390-protos.h (legitimize_address): Delete.
3032         * gcc/config/m32c/m32c-protos.h (m32c_legitimize_address): Delete.
3033         * gcc/config/sparc/sparc-protos.h (legitimize_address): Delete.
3034         * gcc/config/i386/i386-protos.h (legitimize_address): Delete.
3035         * gcc/config/avr/avr-protos.h (legitimize_address): Delete.
3036         * gcc/config/mn10300/mn10300-protos.h (legitimize_address): Delete.
3037         * gcc/config/score/score-protos.h (score_legitimize_address): Delete.
3038         * gcc/config/arm/arm-protos.h (arm_legitimize_address,
3039         (thumb_legitimize_address): Delete.
3040         * gcc/config/pa/pa-protos.h (hppa_legitimize_address): Delete.
3041         * gcc/config/mips/mips-protos.h (mips_legitimize_address): Delete.
3042         * gcc/config/alpha/alpha-protos.h (alpha_legitimize_address): Delete.
3043         * gcc/config/frv/frv-protos.h (frv_legitimize_address): Delete.
3044         * gcc/config/spu/spu-protos.h (spu_legitimize_address): Delete.
3045         * gcc/config/xtensa/xtensa-protos.h (xtensa_legitimize_address):
3046         Delete.
3047         * gcc/config/rs6000/rs6000-protos.h (rs6000_legitimize_address):
3048         Delete.
3049
3050         * config/arm/arm.c (arm_legitimize_address): Maybe call Thumb version.
3051         * config/m32c/m32c.c (m32c_legitimize_address): Standardize.
3052         * config/m32r/m32r.c (m32r_legitimize_address): New.
3053         * config/m68k/m68k.c (m68k_legitimize_address): New.
3054         * config/score/score.c (score_legitimize_address): Standardize.
3055         * config/score/score3.c (score3_legitimize_address): Standardize.
3056         * config/score/score3.h (score3_legitimize_address): Adjust.
3057         * config/score/score7.c (score7_legitimize_address): Standardize.
3058         * config/score/score7.h (score7_legitimize_address): Adjust.
3059         * config/sh/sh.c (sh_legitimize_address): New.
3060         * config/iq2000/iq2000.c (iq2000_legitimize_address): New.
3061
3062         * gcc/config/s390/s390.c (legitimize_address): Rename to...
3063         (s390_legitimize_address): ... this.
3064         * gcc/config/sparc/sparc.c (legitimize_address): Rename to...
3065         (sparc_legitimize_address): ... this.
3066         * gcc/config/i386/i386.c (legitimize_address): Rename to...
3067         (ix86_legitimize_address): ... this.
3068         * gcc/config/avr/avr.c (legitimize_address): Rename to...
3069         (avr_legitimize_address): ... this.
3070         * gcc/config/mn10300/mn10300.c (legitimize_address): Rename to...
3071         (mn10300_legitimize_address): ... this.
3072         * config/alpha/alpha.c (alpha_legitimize_address): Wrap...
3073         (alpha_legitimize_address_1): ... the old alpha_legitimize_address.
3074         (alpha_expand_mov): Adjust call.
3075
3076         * config/frv/frv.c (frv_legitimize_address): Return x on failure.
3077         * config/spu/spu.c (spu_legitimize_address): Likewise.
3078         * config/xtensa/xtensa.c (xtensa_legitimize_address): Likewise.
3079         * config/rs6000/rs6000.c (rs6000_legitimize_address): Likewise.
3080
3081 2009-05-04  Joseph Myers  <joseph@codesourcery.com>
3082
3083         * intl.c (locale_encoding, locale_utf8): New.
3084         (gcc_init_libintl): Initialize locale_encoding and locale_utf8.
3085         * intl.h (locale_encoding, locale_utf8): Declare.
3086         * pretty-print.c: Include ggc.h.  Include iconv.h if HAVE_ICONV.
3087         (pp_base_tree_identifier, decode_utf8_char, identifier_to_locale):
3088         New.
3089         * pretty-print.h (pp_identifier): Call identifier_to_locale on ID
3090         argument.
3091         (pp_tree_identifier): Define to call pp_base_tree_identifier.
3092         (pp_base_tree_identifier): Declare as function.
3093         (identifier_to_locale): Declare.
3094         * Makefile.in (pretty-print.o): Update dependencies.
3095         * varasm.c (finish_aliases_1): Use %qE for identifiers in diagnostics.
3096
3097 2009-05-04  Richard Guenther  <rguenther@suse.de>
3098
3099         PR middle-end/40015
3100         * builtins.c (fold_builtin_memory_op): Do not decay to element
3101         type if the size matches the whole array.
3102
3103 2009-05-04  Kazu Hirata  <kazu@codesourcery.com>
3104
3105         * expmed.c (synth_mult): When trying out a shift, pass the result
3106         of a signed shift.
3107
3108 2009-05-04  Kazu Hirata  <kazu@codesourcery.com>
3109
3110         * expmed.c (shiftsub_cost): Rename to shiftsub0_cost.
3111         (shiftsub1_cost): New.
3112         (init_expmed): Compute shiftsub1_cost.
3113         (synth_mult): Optimize multiplications by constants of the form
3114         -(2^^m-1) for some constant positive integer m.
3115
3116 2009-05-03  Richard Guenther  <rguenther@suse.de>
3117
3118         PR c/39983
3119         * c-typeck.c (array_to_pointer_conversion): Do not built
3120         ADDR_EXPRs of arrays of pointer-to-element type.
3121         * c-gimplify.c (c_gimplify_expr): Revert change fixing
3122         up wrong ADDR_EXPRs after-the-fact.
3123         * c-common.c (strict_aliasing_warning): Strip pointer
3124         conversions for obtaining the original type.
3125         * builtins.c (fold_builtin_memset): Handle array types.
3126         (fold_builtin_memory_op): Handle folded POINTER_PLUS_EXPRs
3127         and array types
3128
3129 2009-05-03  Richard Guenther  <rguenther@suse.de>
3130
3131         PR middle-end/23329
3132         * tree-ssa.c (useless_type_conversion_p_1): Use get_deref_alias_set.
3133         Do not lose casts from array types with unknown extent to array
3134         types with known extent.
3135         * tree-ssa-copy.c (may_propagate_copy): Remove hack checking for
3136         alias set compatibility.
3137
3138 2009-05-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3139
3140         * flags.h (extra_warnings): Delete.
3141         * toplev.c (process_options): Handle Wuninitialized here.
3142         * opts.c (extra_warnings): Delete.
3143         (set_Wextra): Delete.
3144         (common_handle_option): -Wextra can be handled automatically.
3145         * c-opts.c (c_common_handle_option): Delete obsolete code.
3146         (c_common_post_options): Simplify comment.
3147         * common.opt (W): Add Var.
3148         (Wextra): Add Var.
3149         (Wuninitialized): Initialize to -1.
3150
3151 2009-05-03  Adam Nemet  <anemet@caviumnetworks.com>
3152             Richard Guenther  <rguenther@suse.de>
3153
3154         * expr.c (get_def_for_expr): New function.
3155         (expand_expr_real_1) <PLUS_EXPR, MINUS_EXPR>: Adjust to work with
3156         SSA rather than trees.
3157         <MULT_EXPR>: Likewise.  Use subexp0 and subexp1 instead of
3158         TREE_OPERAND (exp, 0) and TREE_OPERAND (exp, 1).
3159         
3160 2009-05-03  Joseph Myers  <joseph@codesourcery.com>
3161
3162         * c-common.c (reswords): Add _Imaginary.
3163         * c-common.c (enum rid): Add RID_IMAGINARY.
3164
3165 2009-05-03  Paolo Bonzini  <bonzini@gnu.org>
3166
3167         * tree.h (TYPE_VECTOR_OPAQUE): Fix documentation.
3168         Patch by Richard Guenther.
3169
3170 2009-05-03  Anatoly Sokolov  <aesok@post.ru>
3171
3172         * defaults.h (FRAME_POINTER_REQUIRED): Provide default.
3173         * doc/tm.texi (FRAME_POINTER_REQUIRED): Revise documentation.
3174         * config/alpha/alpha.h (FRAME_POINTER_REQUIRED): Delete.
3175         * config/s390/s390.h (FRAME_POINTER_REQUIRED): Delete.
3176         * config/spu/spu.h (FRAME_POINTER_REQUIRED): Delete.
3177         * config/sh/sh.h (FRAME_POINTER_REQUIRED): Delete.
3178         * config/pdp11/pdp11.h (FRAME_POINTER_REQUIRED): Delete.
3179         * config/stormy16/stormy16.h (FRAME_POINTER_REQUIRED): Delete.
3180         * config/m68hc11/m68hc11.h (FRAME_POINTER_REQUIRED): Delete.
3181         * config/iq2000/iq2000.h (FRAME_POINTER_REQUIRED): Delete.
3182         * config/mn10300/mn10300.h (FRAME_POINTER_REQUIRED): Delete.
3183         * config/ia64/ia64.h (FRAME_POINTER_REQUIRED): Delete.
3184         * config/m68k/m68k.h (FRAME_POINTER_REQUIRED): Delete.
3185         * config/rs6000/rs6000.h (FRAME_POINTER_REQUIRED): Delete.
3186         * config/picochip/picochip.h (FRAME_POINTER_REQUIRED): Delete.
3187         * config/mcore/mcore.h (FRAME_POINTER_REQUIRED): Delete.
3188         * config/h8300/h8300.h (FRAME_POINTER_REQUIRED): Delete.
3189         * config/v850/v850.h (FRAME_POINTER_REQUIRED): Delete.
3190
3191 2009-05-02  Richard Guenther  <rguenther@suse.de>
3192
3193         PR tree-optimization/39940
3194         * tree-ssa-pre.c (eliminate): Make sure we may propagate before
3195         doing so.
3196
3197 2009-05-02  Richard Guenther  <rguenther@suse.de>
3198
3199         PR middle-end/40001
3200         * tree-ssa.c (execute_update_addresses_taken): Properly check
3201         if we can mark a variable DECL_GIMPLE_REG_P.
3202         * gimple.c (is_gimple_reg): Re-order check for DECL_GIMPLE_REG_P
3203         back to the end of the function.
3204         (is_gimple_reg_type): Remove complex type special casing.
3205         * gimplify.c (gimplify_bind_expr): Do not set DECL_GIMPLE_REG_P
3206         if not optimizing.
3207
3208 2009-05-02  Ben Elliston  <bje@au.ibm.com>
3209
3210         * doc/collect2.texi (Collect2): Document search path behaviour
3211         when configured with --with-ld.
3212
3213 2009-05-02  Jan Hubicka  <jh@suse.cz>
3214
3215         * tree-ssa-coalesce.c (coalesce_cost): Do not take ciritical
3216         parameter; update callers.
3217         (coalesce_cost_edge): EH edges are costier because they needs
3218         splitting even if not critical and even more costier when there are
3219         multiple EH predecestors.
3220
3221 2009-05-02  Jan Hubicka  <jh@suse.cz>
3222
3223         * except.c (remove_eh_handler_and_replace): Handle updating after
3224         removing TRY blocks.
3225
3226 2009-05-02  Eric Botcazou  <ebotcazou@adacore.com>
3227
3228         * store-motion.c (compute_store_table): Add ENABLE_CHECKING guard.
3229
3230 2009-05-02  Steven Bosscher  <steven@gcc.gnu.org>
3231
3232         * varasm.c: Do not include c-pragma.h.
3233         * attribs.c: Do not incude c-common.h.
3234
3235 2009-05-01  Michael Matz  <matz@suse.de>
3236
3237         * calls.c (initialize_argument_information): Handle SSA names like
3238         decls with a non MEM_P DECL_RTL.
3239
3240 2009-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3241
3242         * ipa-reference.c: Do not include c-common.h, include splay-tree.h.
3243         * ipa-utils.c: Likewise.
3244         * ipa-type-escape.c: Likewise.
3245         * cgraphunit.c Do not include c-common.h.
3246         * ipa-pure-const.c: Likewise.
3247         * tree-if-conv.c: Likewise.
3248         * matrix-reorg.c: Do not include c-common.h and c-tree.h.
3249         * ipa-struct-reorg.c: Likewise.
3250         * tree-nomudflap.c: Likewise.
3251         * tree-ssa-structalias.c: Likewise.
3252
3253 2009-05-01  Steven Bosscher  <steven@gcc.gnu.org>
3254
3255         * store-motion.c: Many cleanups to make this pass a first-class
3256         citizen instead of an appendix to gcse load motion.  Add TODO list
3257         to make this pass faster/cleaner/better.
3258
3259         (struct ls_expr): Post gcse.c-split cleanups.
3260         Rename to st_expr.  Rename "loads" field to "antic_stores".  Rename
3261         "stores" field to "avail_stores".
3262         (pre_ldst_mems): Rename to store_motion_mems.
3263         (pre_ldst_table): Rename to store_motion_mems_table.
3264         (pre_ldst_expr_hash): Rename to pre_st_expr_hash, update users.
3265         (pre_ldst_expr_eq): Rename to pre_st_expr_eq, update users.
3266         (ldst_entry): Rename to st_expr_entry, update users.
3267         (free_ldst_entry): Rename to free_st_expr_entry, update users.
3268         (free_ldst_mems): Rename to free_store_motion_mems, update users.
3269         (enumerate_ldsts): Rename to enumerate_store_motion_mems,
3270         update caller.
3271         (first_ls_expr): Rename to first_st_expr, update users.
3272         (next_ls_expr): Rename to next_st_expr, update users.
3273         (print_ldst_list): Rename to print_store_motion_mems.  Print names of
3274         fields properly for store motion instead of names inherited from load
3275         motion in gcse.c.
3276         (ANTIC_STORE_LIST, AVAIL_STORE_LIST): Remove.
3277         (LAST_AVAIL_CHECK_FAILURE): Explain what this is.  Undefine when we
3278         are done with it.
3279
3280         (ae_kill): Rename to st_kill, update users.
3281         (ae_gen): Rename to st_avloc, update users.
3282         (transp): Rename to st_transp, update users.
3283         (pre_insert_map): Rename to st_insert_map, update users.
3284         (pre_delete_map): Rename to st_delete_map, update users.
3285         (insert_store, build_store_vectors, free_store_memory,
3286         one_store_motion_pass): Update for abovementioned changes.
3287
3288         (gcse_subst_count, gcse_create_count): Remove.
3289         (one_store_motion_pass): New statistics counters "n_stores_deleted"
3290         and "n_stores_created", local variables.
3291
3292         (extract_mentioned_regs, extract_mentioned_regs_1): Rewrite to
3293         use for_each_rtx.
3294
3295         (regvec, compute_store_table_current_insn): Remove.
3296         (reg_set_info, reg_clear_last_set): Remove.
3297         (compute_store_table): Use DF caches instead of local dataflow
3298         solvers.
3299
3300 2009-05-01  Joseph Myers  <joseph@codesourcery.com>
3301
3302         * c-objc-common.c (c_tree_printer): Print identifiers with
3303         pp_identifier, not pp_string.  Mark "({anonymous})" for
3304         translation.
3305         * c-pretty-print.c (pp_c_ws_string): New.
3306         (pp_c_cv_qualifier, pp_c_type_specifier,
3307         pp_c_specifier_qualifier_list, pp_c_parameter_type_list,
3308         pp_c_storage_class_specifier, pp_c_function_specifier,
3309         pp_c_attributes, pp_c_bool_constant, pp_c_constant,
3310         pp_c_primary_expression, pp_c_postfix_expression,
3311         pp_c_unary_expression, pp_c_shift_expression,
3312         pp_c_relational_expression, pp_c_equality_expression,
3313         pp_c_logical_and_expression, pp_c_logical_or_expression): Mostly
3314         use pp_string and pp_c_ws_string in place of pp_identifier and
3315         pp_c_identifier for non-identifiers.  Mark English strings for
3316         translation.
3317         * c-pretty-print.h (pp_c_ws_string): Declare.
3318
3319 2009-04-30  Paul Pluzhnikov  <ppluzhnikov@google.com>
3320             Roland McGrath <roland@redhat.com>
3321
3322         * configure.ac (HAVE_LD_BUILDID): New check for ld --build-id support.
3323         (ENABLE_LD_BUILDID): New configuration option.
3324         * gcc.c [HAVE_LD_BUILDID and ENABLE_LD_BUILDID]
3325         (LINK_BUILDID_SPEC): New macro.
3326         (init_spec): If defined, prepend it between LINK_EH_SPEC and
3327         link_spec.
3328         * doc/install.texi: Document --enable-linker-build-id option.
3329         * configure: Rebuild.
3330         * config.in: Rebuild.
3331
3332 2009-04-30  Adam Nemet  <anemet@caviumnetworks.com>
3333
3334         * config/mips/mips.h (FRAME_GROWS_DOWNWARD,
3335         MIPS_GP_SAVE_AREA_SIZE): Define new macros.
3336         (STARTING_FRAME_OFFSET): Return 0 if FRAME_GROWS_DOWNWARD.  Use
3337         MIPS_GP_SAVE_AREA_SIZE.
3338         * config/mips/mips.c (struct mips_frame_info): Update comment
3339         before arg_pointer_offset and hard_frame_pointer_offset.
3340         (mips_compute_frame_info): Update diagram before function: to
3341         correctly use stack_pointer_rtx for fp_sp_offset and gp_sp_offset, to
3342         indicate the position of frame_pointer_rtx with -fstack-protector and
3343         to show args_size.  Don't allocate cprestore area for leaf functions
3344         if FRAME_GROWS_DOWNWARD.  Use MIPS_GP_SAVE_AREA_SIZE to set
3345         cprestore_size.
3346         (mips_initial_elimination_offset): Update for FRAME_GROWS_DOWNWARD.
3347
3348 2009-04-30  Michael Matz  <matz@suse.de>
3349
3350         PR tree-optimization/39955
3351         * config/rs6000/rs6000.c (rs6000_check_sdmode): Also check SSA_NAMEs.
3352
3353 2009-04-30  Dave Korn  <dave.korn.cygwin@gmail.com>
3354
3355         * ira.c (setup_cover_and_important_classes):  Use safe macro
3356         REG_CLASS_FOR_CONSTRAINT instead of calling regclass_for_constraint
3357         directly.
3358         * genpreds.c (write_tm_preds_h):  Output suitable definition of
3359         REG_CLASS_FOR_CONSTRAINT.
3360
3361 2009-04-30  Rafael Avila de Espindola  <espindola@google.com>
3362
3363         * alloc-pool.c (alloc_pool_descriptor): Use an insert_opion value
3364         instead of an int.
3365         * bitmap.c (bitmap_descriptor): Likewise.
3366         * ggc-common.c (loc_descriptor): Likewise.
3367         * varray.c (varray_descriptor): Likewise.
3368         * vec.c (vec_descriptor): Likewise.
3369
3370 2009-04-30  Eric Botcazou  <ebotcazou@adacore.com>
3371
3372         * Makefile.in (dce.o): Add $(EXCEPT_H).
3373         * dce.c: Include except.h and delete redundant vector definitions.
3374         (deletable_insn_p): Return false for non-call insns that can throw
3375         if DF is running.
3376
3377 2009-04-30  Steven Bosscher  <steven@gcc.gnu.org>
3378
3379         * gcse.c (ae_gen): Remove.
3380         (can_assign_to_reg_p): Rename to can_assign_to_reg_without_clobbers_p
3381         and make non-static function to make it available in store-motion.c.
3382         Update call sites with search-and-replace.
3383         (enumerate_ldsts, reg_set_info, reg_clear_last_set, store_ops_ok,
3384         extract_mentioned_regs, extract_mentioned_regs_helper,
3385         find_moveable_store, compute_store_table, load_kills_store, find_loads,
3386         store_killed_in_insn, store_killed_after, store_killed_before,
3387         build_store_vectors, insert_insn_start_basic_block, insert-store,
3388         remove_reachable_equiv_notes, replace_store_insn, delete_store,
3389         free_store_memory, one_store_motion_pass, gate_rtl_store_motion,
3390         execute_rtl_store_motion, pass_rtl_store_motion): Move to...
3391         * store-motion.c: ...new file.  Also copy data structures from gcse.c
3392         and clean up to remove parts not used by store motion.
3393         * rtl.h (can_assign_to_reg_without_clobbers_p): Add prototype.
3394         * Makefile.in (store-motion.o): New rule. Add to OBJS-common.
3395
3396 2009-04-30  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3397
3398         PR target/38571
3399         * config/arm/arm.h (FUNCTION_BOUNDARY): Set to 16 for thumb
3400         when optimizing for size.
3401
3402 2009-04-30  Hans-Peter Nilsson  <hp@axis.com>
3403
3404         * gcse.c (gcse_constant_p): Fix typo in last change.
3405
3406 2009-04-30  Rafael Avila de Espindola  <espindola@google.com>
3407
3408         * plugin.c: Include plugin-version.h only if ENABLE_PLUGIN is defined.
3409
3410 2009-04-30  Andreas Krebbel  <krebbel1@de.ibm.com>
3411
3412         * gcse.c (gcse_constant_p): Make sure the constant is sharable.
3413
3414 2009-04-29  James E. Wilson  <wilson@codesourcery.com>
3415
3416         * config/mips/mips.c (mips_add_offset): Use gen_int_mode for
3417         CONST_HIGH_PART result.
3418
3419 2009-04-29  Anatoly Sokolov  <aesok@post.ru>
3420
3421         * config/avr/avr.c (initial_elimination_offset): Rename to
3422         avr_initial_elimination_offset.
3423         (frame_pointer_required_p): Rename to avr_frame_pointer_required_p,
3424         change return type to bool.
3425         (avr_can_eliminate): New function.
3426         * config/avr/avr.h (CAN_ELIMINATE): Use avr_can_eliminate.
3427         (FRAME_POINTER_REQUIRED): Use avr_frame_pointer_required_p.
3428         (INITIAL_ELIMINATION_OFFSET): Use avr_initial_elimination_offset.
3429         * config/avr/avr-protos.h (initial_elimination_offset): Rename to
3430         avr_initial_elimination_offset.
3431         (frame_pointer_required_p): Rename to avr_frame_pointer_required_p.
3432         (avr_initial_elimination_offset): Define.
3433
3434 2009-04-29  Eric Botcazou  <ebotcazou@adacore.com>
3435             Steven Bosscher  <steven@gcc.gnu.org>
3436
3437         PR rtl-optimization/39938
3438         * Makefile.in (cfgrtl.o): Add $(INSN_ATTR_H).
3439         * cfgrtl.c: Include insn-attr.h.
3440         (rest_of_pass_free_cfg): New function.
3441         (pass_free_cfg): Use rest_of_pass_free_cfg as execute function.
3442         * resource.c (init_resource_info): Remove call to df_analyze.
3443
3444 2009-04-29  Richard Guenther  <rguenther@suse.de>
3445
3446         PR target/39943
3447         * config/i386/i386.c (ix86_vectorize_builtin_conversion): Only
3448         allow conversion to signed integers.
3449
3450 2009-04-29  Richard Guenther  <rguenther@suse.de>
3451
3452         * tree-cfg.c (verify_gimple_assign_binary): Allow vector
3453         shifts of floating point vectors if the shift amount is
3454         a constant multiple of the element size.
3455
3456 2009-04-29  Andreas Krebbel  <krebbel1@de.ibm.com>
3457             Michael Matz  <matz@suse.de>
3458
3459         PR middle-end/39927
3460         PR bootstrap/39929
3461         * tree-outof-ssa.c (emit_partition_copy): New function.
3462         (insert_partition_copy_on_edge, insert_rtx_to_part_on_edge,
3463         insert_part_to_rtx_on_edge): Perform the partition base var
3464         copy using emit_partition_copy.
3465         (insert_value_copy_on_edge): Convert constants to the right mode.
3466         (insert_rtx_to_part_on_edge): Add UNSIGNEDSRCP parameter.
3467         (elim_create): Pass the sign of the src to insert_rtx_to_part_on_edge.
3468
3469 2009-04-29  Bernd Schmidt  <bernd.schmidt@analog.com>
3470
3471         * config/bfin/bfin.c (bfin_optimize_loop): If we need a scratch reg,
3472         scan backwards to try to find a constant to initialize it.
3473
3474         * config/bfin/bfin.c (bfin_optimize_loop): When looking for the last
3475         insn before the loop_end instruction, don't look past labels.
3476
3477 2009-04-29  Richard Guenther  <rguenther@suse.de>
3478
3479         PR middle-end/39937
3480         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Do not
3481         loose type conversions.
3482         (forward_propagate_addr_expr): Fix tuplification bug.  Remove
3483         stmts only if there are no uses of its definition.
3484
3485 2009-04-29  Bernd Schmidt  <bernd.schmidt@analog.com>
3486
3487         * config/bfin/bfin.h (splitting_loops): Declare.
3488         * config/bfin/bfin-protos.h (WA_05000257, WA_05000283, WA_05000315):
3489         Reorder bit definitions to be ascending.
3490         (WA_LOAD_LCREGS, ENABLE_WA_LOAD_LCREGS): New macros.
3491         * config/bfin/bfin.c (splitting_loops): New variable.
3492         (bfin_cpus): Add WA_LOAD_LCREGS as needed.
3493         (struct loop_info): Remove members INIT and LOOP_INIT.
3494         (bfin_optimize_loop): Don't set them.  Reorder the code that generates
3495         the LSETUP sequence.  Allow LC to be loaded from any register, but
3496         also add a case to push/pop a PREG scratch if ENABLE_WA_LOAD_LCREGS.
3497         (bfin_reorg_loops): When done, split all BB_ENDs with splitting_loops
3498         set to 1.
3499         * config/bfin/bfin.md (loop_end splitter): Use splitting_loops instead
3500         of reload_completed.
3501
3502         From Jie Zhang:
3503         * config/bfin/bfin.md (movsi_insn): Refine constraints.
3504
3505 2009-04-29  Rafael Avila de Espindola  <espindola@google.com>
3506
3507         * Makefile.in (PLUGIN_VERSION_H): New.
3508         (OBJS-common): Remove plugin-version.o.
3509         (plugin.o): Depend on (PLUGIN_VERSION_H).
3510         (plugin-version.o): Remove.
3511         * configure: Regenerate
3512         * configure.ac: Create plugin-version.h.
3513         * gcc-plugin.h (plugin_gcc_version): Remove.
3514         (plugin_default_version_check): Change signature.
3515         * plugin-version.c: Remove.
3516         * plugin.c: Include plugin-version.h.
3517         (str_plugin_gcc_version_name): Remove.
3518         (try_init_one_plugin): Pass gcc version to plugin_init.
3519         (plugin_default_version_check): Both gcc and plugin versions are now
3520         arguments.
3521
3522 2009-04-29  Bernd Schmidt  <bernd.schmidt@analog.com>
3523         
3524         * config/bfin/bfin.c (bfin_optimize_loop): Unify handling of
3525         problematic last insns.  Test for TYPE_CALL rather than CALL_P.
3526         Remove special case testing for last insn of inner loops. Don't fail
3527         if the loop ends with a jump, emit an extra nop instead.
3528
3529         * config/bfin/bfin.c (bfin_register_move_cost): Test for subsets of
3530         DREGS rather than comparing directly.  Remove code that tries to
3531         account for latencies.
3532
3533 2009-04-29  Richard Guenther  <rguenther@suse.de>
3534
3535         PR tree-optimization/39941
3536         * tree-ssa-pre.c (eliminate): Schedule update-ssa after
3537         eliminating an indirect call.
3538
3539 2009-04-29  Richard Guenther  <rguenther@suse.de>
3540
3541         * tree-cfg.c (verify_types_in_gimple_reference): Add require_lvalue
3542         parameter.  Allow invariants as base if !require_lvalue.
3543         (verify_gimple_assign_single): Adjust.
3544
3545 2009-04-29  Bernd Schmidt  <bernd.schmidt@analog.com>
3546
3547         * config/bfin/bfin.md (sp_or_sm, spm_string, spm_name): New macro.
3548         (ss<spm_name>hi3, ss<spm_name>hi3_parts, ss<spm_name>hi3_low_parts,
3549         ss<spm_name_hi3_high_parts): New patterns, replacing ssaddhi3,
3550         ssubhi3, ssaddhi3_parts and sssubhi3_parts.
3551         (flag_mulhi3_parts): Produce a HImode output rather than trying to set
3552         a VEC_SELECT.
3553         * config/bfin/bfin.c (bfin_expand_builtin,
3554         case BFIN_BUILTIN_CPLX_SQU): Adjust accordingly.
3555
3556 2009-04-28  Richard Guenther  <rguenther@suse.de>
3557
3558         * tree-vect-loop.c (get_initial_def_for_induction): Use
3559         correct types for pointer increment.
3560
3561 2009-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3562
3563         * toplev.c (print_version): Update GMP version string calculation.
3564
3565 2009-04-28  Eric Botcazou  <ebotcazou@adacore.com>
3566
3567         PR rtl-optimization/39938
3568         * resource.c (init_resource_info): Add call to df_analyze.
3569
3570 2009-04-28  Uros Bizjak  <ubizjak@gmail.com>
3571
3572         * config/alpha/alpha.md (usegp): Cast the result of
3573         alpha_find_lo_sum_using_gp to enum attr_usegp.
3574         * config/alpha/alpha.c (override_options): Remove end-of-structure
3575         marker element from cpu_table.  Use array size of cpu_table to handle
3576         -mcpu and -mtune options.
3577         (tls_symbolic_operand_type): Change 0 to TLS_MODEL_NONE.
3578
3579 2009-04-28  Joseph Myers  <joseph@codesourcery.com>
3580
3581         * config.gcc (powerpc*-*-* | rs6000-*-*): Add
3582         rs6000/option-defaults.h to tm_file.  Support cpu_32, cpu_64,
3583         tune_32 and tune_64.
3584         * doc/install.texi (--with-cpu-32, --with-cpu-64): Document
3585         support on PowerPC.
3586         * config/rs6000/rs6000.h (OPTION_DEFAULT_SPECS): Move to ...
3587         * config/rs6000/option-defaults.h: ... here.  New file.
3588         (OPT_64, OPT_32): Define.
3589         (MASK_64BIT): Define to 0 if not already defined.
3590         (OPT_ARCH64, OPT_ARCH32): Define.
3591         (OPTION_DEFAULT_SPECS): Add entries for cpu_32, cpu_64, tune_32
3592         and tune_64.
3593
3594 2009-04-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3595
3596         * config/arm/arm.c (arm_override_options): Emit error on using
3597         fpa with AAPCS.
3598
3599 2009-04-28  Uros Bizjak  <ubizjak@gmail.com>
3600
3601         PR rtl-optimization/39914
3602         * ira-conflicts.c (ira_build_conflicts): Prohibit call used
3603         registers for allocnos created from user-defined variables only
3604         when not optimizing.
3605
3606 2009-04-28  Richard Guenther  <rguenther@suse.de>
3607
3608         PR middle-end/39937
3609         * fold-const.c (fold_binary): Use distribute_real_division only
3610         on float types.
3611
3612 2009-04-28  Steve Ellcey  <sje@cup.hp.com>
3613
3614         * config.gcc (hppa*64*-*-hpux11*): Set use_gcc_stdint and
3615         add hpux-stdint.h to tm_file.
3616         (hppa[12]*-*-hpux11*): Ditto.
3617         (ia64*-*-hpux*): Ditto.
3618         * config/hpux-stdint.h: New.
3619         * config/ia64/hpux.h (TARGET_OS_CPP_BUILTINS): Set
3620         __STDC_EXT__ for all compiles.
3621         * config/pa/pa-hpux.h: Ditto.
3622         * config/pa/pa-hpux10.h: Ditto.
3623         * config/pa/pa-hpux11.h: Ditto.
3624
3625 2009-04-28  Catherine Moore  <clm@codesourcery.com>
3626
3627         * debug.h (set_name): Add comment.
3628
3629 2009-04-28  Andrew Pinski  <pinskia@gmail.com>
3630
3631         PR target/39929
3632         * config/darwin.c (machopic_gen_offset): Check
3633         currently_expanding_to_rtl if current_ir_type returns IR_GIMPLE.
3634         * config/arm/arm.c (require_pic_register): Likewise.
3635
3636 2009-04-28  Paolo Bonzini  <bonzini@gnu.org>
3637
3638         * config/m32c/m32c.c (TARGET_PROMOTE_FUNCTION_RETURN,
3639         m32c_promote_function_return, TARGET_PROMOTE_PROTOTYPES,
3640         m32c_promote_prototypes): Delete.
3641
3642 2009-04-28  Michael Matz  <matz@suse.de>
3643
3644         PR middle-end/39922
3645         * tree-outof-ssa.c (insert_value_copy_on_edge): Don't convert
3646         constants.
3647
3648 2009-04-28  Richard Guenther  <rguenther@suse.de>
3649
3650         * tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix type error.
3651
3652 2009-04-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3653
3654         * config/arm/arm-cores.def: Add support for arm1156t2f-s.
3655         * doc/invoke.texi (ARM Options): Document support for arm1156t2f-s.
3656         * config/arm/arm-tune.md: Regenerate.
3657
3658 2009-04-28  Alexander Monakov  <amonakov@ispras.ru>
3659
3660         * sel-sched-ir.c (maybe_tidy_empty_bb): Do not attempt to delete a
3661         block if there are complex incoming edges.
3662         (sel_merge_blocks): Remove useless assert.
3663         (sel_redirect_edge_and_branch): Check that edge was redirected.
3664         * sel-sched-ir.h (_eligible_successor_edge_p): Remove assert.
3665         (sel_find_rgns): Delete declaration.
3666         * sel-sched.c (purge_empty_blocks): Attempt to remove first block of
3667         the region when it is not a preheader.
3668
3669 2009-04-28  Uros Bizjak  <ubizjak@gmail.com>
3670
3671         PR c/39323
3672         * config/alpha/elf.h (MAX_OFILE_ALIGNMENT): Sync with elfos.h
3673
3674 2009-04-28  Richard Guenther  <rguenther@suse.de>
3675
3676         * tree.h (SSA_NAME_VALUE): Remove.
3677         (struct tree_ssa_name): Remove value_handle member.
3678         * tree-vrp.c (execute_vrp): Initialize/free the value-handle
3679         array for jump threading.
3680         * tree-ssa-propagate.c (ssa_prop_init): Do not initialize
3681         SSA_NAME_VALUEs.
3682         * print-tree.c (print_node): Do not dump SSA_NAME_VALUEs.
3683         * tree-flow.h (threadedge_initialize_values): Declare.
3684         (threadedge_finalize_values): Likewise.
3685         * tree-ssa-threadedge.c (ssa_name_values): New global variable.
3686         (SSA_NAME_VALUE): Define.
3687         (threadedge_initialize_values): New function.
3688         (threadedge_finalize_values): Likewise.
3689         * tree-ssa-dom.c (ssa_name_values): New global variable.
3690         (SSA_NAME_VALUE): Define.
3691         (tree_ssa_dominator_optimize): Initialize/free the value-handle array.
3692
3693 2009-04-28  Ira Rosen  <irar@il.ibm.com>
3694
3695         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks):
3696         Use REPORT_VECTORIZED_LOCATIONS instead 
3697         REPORT_VECTORIZED_LOOPS.
3698         * tree-vectorizer.c (vect_verbosity_level): Make static.
3699         (vect_loop_location): Rename to vect_location.
3700         (vect_set_verbosity_level): Update comment.
3701         (vect_set_dump_settings): Use REPORT_VECTORIZED_LOCATIONS
3702         and vect_location.
3703         (vectorize_loops): Fix comment. Use REPORT_VECTORIZED_LOCATIONS
3704         and vect_location. Use REPORT_UNVECTORIZED_LOCATIONS
3705         instead REPORT_UNVECTORIZED_LOOPS.
3706         * tree-vectorizer.h (enum vect_def_type): Rename vect_invariant_def
3707         and vect_loop_def to vect_external_def and vect_internal_def.
3708         (enum verbosity_levels): Rename REPORT_VECTORIZED_LOOPS
3709         and REPORT_UNVECTORIZED_LOOPS to REPORT_VECTORIZED_LOCATIONS and 
3710         REPORT_UNVECTORIZED_LOCATIONS.
3711         (enum vect_relevant): Update comment. Rename vect_unused_in_loop
3712         and vect_used_in_loop and to vect_unused_in_scope and 
3713         vect_used_in_scope.
3714         (STMT_VINFO_RELEVANT_P): Use vect_unused_in_scope.
3715         (vect_verbosity_level): Remove declaration.
3716         (vect_analyze_operations): Likewise.
3717         (vect_analyze_stmt): Declare.
3718         * tree-vect-loop.c (vect_determine_vectorization_factor): Use
3719         REPORT_UNVECTORIZED_LOCATIONS.
3720         (vect_get_loop_niters): Fix indentation.
3721         (vect_analyze_loop_form): Use REPORT_UNVECTORIZED_LOCATIONS.
3722         (vect_analyze_loop_operations): New function.
3723         (vect_analyze_loop): Call vect_analyze_loop_operations instead of
3724         vect_analyze_operations.
3725         (vect_is_simple_reduction): Use new names.
3726         (vectorizable_live_operation, vect_transform_loop): Likewise.
3727         * tree-vect-data-refs.c (vect_check_interleaving): Add a return value
3728         to specify whether the data references can be a part of interleaving
3729         chain.
3730         (vect_analyze_data_ref_dependence): Use new names.
3731         (vect_analyze_data_refs_alignment, vect_analyze_data_refs): Likewise.
3732         (vect_create_addr_base_for_vector_ref): Remove redundant code.
3733         * tree-vect-patterns.c (widened_name_p): Use new names.
3734         (vect_recog_dot_prod_pattern): Likewise.
3735         * tree-vect-stmts.c (vect_stmt_relevant_p): Use new names.
3736         (process_use, vect_mark_stmts_to_be_vectorized, 
3737         vect_model_simple_cost, vect_model_store_cost,
3738         vect_get_vec_def_for_operand, vect_get_vec_def_for_stmt_copy,
3739         vectorizable_call, vectorizable_conversion, vectorizable_assignment,
3740         vectorizable_operation, vectorizable_type_demotion,
3741         vectorizable_type_promotion, vectorizable_store, vectorizable_load,
3742         vectorizable_condition): Likewise.
3743         (vect_analyze_operations): Split into vect_analyze_loop_operations
3744         and ...
3745         (vect_analyze_stmt): ... new function.
3746         (new_stmt_vec_info): Use new names.
3747         (vect_is_simple_use): Use new names and fix comment.
3748         * tree-vect-slp.c (vect_get_and_check_slp_defs): Use new names.
3749         (vect_build_slp_tree, vect_analyze_slp, vect_schedule_slp): Likewise.
3750
3751 2009-04-28  Uros Bizjak  <ubizjak@gmail.com>
3752
3753         PR target/39911
3754         * config/i386/i386.c (print_operand) ['Z']: Handle floating point
3755         and integer modes for x87 operands.  Do not ICE for unsupported size,
3756         generate error instead.  Generate error for unsupported operand types.
3757         ['z']: Do not handle HImode memory operands specially.  Warning
3758         for floating-point operands.  Fallthru to 'Z' for unsupported operand
3759         types.  Do not ICE for unsupported size, generate error instead.
3760         (output_387_binary_op): Use %Z to output operands.
3761         (output_fp_compare): Ditto.
3762         (output_387_reg_move): Ditto.
3763
3764 2009-04-28  Ben Elliston  <bje@au.ibm.com>
3765
3766         PR c++/35652
3767         Revert:
3768
3769         2009-03-27  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3770
3771         * builtins.c (c_strlen): Do not warn here.
3772         * c-typeck.c (build_binary_op): Adjust calls to pointer_int_sum.
3773         * c-common.c (pointer_int_sum): Take an explicit location.
3774         Warn about offsets out of bounds.
3775         * c-common.h (pointer_int_sum): Adjust declaration.
3776
3777 2009-04-27  Ian Lance Taylor  <iant@google.com>
3778
3779         * collect2.c (is_ctor_dtor): Change type of ret field in struct
3780         names to symkind.
3781         * dce.c (run_fast_df_dce): Change type of old_flags to int.
3782         * df-core.c (df_set_flags): Change return type to int.  Change
3783         type of old_flags to int.
3784         (df_clear_flags): Likewise.
3785         * df-scan.c (df_def_record_1): Change 0 to VOIDmode.
3786         (df_get_conditional_uses): Likewise.
3787         * df.h (df_set_flags, df_clear_flags): Update declarations.
3788         * dwarf2out.c (struct indirect_string_node): Change type of form
3789         field to enum dwarf_form.
3790         (AT_string_form): Change return type to enum dwarf_form.
3791         * fixed-value.c (fixed_compare): Add cast to enum type.
3792         * fwprop.c (update_df): Change 0 to VOIDmode.
3793         * gensupport.c: Change 0 to UNKNOWN.
3794         * gimple.h (gimple_cond_code): Add cast to enum type.
3795         * haifa-sched.c (reemit_notes): Add cast to enum type.
3796         * hooks.c (hook_int_void_no_regs): Remove function.
3797         * hooks.h (hook_int_void_no_regs): Remove declaration.
3798         * optabs.c (expand_widen_pattern_expr): Change 0 to VOIDmode.
3799         * predict.c (combine_predictions_for_insn): Add casts to enum type.
3800         * real.c (real_arithmetic): Add cast to enum type.
3801         (real_compare): Likewise.
3802         * target.h (struct gcc_target): Change return type of
3803         branch_target_register_class to enum reg_class.
3804         * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define as
3805         default_branch_target_register_class.
3806         * targhooks.c (default_branch_target_register_class): New function.
3807         * targhooks.h (default_branch_target_register_class): Declare.
3808         * tree-data-ref.c (print_direction_vector): Add cast to enum type.
3809         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Remove
3810         cast to int.
3811         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change 0 to
3812         ERROR_MARK.
3813         * tree-vect-slp.c (vect_build_slp_tree): Change 0 to
3814         vect_uninitialized_def.  Change 0 to ERROR_MARK.
3815         * tree-vect-stmts.c (supportable_widening_operation): Don't
3816         initialize icode1 and icode2.
3817         * tree-vectorizer.h (enum vect_def_type): Add vect_uninitialized_def.
3818         * config/sol2-c.c (cmn_err_length_specs): Change 0 to FMT_LEN_none
3819         and to STD_C89.
3820         (cmn_err_flag_specs): Change 0 to STD_C89.
3821         (cmn_err_char_table): Likewise.
3822         * config/arm/arm.c (get_arm_condition_code): Change type of code
3823         to enum arm_cond_code.
3824         (IWMMXT_BUILTIN): Change 0 to UNKNOWN.
3825         (IWMMXT_BUILTIN2): Likewise.
3826         (neon_builtin_type_bits): Don't define typedef.
3827         (neon_builtin_datum): Change type of bits field to int.
3828         (arm_expand_neon_args): Add cast to enum type.
3829         * config/ia64/ia64.c (tls_symbolic_operand_type): Change 0 to
3830         TLS_MODEL_NONE.
3831         * config/i386/i386.c (bdesc_multi_arg): Change 0 to UNKNOWN.  Add
3832         casts to enum type.
3833         * config/mips/mips.c (LOONGSON_BUILTIN_ALIAS): Change 0 to
3834         MIPS_FP_COND_f.
3835         * config/mips/mips.md (jal_macro): Return enum constant.
3836         (single_insn): Likewise.
3837         * config/rs6000/rs6000.c (bdesc_altivec_preds): Change 0 to
3838         CODE_FOR_nothing.
3839         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3840         casts to enum type.
3841         * config/s390/s390.c (s390_tune_flags): Change type to int.
3842         (s390_arch_flags): Likewise.
3843         (s390_handle_arch_option): Change flags field of struct pta to int.
3844         * config/s390/s390.h (s390_tune_flags): Update declaration.
3845         (s390_arch_flags): Likewise.
3846         * config/sh/sh.c (prepare_move_operands): Compare
3847         tls_symbolic_operand result with enum constant.
3848         (sh_reorg): Change PUT_MODE to PUT_REG_NOTE_KIND.
3849         (sh_expand_prologue): Add cast to enum type.
3850         (sh_expand_epilogue): Likewise.
3851         (tls_symbolic_operand): Change return type to enum tls_model.
3852         (fpscr_set_from_mem): Add cast to enum type.
3853         (legitimize_pic_address): Compare tls_symbolic_operand result with
3854         enum constant.
3855         (sh_target_reg_class): Change return type to enum reg_class.
3856         * config/sh/sh.h (OVERRIDE_OPTIONS): Change CPU_xxx to
3857         PROCESSOR_xxx.
3858         * config/sh/sh-protos.h (tls_symbolic_operand): Update declaration.
3859         * config/sparc/sparc.c (sparc_override_options): Add cast to enum type.
3860         * config/sparc/sparc.md (empty_delay_slot): Return enum constant.
3861         (pic, calls_alloca, calls_eh_return, leaf_function): Likewise.
3862         (delayed_branch, tls_call_delay): Likewise.
3863         (eligible_for_sibcall_delay): Likewise.
3864         (eligible_for_return_delay): Likewise. 
3865         * config/spu/spu.c (expand_builtin_args): Add cast to enum type.
3866         (spu_expand_builtin_1): Likewise.
3867
3868         * c-typeck.c (convert_for_assignment): Issue -Wc++-compat warnings
3869         for all types of conversions.
3870         (output_init_element): Issue -Wc++-compat warning if needed when
3871         initializing a bitfield with enum type.
3872         * c-parser.c (c_parser_expression): Set original_type to
3873         original_type of right hand operand of comman operator.
3874
3875 2009-04-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3876
3877         * doc/c-tree.texi (Types, Functions, Expression trees): Fix
3878         grammar nits.
3879         * doc/cfg.texi (Maintaining the CFG, Liveness information): Likewise.
3880         * doc/cpp.texi (Standard Predefined Macros)
3881         (Implementation-defined behavior): Likewise.
3882         * doc/extend.texi (Function Attributes, Type Attributes): Likewise.
3883         * doc/gimple.texi (GIMPLE Exception Handling)
3884         (@code{GIMPLE_ASSIGN}): Likewise.
3885         * doc/install.texi (Prerequisites, Configuration, Specific): Likewise.
3886         * doc/invoke.texi (Warning Options, Optimize Options)
3887         (AVR Options, Darwin Options): Likewise.
3888         (Optimize Options): Reformulate -fwhole-program description.
3889         * doc/loop.texi (Lambda): Likewise.
3890         * doc/md.texi (Output Template, Define Constraints)
3891         (Standard Names, Insn Splitting): Likewise.
3892         * doc/options.texi (Option properties): Likewise.
3893         * doc/passes.texi (Tree-SSA passes): Likewise.
3894         * doc/rtl.texi (Side Effects, Assembler, Insns): Likewise.
3895         * doc/tm.texi (Register Classes, Old Constraints, Scalar Return)
3896         (File Names and DBX): Likewise.
3897         * doc/trouble.texi (Incompatibilities): Likewise.
3898
3899 2009-04-27  Trevor Smigiel  <trevor_smigiel@playstation.sony.com>