OSDN Git Service

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