OSDN Git Service

e0d22a843072505eca1539f88349556d5e0a744e
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2011-08-18  Vladimir Makarov  <vmakarov@redhat.com>
2
3         PR rtl-optimization/49890
4         * ira-costs.c (setup_regno_cost_classes_by_aclass): Don't exclude
5         subclasses of class which is superset of a pressure class.
6
7 2011-08-18  H.J. Lu  <hongjiu.lu@intel.com>
8             Igor Zamyatin <igor.zamyatin@intel.com>
9
10         * config/i386/i386-c.c (ix86_target_macros_internal): Replace int
11         with HOST_WIDE_INT for isa_flag.
12         (ix86_pragma_target_parse): Replace int with HOST_WIDE_INT for
13         isa variables.
14
15         * config/i386/i386.c (ix86_target_string): Replace int with
16         HOST_WIDE_INT for isa.  Use HOST_WIDE_INT_PRINT to print isa.
17         (ix86_target_opts): Replace int with HOST_WIDE_INT on mask.
18         (pta_flags): Removed.
19         (PTA_XXX): Redefined as (HOST_WIDE_INT_1 << X).
20         (pta): Use HOST_WIDE_INT on flags.
21         (builtin_isa): Use HOST_WIDE_INT on isa.
22         (ix86_add_new_builtins): Likewise.
23         (def_builtin): Use HOST_WIDE_INT on mask.
24         (def_builtin_const): Likewise.
25         (builtin_description): Likewise.
26
27         * config/i386/i386.opt (ix86_isa_flags): Replace int with
28         HOST_WIDE_INT.
29         (ix86_isa_flags_explicit): Likewise.
30         (x_ix86_isa_flags_explicit): Likewise.
31
32 2011-08-17  Vladimir Makarov  <vmakarov@redhat.com>
33
34         PR rtl-optimization/50107
35         * ira-int.h (ira_hard_reg_not_in_set_p): Remove.
36         (ira_hard_reg_in_set_p): New.
37
38         * ira-color.c (calculate_saved_nregs): New.
39         (assign_hard_reg): Use it.  Set up allocated_hard_reg_p for all
40         hard regs.
41         (allocno_reload_assign, fast_allocation): Use
42         ira_hard_reg_set_intersection_p instead of
43         ira_hard_reg_not_in_set_p.
44
45         * ira.c (setup_reg_renumber): Use
46         ira_hard_reg_set_intersection_p instead of
47         ira_hard_reg_not_in_set_p.
48         (setup_allocno_assignment_flags, calculate_allocation_cost): Use
49         ira_hard_reg_in_set_p instead of ira_hard_reg_not_in_set_p.
50
51         * ira-costs.c (ira_tune_allocno_costs): Use
52         ira_hard_reg_set_intersection_p instead of
53         ira_hard_reg_not_in_set_p.
54
55 2011-08-18  H.J. Lu  <hongjiu.lu@intel.com>
56             Igor Zamyatin <igor.zamyatin@intel.com>
57
58         * hwint.h (HOST_WIDE_INT_1): New.
59
60         * opt-functions.awk (switch_bit_fields): Initialize the
61         host_wide_int field.
62         (host_wide_int_var_name): New.
63         (var_type_struct): Check and return HOST_WIDE_INT.
64
65         * opt-read.awk: Handle HOST_WIDE_INT for "Variable".
66
67         * optc-save-gen.awk: Support HOST_WIDE_INT on var_target_other.
68
69         * opth-gen.awk: Use HOST_WIDE_INT_1 on HOST_WIDE_INT.  Properly
70         check masks for HOST_WIDE_INT.
71
72         * opts-common.c (set_option): Support HOST_WIDE_INT flag_var.
73         (option_enabled): Likewise.
74         (get_option_state): Likewise.
75
76         * opts.h (cl_option): Add cl_host_wide_int.  Change var_value
77         to HOST_WIDE_INT.
78
79 2011-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
80             Marc Glisse  <marc.glisse@normalesup.org>
81
82         PR libstdc++-v3/1773
83         * target.def (decl_mangling_context): New C++ hook.
84         * doc/tm.texi: Regenerate.
85         * config/sol2-cxx.c, config/sol2-stubs.c: New files.
86         * config/sol2-protos.h: Group by source file.
87         (solaris_cxx_decl_mangling_context): Declare.
88         * config/sol2.h (TARGET_CXX_DECL_MANGLING_CONTEXT): Define.
89         * config/t-sol2 (sol2-cxx.o, sol2-stubs.o): New targets.
90         Use $<.
91         * config.gcc (*-*-solaris2*): Add sol2-cxx.o to cxx_target_objs.
92         Add sol2-stubs.o to extra_objs.
93
94 2011-08-18  Jakub Jelinek  <jakub@redhat.com>
95
96         PR target/50009
97         * stor-layout.c (update_alignment_for_field): Don't ICE on
98         packed flexible array members if ms_bitfield_layout_p.
99
100         PR target/50092
101         * config/i386/i386.c (assign_386_stack_local): Call validize_mem
102         on the result before returning it.
103
104         PR debug/50017
105         * tree-vect-stmts.c (vect_finish_stmt_generation): If gsi_stmt (*gsi)
106         is a debug stmt, use location of the first non-debug stmt after it.
107
108 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
109
110         * config/arm/arm.c (arm_rtx_costs_1): Don't modify the costs of SET.
111         (arm_size_rtx_costs): Likewise.
112
113 2011-08-18  Richard Guenther  <rguenther@suse.de>
114
115         * tree.h (tree_int_cst_msb): Remove.
116         * tree.c (tree_int_cst_msb): Likewise.
117         (tree_int_cst_sign_bit): Move from ...
118         * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): ... here.
119
120 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
121
122         * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter.
123         * doc/tm.texi: Regenerate.
124         * target.def (rtx_costs): Add an opno parameter.
125         * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with...
126         (hook_bool_rtx_int_int_int_intp_bool_false): ...this.
127         * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with...
128         (hook_bool_rtx_int_int_int_intp_bool_false): ...this.
129         * cse.c (COST_IN): Add an opno parameter.
130         (notreg_cost): Likewise.  Update call to rtx_cost.
131         (COST, fold_rtx): Update accordingly.
132         * dojump.c (prefer_and_bit_test): Update call to rtx_cost.
133         * expmed.c (emit_store_flag): Likewise.
134         * optabs.c (avoid_expensive_constant): Add an opno parameter.
135         Update call to rtx_cost.
136         (expand_binop_directly, expand_binop): Likewise.
137         (expand_twoval_binop, prepare_cmp_insn): Likewise.
138         * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters.
139         (set_src_cost, get_full_set_src_cost): Update accordingly.
140         * rtlanal.c (rtx_cost): Add an opno parameter.  Update call
141         to target hook.
142         (get_full_rtx_cost): Add an opno paramter.  Update calls to rtx_cost.
143         (default_adress_cost): Update calls to rtx_cost.
144
145         * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs)
146         (arm_slowmul_rtx_costs): Adjust calls to rtx_cost.
147         (arm_rtx_costs): Add an opno parameter.
148         * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and
149         adjust any recursive rtx-cost calls.
150         * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise.
151         * config/bfin/bfin.c (bfin_rtx_costs): Likewise.
152         * config/c6x/c6x.c (c6x_rtx_costs): Likewise.
153         * config/cris/cris.c (cris_rtx_costs): Likewise.
154         * config/frv/frv.c (frv_rtx_costs): Likewise.
155         * config/h8300/h8300.c (h8300_rtx_costs): Likewise.
156         * config/i386/i386.c (ix86_rtx_costs): Likewise.
157         * config/ia64/ia64.c (ia64_rtx_costs): Likewise.
158         * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise.
159         * config/lm32/lm32.c (lm32_rtx_costs): Likewise.
160         * config/m32c/m32c.c (m32c_rtx_costs): Likewise.
161         * config/m32r/m32r.c (m32r_rtx_costs): Likewise.
162         * config/m68k/m68k.c (m68k_rtx_costs): Likewise.
163         * config/mcore/mcore.c (mcore_rtx_costs): Likewise.
164         * config/mep/mep.c (mep_rtx_cost): Likewise.
165         * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise.
166         * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost.
167         (mips_zero_extend_cost): Add an opno parameter.
168         * config/mmix/mmix.c (mmix_rtx_costs): Likewise.
169         * config/mn10300/mn10300.c (mn10300_address_cost): Update call
170         to rtx_cost.
171         (mn10300_rtx_costs): Add an opno parameter and adjust any recursive
172         rtx-cost calls.
173         * config/pa/pa.c (hppa_rtx_costs): Likewise.
174         * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise.
175         * config/picochip/picochip.c (picochip_rtx_costs): Likewise.
176         * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise.
177         (rs6000_debug_rtx_costs): Likewise.
178         * config/s390/s390.c (s390_rtx_costs): Likewise.
179         * config/score/score-protos.h (score_rtx_costs): Likewise.
180         * config/score/score.c (score_rtx_costs): Likewise.
181         * config/sh/sh.c (andcosts): Update call to rtx_cost.
182         (sh_rtx_costs): Add an opno parameter.
183         * config/sparc/sparc.c (sparc_rtx_costs): Likewise.
184         * config/spu/spu.c (spu_rtx_costs): Likewise.
185         * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise.
186         * config/v850/v850.c (v850_rtx_costs): Likewise.
187         * config/vax/vax.c (vax_rtx_costs): Likewise.
188         * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise.
189
190 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
191
192         * rtl.h (set_src_cost, get_full_set_src_cost): New functions.
193         * auto-inc-dec.c (attempt_change): Use set_src_cost instead of
194         rtx_cost.
195         * calls.c (precompute_register_parameters): Likewise.
196         * combine.c (expand_compound_operation, make_extraction): Likewise.
197         (force_to_mode, distribute_and_simplify_rtx): Likewise.
198         * dse.c (find_shift_sequence): Likewise.
199         * expmed.c (init_expmed, expand_mult, expand_smod_pow2): Likewise.
200         * expr.c (compress_float_constant): Likewise.
201         * fwprop.c (should_replace_address, try_fwprop_subst): Likewise.
202         * gcse.c (want_to_gcse_p): Likewise.
203         * ifcvt.c (noce_try_sign_mask): Likewise.
204         * loop-doloop.c (doloop_optimize): Likewise.
205         * loop-invariant.c (create_new_invariant): Likewise.
206         * optabs.c (avoid_expensive_constant): Likewise.
207         * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands)
208         (try_replace_in_use, reload_cse_move2add): Likewise.
209         * reload1.c (calculate_elim_costs_all_insns): Likewise.
210         (note_reg_elim_costly): Likewise.
211         * rtlanal.c (insn_rtx_cost): Likewise.
212         * simplify-rtx.c (simplify_binary_operation_1): Likewise.
213         * stmt.c (lshift_cheap_p): Likewise.
214         * tree-ssa-loop-ivopts.c (seq_cost, computation_cost): Likewise.
215         * config/avr/avr.c (final_prescan_insn): Likewise.
216         * config/bfin/bfin.c (bfin_rtx_costs): Likewise.
217         * config/mips/mips.c (mips_binary_cost, mips_rtx_costs): Likewise.
218
219 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
220
221         * rtl.h (set_rtx_cost, get_full_set_rtx_cost): New functions.
222         * auto-inc-dec.c (attempt_change): Use set_rtx_cost.
223         * cfgloopanal.c (seq_cost): Likewise.
224         * loop-invariant.c (create_new_invariant): Likewise.
225         * postreload.c (move2add_use_add2_insn, move2add_use_add3_insn)
226         (reload_cse_move2add): Use get_full_set_rtx_cost.
227
228 2011-08-18  Richard Guenther  <rguenther@suse.de>
229
230         * expr.c (get_inner_reference): Fix typo in last change.
231
232 2011-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
233             Joseph Myers  <joseph@codesourcery.com>
234
235         PR tree-optimization/49963
236         * hwint.c (absu_hwi): Define.
237         * hwint.h (absu_hwi): Declare.
238         * fold-const.c (fold_plusminus_mult_expr): Use absu_hwi instead
239         of abs_hwi.
240         * tree-ssa-math-opts.c (gimple_expand_builtin_pow): Likewise.
241         * tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Likewise.
242
243 2011-08-18  Richard Guenther  <rguenther@suse.de>
244
245         * expr.c (get_inner_reference): Sign-extend the constant
246         twos-complement offset before doing arbitrary precision
247         arithmetic on it.
248         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
249         (get_constraint_for_1): Pass the offset of a MEM_REF unchanged
250         to get_constraint_for_ptr_offset.
251
252 2011-08-17  Kaz Kojima  <kkojima@gcc.gnu.org>
253
254         PR target/50068
255         * config/sh/sh.c (sh_output_mi_thunk): Don't call dbr_schedule.
256
257 2011-08-17  Richard Guenther  <rguenther@suse.de>
258
259         * tree.h (convert_to_ptrofftype_loc): New function.
260         (convert_to_ptrofftype): Define.
261         * builtins.c (expand_builtin_bzero): Use size_type_node.
262         (fold_builtin_bzero): Likewise.
263         (std_gimplify_va_arg_expr): Build the BIT_AND_EXPR on the pointer.
264         * c-typeck.c (build_unary_op): Use convert_to_ptrofftype_loc.
265         * cgraphunit.c (thunk_adjust): Use fold_build_pointer_plus_loc.
266         (cgraph_redirect_edge_call_stmt_to_callee): Use size_int.
267         * expr.c (expand_expr_addr_expr_1): Use fold_build_pointer_plus.
268         * fold-const.c (build_range_check): Negate using the original
269         type.
270         (fold_unary_loc): Use fold_build_pointer_plus_loc.
271         * gimple-fold.c (gimple_adjust_this_by_delta): Use
272         convert_to_ptrofftype.
273         * gimplify.c (gimplify_self_mod_expr): Likewise.
274         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Likewise.
275         (graphite_create_new_loop_guard): Likewise.
276         * graphite-sese-to-poly.c (my_long_long): Remove.
277         (scop_ivs_can_be_represented): Adjust.
278         * tree-cfg.c (verify_gimple_assign_unary): Use ptrofftype_p.
279         * tree-chrec.c (chrec_fold_plus_1): Use fold_build_pointer_plus.
280         * tree-loop-distribution.c (build_size_arg_loc): Use
281         size_type_node.
282         (generate_memset_zero): Simplify.
283         * tree-mudflap.c: Use fold_convert, not convert.
284         * tree-predcom.c (suitable_reference_p): Expand DR_OFFSET in
285         its own type.
286         (determine_offset): Likewise for DR_STEP.
287         (valid_initializer_p): Likewise.
288         * tree-profile.c (prepare_instrumented_value): Convert the pointer
289         to an integer type of same size.
290         * tree-scalar-evolution.c (interpret_rhs_expr): Do not refer
291         to sizetype without need.
292         * tree-ssa-address.c (tree_mem_ref_addr): Likewise.
293         * tree-ssa-loop-ivopts.c (find_bivs): Use convert_to_ptrofftype.
294         * tree-ssa-loop-manip.c (create_iv): Likewise.
295         (determine_exit_conditions): Adjust comment.
296         * tree-ssa-pre.c (create_expression_by_pieces): Use
297         convert_to_ptrofftype.
298         * tree-ssa-structalias.c (get_constraint_for_1): Likewise.
299         * varasm.c (array_size_for_constructor): Compute using double_ints.
300
301 2011-08-16  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
302
303         * config/spu/spu.c (spu_emit_branch_or_set): Avoid reverse tests
304         when generating an integer result where possible.  Short-cut
305         comparison against 0 also for QImode.
306
307 2011-08-16  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
308
309         * config/spu/spu.h (LEGITIMIZE_RELOAD_ADDRESS): New macro.
310         * config/spu/spu-protos.h (spu_legitimize_reload_address): Add
311         prototype.
312         * config/spu/spu.c (spu_legitimize_reload_address): New function.
313         (spu_legitimate_address_p): Do not check displacement if the base
314         is an eliminable stack register.
315
316 2011-08-16  Anatoly Sokolov  <aesok@post.ru>
317
318         * config/m32c/m32c.h (PREFERRED_RELOAD_CLASS,
319         PREFERRED_OUTPUT_RELOAD_CLASS): Remove macro.
320         * config/m32c/m32c-protos.h (m32c_preferred_reload_class,
321         m32c_preferred_output_reload_class): Remove.
322         * config/m32c/m32c.c (m32c_preferred_reload_class): Make static.
323         Change rclass argument and return types to reg_class_t. Use
324         reg_class_subset_p instead of class_sizes.
325         (m32c_preferred_output_reload_class): Make static. Change rclass
326         argument and return types to reg_class_t.
327         (TARGET_PREFERRED_RELOAD_CLASS,
328         TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define.
329
330 2011-08-16  Kai Tietz  <ktietz@redhat.com>
331
332         * config/i386/mingw32.h (GOMP_SELF_SPEC): Add -pthread option.
333
334 2011-08-16  Richard GUenther  <rguenther@suse.de>
335
336         PR tree-optimization/50082
337         * tree-ssa-forwprop.c (combine_cond_expr_cond): Handle overflow
338         warnings here, instead of ...
339         (ssa_forward_propagate_and_combine): ... here.
340         (forward_propagate_into_comparison_1): Adjust.
341         (forward_propagate_into_comparison): Likewise.
342         (forward_propagate_into_gimple_cond): Likewise.
343         (forward_propagate_into_cond): Likewise.
344
345 2011-08-16  Andreas Schwab  <schwab@redhat.com>
346
347         * ggc.h (ggc_alloc_rtvec_sized): Use ggc_alloc_zone_rtvec_def
348         instead of ggc_alloc_zone_vec_rtvec_def.
349
350 2011-08-16  Richard Guenther  <rguenther@suse.de>
351
352         * tree.h (ptrofftype_p): New helper function.
353         * tree-cfg.c (verify_expr): Use ptrofftype_p for POINTER_PLUS_EXPR
354         offset verification.
355         (verify_gimple_assign_binary): Likewise.
356         * tree.c (build2_stat): Likewise.
357         * tree-chrec.c (chrec_fold_plus_poly_poly): Likewise.
358         (reset_evolution_in_loop): Likewise.
359         * tree-chrec.h (build_polynomial_chrec): Likewise.
360
361 2011-08-16  Liang Wang  <lwang1@marvell.com>
362
363         * ggc.h (ggc_alloc_rtvec_sized): Change arguments of
364         ggc_alloc_zone_vec_rtvec_def.
365
366 2011-08-16  Richard Guenther  <rguenther@suse.de>
367
368         * tree-vrp.c (extract_range_from_multiplicative_op_1): New
369         helper factored out from ...
370         (extract_range_from_binary_expr_1): ... here.  Re-structure
371         to not glob handling too different tree codes.
372
373 2011-08-15  Richard Henderson  <rth@redhat.com>
374
375         PR middle-end/50006
376         * explow.c (allocate_dynamic_stack_space): Move suppress_reg_args_size
377         setting out to include allocate_stack named pattern as well.
378         * builtins.c (expand_builtin_apply): Add ARG_SIZE 0 note.
379         * stmt.c (expand_stack_restore): Likewise.
380
381 2011-08-15  Richard Guenther  <rguenther@suse.de>
382
383         PR middle-end/50082
384         * fold-const.c (maybe_canonicalize_comparison_1): Properly
385         convert the modified operand to the other operand type.
386         (fold_comparison): Call maybe_canonicalize_comparison_1 with
387         useless conversions stripped from comparison operands.
388
389 2011-08-15  Richard Guenther  <rguenther@suse.de>
390
391         * tree-vrp.c (value_range_nonnegative_p): Fix anti-range case.
392         (extract_range_from_unary_expr_1): Restructure.
393
394 2011-08-15  Richard Guenther  <rguenther@suse.de>
395
396         PR tree-optimization/50058
397         * tree-ssa-sccvn.c (vn_reference_lookup_3): Relax aggregate
398         copy matching.
399
400 2011-08-15  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
401
402         PR target/50022
403         * config/arm/arm.c (output_move_double): Add 2 parameters
404         to count the number of insns emitted and whether to emit or not.
405         Use the flag to decide when to emit and count number of instructions
406         that will be emitted.
407         Handle case where output_move_double might be called for calculating
408         lengths with an invalid constant.
409         (arm_count_output_move_double_insns): Define.
410         * config/arm/arm-protos.h (arm_count_output_move_double_insns): Declare.
411         (output_move_double): Adjust prototype.
412         * config/arm/vfp.md ("*movdi_vfp"): Adjust call to
413         output_move_double.
414         ("*movdi_vfp_cortexa8"): Likewise and add attribute
415         for ce_count.
416         * config/arm/arm.md ("*arm_movdi"): Adjust call to output_move_double.
417         ("*movdf_soft_insn"): Likewise.
418         * config/arm/cirrus.md ("*cirrus_arm_movdi"): Likewise.
419         ("*cirrus_thumb2_movdi"): Likewise.
420         ("*thumb2_cirrus_movdf_hard_insn"): Likewise.
421         ("*cirrus_movdf_hard_insn"): Likewise.
422         * config/arm/neon.md (*neon_mov<mode> VD): Likewise.
423         * config/arm/iwmmxt.md ("*iwmmxt_arm_movdi"): Likewise.
424         ("mov<mode>_internal VMMX"): Likewise.
425         * config/arm/fpa.md (*movdf_fpa, *thumb2_movdf_fpa): Likewise.
426
427 2011-08-14  Uros Bizjak  <ubizjak@gmail.com>
428
429         * config/i386/i386.c (ix86_expand_round_sse4): New function.
430         * config/i386/i386-protos.h (ix86_expand_round_sse4): New prototype.
431         * config/i386/i386.md (round<mode>2): Use ix86_expand_round_sse4
432         for TARGET_ROUND.
433
434         (rint<mode>2): Simplify TARGET_ROUND check.
435         (floor<mode>2): Ditto.
436         (ceil<mode>2): Ditto.
437         (btrunc<mode>2): Ditto.
438
439 2011-08-14  Anatoly Sokolov  <aesok@post.ru>
440
441         * config/mmix/mmix.c (TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Redefine
442         as mmix_preferred_output_reload_class.
443
444 2011-08-14  Georg-Johann Lay  <avr@gjlay.de>
445
446         * PR target/49903
447         * config/avr/avr.md (UNSPEC_IDENTITY): New c_enum.
448         (branch_unspec): New insn.
449         (branch): Beauty farm.
450         * config/avr/avr.c (compare_condition): Use JUMP_P.  Test SET_SRC
451         to be IF_THEN_ELSE.
452         (avr_compare_pattern, avr_reorg_remove_redundant_compare):
453         New static functions.
454         (avr_reorg): Use them.  Use next_real_insn instead of NEXT_INSN.
455         Use CONST_INT_P.  Beauty.
456
457 2011-08-12  Richard Henderson  <rth@redhat.com>
458
459         PR rtl-opt/49994
460         * sched-init.h (struct deps_desc): Add sched_before_next_jump.
461         * sched-deps.c (init_deps): Clear it.
462         (deps_analyze_insn): Consume it.
463         (sched_analyze_insn): Fill it.
464
465 2011-08-12  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
466
467         PR target/48328
468         * config/arm/arm.h (CASE_VECTOR_SHORTEN_MODE): Fix distance
469         for tbh instructions.
470
471 2011-08-12   Diego Novillo  <dnovillo@google.com>
472
473         * data-streamer.h (streamer_write_zero): Rename from output_zero.
474         (streamer_write_uhwi): Rename from lto_output_uleb128.
475         (streamer_write_hwi): Rename from output_sleb128.
476         (streamer_write_string): Rename from lto_output_string.
477         (streamer_string_index): Rename from lto_string_index.
478         (streamer_write_string_with_length): Rename from
479         lto_output_string_with_length.
480         (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream.
481         (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream.
482         (streamer_read_string): Rename from lto_input_string.
483         (streamer_read_indexed_string): Rename from input_string_internal.
484         (streamer_read_uhwi): Rename from lto_input_uleb128.
485         (streamer_read_hwi): Rename from lto_input_sleb128.
486         (streamer_write_hwi_in_range): Rename from lto_output_int_in_range.
487         (streamer_read_hwi_in_range): Rename from lto_input_int_in_range.
488         (streamer_write_enum): Rename from lto_output_enum.
489         (streamer_read_enum): Rename from lto_input_enum.
490         (streamer_write_record_start): Rename from output_record_start.
491         (streamer_read_record_start): Rename from input_record_start.
492         (streamer_write_bitpack): Rename from lto_output_bitpack.
493         (streamer_read_bitpack): Rename from lto_input_bitpack.
494         (streamer_write_char_stream): Rename from lto_output_1_stream.
495         (streamer_read_uchar): Rename from lto_input_1_unsigned.
496         * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d.
497         (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p.
498         (streamer_read_string_cst): Rename from input_string_cst.
499         (streamer_read_chain): Rename from lto_input_chain.
500         (streamer_alloc_tree): Rename from lto_materialize_tree.
501         (streamer_read_tree_body): Rename from lto_input_tree_pointers.
502         (streamer_get_pickled_tree): Rename from lto_get_pickled_tree.
503         (streamer_get_builtin_tree): Rename from lto_get_builtin_tree.
504         (streamer_read_integer_cst): Rename from lto_input_integer_cst.
505         (streamer_read_tree_bitfields): Rename from tree_read_bitfields.
506         (streamer_write_chain): Rename from lto_output_chain.
507         (streamer_write_tree_header): Rename from lto_output_tree_header.
508         (streamer_pack_tree_bitfields): Rename from pack_value_fields.
509         (streamer_write_tree_body): Rename from lto_output_tree_pointers.
510         (streamer_write_integer_cst): Rename from lto_output_integer_cst.
511         (streamer_write_builtin): Rename from lto_output_builtin_tree.
512         (streamer_check_handled_ts_structures): Rename from
513         check_handled_ts_structures.
514         (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert.
515         (streamer_tree_cache_insert_at): Rename from
516         lto_streamer_cache_insert_at.
517         (streamer_tree_cache_append): Rename from lto_streamer_cache_append.
518         (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup.
519         (streamer_tree_cache_get): Rename from lto_streamer_cache_get.
520         (streamer_tree_cache_create): Rename from lto_streamer_cache_create.
521         (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete.
522         * tree-streamer-out.c (write_string_cst): Rename from output_string_cst.
523         (write_identifier): Rename from output_identifier.
524         (write_ts_common_tree_pointers): Rename from
525         lto_output_ts_common_tree_pointers.
526         (write_ts_vector_tree_pointers): Rename from
527         lto_output_ts_vector_tree_pointers.
528         (write_ts_complex_tree_pointers): Rename from
529         lto_output_ts_complex_tree_pointers.
530         (write_ts_decl_minimal_tree_pointers): Rename from
531         lto_output_ts_decl_minimal_tree_pointers.
532         (write_ts_decl_common_tree_pointers): Rename from
533         lto_output_ts_decl_common_tree_pointers.
534         (write_ts_decl_non_common_tree_pointers): Rename from
535         lto_output_ts_decl_non_common_tree_pointers.
536         (write_ts_decl_with_vis_tree_pointers): Rename from
537         lto_output_ts_decl_with_vis_tree_pointers.
538         (write_ts_field_decl_tree_pointers): Rename from
539         lto_output_ts_field_decl_tree_pointers.
540         (write_ts_function_decl_tree_pointers): Rename from
541         lto_output_ts_function_decl_tree_pointers.
542         (write_ts_type_common_tree_pointers): Rename from
543         lto_output_ts_type_common_tree_pointers.
544         (write_ts_type_non_common_tree_pointers): Rename from
545         lto_output_ts_type_non_common_tree_pointers.
546         (write_ts_list_tree_pointers): Rename from
547         lto_output_ts_list_tree_pointers.
548         (write_ts_vec_tree_pointers): Rename from
549         lto_output_ts_vec_tree_pointers.
550         (write_ts_exp_tree_pointers): Rename from
551         lto_output_ts_exp_tree_pointers.
552         (write_ts_block_tree_pointers): Rename from
553         lto_output_ts_block_tree_pointers.
554         (write_ts_binfo_tree_pointers): Rename from
555         lto_output_ts_binfo_tree_pointers.
556         (write_ts_constructor_tree_pointers): Rename from
557         lto_output_ts_constructor_tree_pointers.
558         (write_ts_target_option): Rename from lto_output_ts_target_option.
559         (write_ts_translation_unit_decl_tree_pointers): Rename from
560         lto_output_ts_translation_unit_decl_tree_pointers.
561         * tree-streamer.c (streamer_tree_cache_add_to_node_array):
562         Rename from lto_streamer_cache_add_to_node_array.
563         (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1.
564         (record_common_node): Rename from lto_record_common_node.
565
566         * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward
567         declarations.
568         * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused
569         function.
570         * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove
571         unused function.
572         * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H.
573         (ipa-reference.o): Likewise.
574         * lto-section-out.c: Include data-streamer.h.
575         * ipa-reference.c: Include data-streamer.h.
576
577 2011-08-12  Nick Clifton  <nickc@redhat.com>
578
579         * builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern.
580         * doc/md.texi (cmpstrn): Note that the comparison stops if both
581         fetched bytes are zero.
582         (cmpstr): Likewise.
583         (cmpmem): Note that the comparison does not stop if both of the
584         fetched bytes are zero.
585
586 2011-08-12  Uros Bizjak  <ubizjak@gmail.com>
587
588         * builtins.def (BUILT_IN_ICEIL{,F,L}, BUILT_IN_IFLOOR{,F,L}
589         BUILT_IN_IRINT{,F,L}, BUILT_IN_IROUND{,F,L}: New builtin definitions.
590         * convert.c (convert_to_integer): Convert to BUILT_IN_ICEIL,
591         BUILT_IN_IFLOOR, BUILT_IN_IRINT or BUILT_INT_IROUND when converting
592         to integer_type_node.
593         * fold-const.c (tree_call_nonnegative_warnv_p): Handle BUILT_IN_ICEIL,
594         BUILT_IN_IFLOOR, BUILT_IN_IRINT and BUILT_INT_IROUND.
595         * builtins.c (expand_builtin_in): Ditto.
596         (mathfn_built_in_1): Ditto.
597         (expand_builtin_int_roundingfn): Handle BUILT_IN_ICEIL and
598         BUILT_IN_IFLOOR.
599         (expand_builtin_int_roundingfn_2): Handle BUILT_IN_IRINT and
600         BUILT_IN_IROUND.
601         (fold_fixed_mathfn): Canonicalize BUILT_IN_ICEIL, BUILTIN_IN_IFLOOR
602         BUILT_IN_IRINT and BUILT_IN_IROUND to BUILT_IN_LCEIL,
603         BUILTIN_IN_LFLOOR, BUILT_IN_LRINT and BUILT_IN_LROUND on ILP32 targets.
604
605 2011-08-12  Richard Guenther  <rguenther@suse.de>
606
607         * tree-vrp.c (extract_range_from_unary_expr_1): Implement
608         -X as 0 - X.
609
610 2011-08-12  Romain Geissler  <romain.geissler@gmail.com>
611
612         * Makefile.in (PLUGIN_HEADERS): Add C_TREE_H.
613
614 2011-08-12  Richard Sandiford  <rdsandiford@googlemail.com>
615
616         * config/arm/arm.c (get_label_padding): New function.
617         (create_fix_barrier, arm_reorg): Use it.
618
619 2011-08-11  Uros Bizjak  <ubizjak@gmail.com>
620
621         PR target/49781
622         * config/i386/i386.md (*lea_5_zext): New.
623         (*lea_6_zext): Ditto.
624         * config/i386/predicates.md (const_32bit_mask): New predicate.
625         (lea_address_operand): Reject AND.
626         * config/i386/i386.c (ix86_decompose_address): Allow Dimode AND with
627         const_32bit_mask immediate.
628         (ix86_print_operand_address): Handle AND.
629         (memory_address_length): Ditto.
630
631 2011-08-11  Romain Geissler  <romain.geissler@gmail.com>
632             Brian Hackett  <bhackett1024@gmail.com>
633
634         * plugin.def: Add event for finish_decl.
635         * plugin.c (register_callback, invoke_plugin_callbacks): Same.
636         * c-decl.c (finish_decl): Invoke callbacks on above event.
637         * doc/plugins.texi: Document above event.
638
639 2011-08-11  Richard Guenther  <rguenther@suse.de>
640
641         * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid redundant
642         lookups, make looking through aggregate copies stronger.
643
644 2011-08-11  Richard Henderson  <rth@redhat.com>
645
646         PR bootstrap/50018
647         * expr.c (fixup_args_size_notes): Accept and ignore normal calls.
648
649 2011-08-11  Richard Guenther  <rguenther@suse.de>
650
651         * lto-cgraph.c (input_node): Use DECL_BUILT_IN.
652         * tree-vrp.c (stmt_interesting_for_vrp): Likewise.
653         (vrp_visit_stmt): Likewise.
654
655 2011-08-11  Richard Guenther  <rguenther@suse.de>
656
657         PR middle-end/50040
658         * gimplify.c (gimplify_modify_expr_complex_part): Mark the
659         load of the other piece with TREE_NO_WARNING.
660         * tree-flow.h (warn_uninit): Adjust prototype.
661         * tree-ssa.c (warn_uninit): Take uninitialized SSA name,
662         the base variable and the expression that is used separately.
663         Properly query all TREE_NO_WARNING flags.
664         (struct walk_data): Remove.
665         (warn_uninitialized_var): Likewise.
666         (warn_uninitialized_vars): Do not walk gimple pieces but simply
667         look at all SSA uses of the statement.  Handle unused memory
668         separately.
669         * tree-ssa-uninit.c (warn_uninitialized_phi): Adjust.
670
671 2011-08-11   Kazuhiro Inaoka  <kazuhiro.inaoka.ud@renesas.com>
672
673         * config/rx/rx.md (movsicc): Allow register to register transfers.
674         (*movsicc): Likewise.
675         (*stcc): Restrict this pattern to EQ and NE compares.
676         (*stcc_reg): New pattern.  Works for any comparison but only for
677         register transfers.
678
679 2011-08-11   Diego Novillo  <dnovillo@google.com>
680
681         * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers):
682         Call stream_write_tree instead of output_record_start.
683         (lto_output_ts_binfo_tree_pointers): Likewise.
684
685         * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h.
686         Convert it to a macro.
687         (stream_read_tree): Likewise.
688
689         * lto-streamer.h (lto_stream_as_builtin_p): Move ...
690         * tree-streamer.h (lto_stream_as_builtin_p): ... here.
691
692         * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append
693         and tree_read_bitfields.
694         * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c
695         (lto_write_tree): Call it.
696         * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c
697         * streamer-hooks.h (struct streamer_hooks): Remove fields
698         name, is_streamable and alloc_tree. Update all users.
699         * tree-streamer-in.c (tree_read_bitfields): Factor out of ...
700         (lto_materialize_tree): ... here.
701         Handle CALL_EXPR codes.
702         Remove call to lto_streamer_cache_append.
703         * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes.
704         * tree-streamer.h (tree_read_bitfields): Declare.
705
706         * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H.
707         (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H.
708         * tree-streamer.h (stream_read_tree): New.  Replace all calls
709         to lto_input_tree with it.
710         (stream_write_tree): New.  Replace all calls to lto_output_tree,
711         lto_output_tree_ref and lto_output_tree_or_ref with it.
712         * lto-streamer-in.c (lto_read_tree): Inline code from
713         lto_streamer_read_tree.
714         (lto_input_tree): Move from tree-streamer-in.c.
715         * lto-streamer-out.c (lto_output_tree_ref): Make static.
716         Remove handling of NULL values for EXPR.
717         Do not handle EXPRs that are not indexable.
718         (lto_write_tree): Move from tree-streamer-out.c.
719         Inline lto_streamer_write_tree.
720         (lto_output_tree): Move from tree-streamer-out.c.
721         If REF_P is true and EXPR is indexable, call lto_output_tree_ref.
722         * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c.
723         (lto_preload_common_nodes): Likewise.
724         Remove assertions and adjustments for nodes
725         main_identifier_node, ptrdiff_type_node and fileptr_type_node.
726         (lto_streamer_hooks_init): Set streamer_hooks.write_tree to
727         lto_output_tree and streamer_hooks.read_tree to lto_input_tree.
728         * lto-streamer.h (lto_input_tree): Declare.
729         (lto_output_tree_ref): Remove.
730         * streamer-hooks.h (struct streamer_hooks): Remove fields
731         preload_common_nodes, indexable_with_decls_p,
732         pack_value_fields, unpack_value_fields and output_tree_header.
733         Update all users.
734         * tree-streamer-in.c (lto_materialize_tree): Make extern.
735         (lto_input_tree_pointers): Likewise.
736         (lto_read_tree): Move to lto-streamer-in.c.
737         (lto_input_integer_cst): Make extern.
738         (lto_get_pickled_tree): Likewise.
739         (lto_get_builtin_tree): Likewise.
740         (lto_input_tree): Move to lto-streamer-in.c.
741         * tree-streamer-out.c (pack_value_fields): Make extern.
742         (lto_output_tree_or_ref): Remove.  Replace all callers with
743         calls to stream_write_tree.
744         (lto_output_builtin_tree): Make extern.
745         (lto_streamer_write_tree): Inline into lto_write_tree.
746         (lto_output_tree_pointers): Make extern.
747         (lto_output_tree_header): Likewise.
748         (lto_output_integer_cst): Likewise.
749         (lto_write_tree): Move to lto-streamer-out.c.
750         (lto_output_tree): Likewise.
751         * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c
752         (preload_common_nodes): Likewise.
753         (lto_streamer_cache_create): Call it.
754         * tree-streamer.h: Include streamer-hooks.h.
755         (stream_write_tree): New.
756         (stream_read_tree): New.
757         (lto_input_tree): Remove.
758         (lto_materialize_tree): Declare.
759         (lto_input_tree_pointers): Declare.
760         (lto_get_pickled_tree): Declare.
761         (lto_get_builtin_tree): Declare.
762         (lto_input_integer_cst): Declare.
763         (lto_output_tree_header): Declare.
764         (pack_value_fields): Declare.
765         (lto_output_tree_pointers): Declare.
766         (lto_output_integer_cst): Declare.
767         (lto_output_builtin_tree): Declare.
768
769 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
770
771         * sel-sched-ir.c (has_dependence_note_reg_use): Call ds_full_merge
772         only if producer writes to the register given by regno.
773
774 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
775             Alexander Monakov  <amonakov@ispras.ru>
776
777         * sched-deps.c (sched_get_condition_with_rev): Rename to ...
778         (sched_get_condition_with_rev_uncached): ... this.  Factor out
779         condition caching logic into ...
780         (sched_get_condition_with_rev): ... this.  Reimplement.  Do not
781         attempt to use cache for instructions with zero luid.
782         (sched_analyze_insn): Use INSN_CACHED_COND instead of INSN_COND.
783         * sched-int.h (INSN_COND): Rename to INSN_CACHED_COND.
784
785 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
786
787         * sel-sched-ir.c (get_seqno_of_a_pred): Rename to
788         get_seqno_for_a_jump.  Update the caller.
789         (get_seqno_by_succs): New.  Use it ...
790         (get_seqno_for_a_jump): ... here to find a seqno if looking at
791         predecessors was not sufficient.
792         (get_seqno_by_preds): Include head in iteration range, exclude insn.
793
794 2011-08-11  Dmitry Melnik  <dm@ispras.ru>
795
796         * sel-sched-ir.c (invalidate_av_set): Remove the assert.
797
798 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
799
800         * sel-sched-ir.h (register_unavailable_p): Declare.
801         * sel-sched-ir.c (register_unavailable_p): New.  Use it...
802         (set_unavailable_target_for_expr): ... here to properly test
803         availability of a register.
804         (speculate_expr): Ditto.
805         * sel-sched.c (substitute_reg_in_expr): Ditto.
806         (av_set_could_be_blocked_by_bookkeeping_p): Ditto.
807
808 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
809
810         * sel-sched.c (verify_target_availability): Fix usage of
811         hard_regno_nregs.
812
813 2011-08-11  Dmitry Melnik  <dm@ispras.ru>
814
815         * sel-sched-ir.c (init_global_and_expr_for_insn): Forbid copying of
816         recognized by cannot_copy_insn_p hook and volatile instructions.
817
818 2011-08-11  Dmitry Melnik  <dm@ispras.ru>
819
820         * sel-sched-ir.c (merge_expr_data): Take maximum spec.
821
822 2011-08-11  Richard Sandiford  <richard.sandiford@linaro.org>
823
824         * doc/md.texi (define_bypass): Say that the instruction names can
825         be filename-style globs.
826         * Makefile.in (FNMATCH_H): Define.
827         (build/genattrtab.o, build/genautomata.o): Depend on $(FNMATCH_H).
828         * genattrtab.c: Include fnmatch.h.
829         (bypass_list): Change field name from "insn" to "pattern".
830         (gen_bypass_1): Update accordingly.
831         (process_bypasses): Use fnmatch to check for matches between
832         insn reservations and define_bypasses.
833         * genautomata.c: Include fnmatch.h.
834         (bypass_decl): Rename in_insn_name and out_insn_name to in_pattern
835         and out_pattern respectively.
836         (gen_bypass, insert_bypass): Update accordingly.
837         (for_each_matching_insn, process_bypass_2, process_bypass_1)
838         (process_bypass): New functions.
839         (process_decls): Use process_bypass.  Update after field name changes.
840
841 2011-08-11  Georg-Johann Lay  <avr@gjlay.de>
842
843         PR target/49687
844         * config/avr/avr.md (smulqi3_highpart): New insn.
845         (umulqi3_highpart): New insn.
846         (*subqi3.ashiftrt7): New insn.
847         (smulhi3_highpart): New expander.
848         (umulhi3_highpart): Nex expander.
849         (*smulhi3_highpart_call): New insn.
850         (*umulhi3_highpart_call): New insn.
851         (extend_u): New code attribute.
852         (extend_prefix): Rename code attribute to extend_su.
853         * config/avr/avr.c (avr_rtx_costs): Report costs of highpart of
854         widening QI/HI multiply.
855
856 2011-08-11  Ira Rosen  <ira.rosen@linaro.org>
857
858         PR tree-optimization/50039
859         * tree-vect-patterns.c (vect_operation_fits_smaller_type): Check
860         that DEF_STMT has a stmt_vec_info.
861
862 2011-08-10  Richard Guenther  <rguenther@suse.de>
863
864         * tree.h (can_trust_pointer_alignment): Remove.
865         * builtins.c (can_trust_pointer_alignment): Remove.
866
867 2011-08-10  Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
868
869         * c-typeck.c (scalar_to_vector): New function. Try scalar to
870         vector conversion.
871         (stv_conv): New enum for scalar_to_vector return type.
872         (build_binary_op): Adjust.
873         * doc/extend.texi: Description of scalar to vector expansion.
874
875 2011-08-10  Richard Guenther  <rguenther@suse.de>
876
877         * tree.h (get_pointer_alignment): Remove max-align argument.
878         (get_object_alignment): Likewise.
879         * builtins.c (get_object_alignment_1): Adjust.
880         (get_object_alignment): Remove max-align argument.
881         (get_pointer_alignment): Likewise.
882         (expand_builtin_strlen): Adjust.
883         (expand_builtin_memcpy): Likewise.
884         (expand_builtin_mempcpy_args): Likewise.
885         (expand_builtin_strncpy): Likewise.
886         (expand_builtin_memset_args): Likewise.
887         (expand_builtin_memcmp): Likewise.
888         (expand_builtin_strcmp): Likewise.
889         (expand_builtin_strncmp): Likewise.
890         (get_builtin_sync_mem): Likewise.
891         (fold_builtin_memset): Likewise.
892         (fold_builtin_memory_op): Likewise.
893         (expand_builtin_memory_chk): Likewise.
894         * emit-rtl.c (get_mem_align_offset): Likewise.
895         (set_mem_attributes_minus_bitpos): Likewise.
896         * expr.c (expand_assignment): Likewise.
897         (expand_expr_real_1): Likewise.
898         * tree-sra.c (tree_non_mode_aligned_mem_p): Likewise.
899         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
900         * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Likewise.
901         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
902         * value-prof.c (gimple_stringops_transform): Likewise.
903
904 2011-08-10  Paulo J. Matos  <paulo.matos@csr.com>
905
906         * doc/tm.texi.in (CLASS_MAX_NREGS): Fix typo.
907         * doc/tm.texi: Regenerate.
908
909 2011-08-10  Georg-Johann Lay  <avr@gjlay.de>
910
911         PR target/29560
912         * config/avr/avr.md (*ashlhiqi3): New insn-and-split.
913         (*ashl<extend_prefix>qihiqi3): New insn-and-splits.
914         (*ashl<extend_prefix>qihiqi3.mem): New insn-and-splits.
915         Add peephole2 to map ashlhi3 to ashlqi3 if high part of
916         shift target is unused.
917
918 2011-08-10  Richard Guenther  <rguenther@suse.de>
919
920         PR tree-optimization/49937
921         * tree-ssa-ccp.c (get_value_from_alignment): Re-implement
922         using get_object_alignment_1.
923
924 2011-08-09  Uros Bizjak  <ubizjak@gmail.com>
925
926         * config/i386/i386.c (ix86_emit_i387_round): New function.
927         * config/i386/i386-protos.h (ix86_emit_i387_round): Declare.
928         * config/i386/i386.md (round<mode>2): Use X87MODEF mode iterator.
929         Use ix86_emit_i387_round to expand round function for i387 math.
930         (lround<X87MODEF:mode><SWI248x:mode>2): Use X87MODEF mode iterator.
931         Use ix86_emit_i387_round to expand {l,ll}round function for i387 math.
932
933 2011-08-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
934
935         * config/sync.c: Move to ../libgcc.
936         * Makefile.in (libgcc.mvars): Remove LIBGCC_SYNC, LIBGCC_SYNC_CFLAGS.
937         * config/mips/t-libgcc-mips16 (LIBGCC_SYNC, LIBGCC_SYNC_CFLAGS):
938         Remove.
939
940 2011-08-09  Anatoly Sokolov  <aesok@post.ru>
941
942         * config/mmix/mmix.h (REGISTER_MOVE_COST): Remove macro.
943         * config/mmix/mmix-protos.h (mmix_register_move_cost): Remove.
944         * config/mmix/mmix.c (mmix_register_move_cost): Make static.
945         Change 'from' and 'to' arguments type to reg_class_t.
946         (TARGET_REGISTER_MOVE_COST): Define.
947
948 2011-08-09  Vladimir Makarov  <vmakarov@redhat.com>
949
950         PR target/50026
951         Revert:
952         PR rtl-optimization/49990
953         * ira-costs.c (print_allocno_costs, print_pseudo_costs): Don't
954         ignore classes which can not change mode.
955         (find_costs_and_classes): Ditto.
956
957 2011-08-09  Richard Guenther  <rguenther@suse.de>
958
959         * tree-vrp.c (zero_nonzero_bits_from_vr): Also return precise
960         information for ranges with only negative values.
961         (extract_range_from_binary_expr_1): Adjust BIT_IOR_EXPR and
962         BIT_AND_EXPR handling to handle ranges with negative values.
963
964 2011-08-09  Kirill Yukhin  <kirill.yukhin@intel.com>
965
966         * config/i386/i386.c: Remove traling spaces.
967         * config/i386/sse.md: Likewise.
968         (*fma_fmadd_<mode>): Fix insn alternative 1 mnemonic.
969         (*fma_fmsub_<mode>): Likewise.
970         (*fma_fnmadd_<mode>): Likewise.
971         (*fma_fnmsub_<mode>): Likewise.
972
973 2011-08-09  Nick Clifton  <nickc@redhat.com>
974
975         * config/rx/rx.md: Disable extender peepholes at -O3.
976
977 2011-08-09  Uros Bizjak  <ubizjak@gmail.com>
978
979         PR target/49781
980         * config/i386/i386.md (reload_noff_load): New.
981         (reload_noff_store): Ditto.
982         * config/i386/i386.c (ix86_secondary_reload): Use
983         CODE_FOR_reload_noff_load and CODE_FOR_reload_noff_store to handle
984         double-word moves from/to non-offsetable addresses instead of
985         generating XMM temporary.
986
987 2011-08-09  Anatoly Sokolov  <aesok@post.ru>
988
989         * config/mmix/mmix.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Remove.
990
991 2011-08-09  Ira Rosen  <ira.rosen@linaro.org>
992
993         PR tree-optimization/50014
994         * tree-vect-loop.c (vectorizable_reduction): Get def type before
995         calling vect_get_vec_def_for_stmt_copy ().
996
997 2011-08-08  Vladimir Makarov  <vmakarov@redhat.com>
998
999         PR rtl-optimization/49990
1000         * ira-costs.c (print_allocno_costs, print_pseudo_costs): Don't
1001         ignore classes which can not change mode.
1002         (find_costs_and_classes): Ditto.
1003
1004 2011-08-08  Richard Henderson  <rth@redhat.com>
1005
1006         PR middle-end/49990
1007         * config/i386/i386.c (ix86_expand_prologue): Call
1008         for SEH target gen_prologue_use instead of gen_blockage
1009         at prologue's end.
1010
1011 2011-08-08  Martin Jambor  <mjambor@suse.cz>
1012
1013         PR middle-end/49923
1014         * tree-sra.c (access_precludes_ipa_sra_p): Also check access
1015         memory alignment.
1016
1017 2011-08-08   Diego Novillo  <dnovillo@google.com>
1018
1019         * Makefile.in (LTO_STREAMER_H): Add DIAGNOSTIC_H.
1020         (DATA_STREAMER_H): New.
1021         (GIMPLE_STREAMER_H): New.
1022         (TREE_STREAMER_H): New.
1023         (STREAMER_HOOKS_H): New.
1024         (OBJS): Add data-streamer.o, data-streamer-in.o, data-streamer-out.o,
1025         gimple-streamer-in.o, gimple-streamer-out.o, streamer-hooks.o,
1026         tree-streamer.o, tree-streamer-in.o and tree-streamer-out.o.
1027         (data-streamer.o): New.
1028         (data-streamer-in.o): New.
1029         (data-streamer-out.o): New.
1030         (gimple-streamer-in.o): New.
1031         (gimple-streamer-out.o): New.
1032         (streamer-hooks.o): New.
1033         (tree-streamer.o): New.
1034         (tree-streamer-in.o): New.
1035         (tree-streamer-out.o): New.
1036         (lto-cgraph.o): Add dependency on DATA_STREAMER_H and TREE_STREAMER_H.
1037         (lto-streamer-in.o): Add dependency on DATA_STREAMER_H,
1038         GIMPLE_STREAMER_H and TREE_STREAMER_H.
1039         (lto-streamer-out.o): Add dependency on DATA_STREAMER_H,
1040         GIMPLE_STREAMER_H and TREE_STREAMER_H.
1041         (lto-streamer.o): Add dependency on STREAMER_HOOKS_H.
1042         (ipa-prop.o): Add dependency on DATA_STREAMER_H and TREE_STREAMER_H.
1043         (ipa-inline-analysis.o): Likewise.
1044         (ipa-pure-const.o): Likewise.
1045         * data-streamer-in.c: New.
1046         * data-streamer-out.c: New.
1047         * data-streamer.c: New.
1048         * data-streamer.h: New.
1049         * gimple-streamer-in.c: New.
1050         * gimple-streamer-out.c: New.
1051         * gimple-streamer.h: New.
1052         * ipa-inline-analysis.c: Include data-streamer.h.
1053         * ipa-prop.c: Include data-streamer.h.
1054         * ipa-pure-const.c: Include data-streamer.h.
1055         * lto-cgraph.c: Include data-streamer.h.
1056         * lto-section-in.c (lto_input_uleb128): Move to data-streamer-in.c.
1057         (lto_input_widest_uint_uleb128): Likewise.
1058         (lto_input_sleb128): Likewise.
1059         (bp_unpack_var_len_unsigned): Likewise.
1060         (bp_unpack_var_len_int): Likewise.
1061         * lto-section-out.c (lto_output_uleb128_stream): Move to
1062         data-streamer-out.c.
1063         (lto_output_widest_uint_uleb128_stream): Likewise.
1064         (lto_output_sleb128_stream): Likewise.
1065         (bp_pack_var_len_unsigned): Likewise.
1066         (bp_pack_var_len_int): Likewise.
1067         * lto-streamer-in.c: Include data-streamer.h and gimple-streamer.h.
1068         (struct string_slot): Remove.  Update all users.
1069         (lto_tag_check_set): Make extern.
1070         (lto_tag_check_range): Move to lto-streamer.h.
1071         (lto_tag_check): Likewise.
1072         (hash_string_slot_node): Remove.  Update all users.
1073         (eq_string_slot_node): Remove.  Update all users.
1074         (string_for_index): Move to data-streamer-in.c
1075         (input_string_internal): Likewise.
1076         (input_string_cst): Move to tree-streamer-in.c.
1077         (input_identifier): Likewise.
1078         (lto_input_string): Move to data-streamer-in.c
1079         (input_record_start): Move to data-streamer.h
1080         (canon_file_name): Use new definition of struct string_slot
1081         from data-streamer.h.  Set S_SLOT.LEN.
1082         (lto_input_location): Make extern.
1083         (lto_input_chain): Move to tree-streamer-in.c.
1084         (lto_init_eh): Make extern.
1085         (input_phi): Move to gimple-streamer-in.c.
1086         (input_gimple_stmt): Likewise.
1087         (input_bb): Likewise.
1088         (unpack_ts_base_value_fields): Move to tree-streamer-in.c.
1089         (unpack_ts_real_cst_value_fields): Likewise.
1090         (unpack_ts_fixed_cst_value_fields): Likewise.
1091         (unpack_ts_decl_common_value_fields): Likewise.
1092         (unpack_ts_decl_wrtl_value_fields): Likewise.
1093         (unpack_ts_decl_with_vis_value_fields): Likewise.
1094         (unpack_ts_function_decl_value_fields): Likewise.
1095         (unpack_ts_type_common_value_fields): Likewise.
1096         (unpack_ts_block_value_fields): Likewise.
1097         (unpack_ts_translation_unit_decl_value_fields): Likewise.
1098         (unpack_value_fields): Likewise.
1099         (lto_materialize_tree): Likewise.
1100         (lto_input_ts_common_tree_pointers): Likewise.
1101         (lto_input_ts_vector_tree_pointers): Likewise.
1102         (lto_input_ts_complex_tree_pointers): Likewise.
1103         (lto_input_ts_decl_minimal_tree_pointers): Likewise.
1104         (lto_input_ts_decl_common_tree_pointers): Likewise.
1105         (lto_input_ts_decl_non_common_tree_pointers): Likewise.
1106         (lto_input_ts_decl_with_vis_tree_pointers): Likewise.
1107         (lto_input_ts_field_decl_tree_pointers): Likewise.
1108         (lto_input_ts_function_decl_tree_pointers): Likewise.
1109         (lto_input_ts_type_common_tree_pointers): Likewise.
1110         (lto_input_ts_type_non_common_tree_pointers): Likewise.
1111         (lto_input_ts_list_tree_pointers): Likewise.
1112         (lto_input_ts_vec_tree_pointers): Likewise.
1113         (lto_input_ts_exp_tree_pointers): Likewise.
1114         (lto_input_ts_block_tree_pointers): Likewise.
1115         (lto_input_ts_binfo_tree_pointers): Likewise.
1116         (lto_input_ts_constructor_tree_pointers): Likewise.
1117         (lto_input_ts_target_option): Likewise.
1118         (lto_input_ts_translation_unit_decl_tree_pointers): Likewise.
1119         (lto_input_tree_pointers): Likewise.
1120         (lto_get_pickled_tree): Likewise.
1121         (lto_get_builtin_tree): Likewise.
1122         (lto_read_tree): Likewise.
1123         (lto_input_integer_cst): Likewise.
1124         (lto_input_tree): Likewise.
1125         * lto-streamer-out.c: Include data-streamer.h,
1126         gimple-streamer.h and streamer-hooks.h.
1127         (struct string_slot): Move to data-streamer.h.
1128         (hash_string_slot_node): Likewise.
1129         (eq_string_slot_node): Likewise.
1130         (lto_string_index): Move to data-streamer-out.c.
1131         (lto_output_string_with_length): Likewise.
1132         (lto_output_string): Likewise.
1133         (output_string_cst): Move to tree-streamer-out.c.
1134         (output_identifier): Likewise.
1135         (output_zero): Move to data-streamer-out.c
1136         (output_uleb128): Likewise.
1137         (output_sleb128): Likewise.
1138         (output_record_start): Move to data-streamer.h
1139         (pack_ts_base_value_fields): Move to tree-streamer-out.c.
1140         (pack_ts_real_cst_value_fields): Likewise.
1141         (pack_ts_fixed_cst_value_fields): Likewise.
1142         (pack_ts_decl_common_value_fields): Likewise.
1143         (pack_ts_decl_wrtl_value_fields): Likewise.
1144         (pack_ts_decl_with_vis_value_fields): Likewise.
1145         (pack_ts_function_decl_value_fields): Likewise.
1146         (pack_ts_type_common_value_fields): Likewise.
1147         (pack_ts_block_value_fields): Likewise.
1148         (pack_ts_translation_unit_decl_value_fields): Likewise.
1149         (pack_value_fields): Likewise.
1150         (lto_output_chain): Likewise.
1151         (lto_output_ts_common_tree_pointers): Likewise.
1152         (lto_output_ts_vector_tree_pointers): Likewise.
1153         (lto_output_ts_complex_tree_pointers): Likewise.
1154         (lto_output_ts_decl_minimal_tree_pointers): Likewise.
1155         (lto_output_ts_decl_common_tree_pointers): Likewise.
1156         (lto_output_ts_decl_non_common_tree_pointers): Likewise.
1157         (lto_output_ts_decl_with_vis_tree_pointers): Likewise.
1158         (lto_output_ts_field_decl_tree_pointers): Likewise.
1159         (lto_output_ts_function_decl_tree_pointers): Likewise.
1160         (lto_output_ts_type_common_tree_pointers): Likewise.
1161         (lto_output_ts_type_non_common_tree_pointers): Likewise.
1162         (lto_output_ts_list_tree_pointers): Likewise.
1163         (lto_output_ts_vec_tree_pointers): Likewise.
1164         (lto_output_ts_exp_tree_pointers): Likewise.
1165         (lto_output_ts_block_tree_pointers): Likewise.
1166         (lto_output_ts_binfo_tree_pointers): Likewise.
1167         (lto_output_ts_constructor_tree_pointers): Likewise.
1168         (lto_output_ts_target_option): Likewise.
1169         (lto_output_ts_translation_unit_decl_tree_pointers): Likewise.
1170         (lto_output_tree_pointers): Likewise.
1171         (lto_output_tree_header): Likewise.
1172         (lto_output_builtin_tree): Likewise.
1173         (lto_write_tree): Likewise.
1174         (lto_output_integer_cst): Likewise.
1175         (lto_output_tree): Likewise.
1176         (output_phi): Move to gimple-streamer-out.c.
1177         (output_gimple_stmt): Likewise.
1178         (output_bb): Likewise.
1179         * lto-streamer.c: Include tree-streamer.h and streamer-hooks.h.
1180         (streamer_hooks): Move to streamer-hooks.c.
1181         (check_handled_ts_structures): Move to tree-streamer.c
1182         (lto_streamer_cache_add_to_node_array): Likewise.
1183         (lto_streamer_cache_insert_1): Likewise.
1184         (lto_streamer_cache_insert): Likewise.
1185         (lto_streamer_cache_insert_at): Likewise.
1186         (lto_streamer_cache_append): Likewise.
1187         (lto_streamer_cache_lookup): Likewise.
1188         (lto_streamer_cache_get): Likewise.
1189         (lto_record_common_node): Likewise.
1190         (lto_preload_common_nodes): Likewise.
1191         (lto_streamer_cache_create): Likewise.
1192         (lto_streamer_cache_delete): Likewise.
1193         (streamer_hooks_init): Move to streamer-hooks.c.
1194         * lto-streamer.h: Include diagnostic.h
1195         (struct output_block, struct lto_input_block,
1196         struct data_in, struct bitpack_d): Remove forward declarations.
1197         (struct bitpack_d): Move to data-streamer.h.
1198         (struct lto_streamer_cache_d): Move to tree-streamer.h.
1199         (struct streamer_hooks): Move to streamer-hooks.h.
1200         (bp_pack_var_len_unsigned): Move to data-streamer.h.
1201         (bp_pack_var_len_int): Likewise.
1202         (bp_unpack_var_len_unsigned): Likewise.
1203         (bp_unpack_var_len_int): Likewise.
1204         (lto_input_location): Declare.
1205         (lto_tag_check_set): Declare.
1206         (lto_init_eh): Declare.
1207         (lto_output_tree_ref): Declare.
1208         (lto_output_location): Declare.
1209         (bitpack_create): Move to data-streamer.h.
1210         (bp_pack_value): Likewise.
1211         (lto_output_bitpack): Likewise.
1212         (lto_input_bitpack): Likewise.
1213         (bp_unpack_value): Likewise.
1214         (lto_output_1_stream): Likewise.
1215         (lto_input_1_unsigned): Likewise.
1216         (lto_output_int_in_range): Likewise.
1217         (lto_input_int_in_range): Likewise.
1218         (bp_pack_int_in_range): Likewise.
1219         (bp_unpack_int_in_range): Likewise.
1220         (lto_output_enum): Likewise.
1221         (lto_input_enum): Likewise.
1222         (bp_pack_enum): Likewise.
1223         (bp_unpack_enum): Likewise.
1224         * streamer-hooks.c: New.
1225         * streamer-hooks.h: New.
1226         * tree-streamer-in.c: New.
1227         * tree-streamer-out.c: New.
1228         * tree-streamer.c: New.
1229         * tree-streamer.h: New.
1230
1231 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1232
1233         * gthr-posix95.h: Remove.
1234         * gthr.h [_PTHREADS95]: Remove.
1235         * configure.ac (enable_threads): Remove posix95.
1236         * configure: Regenerate.
1237         * doc/install.texi (Configuration, --enable-threads): Remove posix95.
1238
1239 2011-08-08  Uros Bizjak  <ubizjak@gmail.com>
1240
1241         PR target/49781
1242         * config/i386/i386.c (ix86_decompose_address): Allow zero-extended
1243         SImode addresses.
1244         (ix86_print_operand_address): Handle zero-extended addresses.
1245         (memory_address_length): Add length of addr32 prefix for
1246         zero-extended addresses.
1247         (ix86_secondary_reload): Handle moves to/from double-word general
1248         registers from/to zero-extended addresses.
1249         * config/i386/predicates.md (lea_address_operand): Reject
1250         zero-extended operands.
1251
1252 2011-08-08  H.J. Lu  <hongjiu.lu@intel.com>
1253
1254         PR other/48007
1255         * config.gcc (libgcc_tm_file): Add i386/value-unwind.h for Linux/x86.
1256
1257         * system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned.
1258         (ASSUME_EXTENDED_UNWIND_CONTEXT): Likewise.
1259
1260         * unwind-dw2.c (ASSUME_EXTENDED_UNWIND_CONTEXT): New.
1261         (_Unwind_Context_Reg_Val): Likewise.
1262         (_Unwind_Get_Unwind_Word): Likewise.
1263         (_Unwind_Get_Unwind_Context_Reg_Val): Likewise.
1264         (_Unwind_Context): Use _Unwind_Context_Reg_Val on the reg field.
1265         (_Unwind_IsExtendedContext): Check ASSUME_EXTENDED_UNWIND_CONTEXT
1266         for EXTENDED_CONTEXT_BIT.
1267         (__frame_state_for): Likewise.
1268         (uw_init_context_1): Likewise.
1269         (_Unwind_GetGR): Updated.
1270         (_Unwind_SetGR): Likewise.
1271         (_Unwind_GetGRPtr): Likewise.
1272         (_Unwind_SetGRPtr): Likewise.
1273         (_Unwind_SetGRValue): Likewise.
1274         (_Unwind_GRByValue): Likewise.
1275         (uw_install_context_1): Likewise.
1276
1277         * doc/tm.texi.in: Document REG_VALUE_IN_UNWIND_CONTEXT and
1278         ASSUME_EXTENDED_UNWIND_CONTEXT.
1279         * doc/tm.texi: Regenerated.
1280
1281 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1282
1283         * Makefile.in (gengtype$(exeext)): Add $(LDFLAGS).
1284
1285 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1286
1287         * doc/invoke.texi (DEC Alpha Options, -mcpu): native support isn't
1288         Linux/GNU-specific.
1289         (DEC Alpha Options, -mtune): Likewise.
1290         (MIPS Options, -march): native is supported on IRIX.
1291
1292 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1293
1294         * config/sparc/driver-sparc.c: New file.
1295         * config/sparc/x-sparc: New file.
1296         * config.host: Use driver-sparc.o, sparc/x-sparc on sparc*-*-solaris2*.
1297         * config/sparc/sparc.opt (native): New value for enum processor_type.
1298         * config/sparc/sparc-opts.h (PROCESSOR_NATIVE): Declare.
1299         * config/sparc/sparc.c (sparc_option_override): Abort if
1300         PROCESSOR_NATIVE gets here.
1301         * config/sparc/sol2.h [__sparc__] (host_detect_local_cpu): Declare.
1302         (EXTRA_SPEC_FUNCTIONS, MCPU_MTUNE_NATIVE_SPECS,
1303         DRIVER_SELF_SPECS): Define.
1304         * doc/invoke.texi (SPARC Options, -mcpu): Document native.
1305         (SPARC Options, -mtune): Likewise.
1306         * configure.ac (EXTRA_GCC_LIBS): Check for libkstat.
1307         Substitute result.
1308         * configure: Regenerate.
1309         * Makefile.in (EXTRA_GCC_LIBS): Set.
1310         (xgcc$(exeext)): Add $(EXTRA_GCC_LIBS).
1311         (cpp$(exeext)): Likewise.
1312
1313 2011-08-08  Richard Guenther  <rguenther@suse.de>
1314
1315         * tree-vrp.c (extract_range_from_unary_expr_1): New function,
1316         split out from ...
1317         (extract_range_from_unary_expr): ... here.  Handle BIT_NOT_EXPR
1318         by composition.
1319
1320 2011-08-08  Mikael Pettersson  <mikpe@it.uu.se>
1321
1322         PR tree-optimization/50005
1323         * ipa-inline-analysis (remap_predicate): Add cast to
1324         silence signed/unsigned comparison warning.
1325
1326 2011-08-08  Richard Sandiford  <richard.sandiford@linaro.org>
1327
1328         * modulo-sched.c (get_sched_window): Use a table for the debug output.
1329         Print the current ii.
1330         (sms_schedule_by_order): Reduce whitespace in dump line.
1331
1332 2011-08-08  Richard Sandiford  <richard.sandiford@linaro.org>
1333
1334         * modulo-sched.c (get_sched_window): Use just one loop for predecessors
1335         and one loop for successors.  Fix upper bound of memory range.
1336
1337 2011-08-06  Uros Bizjak  <ubizjak@gmail.com>
1338
1339         PR target/50001
1340         * config/alpha/alpha.c (alpha_instantiate_decls): New function.
1341         (TARGET_INSTANTIATE_DECLS): New define.
1342
1343 2011-08-06  Paolo Bonzini  <bonzini@gnu.org>
1344             Mikael Morin   <mikael.morin@sfr.fr>
1345
1346         * Makefile.in (INCLUDES_FOR_TARGET): New.
1347         (LIBGCC2_CFLAGS): Use it.
1348         (CRTSTUFF_CFLAGS): Use it instead of INCLUDES.
1349
1350 2011-08-06  Uros Bizjak  <ubizjak@gmail.com>
1351
1352         * config/i386/i386.c (ix86_compute_frame_layout): Simplify
1353         frame->save_regs_using_mov calculation.
1354
1355 2011-08-06  Uros Bizjak  <ubizjak@gmail.com>
1356
1357         * config/i386/i386.md (ssemodesuffix): Remove V8SI mode.
1358         * config/i386/sse.md (castmode): New mode attribute.
1359         (avx_<castmode><avxsizesuffix>_<castmode>): Rename from
1360         avx_<ssemodesuffix><avxsizesuffix>_<ssemodesuffix>.
1361
1362 2011-08-05  Jan Hubicka  <jh@suse.cz>
1363
1364         PR middle-end/49494
1365         * ipa-inline-analysis.c (remap_predicate): Add bounds check.
1366
1367 2011-08-05  Jan Hubicka  <jh@suse.cz>
1368
1369         PR middle-end/49500
1370         * tree-emultls.c (new_emutls_decl):Add alias_of parameter;
1371         handle aliases.
1372         (create_emultls_var):New function.
1373         (ipa_lower_emutls): Handle aliases correctly.
1374
1375 2011-08-05  Jan Hubicka  <jh@suse.cz>
1376
1377         PR middle-end/49735
1378         * ipa-inline.c (recursive_inlining): Look through aliases.
1379
1380 2011-08-05  Jason Merrill  <jason@redhat.com>
1381
1382         * config/i386/i386.c (setup_incoming_varargs_ms_64): Move
1383         declarations to beginning of function.
1384
1385 2011-08-05  Bernd Schmidt  <bernds@codesourcery.com>
1386
1387         PR rtl-optimization/49900
1388         * sched-ebb.c (add_deps_for_risky_insns): Also add dependencies to
1389         ensure basic blocks stay in the same order.
1390
1391 2011-08-05  Aldy Hernandez  <aldyh@redhat.com>
1392
1393         * config/s390/s390.c (s390_expand_cs_hqi): Add new arguments to
1394         store_bit_field.
1395         (s390_expand_atomic): Same.
1396
1397 2011-08-05  Richard Henderson  <rth@redhat.com>
1398
1399         PR rtl-opt/49977
1400         * dwarf2cfi.c (scan_insn_after): Split out of ...
1401         (scan_trace): ... here.  Correctly place notes wrt sequences.
1402
1403 2011-08-05  Kaz Kojima  <kkojima@gcc.gnu.org>
1404             Richard Henderson  <rth@redhat.com>
1405
1406         PR rtl-opt/49982
1407         * expr.c (fixup_args_size_notes): Look through no-op moves.
1408
1409 2011-08-05  Uros Bizjak  <ubizjak@gmail.com>
1410
1411         * config/i386/i386.md (*push<mode>2): Use "o" constraint instead
1412         of "m" for operand 0.  Add type and mode attribute.
1413         (*pushxf_nointeger"): Use "<" constraint for operand 0.
1414         (*pushdf_rex64): New pattern, split out of *pushdf.  Use "m"
1415         constraint instead of "o" for opreand 1.
1416         (*pushdf): Disable for TARGET_64BIT.  Correct mode attribute.
1417         (*movdi_internal_rex64): Use "!o" constraint instead of "!m" for
1418         operand 0, alternative 4.
1419         (*movdf_internal_rex64): Ditto for operand 0, alernative 6.
1420
1421 2011-08-05  Uros Bizjak  <ubizjak@gmail.com>
1422
1423         * config/i386/predicates.md (lea_address_operand): Rename from
1424         no_seg_address_operand.
1425         * config/i386/i386.md (*lea_1): Update operand 1 predicate for rename.
1426         (*lea_1_zext): Ditto.
1427         (*lea_2): Ditto.
1428         (*lea_2_zext): Ditto.
1429
1430 2011-08-05  Uros Bizjak  <ubizjak@gmail.com>
1431
1432         * config/i386/i386.c (ix86_print_operand_address): Handle SUBREGs of
1433         parts.base and parts.index.
1434         * config/i386/predicates.md (aligned_operand): Ditto.
1435         (cmpxchg8b_pic_memory_operand): Ditto.
1436
1437 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1438
1439         * config/soft-fp: Move to ../libgcc.
1440         * Makefile.in (SFP_MACHINE): Remove.
1441         (libgcc-support): Remove $(SFP_MACHINE) dependency.
1442         * config/arm/sfp-machine.h: Move to ../libgcc/config/arm.
1443         * config/arm/t-arm-softfp: Move to
1444         ../libgcc/config/arm/t-softfp.
1445         * config/c6x/sfp-machine.h: Move to ../libgcc/config/c6x.
1446         * config/c6x/t-c6x-softfp: Remove.
1447         * config/i386/sfp-machine.h: Move to ../libgcc/config/i386.
1448         * config/i386/t-fprules-softfp: Move to
1449         ../libgcc/config/t-softfp-tf.
1450         * config/ia64/sfp-machine.h: Move to ../libgcc/config/ia64.
1451         * config/ia64/t-fprules-softfp: Remove.
1452         * config/lm32/sfp-machine.h: Move to ../libgcc/config/lm32.
1453         * config/lm32/t-fprules-softfp: Remove.
1454         * config/moxie/sfp-machine.h: Remove.
1455         * config/moxie/t-moxie-softfp: Remove.
1456         * config/rs6000/darwin-ldouble-format: Move to
1457         ../libgcc/config/rs6000/ibm-ldouble-format.
1458         * config/rs6000/darwin-ldouble.c: Move to
1459         ../libgcc/config/rs6000/ibm-ldouble.c
1460         * config/rs6000/libgcc-ppc-glibc.ver: Move to ../libgcc/config/rs6000.
1461         * config/rs6000/libgcc-ppc64.ver: Likewise.
1462         * config/rs6000/sfp-machine.h: Likewise.
1463         * config/rs6000/t-aix43 (SHLIB_MAPFILES): Remove
1464         $(srcdir)/config/rs6000/libgcc-ppc64.ver.
1465         (LIB2FUNCS_EXTRA): Remove.
1466         (TARGET_LIBGCC2_CFLAGS): Remove.
1467         * config/rs6000/t-aix52: Likewise
1468         * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Remove
1469         $(srcdir)/config/rs6000/darwin-ldouble.c.
1470         (SHLIB_MAPFILES): Remove.
1471         * config/rs6000/t-darwin64 (LIB2FUNCS_EXTRA): Remove
1472         $(srcdir)/config/rs6000/darwin-ldouble.c.
1473         * config/rs6000/t-fprules-softfp: Move to
1474         ../libgcc/config/t-softfp-sfdf.
1475         * config/rs6000/t-freebsd: Move to ../libgcc/config/rs6000.
1476         * config/rs6000/t-linux64 (softfp_wrap_start, softfp_wrap_end): Remove.
1477         * config/rs6000/t-ppccomm (LIB2FUNCS_EXTRA): Remove
1478         $(srcdir)/config/rs6000/darwin-ldouble.c.
1479         * config/score/sfp-machine.h: Move to ../libgcc/config/score.
1480         * config/score/t-score-softfp: Remove.
1481         * config.gcc (arm*-*-linux*): Remove arm/t-arm-softfp,
1482         soft-fp/t-softfp from tmake_file.
1483         (arm*-*-uclinux*): Likewise.
1484         (arm*-*-ecos-elf): Likewise.
1485         (arm*-*-eabi*, arm*-*-symbianelf*): Likewise.
1486         (arm*-*-rtems*): Likewise.
1487         (arm*-*-elf): Likewise.
1488         (moxie-*-elf): Remove moxie/t-moxie-softfp, soft-fp/t-softfp from
1489         tmake_file.
1490         (moxie-*-uclinux*): Likewise.
1491         (moxie-*-rtems*): Likewise.
1492         (lm32-*-elf*): Remove lm32/t-fprules-softfp, soft-fp/t-softfp from
1493         tmake_file.
1494         (lm32-*-rtems*): Likewise.
1495         (lm32-*-uclinux*): Likewise.
1496         (powerpc-*-freebsd*): Remove rs6000/t-freebsd,
1497         rs6000/t-fprules-softfp, soft-fp/t-softfp from tmake_file.
1498         (powerpc-*-linux*, powerpc64-*-linux*): Remove
1499         rs6000/t-fprules-softfp, soft-fp/t-softfp from tmake_file.
1500         (score-*-elf): Remove score/t-score-softfp, soft-fp/t-softfp from
1501         tmake_file.
1502         (tic6x-*-elf): Remove c6x/t-c6x-softfp, soft-fp/t-softfp from
1503         tmake_file.
1504         (tic6x-*-uclinux): Likewise.
1505         (i[34567]86-*-darwin*, x86_64-*-darwin*): Remove i386/t-fprules-softfp,
1506         soft-fp/t-softfp from tmake_file.
1507         (i[34567]86-*-linux*, x86_64-*-linux*, i[34567]86-*-kfreebsd*-gnu)
1508         (x86_64-*-kfreebsd*-gnu, i[34567]86-*-gnu*): Likewise.
1509         (i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*): Likewise.
1510         (i[34567]86-*-cygwin*, i[34567]86-*-mingw*, x86_64-*-mingw*): Likewise.
1511         (i[34567]86-*-freebsd*, x86_64-*-freebsd*): Likewise.
1512
1513 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1514
1515         * Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS, TPBIT_FUNCS): Remove.
1516         (libgcc-support): Remove $(FPBIT), $(DPBIT), $(TPBIT) dependencies.
1517         (libgcc.mvars): Remove FPBIT, FPBIT_FUNCS, DPBIT, DPBIT_FUNCS,
1518         TPBIT, TPBIT_FUNCS.
1519         * config/fp-bit.c, config/fp-bit.h: Move to ../libgcc.
1520         * config/arm/t-strongarm-elf (FPBIT, DPBIT, dp-bit.c, fp-bit.c):
1521         Remove.
1522         * config/arm/t-vxworks: Likewise.
1523         * config/arm/t-wince-pe: Likewise.
1524         * config/avr/t-avr (fp-bit.c, FPBIT): Remove.
1525         * config/bfin/t-bfin (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1526         * config/bfin/t-bfin-elf: Likewise.
1527         * config/bfin/t-bfin-linux: Likewise.
1528         * config/bfin/t-bfin-uclinux: Likewise.
1529         * config/cris/t-cris (FPBIT, DPBIT, dp-bit.c, tmplibgcc_fp_bit.c):
1530         Remove.
1531         * config/fr30/t-fr30: Likewise.
1532         * config/frv/t-frv: Likewise.
1533         * config/h8300/t-h8300 (FPBIT, fp-bit.c): Remove.
1534         * config/iq2000/t-iq2000 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1535         * config/m32c/t-m32c: Likewise.
1536         * config/m32r/t-linux: (LIB2FUNCS_EXTRA, fp-bit.c, dp-bit.c): Remove.
1537         * config/m32r/t-m32r (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1538         * config/mcore/t-mcore: Likewise.
1539         * config/mep/t-mep: Likewise.
1540         * config/microblaze/t-microblaze: Likewise.
1541         * config/mips/t-linux64 (TPBIT, tp-bit.c): Remove.
1542         * config/mips/t-mips (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1543         * config/mips/t-sdemtk (FPBIT, DPBIT): Remove.
1544         * config/mips/t-sr71k (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1545         * config/mn10300/t-linux: Remove.
1546         * config/mn10300/t-mn10300 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1547         * config/pdp11/t-pdp11: Likewise.
1548         * config/picochip/t-picochip (FPBIT, fp-bit.c): Remove.
1549         * config/rs6000/ppc64-fp.c: Move to ../libgcc/config/rs6000.
1550         * config/rs6000/t-aix43 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1551         (LIB2FUNCS_EXTRA): Remove $(srcdir)/config/rs6000/ppc64-fp.c.
1552         * config/rs6000/t-aix52: Likewise.
1553         * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Remove
1554         $(srcdir)/config/rs6000/ppc64-fp.c.
1555         * config/rs6000/t-fprules-fpbit: Remove.
1556         * config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Remove.
1557         * config/rs6000/t-lynx (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1558         * config/sh/t-netbsd (FPBIT, DPBIT): Remove.
1559         * config/sh/t-sh (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1560         * config/sparc/t-elf: Likewise.
1561         * config/sparc/t-leon: Likewise.
1562         * config/sparc/t-leon3: Likewise.
1563         * config/spu/t-spu-elf: Likewise.
1564         (DPBIT_FUNCS): Remove.
1565         * config/stormy16/t-stormy16 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
1566         * config/v850/t-v850: Likewise.
1567         * config.gcc (avr-*-rtems*): Add avr/avr-lib.h to libgcc_tm_file.
1568         (avr-*-*): Likewise.
1569         (h8300-*-rtems*): Set libgcc_tm_file.
1570         (h8300-*-elf*): Likewise.
1571         (powerpc-*-eabisimaltivec*): Remove rs6000/t-fprules-fpbit from
1572         tmake_file.
1573         (powerpc-*-eabisim*): Likewise.
1574         (powerpc-*-elf*): Likewise.
1575         (powerpc-*-eabialtivec*): Likewise.
1576         (powerpc-xilinx-eabi*): Likewise.
1577         (powerpc-*-eabi*): Likewise.
1578         (powerpc-*-rtems*): Likewise.
1579         (powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Likewise.
1580         (powerpcle-*-elf*): Likewise.
1581         (powerpcle-*-eabisim*): Likewise.
1582         (powerpcle-*-eabi*): Likewise.
1583         (rx-*-elf*): Add rx/rx-lib.h to libgcc_tm_file.
1584         (am33_2.0-*-linux*): Remove mn10300/t-linux from tmake_file.
1585         * doc/fragments.texi (Target Fragment, Floating Point Emulation):
1586         Remove.
1587
1588 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1589
1590         * Makefile.in (UNWIND_H): Remove.
1591         (LIB2ADDEH, LIB2ADDEHSTATIC, LIB2ADDEHSHARED): Move to
1592         ../libgcc/Makefile.in.
1593         (LIBUNWIND, SHLIBUNWIND_LINK, SHLIBUNWIND_INSTALL): Likewise.
1594         (LIBUNWINDDEP): Remove.
1595         (libgcc-support): Remove LIB2ADDEH, $(srcdir)/emutls.c dependencies.
1596         (libgcc.mvars): Remove LIB2ADDEH, LIB2ADDEHSTATIC, LIB2ADDEHSHARED,
1597         LIBUNWIND, SHLIBUNWIND_LINK, SHLIBUNWIND_INSTALL.
1598         (stmp-int-hdrs): Remove $(UNWIND_H) dependency.
1599         Don't copy $(UNWIND_H).
1600         * config.gcc (ia64*-*-linux*): Remove with_system_libunwind handling.
1601         * configure.ac (GCC_CHECK_UNWIND_GETIPINFO): Remove.
1602         * aclocal.m4: Regenerate.
1603         * configure: Regenerate.
1604         * emutls.c, unwind-c.c, unwind-compat.c, unwind-compat.h,
1605         unwind-dw2-fde-compat.c, unwind-dw2-fde-glibc.c, unwind-dw2-fde.c,
1606         unwind-dw2-fde.h, unwind-dw2.c, unwind-dw2.h, unwind-generic.h,
1607         unwind-pe.h, unwind-sjlj.c, unwind.inc: Move to ../libgcc.
1608         * unwind-dw2-fde-darwin.c: Move to ../libgcc/config.
1609         * config/arm/libunwind.S, config/arm/pr-support.c,
1610         config/arm/unwind-arm.c, config/arm/unwind-arm.h: Move to
1611         ../libgcc/config/arm.
1612         * config/arm/t-bpabi (UNWIND_H, LIB2ADDEH): Remove.
1613         * config/arm/t-symbian (UNWIND_H, LIB2ADDEH): Remove.
1614         * config/frv/t-frv ($(T)frvbegin$(objext)): Use
1615         $(srcdir)/../libgcc to refer to unwind-dw2-fde.h.
1616         ($(T)frvend$(objext)): Likewise.
1617         * config/ia64/t-glibc (LIB2ADDEH): Remove.
1618         * config/ia64/t-glibc-libunwind: Move to ../libgcc/config/ia64.
1619         * config/ia64/fde-glibc.c, config/ia64/fde-vms.c,
1620         config/ia64/unwind-ia64.c, config/ia64/unwind-ia64.h: Move to
1621         ../libgcc/config/ia64.
1622         * config/ia64/t-hpux (LIB2ADDEH): Remove.
1623         * config/ia64/t-ia64 (LIB2ADDEH): Remove.
1624         * config/ia64/t-vms (LIB2ADDEH): Remove.
1625         * config/ia64/vms.h (UNW_IVMS_MODE,
1626         MD_UNW_COMPATIBLE_PERSONALITY_P): Remove.
1627         * config/picochip/t-picochip (LIB2ADDEH): Remove.
1628         * config/rs6000/aix.h (R_LR, MD_FROB_UPDATE_CONTEXT): Remove.
1629         * config/rs6000/t-darwin (LIB2ADDEH): Remove.
1630         * config/rs6000/darwin-fallback.c: Move to ../libgcc/config/rs6000.
1631         * config/sh/t-sh ($(T)unwind-dw2-Os-4-200.o): Use
1632         $(srcdir)/../libgcc to refer to unwinder sources.
1633         * config/spu/t-spu-elf (LIB2ADDEH): Remove.
1634         * config/t-darwin (LIB2ADDEH): Remove.
1635         * config/t-freebsd (LIB2ADDEH): Remove.
1636         * config/t-libunwind (LIB2ADDEH, LIB2ADDEHSTATIC): Remove.
1637         * config/t-libunwind-elf: Move to ../libgcc/config.
1638         * config/t-linux (LIB2ADDEH): Remove.
1639         * config/t-sol2 (LIB2ADDEH): Remove.
1640         * config/xtensa/t-xtensa (LIB2ADDEH): Remove.
1641         * system.h (MD_FROB_UPDATE_CONTEXT): Poison.
1642
1643 2011-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1644
1645         * config/i386/i386.c (processor_alias_table): Add core-avx-i.
1646
1647         * doc/invoke.texi: Document core-avx-i.
1648
1649 2011-08-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1650
1651         * tsystem.h (CONST_CAST2, CONST_CAST): Define.
1652
1653 2011-08-05  Ira Rosen  <ira.rosen@linaro.org>
1654
1655         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use the
1656         result of multiple results reduction when extracting the final
1657         value using scalar code.
1658
1659 2011-08-05  Richard Guenther  <rguenther@suse.de>
1660
1661         PR tree-optimization/49984
1662         * tree-vrp.c (extract_range_from_binary_expr_1): Handle BIT_XOR_EXPR.
1663
1664 2011-08-05  Richard Guenther  <rguenther@suse.de>
1665
1666         * tree-vrp.c (zero_nonzero_bits_from_vr): Make sure to always
1667         return true for constant integer ranges.
1668         (extract_range_from_binary_expr_1): Simplify BIT_AND_EXPR and
1669         BIT_IOR_EXPR handling.
1670
1671 2011-08-04  Kai Tietz  <ktietz@redhat.com>
1672
1673         * config/i386/i386.c (setup_incoming_varargs_ms_64): Set
1674         ix86_varargs_gpr_size and ix86_varargs_fpr_size to zero.
1675
1676 2011-08-04  Ira Rosen  <ira.rosen@linaro.org>
1677
1678         * tree-vectorizer.h (struct _stmt_vec_info): Add new field for
1679         pattern def statement, and its access macro.
1680         (NUM_PATTERNS): Set to 5.
1681         * tree-vect-loop.c (vect_determine_vectorization_factor): Handle
1682         pattern def statement.
1683         (vect_transform_loop): Likewise.
1684         * tree-vect-patterns.c (vect_vect_recog_func_ptrs): Add new
1685         function vect_recog_over_widening_pattern ().
1686         (vect_operation_fits_smaller_type): New function.
1687         (vect_recog_over_widening_pattern, vect_mark_pattern_stmts):
1688         Likewise.
1689         (vect_pattern_recog_1): Move the code that marks pattern
1690         statements to vect_mark_pattern_stmts (), and call it.  Update
1691         documentation.
1692         * tree-vect-stmts.c (vect_supportable_shift): New function.
1693         (vect_analyze_stmt): Handle pattern def statement.
1694         (new_stmt_vec_info): Initialize pattern def statement.
1695
1696 2011-08-04  Richard Henderson  <rth@redhat.com>
1697
1698         PR target/49964
1699         * config/i386/i386.c (ix86_expand_call): Don't create nested
1700         PARALLELs for TARGET_VZEROUPPER.
1701         (ix86_split_call_vzeroupper): Fix extraction of the original call.
1702         * config/i386/i386.md (*call_rex64_ms_sysv_vzeroupper): Don't
1703         recognize nested PARALLELs.
1704         (*call_pop_vzeroupper, *sibcall_pop_vzeroupper,
1705         *call_value_rex64_ms_sysv_vzeroupper, *call_value_pop_vzeroupper,
1706         *sibcall_value_pop_vzeroupper): Likewise.
1707
1708 2011-08-04  Richard Henderson  <rth@redhat.com>
1709
1710         PR middle-end/49968
1711         * calls.c (expand_call): Use fixup_args_size_notes for
1712         emit_stack_restore.
1713         * expr.c (fixup_args_size_notes): Allow STACK_POINTER_REGNUM sets
1714         in non-standard modes.
1715
1716 2011-08-04  Jakub Jelinek  <jakub@redhat.com>
1717
1718         * gcc.c (self_spec): New variable.
1719         (static_specs): Add self_spec.
1720         (main): Call do_self_spec on "self_spec" specs after reading
1721         user specs files.  Move compare_debug handling right after that.
1722
1723 2011-08-04  Richard Guenther  <rguenther@suse.de>
1724
1725         * tree-vrp.c (vrp_expr_computes_nonnegative): Remove.
1726         (value_range_nonnegative_p): New function.
1727         (ssa_name_nonnegative_p): Use it.
1728         (value_range_constant_singleton): New function.
1729         (op_with_constant_singleton_value_range): Use it.
1730         (extract_range_from_binary_expr_1): New function, split out from ...
1731         (extract_range_from_binary_expr): ... this.  Remove fallback
1732         constant folding done here.
1733
1734 2011-08-04  Richard Guenther  <rguenther@suse.de>
1735
1736         PR tree-optimization/49806
1737         * tree-vrp.c (op_with_boolean_value_range_p): New function.
1738         (simplify_truth_ops_using_ranges): Simplify.  Allow inserting
1739         a new statement for a final conversion to bool.
1740
1741 2011-08-04  Romain Geissler  <romain.geissler@gmail.com>
1742
1743         * gengtype-state.c: Include "bconfig.h" if
1744         GENERATOR_FILE is defined, "config.h" otherwise.
1745         * gengtype.c: Likewise.
1746         * gengtype-lex.l: Likewise.
1747         * gengtype-parse.c: Likewise.
1748         * Makefile.in (gengtype-lex.o-warn): New variable.
1749         (plugin_resourcesdir): Likewise.
1750         (plugin_bindir): Likewise.
1751         (plugin_includedir): Use $(plugin_resourcesdir) as prefix base.
1752         (MOSTLYCLEANFILES): Add gengtype$(exeext).
1753         (native): Depend on gengtype$(exeext) is $enable_plugin
1754         is set to "yes".
1755         (gtype.state): Depend on s-gtype. Use temporary file.
1756         (gengtype-lex.o): New rule.
1757         (gengtype-parse.o): Likewise.
1758         (gengtype-state.o): Likewise.
1759         (gengtype$(exeext)): Likewise.
1760         (install-gengtype): Likewise.
1761         (gengtype.o): Likewise.
1762         (build/gengtype.o): Depend on version.h.
1763         (build/gengtype-state): Depend on double-int.h, version.h,
1764         $(HASHTAB_H), $(OBSTACK_H), $(XREGEX_H) and build/errors.o.
1765         (install-plugin): Depend on install-gengtype.
1766
1767 2011-08-04  Jakub Jelinek  <jakub@redhat.com>
1768
1769         PR middle-end/49905
1770         * tree.h (init_attributes): New prototype.
1771         * attribs.c (init_attributes): No longer static.
1772
1773 2011-08-04  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
1774
1775         * config/arm/arm.c (arm_set_fixed_optab_libfunc): Constify
1776         maybe_suffix.
1777
1778 2011-08-03   David Li  <davidxl@google.com>
1779
1780         * tree-optimize.c (execute_fixup_cfg): Fix up entry
1781         outgoing edge counts after inlining.
1782
1783 2011-08-03   David Li  <davidxl@google.com>
1784
1785         * profile.c (compute_branch_probabilities): Compute
1786         function frequency after profile annotation.
1787
1788 2011-08-04  Alan Modra  <amodra@gmail.com>
1789
1790         * config/rs6000/rs6000.c (rs6000_emit_epilogue): Simplify
1791         use_backchain_to_restore_sp initialisation.
1792         (rs6000_legitimate_offset_address_p): Simplify offset test.
1793
1794 2011-08-03  Richard Henderson  <rth@redhat.com>
1795
1796         * config/spu/spu.md: Use define_c_enum instead of define_constants.
1797         (UNSPECV_BLOCKAGE, UNSPECV_LNOP, UNSPECV_SYNC): Rename from UNSPEC_*.
1798         (UNSPECV_NOP): New.
1799
1800 2011-08-03  Richard Henderson  <rth@redhat.com>
1801
1802         PR target/34888
1803         * config/avr/avr.md: New splitter for REG_ARGS_SIZE 0.
1804
1805 2011-08-03  Jakub Jelinek  <jakub@redhat.com>
1806
1807         PR tree-optimization/49948
1808         * gimple.c (walk_stmt_load_store_addr_ops): Walk CONSTRUCTOR elements.
1809
1810 2011-08-03  Anatoly Sokolov  <aesok@post.ru>
1811
1812         * config/m32c/m32c.c (class_sizes): Remove.
1813         (reduce_class): Change arguments and return type to reg_class_t.
1814         Change type cc var to HARD_REG_SET. Change type best var to
1815         reg_class_t. Change type best_size var to unsigned int. Remove
1816         initialization class_sizes var. Use reg_class_size array instead
1817         of class_sizes. Use reg_class_contents array instead
1818         of class_contents.
1819
1820 2011-08-03  Richard Guenther  <rguenther@suse.de>
1821
1822         PR middle-end/49958
1823         * fold-const.c (fold_binary_loc): Only associate
1824         (+ (+ (* a b) c) (* d e)) as (+ (+ (* a b) (* d e)) c) if
1825         overflow wraps.
1826
1827 2011-08-03  Alan Modra  <amodra@gmail.com>
1828
1829         PR rtl-optimization/49941
1830         * jump.c (mark_jump_label): Comment.
1831         (mark_jump_label_1): Set JUMP_LABEL for return jumps.
1832         * emit-rtl.c (copy_rtx_if_shared_1, copy_insn_1): Leave RETURN shared.
1833         (mark_used_flags): Don't mark RETURN.
1834
1835 2011-08-03  Richard Guenther  <rguenther@suse.de>
1836
1837         PR tree-optimization/49938
1838         * tree-scalar-evolution.c (interpret_loop_phi): Gracefully
1839         deal with a POLYNOMIAL_CHREC.
1840
1841 2011-08-03  Revital Eres  <revital.eres@linaro.org>
1842
1843         * modulo-sched.c (calculate_stage_count,
1844         calculate_must_precede_follow, get_sched_window,
1845         try_scheduling_node_in_cycle, remove_node_from_ps): Add
1846         declaration.
1847         (update_node_sched_params, set_must_precede_follow, optimize_sc):
1848         New functions.
1849         (reset_sched_times): Call update_node_sched_params.
1850         (sms_schedule): Call optimize_sc.
1851         (get_sched_window): Change function arguments.
1852         (sms_schedule_by_order): Update call to get_sched_window.
1853         Call set_must_precede_follow.
1854         (calculate_stage_count): Add function argument.
1855
1856 2011-08-02  Richard Henderson  <rth@redhat.com>
1857
1858         PR target/49864
1859         PR target/49879
1860         * reg-notes.def (REG_ARGS_SIZE): New.
1861         * calls.c (emit_call_1): Emit REG_ARGS_SIZE for call_pop.
1862         (expand_call): Add REG_ARGS_SIZE to emit_stack_restore.
1863         * cfgcleanup.c (old_insns_match_p): Don't allow cross-jumping to
1864         different stack levels.
1865         * combine-stack-adj.c (adjust_frame_related_expr): Remove.
1866         (maybe_move_args_size_note): New.
1867         (combine_stack_adjustments_for_block): Use it.
1868         * combine.c (distribute_notes): Place REG_ARGS_SIZE.
1869         * dwarf2cfi.c (dw_cfi_row_struct): Remove args_size member.
1870         (dw_trace_info): Add beg_true_args_size, end_true_args_size,
1871         beg_delay_args_size, end_delay_args_size, eh_head, args_size_undefined.
1872         (cur_cfa): New.
1873         (queued_args_size): Remove.
1874         (add_cfi_args_size): Assert size is non-negative.
1875         (stack_adjust_offset, dwarf2out_args_size): Remove.
1876         (dwarf2out_stack_adjust, dwarf2out_notice_stack_adjust): Remove.
1877         (notice_args_size, notice_eh_throw): New.
1878         (dwarf2out_frame_debug_def_cfa): Use cur_cfa.
1879         (dwarf2out_frame_debug_adjust_cfa): Likewise.
1880         (dwarf2out_frame_debug_cfa_offset): Likewise.
1881         (dwarf2out_frame_debug_expr): Likewise.  Don't stack_adjust_offset.
1882         (dwarf2out_frame_debug): Don't handle non-frame-related-p insns.
1883         (change_cfi_row): Don't emit args_size.
1884         (maybe_record_trace_start_abnormal): Split out from ...
1885         (maybe_record_trace_start): Here.  Set args_size_undefined.
1886         (create_trace_edges): Update to match.
1887         (scan_trace): Handle REG_ARGS_SIZE.
1888         (connect_traces): Connect args_size between EH insns.
1889         * emit-rtl.c (try_split): Handle REG_ARGS_SIZE.
1890         * explow.c (suppress_reg_args_size): New.
1891         (adjust_stack_1): Split out from ...
1892         (adjust_stack): ... here.
1893         (anti_adjust_stack): Use it.
1894         (allocate_dynamic_stack_space): Suppress REG_ARGS_SIZE.
1895         * expr.c (mem_autoinc_base): New.
1896         (fixup_args_size_notes): New.
1897         (emit_single_push_insn_1): Rename from emit_single_push_insn.
1898         (emit_single_push_insn): New.  Generate REG_ARGS_SIZE.
1899         * recog.c (peep2_attempt): Handle REG_ARGS_SIZE.
1900         * reload1.c (reload_as_needed): Likewise.
1901         * rtl.h (fixup_args_size_notes): Declare.
1902
1903 2011-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
1904
1905         PR bootstrap/49914
1906         * fold-const.c (fold_plusminus_mult_expr): Use abs_hwi instead
1907         of abs.
1908         * tree-ssa-math-opts.c (gimple_expand_builtin_pow): Likewise.
1909         * tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Likewise.
1910
1911 2011-08-02  Richard Henderson  <rth@redhat.com>
1912
1913         * config/h8300/h8300.c (push, pop): Return the insn.
1914         (h8300_swap_into_er6): Generate correct unwind info.
1915         (h8300_swap_out_of_er6): Likewise.
1916         * dwarf2cfi.c (def_cfa_1): Clear cfa_cfi if we no longer have a
1917         complex cfa expression.
1918         (dwarf2out_frame_debug_def_cfa): Allow (plus (mem) (const_int)) too.
1919
1920 2011-08-02  H.J. Lu  <hongjiu.lu@intel.com>
1921
1922         * config/i386/driver-i386.c (host_detect_local_cpu): Fix a typo.
1923
1924 2011-08-02  Richard Henderson  <rth@redhat.com>
1925
1926         PR target/49878
1927         * config/h8300/h8300.c (h8300_move_ok): New.
1928         * config/h8300/h8300-protos.h: Declare it.
1929         * config/h8300/h8300.md (P): New mode iterator.
1930         (*movqi_h8300, *movqi_h8300hs, movqi): Use h8300_move_ok.
1931         (*movqi_h8sx, *movhi_h8300, *movhi_h8300hs, movhi): Likewise.
1932         (movsi, *movsi_h8300, *movsi_h8300hs): Likewise.
1933         (*pushqi1_h8300): Rename from pushqi1_h8300; use PRE_MODIFY.
1934         (*pushqi1_h8300hs_<P>): Macroize from pushqi1_h8300hs_advanced
1935         and pushqi1_h8300hs_normal; use PRE_MODIFY and
1936         register_no_sp_elim_operand.
1937         (*pushhi1_h8300hs_<P>): Similarly.
1938         (pushqi1, pushhi1, pushhi1_h8300): Remove.
1939         * config/h8300/predicates.md (register_no_sp_elim_operand): New.
1940
1941 2011-08-02  Richard Henderson  <rth@redhat.com>
1942
1943         PR target/49881
1944         * config/avr/avr.md (push<MPUSH>1): Don't constrain the operand.
1945
1946 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
1947
1948         * c-parser.c (enum c_parser_prec): New enum, moved from within
1949         c_parser_binary_expression.
1950         (c_parser_binary_expression): Add PREC argument.  Stop parsing
1951         if operator has lower or equal precedence than PREC.
1952         (c_parser_conditional_expression, c_parser_omp_for_loop): Adjust
1953         callers.
1954         (c_parser_omp_atomic): Handle parsing OpenMP 3.1 atomics.
1955         Adjust c_finish_omp_atomic caller.
1956         (c_parser_omp_taskyield): New function.
1957         (c_parser_pragma): Handle PRAGMA_OMP_TASKYIELD.
1958         (c_parser_omp_clause_name): Handle final and mergeable clauses.
1959         (c_parser_omp_clause_final, c_parser_omp_clause_mergeable): New
1960         functions.
1961         (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FINAL
1962         and PRAGMA_OMP_CLAUSE_MERGEABLE.
1963         (OMP_TASK_CLAUSE_MASK): Allow final and mergeable clauses.
1964         (c_parser_omp_clause_reduction): Handle min and max.
1965         * c-typeck.c (c_finish_omp_clauses): Don't complain about
1966         const qualified predetermined vars in firstprivate clause.
1967         andle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
1968         Handle MIN_EXPR and MAX_EXPR.
1969         * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_FINAL
1970         and OMP_CLAUSE_MERGEABLE.
1971         (dump_generic_node): Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD
1972         and OMP_ATOMIC_CAPTURE_NEW.
1973         * tree.c (omp_clause_num_ops): Add OMP_CLAUSE_FINAL and
1974         OMP_CLAUSE_MERGEABLE.
1975         (omp_clause_code_name): Likewise.
1976         (walk_tree_1): Handle OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
1977         * tree.h (enum omp_clause_code): Add OMP_CLAUSE_FINAL
1978         and OMP_CLAUSE_MERGEABLE.
1979         (OMP_CLAUSE_FINAL_EXPR): Define.
1980         * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_FINAL and
1981         OMP_CLAUSE_MERGEABLE.
1982         (expand_task_call): Likewise.
1983         (expand_omp_atomic_load, expand_omp_atomic_store): New functions.
1984         (expand_omp_atomic_fetch_op): Handle cases where old or new
1985         value is needed afterwards.
1986         (expand_omp_atomic): Call expand_omp_atomic_load resp.
1987         expand_omp_atomic_store.
1988         * gimplify.c (gimplify_omp_atomic, gimplify_expr): Handle
1989         OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and OMP_ATOMIC_CAPTURE_NEW.
1990         (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
1991         OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
1992         * tree-nested.c (convert_nonlocal_omp_clauses,
1993         convert_local_omp_clauses): Likewise.
1994         * tree.def (OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD,
1995         OMP_ATOMIC_CAPTURE_NEW): New.
1996         * gimple.h (GF_OMP_ATOMIC_NEED_VALUE): New.
1997         (gimple_omp_atomic_need_value_p, gimple_omp_atomic_set_need_value):
1998         New inlines.
1999         * omp-builtins.def (BUILT_IN_GOMP_TASKYIELD): New builtin.
2000         * doc/generic.texi: Mention OMP_CLAUSE_COLLAPSE,
2001         OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL and OMP_CLAUSE_MERGEABLE.
2002
2003 2011-08-02  Kai Tietz  <ktietz@redhat.com>
2004
2005         * gimple.c (canonicalize_cond_expr_cond): Handle cast from
2006         boolean-type.
2007         (ssa_forward_propagate_and_combine): Interprete result of
2008         forward_propagate_comparison.
2009         * gcc/gimple-fold.c (fold_gimple_assign): Add canonicalization for
2010         boolean-typed operands for comparisons.
2011
2012 2011-08-02  Georg-Johann Lay  <avr@gjlay.de>
2013
2014         * config/avr/libgcc.S: Gather related function in the
2015         same input section.
2016         (__mulqihi3, __mulqihi3, __divmodqi4, __divmodhi4, __udivmodsi4,
2017         __divmodsi4): Use XCALL/XJMP instead of rcall/rjmp for external
2018         references.
2019         (__udivmodqi4, __divmodqi4, __udivmodhi4, __divmodhi4,
2020         __udivmodsi4, __divmodsi4, __prologue_saves__,
2021         __epilogue_restores__, _exit, __tablejump2__, __tablejump__,
2022         __do_copy_data, __do_clear_bss, __do_global_ctors,
2023         __do_global_dtors, __tablejump_elpm__): Enclose in DEFUN/ENDF.
2024
2025 2011-08-02  Uros Bizjak  <ubizjak@gmail.com>
2026
2027         PR target/47766
2028         * doc/md.texi (stack_protect_set): The pattern moves ptr_mode value.
2029         (stack_protect_test): The pattern compares ptr_mode value.
2030
2031 2011-08-02  Alan Modra  <amodra@gmail.com>
2032
2033         * config/rs6000/rs6000.c (rs6000_emit_prologue): Add REG_CFA_RESTORE
2034         note for save_LR_around_toc_setup sequence.
2035
2036 2011-08-01  H.J. Lu  <hongjiu.lu@intel.com>
2037
2038         * config/i386/lzcntintrin.h (__lzcnt64): Replace long with long long.
2039
2040 2011-08-01  Sebastian Pop  <sebastian.pop@amd.com>
2041             Joseph Myers  <joseph@codesourcery.com>
2042
2043         * Makefile.in (hwint.o): Depend on DIAGNOSTIC_CORE_H.
2044         * hwint.c: Include diagnostic-core.h.
2045         (abs_hwi): New.
2046         (gcd): Moved here...
2047         (pos_mul_hwi): New.
2048         (mul_hwi): New.
2049         (least_common_multiple): Moved here...
2050         * hwint.h (gcd): ... from here.
2051         (least_common_multiple): ... from here.
2052         (HOST_WIDE_INT_MIN): New.
2053         (HOST_WIDE_INT_MAX): New.
2054         (abs_hwi): Declared.
2055         (gcd): Declared.
2056         (pos_mul_hwi): Declared.
2057         (mul_hwi): Declared.
2058         (least_common_multiple): Declared.
2059         * omega.c (check_pos_mul): Removed.
2060         (check_mul): Removed.
2061         (omega_solve_geq): Use pos_mul_hwi instead of check_pos_mul and
2062         mul_hwi instead of check_mul.
2063
2064 2011-08-01  Richard Henderson  <rth@redhat.com>
2065
2066         PR target/49881
2067         * config/avr/avr.h (PUSH_ROUNDING): New.
2068         * config/avr/avr.md (pushqi1): Rename from *pushqi.
2069         (*pushhi, *pushsi, *pushsf): Remove.
2070         (MPUSH): New mode iterator.
2071         (push<MPUSH>1): New expander.
2072
2073 2011-08-01  Anatoly Sokolov  <aesok@post.ru>
2074
2075         * config/mmix/mmix.h (PREFERRED_RELOAD_CLASS,
2076         PREFERRED_OUTPUT_RELOAD_CLASS): Remove macro.
2077         * config/mmix/mmix-protos.h (mmix_preferred_reload_class,
2078         mmix_preferred_output_reload_class): Remove.
2079         * config/mmix/mmix.c (mmix_preferred_reload_class,
2080         mmix_preferred_output_reload_class): Make static. Change rclass
2081         argument and return type to reg_class_t.
2082         (TARGET_PREFERRED_RELOAD_CLASS,
2083         TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define.
2084
2085 2011-08-01  Joern Rennecke  <joern.rennecke@embecosm.com>
2086
2087         * mode-switching.c (optimize_mode_switching): Fix bug in MODE_AFTER
2088         handling.
2089
2090 2011-08-01  H.J. Lu  <hongjiu.lu@intel.com>
2091
2092         PR target/47766
2093         * config/i386/i386.md (PTR): New.
2094         (stack_protect_set: Check TARGET_LP64 instead of TARGET_64BIT.
2095         (stack_protect_test): Likewise.
2096         (stack_protect_set_<mode>): Replace ":P" with ":PTR".
2097         (stack_tls_protect_set_<mode>): Likewise.
2098         (stack_tls_protect_test_<mode>): Likewise.
2099
2100 2011-08-01  Uros Bizjak  <ubizjak@gmail.com>
2101
2102         PR target/49927
2103         * config/i386/i386.c (ix86_address_subreg_operand): New.
2104         (ix86_decompose_address): Use ix86_address_subreg_operand.
2105         (ix86_legitimate_address_p): Do not assert that subregs satisfy
2106         register_no_elim_operand in DImode.
2107
2108 2011-08-01  Ira Rosen  <ira.rosen@linaro.org>
2109
2110         PR tree-optimization/49926
2111         * tree-vect-loop.c (vect_is_slp_reduction): Check that a statement
2112         in a chain doesn't have uses both inside and outside the loop.
2113
2114 2011-08-01  Georg-Johann Lay  <avr@gjlay.de>
2115
2116         * config/avr/avr.h (mcu_type_s): Add errata_skip field.
2117         * config/avr/avr-devices.c (avr_mcu_types): Use it.
2118         * config/avr/avr-mcus.def (AVR_MCU): Use it.
2119         * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use it to builtin
2120         define __AVR_ERRATA_SKIP__ and __AVR_ERRATA_SKIP_JMP_CALL__.
2121         * config/avr/libgcc.S (__mulshisi3, __ffshi2, __fmulsu_exit):
2122         Use __AVR_ERRATA_SKIP_JMP_CALL__ instead of __AVR_HAVE_JMP_CALL__
2123         to detect if XJMP must not be skipped.
2124
2125 2011-08-02  Alan Modra  <amodra@gmail.com>
2126
2127         * config/rs6000/rs6000-protos.h (rs6000_save_toc_in_prologue_p):
2128         Delete.
2129         * config/rs6000/rs6000.c (rs6000_save_toc_in_prologue_p): Make static.
2130         (rs6000_emit_prologue): Don't prematurely return when
2131         TARGET_SINGLE_PIC_BASE.  Don't emit eh_frame info in
2132         save_toc_in_prologue case.
2133         (rs6000_call_indirect_aix): Only disallow save_toc_in_prologue for
2134         calls_alloca.
2135
2136 2011-08-01  Georg-Johann Lay  <avr@gjlay.de>
2137
2138         * config/avr/avr-devices.c: Delete SVN property svn:executable.
2139         * config/avr/predicates.md: Ditto.
2140         * config/avr/driver-avr.c: Ditto.
2141         * config/avr/genopt.sh: Set SVN property svn:executable to *.
2142
2143 2011-08-01  H.J. Lu  <hongjiu.lu@intel.com>
2144
2145         * calls.c (emit_library_call_value_1): Declare size only if
2146         BLOCK_REG_PADDING is defined.
2147
2148 2011-08-01  Kirill Yukhin  <kirill.yukhin@intel.com>
2149
2150         PR target/49547
2151         * config.gcc (i[34567]86-*-*): Replace abmintrin.h with lzcntintrin.h.
2152         (x86_64-*-*): Likewise.
2153         * config/i386/i386.opt (mlzcnt): New.
2154         * config/i386/abmintrin.h: File removed.
2155         (__lzcnt_u16, __lzcnt, __lzcnt_u64): Moved to ...
2156         * config/i386/lzcntintrin.h: ... here.  New file.
2157         (__lzcnt): Rename to ...
2158         (__lzcnt32): ... this.
2159         * config/i386/bmiintrin.h (head): Update copyright year.
2160         (__lzcnt_u16): Removed.
2161         (__lzcnt_u32): Likewise.
2162         (__lzcnt_u64): Likewise.
2163         * config/i386/x86intrin.h: Include lzcntintrin.h when __LZCNT__
2164         is defined, remove abmintrin.h.
2165         * config/i386/cpuid.h (bit_LZCNT): New.
2166         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2167         LZCNT feature.
2168         * config/i386/i386-c.c (ix86_target_macros_internal): Define
2169         __LZCNT__ if needed.
2170         * config/i386/i386.c (ix86_target_string): New option -mlzcnt.
2171         (ix86_option_override_internal): Handle LZCNT option.
2172         (ix86_valid_target_attribute_inner_p): Likewise.
2173         (struct builtin_description bdesc_args) <IX86_BUILTIN_CLZS>: Update.
2174         * config/i386/i386.h (TARGET_LZCNT): New.
2175         (CLZ_DEFINED_VALUE_AT_ZERO): Update.
2176         * config/i386/i386.md (clz<mode>2): Update insn constraint.
2177         (clz<mode>2_lzcnt): Likewise.
2178         * doc/invoke.texi: Mention -mlzcnt option.
2179         * doc/extend.texi: Likewise.
2180
2181 2011-08-01  Julian Brown  <julian@codesourcery.com>
2182
2183         * configure.ac (fixed-point): Add ARM support.
2184         * configure: Regenerate.
2185         * config/arm/arm.c (arm_fixed_mode_set): New struct.
2186         (arm_set_fixed_optab_libfunc): New.
2187         (arm_set_fixed_conv_libfunc): New.
2188         (arm_init_libfuncs): Initialise fixed-point helper libfuncs with
2189         ARM-specific names.
2190         (aapcs_libcall_value): Return sub-word-size fixed-point libcall
2191         return values in SImode.
2192         (arm_return_in_msb): Return fixed-point types in the msb.
2193         (arm_pad_reg_upwards, arm_pad_arg_upwards): Pad fixed-point types
2194         upwards.
2195         (arm_scalar_mode_supported_p): Support fixed-point modes.
2196         (arm_vector_mode_supported_p): Support vector fixed-point modes.
2197         * config/arm/arm.h (SHORT_FRACT_TYPE_SIZE, FRACT_TYPE_SIZE)
2198         (LONG_FRACT_TYPE_SIZE, LONG_LONG_FRACT_TYPE_SIZE)
2199         (SHORT_ACCUM_TYPE_SIZE, ACCUM_TYPE_SIZE, LONG_ACCUM_TYPE_SIZE)
2200         (LONG_LONG_ACCUM_TYPE_SIZE, MAX_FIXED_MODE_SIZE): Define.
2201         * config/arm/iterators.md (FIXED, ADDSUB, UQADDSUB, QADDSUB, QMUL):
2202         New mode iterators.
2203         (qaddsub_suf): New mode attribute.
2204         * config/arm/arm-modes.def (FRACT, UFRACT, ACCUM, UACCUM): Declare
2205         vector modes.
2206         * config/arm/predicates.md (sat_shift_operator): New predicate.
2207         * config/arm/arm-fixed.md: New.
2208         * config/arm/arm.md: Include arm-fixed.md.
2209         * config/arm/t-arm (MD_INCLUDES): Add arm-fixed.md.
2210
2211 2011-08-01  Julian Brown  <julian@codesourcery.com>
2212
2213         * calls.c (emit_library_call_value_1): Support padding for libcall
2214         arguments and return values.
2215         * config/arm/arm.c (arm_pad_arg_upward): Pad half-float values
2216         downwards in big-endian mode.
2217
2218 2011-08-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2219
2220         PR debug/49887
2221         * config/sol2.c (solaris_code_end): Rename to solaris_file_end.
2222         * config/sol2-protos.h: Likewise.
2223         * config/i386/i386.c (ix86_code_end) [TARGET_SOLARIS]: Don't call
2224         solaris_code_end.
2225         * config/i386/sol2.h [!USE_GAS] (TARGET_ASM_FILE_END): Redefine.
2226         * config/sparc/sparc.c (sparc_file_end) [TARGET_SOLARIS]: Call
2227         solaris_file_end.
2228         * config/sparc/sol2.h (TARGET_ASM_CODE_END): Remove.
2229
2230 2011-08-01  Julian Brown  <julian@codesourcery.com>
2231
2232         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Support FIXED_CST.
2233
2234 2011-08-01  Julian Brown  <julian@codesourcery.com>
2235
2236         * final.c (output_addr_const): Print fixed-point constants as
2237         decimal not hex.
2238
2239 2011-08-01  Richard Guenther  <rguenther@suse.de>
2240
2241         * stor-layout.c (initialize_sizetypes): Properly sign-extend
2242         bitsiztype TYPE_MAX_VALUE.
2243
2244 2011-08-01  Julian Brown  <julian@codesourcery.com>
2245
2246         * optabs.c (prepare_cmp_insn): Use correct biasing for fixed-point
2247         comparison helpers.
2248
2249 2011-07-31  Richard Henderson  <rth@redhat.com>
2250
2251         * config/h8300/crti.asm: Add flags to .section directive.
2252         * config/h8300/crtn.asm: Likewise.
2253
2254 2011-07-31  Richard Henderson  <rth@redhat.com>
2255
2256         * stor-layout.c (initialize_sizetypes): Handle unsigned short.
2257         * tree.c (build_common_tree_nodes): Likewise.
2258
2259 2011-07-31  Kaz Kojima  <kkojima@gcc.gnu.org>
2260
2261         PR target/49880
2262         * config/sh/sh.md (udivsi3_i1): Enable for TARGET_DIVIDE_CALL_DIV1.
2263         (divsi3_i1): Likewise.
2264
2265 2011-07-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2266
2267         PR tree-optimization/49749
2268         * tree-ssa-reassoc.c (get_rank): New forward declaration.
2269         (PHI_LOOP_BIAS): New macro.
2270         (phi_rank): New function.
2271         (loop_carried_phi): Likewise.
2272         (propagate_rank): Likewise.
2273         (get_rank): Add calls to phi_rank and propagate_rank.
2274
2275 2011-07-31  H.J. Lu  <hongjiu.lu@intel.com>
2276
2277         * config/i386/x86-64.h (SIZE_TYPE): Check TARGET_LP64 instead
2278         of TARGET_64BIT.
2279         (PTRDIFF_TYPE): Likewise.
2280
2281 2011-07-31  Uros Bizjak  <ubizjak@gmail.com>
2282
2283         PR target/49920
2284         * config/i386/i386.md (strset): Do not expand strset_singleop
2285         when %eax or $edi are fixed.
2286         (*strsetdi_rex_1): Disable when %eax or %edi are fixed.
2287         (*strsetsi_1): Ditto.
2288         (*strsethi_1): Ditto.
2289         (*strsetqi_1): Ditto.
2290         (*rep_stosdi_rex64): Disable when %eax, %ecx or %edi are fixed.
2291         (*rep_stossi): Ditto.
2292         (*rep_stosqi): Ditto.
2293         (*strlenqi_1): Ditto.
2294         (cmpstrnsi): Also fail when %ecx is fixed.
2295         (*cmpstrnqi_nz_1): Disable when %ecx, %esi or %edi are fixed.
2296         (*cmpstrnqi_1): Ditto.
2297         (*strmovdi_rex_1): Disable when %esi or %edi are fixed.
2298         (*strmovsi_1): Ditto.
2299         (*strmovhi_1): Ditto.
2300         (*strmovqi_1): Ditto.
2301         (*rep_movdi_rex64): Disable when %ecx, %esi or %edi are fixed.
2302         (*rep_movsi): Ditto.
2303         (*rep_movqi): Ditto.
2304
2305 2011-07-31  Mikael Pettersson  <mikpe@it.uu.se>
2306
2307         PR target/47908
2308         * config/m68k/m68k.c (m68k_override_options_after_change): New function.
2309         Disable instruction scheduling for non-ColdFire targets.
2310         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2311
2312 2011-07-31  Revital Eres  <revital.eres@linaro.org>
2313
2314         * ddg.c (create_ddg_dep_from_intra_loop_link): Remove the creation
2315         of anti-dep edge from a branch.
2316         (add_cross_iteration_register_deps): Create anti-dep edge from
2317         a branch.
2318
2319 2011-07-31  Revital Eres  <revital.eres@linaro.org>
2320
2321         * modulo-sched.c: Change comment.
2322         (reset_sched_times): Fix print message.
2323         (print_partial_schedule): Add print info.
2324
2325 2011-07-31  Tom de Vries  <tom@codesourcery.com>
2326
2327         PR middle-end/43513
2328         * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Use max of
2329         get_object_alignment and TYPE_ALIGN.
2330
2331 2011-07-30  Tom de Vries  <tom@codesourcery.com>
2332
2333         PR middle-end/43513
2334         * tree-ssa-dce.c (ref_may_be_aliased): Add assert.
2335         (propagate_necessity): Handle WITH_SIZE_EXPR call arg.
2336
2337 2011-07-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2338
2339         * config/mips/driver-native.c [__sgi__]: Include <invent.h>,
2340         <sys/sbd.h>.
2341         (cpu_types): New array.
2342         (cputype): New function.
2343         (host_detect_local_cpu): Only define buf, f if !__sgi__.
2344         Use scaninvent instead of /proc/cpuinfo if __sgi__.
2345         * config.host: Also use driver-native.o, mips/x-native on
2346         mips-sgi-irix*.
2347         * config/mips/iris6.h [__mips__] (host_detect_local_cpu): Declare.
2348         (EXTRA_SPEC_FUNCTIONS, MARCH_MTUNE_NATIVE_SPECS): Define.
2349         (DRIVER_SELF_SPECS): Add MARCH_MTUNE_NATIVE_SPECS.
2350
2351 2011-07-29  Jakub Jelinek  <jakub@redhat.com>
2352
2353         PR middle-end/49897
2354         PR middle-end/49898
2355         * omp-low.c (use_pointer_for_field): If disallowing copy-in/out
2356         in nested parallel and outer is a gimple_reg, mark it as addressable
2357         and set its bit in task_shared_vars bitmap too.
2358
2359 2011-07-29  Uros Bizjak  <ubizjak@gmail.com>
2360
2361         * config/i386/predicates.md (tp_or_register_operand): Remove predicate.
2362
2363 2011-07-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2364
2365         * config/alpha/driver-alpha.c (IMPLVER_EV4_FAMILY,
2366         IMPLVER_EV5_FAMILY, IMPLVER_EV6_FAMILY, IMPLVER_EV7_FAMILY): Define.
2367         (AMASK_BWX, AMASK_FIX, AMASK_CIX, AMASK_MVI, AMASK_PRECISE,
2368         AMASK_LOCKPFTCHOK): Define.
2369         (host_detect_local_cpu): Remove buf, f, cpu_names.
2370         Define cpu_types, implver, amask.
2371         Use __builtin_alpha_implver, __builtin_alpha_amask to determine
2372         native CPU.
2373         * config.host: Also use driver-alpha.o, alpha/x-alpha on
2374         alpha*-dec-osf*.
2375         * config/alpha/osf5.h [__alpha__ || __alpha]
2376         (host_detect_local_cpu): Declare.
2377         (EXTRA_SPEC_FUNCTIONS, MCPU_MTUNE_NATIVE_SPECS)
2378         (DRIVER_SELF_SPECS): Define.
2379
2380 2011-07-29  Uros Bizjak  <ubizjak@gmail.com>
2381
2382         PR target/47715
2383         * config/i386/i386.md (*load_tp_x32): New.
2384         (*load_tp_x32_zext): Ditto.
2385         (*add_tp_x32): Ditto.
2386         (*add_tp_x32_zext): Ditto.
2387         (*load_tp_<mode>): Disable for TARGET_X32 targets.
2388         (*add_tp_<mode>): Ditto.
2389         * config/i386/i386.c (get_thread_pointer): Load thread pointer in
2390         ptr_mode and convert to Pmode if needed.
2391
2392 2011-07-29  Georg-Johann Lay  <avr@gjlay.de>
2393
2394         PR target/49687
2395         * config/avr/avr.md (mulsi3, *mulsi3, mulu<mode>si3,
2396         muls<mode>si3, mulohisi3, mulhisi3, umulhisi3, usmulhisi3,
2397         *<any_extend:extend_prefix><any_extend2:extend_prefix>mul<QIHI:mode><QIHI2:mode>si3):
2398         Add X to register footprint: Clobber r26/r27.
2399
2400 2011-07-29  Richard Guenther  <rguenther@suse.de>
2401
2402         * builtins.c (fold_builtin_signbit): Build the comparison
2403         with a proper type.
2404
2405 2011-07-29  Richard Guenther  <rguenther@suse.de>
2406
2407         PR tree-optimization/49893
2408         * tree-predcom.c (suitable_reference_p): Volatile references
2409         are not suitable.
2410
2411 2011-07-29  Georg-Johann Lay  <avr@gjlay.de>
2412
2413         PR target/49313
2414         * config/avr/libgcc.S (__ffshi2): Don't skip 2-word instruction.
2415         (__ctzsi2): Result for 0 may be undefined.
2416         (__ctzhi2): Result for 0 may be undefined.
2417         (__popcounthi2): Don't clobber r30. Use __popcounthi2_tail.
2418         (__popcountsi2): Ditto. And don't clobber r26.
2419         (__popcountdi2): Ditto. And don't clobber r27.
2420         * config/avr/avr.md (UNSPEC_COPYSIGN): New c_enum.
2421         (parityhi2): New expand.
2422         (paritysi2): New expand.
2423         (popcounthi2): New expand.
2424         (popcountsi2): New expand.
2425         (clzhi2): New expand.
2426         (clzsi2): New expand.
2427         (ctzhi2): New expand.
2428         (ctzsi2): New expand.
2429         (ffshi2): New expand.
2430         (ffssi2): New expand.
2431         (copysignsf3): New insn.
2432         (bswapsi2): New expand.
2433         (*parityhi2.libgcc): New insn.
2434         (*parityqihi2.libgcc): New insn.
2435         (*paritysihi2.libgcc): New insn.
2436         (*popcounthi2.libgcc): New insn.
2437         (*popcountsi2.libgcc): New insn.
2438         (*popcountqi2.libgcc): New insn.
2439         (*popcountqihi2.libgcc): New insn-and-split.
2440         (*clzhi2.libgcc): New insn.
2441         (*clzsihi2.libgcc): New insn.
2442         (*ctzhi2.libgcc): New insn.
2443         (*ctzsihi2.libgcc): New insn.
2444         (*ffshi2.libgcc): New insn.
2445         (*ffssihi2.libgcc): New insn.
2446         (*bswapsi2.libgcc): New insn.
2447
2448 2011-07-29  Richard Guenther  <rguenther@suse.de>
2449
2450         * tree-vrp.c (get_value_range): Only set parameter default
2451         definitions to varying, leave others at undefined.
2452         (extract_range_from_binary_expr): Fix undefined handling.
2453         (vrp_visit_phi_node): Handle merged undefined state.
2454
2455 2011-07-29  Wei Guozhi  <carrot@google.com>
2456
2457         PR rtl-optimization/49799
2458         * combine.c (make_compound_operation): Check if the bit field is valid
2459         before change it to bit field extraction.
2460
2461 2011-07-29  Bernd Schmidt  <bernds@codesourcery.com>
2462
2463         PR rtl-optimization/49891
2464         * cfgrtl.c (force_nonfallthru_and_redirect): Set JUMP_LABEL for
2465         newly created returnjumps.
2466
2467 2011-07-28  DJ Delorie  <dj@redhat.com>
2468
2469         * expr.c (expand_expr_addr_expr_1): Detect a user request for a
2470         local frame in a naked function, and produce a suitable error for
2471         that specific case.
2472
2473         * config/m32c/m32c.c (m32c_secondary_reload_class): Allow PSI
2474         registers to be reloaded in HI classes when the target is HI.
2475
2476 2011-07-28  Sebastian Pop  <sebastian.pop@amd.com>
2477
2478         * graphite-clast-to-gimple.c: Replace v1, v2, lb, ub with
2479         bound_one, bound_two.
2480
2481 2011-07-28  Sebastian Pop  <sebastian.pop@amd.com>
2482
2483         PR middle-end/48648
2484         * graphite-clast-to-gimple.c (clast_get_body_of_loop): Handle
2485         CLAST assignments.
2486         (translate_clast): Same.
2487         (translate_clast_assignment): New.
2488
2489 2011-07-28  Sebastian Pop  <sebastian.pop@amd.com>
2490
2491         PR tree-optimization/49876
2492         * sese.c (rename_uses): Do not return false on gloog_error: set
2493         the new_expr to integer_zero_node and continue code generation.
2494         (graphite_copy_stmts_from_block): Remove early exit on gloog_error.
2495
2496 2011-07-28  Jakub Jelinek  <jakub@redhat.com>
2497
2498         PR debug/49846
2499         * var-tracking.c (prepare_call_arguments): For non-MODE_INT stack
2500         arguments also check if they aren't initialized with a MODE_INT
2501         mode of the same size.
2502
2503 2011-07-28  Aldy Hernandez  <aldyh@redhat.com>
2504
2505         * expr.c (get_bit_range): Handle *MEM_REF's.
2506
2507 2011-07-28  Bernd Schmidt  <bernds@codesourcery.com>
2508
2509         * rtlanal.c (tablejump_p): False for returns.
2510         * reorg.c (first_active_target_insn): New static function.
2511         (find_end_label): Set JUMP_LABEL for a new returnjump.
2512         (optimize_skip, get_jump_flags, rare_destination,
2513         mostly_true_jump, get_branch_condition,
2514         steal_delay_list_from_target, own_thread_p,
2515         fill_simple_delay_slots, follow_jumps, fill_slots_from_thread,
2516         fill_eager_delay_slots, relax_delay_slots, make_return_insns,
2517         dbr_schedule): Adjust to handle ret_rtx in JUMP_LABELs.
2518         * jump.c (delete_related_insns): Likewise.
2519         (jump_to_label_p): New function.
2520         (redirect_target): New static function.
2521         (redirect_exp_1): Use it.  Adjust to handle ret_rtx in JUMP_LABELS.
2522         (redirect_jump_1): Assert that the new label is nonnull.
2523         (redirect_jump): Likewise.
2524         (redirect_jump_2): Check for ANY_RETURN_P rather than NULL labels.
2525         * ifcvt.c (find_if_case_1): Take care when redirecting jumps to the
2526         exit block.
2527         (dead_or_predicable): Change NEW_DEST arg to DEST_EDGE.  All callers
2528         changed.  Ensure that the right label is passed to redirect_jump.
2529         * function.c (emit_return_into_block,
2530         thread_prologue_and_epilogue_insns): Ensure new returnjumps have
2531         ret_rtx in their JUMP_LABEL.
2532         * print-rtl.c (print_rtx): Handle ret_rtx in a JUMP_LABEL.
2533         * emit-rtl.c (skip_consecutive_labels): Allow the caller to
2534         pass ret_rtx as label.
2535         * cfglayout.c (fixup_reorder_chain): Use
2536         force_nonfallthru_and_redirect rather than force_nonfallthru.
2537         (duplicate_insn_chain): Copy JUMP_LABELs for returns.
2538         * rtl.h (ANY_RETURN_P): New macro.
2539         (jump_to_label_p): Declare.
2540         * resource.c (find_dead_or_set_registers): Handle ret_rtx in
2541         JUMP_LABELs.
2542         (mark_target_live_regs): Likewise.
2543         * basic-block.h (force_nonfallthru_and_redirect): Declare.
2544         * cfgrtl.c (force_nonfallthru_and_redirect): No longer static.
2545         * config/alpha/alpha.c (alpha_tablejump_addr_vec,
2546         alpha_tablejump_best_label): Remove functions.
2547         * config/alpha/alpha-protos.c (alpha_tablejump_addr_vec,
2548         alpha_tablejump_best_label): Remove declarations.
2549         * config/sh/sh.c (barrier_align, split_branches): Adjust for
2550         ret_rtx in JUMP_LABELs.
2551         * config/arm/arm.c (is_jump_table): Likewise.
2552
2553 2011-07-28  Uros Bizjak  <ubizjak@gmail.com>
2554
2555         * config/i386/predicates.md (pic_32bit_opreand): Do not define as
2556         special predicate.  Remove explicit mode checks.
2557
2558 2011-07-28  Jakub Jelinek  <jakub@redhat.com>
2559
2560         * dwarf2out.c (resolve_addr): For -gdwarf-2 don't optimize
2561         DW_AT_data_member_location containing just DW_OP_plus_uconst.
2562
2563         PR debug/49871
2564         * dwarf2out.c (size_of_die, value_format, output_die): Use
2565         DW_FORM_udata instead of DW_FORM_data[48] for
2566         dw_val_class_unsigned_const DW_AT_data_member_location for DWARF 3.
2567
2568 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
2569
2570         * config/i386/i386.md (*tls_global_dynamic_64): Update
2571         length attribute.
2572
2573 2011-07-28  Uros Bizjak  <ubizjak@gmail.com>
2574
2575         PR target/47715
2576         * config/i386/i386.md (*tls_global_dynamic_64): Remove mode from
2577         tls_symbolic_operand check.  Update code sequence for TARGET_X32.
2578         (tls_global_dynamic_64): Remove mode from tls_symbolic_operand check.
2579         (tls_dynamic_gnu2_64): Ditto.
2580         (*tls_dynamic_gnu2_lea_64): Ditto.
2581         (*tls_dynamic_gnu2_call_64): Ditto.
2582         (*tls_dynamic_gnu2_combine_64): Ditto.
2583
2584 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
2585
2586         * config.gcc: Set need_64bit_hwint to yes for x86 targets.
2587
2588 2011-07-28  H.J. Lu  <hongjiu.lu@intel.com>
2589
2590         PR target/47364
2591         * config/i386/i386.md (strlen<mode>): Replace SWI48x with P.
2592
2593 2011-07-28  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
2594
2595         * config/arm/vfp.md ("*movdf_vfp"): Handle the VFP constraints
2596         before the core constraints. Adjust attributes.
2597         ("*thumb2_movdf_vfp"): Likewise.
2598
2599 2011-07-28  Kai Tietz  <ktietz@redhat.com>
2600
2601         * tree-vrp.c (simplify_stmt_using_ranges): Remove TRUTH_NOT_EXPR case.
2602         (simplify_truth_ops_using_ranges): Likewise.
2603         (build_assert_expr_for): Likewise.
2604         (build_assert_expr_for_1): Remove TRUTH_NOT_EXPR case
2605         and handle BIT_NOT_EXPR for truth-operation.
2606
2607 2011-07-28  Georg-Johann Lay  <avr@gjlay.de>
2608
2609         PR target/49313
2610         Undo r176835 from trunk
2611         2011-07-27  Georg-Johann Lay
2612
2613 2011-07-28  Georg-Johann Lay  <avr@gjlay.de>
2614
2615         PR target/49687
2616         * config/avr/t-avr (LIB1ASMFUNCS): Remove _xmulhisi3_exit.
2617         Add _muluhisi3, _mulshisi3, _usmulhisi3.
2618         * config/avr/libgcc.S (__mulsi3): Rewrite.
2619         (__mulhisi3): Rewrite.
2620         (__umulhisi3): Rewrite.
2621         (__usmulhisi3): New.
2622         (__muluhisi3): New.
2623         (__mulshisi3): New.
2624         (__mulohisi3): New.
2625         (__mulqi3, __mulqihi3, __umulqihi3, __mulhi3): Use DEFUN/ENDF to
2626         declare.
2627         * config/avr/predicates.md (pseudo_register_operand): Rewrite.
2628         (pseudo_register_or_const_int_operand): New.
2629         (combine_pseudo_register_operand): New.
2630         (u16_operand): New.
2631         (s16_operand): New.
2632         (o16_operand): New.
2633         * config/avr/avr.c (avr_rtx_costs): Handle costs for mult:SI.
2634         * config/avr/avr.md (QIHI, QIHI2): New mode iterators.
2635         (any_extend, any_extend2): New code iterators.
2636         (extend_prefix): New code attribute.
2637         (mulsi3): Rewrite. Turn insn to expander.
2638         (mulhisi3): Ditto.
2639         (umulhisi3): Ditto.
2640         (usmulhisi3): New expander.
2641         (*mulsi3): New insn-and-split.
2642         (mulu<mode>si3): New insn-and-split.
2643         (muls<mode>si3): New insn-and-split.
2644         (mulohisi3): New insn-and-split.
2645         (*uumulqihisi3, *uumulhiqisi3, *uumulhihisi3, *uumulqiqisi3,
2646         *usmulqihisi3, *usmulhiqisi3, *usmulhihisi3, *usmulqiqisi3,
2647         *sumulqihisi3, *sumulhiqisi3, *sumulhihisi3, *sumulqiqisi3,
2648         *ssmulqihisi3, *ssmulhiqisi3, *ssmulhihisi3, *ssmulqiqisi3): New
2649         insn-and-split.
2650         (*mulsi3_call): Rewrite.
2651         (*mulhisi3_call): Rewrite.
2652         (*umulhisi3_call): Rewrite.
2653         (*usmulhisi3_call): New insn.
2654         (*muluhisi3_call): New insn.
2655         (*mulshisi3_call): New insn.
2656         (*mulohisi3_call): New insn.
2657         (extendqihi2): Use combine_pseudo_register_operand as predicate
2658         for operand 1.
2659         (extendqisi2): Ditto.
2660         (zero_extendqihi2): Ditto.
2661         (zero_extendqisi2): Ditto.
2662         (zero_extendhisi2): Ditto.
2663         (extendhisi2): Ditto. Don't early-clobber operand 0.
2664
2665 2011-07-28  Uros Bizjak  <ubizjak@gmail.com>
2666
2667         * config/i386/i386.c (add->lea splitter): Add SWI mode to PLUS RTX.
2668
2669 2011-07-27  Sebastian Pop  <sebastian.pop@amd.com>
2670
2671         PR tree-optimization/49471
2672         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Build an unsigned
2673         iv only when the largest type is unsigned.  Do not call
2674         lang_hooks.types.type_for_size.
2675
2676 2011-07-27  Sebastian Pop  <sebastian.pop@amd.com>
2677
2678         PR middle-end/45450
2679         * graphite-poly.c (apply_poly_transforms): Disable legality check
2680         after an openscop read.
2681
2682 2011-07-27  Sebastian Pop  <sebastian.pop@amd.com>
2683
2684         PR middle-end/47691
2685         * graphite-clast-to-gimple.c (translate_clast_user): Update use of
2686         copy_bb_and_scalar_dependences.
2687         * sese.c (rename_uses): Do not call gcc_assert.  Set gloog_error.
2688         (graphite_copy_stmts_from_block): Update call to rename_uses.
2689         (copy_bb_and_scalar_dependences): Update call to
2690         graphite_copy_stmts_from_block.
2691         * sese.h (copy_bb_and_scalar_dependences): Update declaration.
2692
2693 2011-07-27  Georg-Johann Lay  <avr@gjlay.de>
2694
2695         PR target/49313
2696         * config/avr/libgcc.S (__ffshi2): Don't skip 2-word instruction.
2697         (__ctzsi2): Result for 0 may be undefined.
2698         (__ctzhi2): Result for 0 may be undefined.
2699         (__popcounthi2): Don't clobber r30. Use __popcounthi2_tail.
2700         (__popcountsi2): Ditto. And don't clobber r26.
2701         (__popcountdi2): Ditto. And don't clobber r27.
2702         * config/avr/avr.md (UNSPEC_COPYSIGN): New c_enum.
2703         (parityhi2): New expand.
2704         (paritysi2): New expand.
2705         (popcounthi2): New expand.
2706         (popcountsi2): New expand.
2707         (clzhi2): New expand.
2708         (clzsi2): New expand.
2709         (ctzhi2): New expand.
2710         (ctzsi2): New expand.
2711         (ffshi2): New expand.
2712         (ffssi2): New expand.
2713         (copysignsf3): New insn.
2714         (bswapsi2): New expand.
2715         (*parityhi2.libgcc): New insn.
2716         (*parityqihi2.libgcc): New insn.
2717         (*paritysihi2.libgcc): New insn.
2718         (*popcounthi2.libgcc): New insn.
2719         (*popcountsi2.libgcc): New insn.
2720         (*popcountqi2.libgcc): New insn.
2721         (*popcountqihi2.libgcc): New insn-and-split.
2722         (*clzhi2.libgcc): New insn.
2723         (*clzsihi2.libgcc): New insn.
2724         (*ctzhi2.libgcc): New insn.
2725         (*ctzsihi2.libgcc): New insn.
2726         (*ffshi2.libgcc): New insn.
2727         (*ffssihi2.libgcc): New insn.
2728         (*bswapsi2.libgcc): New insn.
2729
2730 2011-07-27  Uros Bizjak  <ubizjak@gmail.com>
2731
2732         * config/i386/i386.c (ix86_expand_move): Do not explicitly check
2733         the mode of symbolic_opreand RTXes.
2734
2735 2011-07-27  Uros Bizjak  <ubizjak@gmail.com>
2736
2737         * config/i386/predicates.md (x86_64_movabs_operand): Return false
2738         for pic_32bit_operand RTXes.
2739         * config/i386/i386.c (ix86_expand_move): Check x86_64_movabs_operand
2740         in DImode.
2741
2742 2011-07-27  Kai Tietz  <ktietz@redhat.com>
2743
2744         * config/i386/i386.c (ix86_option_override_internal): Allow -mabi
2745         for 32-bit, too.
2746         (ix86_handle_abi_attribute): Allow function attributes
2747         ms_abi/sysv_abi in 32-bit mode, too.
2748         * doc/extend.texi: Adjust attribute documentation.
2749
2750         * gimple-fold.c (or_comparisons_1): Remove TRUTH_AND/OR
2751         expression handling.
2752         (and_var_with_comparison_1): Likewise.
2753
2754 2011-07-27  Aldy Hernandez  <aldyh@redhat.com>
2755
2756         * params.h (ALLOW_STORE_DATA_RACES): New.
2757         * params.def (PARAM_ALLOW_STORE_DATA_RACES): New.
2758         * Makefile.in (expr.o): Depend on PARAMS_H.
2759         * machmode.h (get_best_mode): Add argument.
2760         * fold-const.c (optimize_bit_field_compare): Add argument to
2761         get_best_mode.
2762         (fold_truthop): Same.
2763         * ifcvt.c (noce_emit_move_insn): Add argument to store_bit_field.
2764         * expr.c (emit_group_store): Same.
2765         (copy_blkmode_from_reg): Same.
2766         (write_complex_part): Same.
2767         (optimize_bitfield_assignment_op): Add argument.
2768         Add argument to get_best_mode.
2769         (get_bit_range): New.
2770         (expand_assignment): Calculate maxbits and pass it down accordingly.
2771         (store_field): New argument.
2772         (expand_expr_real_2): New argument to store_field.  Include params.h.
2773         * expr.h (store_bit_field): New argument.
2774         * stor-layout.c (get_best_mode): Restrict mode expansion by taking
2775         into account maxbits.
2776         * calls.c (store_unaligned_arguments_into_pseudos): New argument
2777         to store_bit_field.
2778         * expmed.c (store_bit_field_1): New argument.  Use it.
2779         (store_bit_field): Same.
2780         (store_fixed_bit_field): Same.
2781         (store_split_bit_field): Same.
2782         (extract_bit_field_1): Pass new argument to get_best_mode.
2783         (extract_bit_field): Same.
2784         * stmt.c (store_bit_field): Pass new argument to store_bit_field.
2785         * doc/invoke.texi: Document parameter allow-store-data-races.
2786
2787 2011-07-27  Jakub Jelinek  <jakub@redhat.com>
2788
2789         * dwarf2out.c (gen_producer_string): Ignore also -fverbose-asm option.
2790
2791 2011-07-27  Kai Tietz  <ktietz@redhat.com>
2792
2793         * tree-vrp.c (extract_range_from_binary_expr): Remove
2794         TRUTH-binary cases and add new bitwise-cases.
2795         (extract_range_from_assignment): Likewise.
2796         (register_edge_assert_for_1): Likeiwise.
2797         (register_edge_assert_for): Likewise.
2798         (simplify_truth_ops_using_ranges): Likewise.
2799         (simplify_stmt_using_ranges): Likewise.
2800
2801 2011-07-26  H.J. Lu  <hongjiu.lu@intel.com>
2802
2803         PR target/47372
2804         * config/i386/i386.c (ix86_delegitimize_address): Call
2805         simplify_gen_subreg for PIC with mode of x only if modes of
2806         x and orig_x are different.
2807
2808 2011-07-26  Jakub Jelinek  <jakub@redhat.com>
2809
2810         * dwarf2out.c (output_macinfo_op): Ensure fd->filename points
2811         to GC allocated copy of the string.
2812         (dwarf2out_finish): Emit .debug_macinfo or .debug_macro sections
2813         before .debug_line, not after it.
2814
2815 2011-07-26  Sebastian Pop  <sebastian.pop@amd.com>
2816
2817         PR middle-end/47046
2818         * tree-chrec.h (evolution_function_is_affine_p): Recursively call
2819         evolution_function_is_affine_p on CHREC_RIGHT.
2820
2821 2011-07-26  Sebastian Pop  <sebastian.pop@amd.com>
2822
2823         * tree-data-ref.c (max_stmt_executions_tree): Do not call
2824         lang_hooks.types.type_for_size.
2825
2826 2011-07-26  Sebastian Pop  <sebastian.pop@amd.com>
2827
2828         PR middle-end/47653
2829         * graphite-scop-detection.c (graphite_can_represent_loop): Discard
2830         loops using wrapping semantics.
2831
2832 2011-07-26  Sebastian Pop  <sebastian.pop@amd.com>
2833
2834         PR middle-end/48805
2835         * tree-scalar-evolution.c (instantiate_scev_r): Return
2836         chrec_dont_know for ADDR_EXPR.
2837
2838 2011-07-26  Uros Bizjak  <ubizjak@gmail.com>
2839             H.J. Lu  <hongjiu.lu@intel.com>
2840
2841         PR target/47369
2842         PR target/49853
2843         * config/i386/i386.c (ix86_expand_move): Call convert_to_mode
2844         if legitimize_tls_address returned operand in wrong mode. Allow
2845         SImode and DImode symbolic operand for PIC.  Call convert_to_mode
2846         if legitimize_pic_address returned operand in wrong mode.
2847
2848 2011-07-26  Martin Jambor  <mjambor@suse.cz>
2849
2850         * tree-sra.c (tree_non_mode_aligned_mem_p): Strip conversions and
2851         return false for invariants.
2852
2853 2011-07-26  Uros Bizjak  <ubizjak@gmail.com>
2854
2855         * config/i386/i386.md (add->lea splitter): Implement using SWI
2856         mode iterator.  Change operand 2 predicate to <nonmemory_operand>.
2857         (add->lea zext splitter): Change operand 2 predicate to
2858         x86_64_nonmemory_operand.
2859
2860 2011-07-26  Richard Guenther  <rguenther@suse.de>
2861
2862         * predict.c (maybe_hot_frequency_p): Make sure a zero entry-block
2863         frequency makes everything hot.
2864
2865 2011-07-26  Richard Guenther  <rguenther@suse.de>
2866
2867         PR tree-optimization/49840
2868         * tree-vrp.c (range_fits_type_p): Properly handle full
2869         double-int precision.
2870
2871 2011-07-26  Martin Jambor  <mjambor@suse.cz>
2872
2873         PR bootstrap/49786
2874         * ipa-cp.c (update_profiling_info): Avoid overflow when updating
2875         counts.
2876         (update_specialized_profile): Likewise.
2877
2878 2011-07-26  Uros Bizjak  <ubizjak@gmail.com>
2879             H.J. Lu  <hongjiu.lu@intel.com>
2880
2881         PR target/47381
2882         PR target/49832
2883         PR target/49833
2884         * config/i386/i386.md (i): Change SImode attribute to "e".
2885         (g): Change SImode attribute to "rme".
2886         (di): Change SImode attribute to "nF".
2887         (general_operand): Change SImode attribute to x86_64_general_operand.
2888         (general_szext_operand): Change SImode attribute to
2889         x86_64_szext_general_operand.
2890         (immediate_operand): Change SImode attribute to
2891         x86_64_immediate_operand.
2892         (nonmemory_operand): Change SImode attribute to
2893         x86_64_nonmemory_operand.
2894         (*movdi_internal_rex64): Remove mode from pic_32bit_operand check.
2895         (*movsi_internal): Ditto.  Use "e" constraint in alternative 2.
2896         (*lea_1): Use SWI48 mode iterator.
2897         (*lea_1_zext): New insn pattern.
2898         (testsi_ccno_1): Use x86_64_nonmemory_operand predicate for operand 2.
2899         (*bt<mode>): Ditto.
2900         (*add<mode>1): Use x86_64_general_operand predicate for operand 2.
2901         Update operand constraints.
2902         (addsi_1_zext): Ditto.
2903         (*add<mode>2): Ditto.
2904         (*addsi_3_zext): Ditto.
2905         (*subsi_1_zext): Ditto.
2906         (*subsi_2_zext): Ditto.
2907         (*subsi_3_zext): Ditto.
2908         (*addsi3_carry_zext): Ditto.
2909         (*<plusminus_insn>si3_zext_cc_overflow): Ditto.
2910         (*mulsi3_1_zext): Ditto.
2911         (*andsi_1): Ditto.
2912         (*andsi_1_zext): Ditto.
2913         (*andsi_2_zext): Ditto.
2914         (*<any_or:code>si_1_zext): Ditto.
2915         (*<any_or:code>si_2_zext): Ditto.
2916         (*test<mode>_1): Use <general_operand> predicate for operand 1.
2917         (*and<mode>_2): Ditto.
2918         (mov<mode>cc): Use  <general_operand> predicate for operands 1 and 2.
2919         (add->lea splitter): Check operand modes in insn constraint.  Extend
2920         operands less than SImode wide to SImode.
2921         (add->lea zext splitter): Do not extend input operands to DImode.
2922         (*lea_general_1): Handle only QImode and HImode operands.
2923         (*lea_general_2): Ditto.
2924         (*lea_general_3): Ditto.
2925         (*lea_general_1_zext): Remove.
2926         (*lea_general_2_zext): Ditto.
2927         (*lea_general_3_zext): Ditto.
2928         (*lea_general_4): Check operand modes in insn constraint.  Extend
2929         operands less than SImode wide to SImode.
2930         (ashift->lea splitter): Ditto.
2931         * config/i386/i386.c (ix86_print_operand_address): Print address
2932         registers with 'q' modifier on 64bit targets.
2933         * config/i386/predicates.md (pic_32bit_opreand): Define as special
2934         predicate.  Reject non-SI and non-DI modes.
2935
2936 2011-07-25  Andrew Pinski  <apinski@cavium.com>
2937
2938         PR tree-opt/49671
2939         * tree-inline.c (remap_gimple_op_r): Copy TREE_THIS_VOLATILE and
2940         TREE_THIS_NOTRAP into the inner most MEM_REF.
2941         Always copy TREE_THIS_VOLATILE.
2942         * tree-sra.c (ptr_parm_has_direct_uses): Check that the lhs, rhs and
2943         arguments are not volatile references.
2944
2945 2011-07-25  Richard Henderson  <rth@redhat.com>
2946
2947         * insn-notes.def (NOTE_INSN_CFA_RESTORE_STATE): Remove.
2948         * final.c (final_scan_insn): Don't test for it.
2949         (rest_of_clean_state): Likewise.
2950
2951 2011-07-25  Richard Henderson  <rth@redhat.com>
2952
2953         PR debug/49841
2954         * config/rs6000/rs6000.c (rs6000_frame_related): Return the insn.
2955         (emit_frame_save): Likewise.
2956         (rs6000_emit_prologue): Move the FRAME_RELATED_EXPR from the save
2957         insn onto a dummy blockage insn after the join label.
2958
2959 2011-07-25  Richard Henderson  <rth@redhat.com>
2960
2961         * dwarf2cfi.c (dw_trace_info): Add ID member.
2962         (get_trace_index): Remove.  Change users to use ID member.
2963         (before_next_cfi_note): New.
2964         (connect_traces): Remove unreachable traces before the main loop.
2965         Look across one trace and generate remember/restore_state if needed.
2966
2967 2011-07-25  Richard Henderson  <rth@redhat.com>
2968
2969         * dwarf2cfi.c (dump_cfi_row, debug_cfi_row): New.
2970
2971 2011-07-25  Joern Rennecke  <joern.rennecke@embecosm.com>
2972
2973         * genattr.c (write_upcase, gen_attr <enum definition writing>):
2974         Move to ...
2975         * genattr-common.c ... here.
2976         (main): Call gen_attr.
2977         * optc-gen.awk: Make generated program include insn-attr-common.h .
2978         * Makefile.in (oprions.o): Depend on insn-attr-common.h
2979
2980 2011-07-25  Anatoly Sokolov  <aesok@post.ru>
2981
2982         * config/m32c/m32c.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS,
2983         PRINT_OPERAND_PUNCT_VALID_P): Remove macro.
2984         * config/m32c/m32c-protos.h (m32c_print_operand_punct_valid_p,
2985         m32c_print_operand, m32c_print_operand_address): Remove.
2986         * config/m32c/m32c.c (m32c_print_operand_punct_valid_p): Make static.
2987         Change return type to bool. Change argument type to bool.
2988         (m32c_print_operand, m32c_print_operand_address): Make static.
2989         (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS,
2990         TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define.
2991
2992 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2993
2994         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
2995         attributes): Document mmap.
2996
2997 2011-07-25  Anatoly Sokolov  <aesok@post.ru>
2998
2999         * config/mmix/mmix.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS,
3000         PRINT_OPERAND_PUNCT_VALID_P): Remove macro.
3001         * config/mmix/mmix-protos.h (mmix_print_operand_punct_valid_p,
3002         mmix_print_operand, mmix_print_operand_address): Remove.
3003         * config/mmix/mmix.c (mmix_print_operand_punct_valid_p): Make static.
3004         Change return type to bool. Change argument type to bool.
3005         (mmix_print_operand, mmix_print_operand_address): Make static.
3006         (mmix_intval, mmix_output_condition): Change 'x' argument type
3007         to const_rtx.
3008         (TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS,
3009         TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define.
3010
3011 2011-07-25  Georg-Johann Lay  <avr@gjlay.de>
3012
3013         PR target/39386
3014         * config/avr/avr.c (out_shift_with_cnt): Use tmp_reg as
3015         shift counter for x << x and x >> x shifts.
3016
3017 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3018
3019         PR target/47124
3020         * config.gcc: Reject *-*-solaris2 configuration.
3021
3022 2011-07-25  Richard Sandiford  <richard.sandiford@linaro.org>
3023
3024         PR tree-optimization/49809
3025         * tree-ssa-phiopt.c (cond_if_else_store_replacement): Use
3026         gimple_get_lhs instead of gimple_assign_lhs.
3027
3028 2011-07-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3029
3030         * system.h [__cplusplus]: Wrap C function declarations in extern "C".
3031
3032 2011-07-25  Richard Guenther  <rguenther@suse.de>
3033
3034         PR tree-optimization/49822
3035         * tree-ssa-forwprop.c (remove_prop_source_from_use): Robustify
3036         more.  Make sure to preserve stmts with side-effects.  Properly
3037         handle virtual defs, follow a longer def chain.
3038
3039 2011-07-22  Romain Geissler  <romain.geissler@gmail.com>
3040
3041         PR plugins/45348
3042         PR plugins/48425
3043         PR plugins/46577
3044         * Makefile.in: Do not flatten c-family directory when installing
3045         plugin headers.
3046
3047 2011-07-25  Eric Botcazou  <ebotcazou@adacore.com>
3048
3049         * ipa-inline.c (can_inline_edge_p): Look into DECL_STRUCT_FUNCTION of
3050         original nodes if we are dealing with virtual clones.
3051
3052 2011-07-25  Bernd Schmidt  <bernds@codesourcery.com>
3053
3054         * common/config/c6x/c6x-common.c: New file.
3055
3056 2011-07-25  Roman Zhuykov  <zhroma@ispras.ru>
3057
3058         * tree-flow.h (tree_ssa_loop_version): Remove unused declaration.
3059
3060 2011-07-25  Richard Guenther  <rguenther@suse.de>
3061
3062         PR tree-optimization/49715
3063         * tree-vrp.c: Include expr.h and optabs.h.
3064         (range_fits_type_): New function.
3065         (simplify_float_conversion_using_ranges): Likewise.
3066         (simplify_stmt_using_ranges): Call it.
3067         * Makefile.in (tree-vrp.o): Add $(EXPR_H) and $(OPTABS_H) dependencies.
3068         * optabs.c (can_float_p): Export.
3069         * optabs.h (can_float_p): Declare.
3070
3071 2011-07-25  Richard Guenther  <rguenther@suse.de>
3072
3073         * tree-vrp.c (num_vr_values, values_propagated): New global vars.
3074         (get_value_range): For out-of-range SSA names or names created
3075         after propagation return a read-only varying range.
3076         (dump_all_value_ranges): Adjust.
3077         (vrp_initialize): Likewise.
3078         (vrp_finalize): Likewise.
3079
3080 2011-07-24  Richard Henderson  <rth@redhat.com>
3081
3082         PR debug/49831
3083         * dwarf2cfi.c (connect_traces): Allow unvisited traces.  Skip
3084         them entirely.
3085
3086 2011-07-24  Richard Henderson  <rth@redhat.com>
3087
3088         PR debug/49825
3089         * dwarf2cfi.c (dwarf2out_stack_adjust): Move A_O_A test earlier.
3090         (dwarf2out_notice_stack_adjust): Use args_size from call_insn.
3091
3092 2011-07-24  Richard Henderson  <rth@redhat.com>
3093
3094         PR debug/49827
3095         * dwarf2cfi.c (create_trace_edges): Handle sequences properly.
3096
3097 2011-07-24  Richard Henderson  <rth@redhat.com>
3098
3099         * dwarf2cfi.c (maybe_record_trace_start): Add abnormal parameter.
3100         Zero args_size for abnormal edges.  Adjust all callers.
3101
3102 2011-07-24  Richard Henderson  <rth@redhat.com>
3103
3104         PR debug/49825
3105         * dwarf2cfi.c (cfi_row_equal_p): Don't compare args_size.
3106
3107 2011-07-24  H.J. Lu  <hongjiu.lu@intel.com>
3108
3109         PR bootstrap/49835
3110         * collect2.c (demangle_flag): Removed.
3111
3112 2011-07-24  Sandra Loosemore  <sandra@codesourcery.com>
3113
3114         * configure.ac (demangler_in_ld): Default to yes.
3115         * configure: Regenerated.
3116         * collect2.c (main): When HAVE_LD_DEMANGLE is defined, don't
3117         mess with COLLECT_NO_DEMANGLE, and just pass --demangle and
3118         --no-demangle options straight through to ld.  When
3119         HAVE_LD_DEMANGLE is not defined, set COLLECT_NO_DEMANGLE in a
3120         way that has the intended effect on Windows.
3121
3122 2011-07-23  Richard Henderson  <rth@redhat.com>
3123
3124         * dwarf2cfi.c: Include basic-block.h.
3125         (dw_label_info): Remove.
3126         (trace_work_list, trace_index): New.
3127         (remember_row, emit_cfa_remember): Remove.
3128         (dw_trace_info_hash, dw_trace_info_eq): New.
3129         (get_trace_index, get_trace_info): New.
3130         (save_point_p): New.
3131         (free_cfi_row): Remove.
3132         (add_cfi): Do not emit DW_CFA_remember_state.
3133         (cfa_row_equal_p): New.
3134         (barrier_args_size): Remove.
3135         (compute_barrier_args_size_1, compute_barrier_args_size): Remove.
3136         (dwarf2out_notice_stack_adjust): Don't compute_barrier_args_size.
3137         (maybe_record_trace_start, create_trace_edges, scan_trace): New.
3138         (dwarf2out_cfi_begin_epilogue): Remove.
3139         (dwarf2out_frame_debug_restore_state): Remove.
3140         (connect_traces, create_pseudo_cfg): New.
3141         (create_cfi_notes, execute_dwarf2_frame): Rewrite using traces.
3142         * Makefile.in (dwarf2cfi.o): Update.
3143
3144 2011-07-23  Richard Henderson  <rth@redhat.com>
3145
3146         * dwarf2cfi.c (dw_trace_info): New.
3147         (dw_label_info): New.
3148         (cie_return_save): New.
3149         (cur_trace): New.
3150         (queued_args_size): Rename from args_size.  Update all users.
3151         (cfa_store, cfa_temp, regs_saved_in_regs): Remove.
3152         (def_cfa_1): Use cur_trace instead of cfa_*.
3153         (dwarf2out_stack_adjust, record_reg_saved_in_reg): Likewise.
3154         (clobbers_queued_reg_save, reg_saved_in): Likewise.
3155         (dwarf2out_frame_debug_expr): Likewise.
3156         (create_cie_data): Split out from ...
3157         (execute_dwarf2_frame): ... here.  Initialize cur_trace.
3158
3159 2011-07-23  Richard Henderson  <rth@redhat.com>
3160
3161         * dwarf2cfi.c (regs_saved_in_regs): Allocate from heap, not gc.
3162         Update all users to match.
3163         (execute_dwarf2_frame): Free reg_saved_in_data.
3164
3165 2011-07-23  Richard Henderson  <rth@redhat.com>
3166
3167         * dwarf2cfi.c (queued_reg_save): Reorder for packing.  Don't GTY.
3168         (queued_reg_saves): Don't GTY.  Change to a VEC.
3169         (queue_reg_save): Update to match.
3170         (dwarf2out_flush_queued_reg_saves): Likewise.
3171         (clobbers_queued_reg_save): Likewise.
3172         (reg_saved_in): Likewise.
3173         (execute_dwarf2_frame): Free queued_reg_saves.
3174
3175 2011-07-23  Richard Henderson  <rth@redhat.com>
3176
3177         * dwarf2cfi.c (dw_cfi_row_ref): Remove.  Update all users.
3178
3179 2011-07-23  Richard Henderson  <rth@redhat.com>
3180
3181         * dwarf2cfi.c (add_cfi_args_size): Split out from...
3182         (dwarf2out_args_size): ... here.
3183         (add_cfi_restore): Split out from ...
3184         (dwarf2out_frame_debug_cfa_restore): ... here.
3185         (def_cfa_0): Split out from ...
3186         (def_cfa_1): ... here.
3187         (cfi_oprnd_equal_p, cfi_equal_p): New.
3188         (change_cfi_row): New.
3189         (add_cfis_to_fde): Set fde->dw_fde_switch_cfi_index.
3190         (create_cfi_notes): Use change_cfi_row at SWITCH_TEXT note.
3191         (output_cfis): Remove.
3192         * dwarf2out.c (output_fde): Simplify output_cfi loop.
3193         (dwarf2out_switch_text_section): Don't call output_cfis.
3194         (dw_val_equal_p, loc_descr_equal_p_1, loc_descr_equal_p): New.
3195         * dwarf2out.h: Update decls.
3196         (enum dw_val_class): Add dw_val_class_none.
3197
3198 2011-07-23  Richard Henderson  <rth@redhat.com>
3199
3200         * dwarf2cfi.c (update_row_reg_save): New.
3201         (dwarf2out_frame_debug_cfa_expression): Use it.
3202         (dwarf2out_frame_debug_cfa_restore): Likewise.
3203         (reg_save): Likewise.  Do not emit DW_CFA_same_value.
3204
3205 2011-07-23  Richard Henderson  <rth@redhat.com>
3206
3207         * dwarf2cfi.c (add_cfi_insn): Rename from cfi_insn.  Update all users.
3208
3209 2011-07-23  Richard Henderson  <rth@redhat.com>
3210
3211         * dwarf2cfi.c (dw_cfi_row, dw_cfi_row_ref): New.
3212         (cie_cfi_row): New.
3213         (new_cfi_row, copy_cfi_row, free_cfi_row): New.
3214         (cfa, old_cfa, cfa_remember, old_cfa_remember, old_args_size): Remove.
3215         (cur_row, remember_row): New.
3216         (def_cfa_1): Use cur_row instead of the old_* variables.
3217         (dwarf2out_frame_debug_restore_state): Similarly.
3218         (dwarf2out_args_size, dwarf2out_notice_stack_adjust): Likewise.
3219         (dwarf2out_frame_debug_def_cfa): Use a local variable instead of cfa.
3220         (dwarf2out_frame_debug_adjust_cfa): Likewise.
3221         (dwarf2out_frame_debug_cfa_offset): Likewise.
3222         (dwarf2out_frame_debug_expr): Likewise.
3223         (execute_dwarf2_frame): Set up cur_row.
3224         * dwarf2out.h (struct cfa_loc): Mark for GTY.
3225
3226 2011-07-23  Richard Henderson  <rth@redhat.com>
3227
3228         * basic-block.h (EDGE_PRESERVE): New.
3229         (EDGE_ALL_FLAGS, EDGE_COMPLEX): Include it.
3230         * bb-reorder.c: Include except.h.
3231         (fix_up_crossing_landing_pad): New.
3232         (find_rarely_executed_basic_blocks_and_crossing_edges): Place
3233         landing pads in the right partition.  Duplicate as necessary.
3234         (partition_hot_cold_basic_blocks): Fix up DF info after
3235         duplicating landing pads.
3236         * cfg.c (dump_edge_info): Add crossing and preserve to bitnames.
3237         * cfgrtl.c (rtl_verify_flow_info_1): Validate that EDGE_CROSSING
3238         is set properly.  Validate that EH edges are not CROSSING.
3239         * except.c (expand_dw2_landing_pad_for_region): Split out from ...
3240         (dw2_build_landing_pads): ... here.
3241         (convert_to_eh_region_ranges): Remove code to fixup crossing
3242         landing pads.
3243         * except.h (expand_dw2_landing_pad_for_region): Declare.
3244         * tree-cfg.c (gimple_can_merge_blocks_p): Don't merge PRESERVE edges.
3245
3246 2011-07-23  Richard Earnshaw  <rearnsha@arm.com>
3247
3248         PR target/49816
3249         * arm.c (aapcs_vfp_allocate_return_reg): Return NULL on failure.
3250
3251 2011-07-22  Jason Merrill  <jason@redhat.com>
3252
3253         * doc/invoke.texi (C++ Dialect Options): Document -Wno-narrowing.
3254
3255 2011-07-22  Richard Henderson  <rth@redhat.com>
3256
3257         * bb-reorder.c (gate_handle_partition_blocks): Honor optimize.
3258
3259 2011-07-22  Richard Henderson  <rth@redhat.com>
3260
3261         * jump.c (maybe_propagate_label_ref): Split out of...
3262         (mark_all_labels): ... here.  Do not attempt label_ref
3263         propagation while in cfglayout mode.
3264
3265 2011-07-22  Jakub Jelinek  <jakub@redhat.com>
3266
3267         * dwarf2out.c (struct macinfo_struct): Change code to unsigned char.
3268         (DEBUG_MACRO_SECTION, DEBUG_MACRO_SECTION_LABEL): Define.
3269         (dwarf_attr_name): Handle DW_AT_GNU_macros.
3270         (dwarf2out_define): If the vector is empty and
3271         lineno is 0, emit a dummy entry first.
3272         (dwarf2out_undef): Likewise.  Remove redundant semicolon.
3273         (htab_macinfo_hash, htab_macinfo_eq, output_macinfo_op,
3274         optimize_macinfo_range): New functions.
3275         (output_macinfo): Use them.  If !dwarf_strict and .debug_str is
3276         mergeable, optimize longer strings using
3277         DW_MACRO_GNU_{define,undef}_indirect and if HAVE_COMDAT_GROUP,
3278         optimize longer sequences of define/undef ops from headers
3279         using DW_MACRO_GNU_transparent_include.  For !dwarf_strict
3280         emit a section headers.
3281         (dwarf2out_init): For !dwarf_strict set debug_macinfo_section
3282         and macinfo_section_label to DEBUG_MACRO_SECTION
3283         resp. DEBUG_MACRO_SECTION_LABEL.
3284         (dwarf2out_finish): For !dwarf_strict emit DW_AT_GNU_macros
3285         instead of DW_AT_macro_info.
3286
3287         PR other/32998
3288         * common.opt (grecord-gcc-switches, gno-record-gcc-switches): New
3289         options.
3290         * dwarf2out.c: Include opts.h.
3291         (dchar_p): New typedef.  Define heap VEC for it.
3292         (producer_string): New variable.
3293         (gen_producer_string): New function.
3294         (gen_compile_unit_die): Use it.
3295         (dwarf2out_finish): Fix up comp_unit_die () DW_AT_producer if needed.
3296         * Makefile.in (dwarf2out.o): Depend on $(OPTS_H).
3297         * doc/invoke.texi: Document -grecord-gcc-switches and
3298         -gno-record-gcc-switches, add a -grecord-gcc-switches reference
3299         to -frecord-gcc-switches description.
3300
3301 2011-07-22  Jason Merrill  <jason@redhat.com>
3302
3303         PR c++/30112
3304         * c-decl.c (c_linkage_bindings): Define.
3305
3306 2011-07-22  Eric Botcazou  <ebotcazou@adacore.com>
3307
3308         PR debug/49815
3309         * var-tracking.c (vt_finalize): Always free windowed_parm_regs.
3310
3311 2011-07-22  H.J. Lu  <hongjiu.lu@intel.com>
3312
3313         * config/i386/i386.c (ix86_option_override_internal): Disallow
3314         MS ABI in x32 mode.
3315         (ix86_init_builtins): Call ix86_init_builtins_va_builtins_abi
3316         only for TARGET_LP64.
3317         (ix86_handle_abi_attribute): Check TARGET_LP64 instead of TARGET_64BIT.
3318
3319 2011-07-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
3320
3321         * config/rs6000/rs6000.c (rs6000_xcoff_strip_dollar): Rewrite to
3322         avoid warnings when GCC is built with a C++ compiler.
3323
3324 2011-07-22  Martin Jambor  <mjambor@suse.cz>
3325
3326         PR lto/49796
3327         * cgraphunit.c (verify_edge_corresponds_to_fndecl): Return false
3328         if decl node is in another partition, call cgraph_get_node only once.
3329
3330 2011-07-22  Uros Bizjak  <ubizjak@gmail.com>
3331
3332         * config.gcc (x86_64-*-linux*): Set
3333         default_gnu_indirect_function to yes.
3334
3335 2011-07-22  Richard Guenther  <rguenther@suse.de>
3336
3337         PR tree-optimization/45819
3338         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Properly
3339         preserve volatile and notrap flags.
3340
3341 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3342             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3343
3344         PR bootstrap/49794
3345         * configure.ac: Test AM_ICONV with CXX.
3346         * configure: Regenerate.
3347         * config/sol2-c.c (solaris_format_types): Use EXPORTED_CONST.
3348
3349 2011-07-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3350
3351         PR bootstrap/49797
3352         * graphite-clast-to-gimple.c (CLOOG_LANGUAGE_C): Provide if missing.
3353         (set_cloog_options): Use it.
3354
3355 2011-07-22  Jakub Jelinek  <jakub@redhat.com>
3356
3357         PR c++/49756
3358         * gcc.c (main): Call stack_limit_increase (64MB).
3359         * toplev.c (toplev_main): Likewise.
3360
3361 2011-07-21  H.J. Lu  <hongjiu.lu@intel.com>
3362
3363         * config/i386/i386.c (ix86_expand_call): Call copy_to_mode_reg
3364         instead of force_reg.
3365
3366 2011-07-21  H.J. Lu  <hongjiu.lu@intel.com>
3367
3368         * config/i386/i386.c (ix86_expand_move): Convert to Pmode if
3369         needed and use force_reg after convert.
3370         (ix86_expand_call): Likewise.
3371         (ix86_expand_special_args_builtin): Likewise.
3372         (ix86_expand_builtin): Likewise.
3373
3374 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3375
3376         PR middle-end/47654
3377         PR middle-end/49649
3378         * graphite-clast-to-gimple.c (type_for_clast_term): Pass v1 and v2
3379         in parameter.  Initialize v1 and v2 based on the values returned
3380         by clast_name_to_lb_ub.
3381         (type_for_clast_red): Pass v1 and v2 in parameter, and set their
3382         values.
3383         (type_for_clast_bin): Same.
3384         (type_for_clast_expr): Same.
3385         (type_for_clast_eq): Update calls to type_for_clast_expr.
3386         (type_for_clast_for): Same.
3387         (build_iv_mapping): Same.
3388         * graphite-ppl.h (value_min): New.
3389
3390 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3391
3392         * graphite-clast-to-gimple.c (type_for_interval): Generate signed
3393         types whenever possible.
3394
3395 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3396
3397         * graphite-clast-to-gimple.c (struct clast_name_index): Add lb
3398         and ub fields.
3399         (new_clast_name_index): Add lb and ub parameters.
3400         (free_clast_name_index): New.
3401         (clast_name_to_lb_ub): New.
3402         (save_clast_name_index): Add lb and ub parameters.
3403         (compute_bounds_for_param): New.
3404         (type_for_level): Removed.
3405         (type_for_clast_for): Removed level parameter.  Do not call
3406         type_for_level.
3407         (graphite_create_new_loop): Store the lb and ub for the clast_name
3408         of the iterator of the loop that has been generated.
3409         (graphite_create_new_loop_guard): Remove parameter level.
3410         (create_params_index): Store the lb and ub of each parameter.
3411         (gloog): Use free_clast_name_index.  Pass to create_params_index
3412         the current scop.
3413
3414 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3415
3416         * graphite-clast-to-gimple.c (max_signed_precision_type): Removed.
3417         (max_precision_type): Inline max_signed_precision_type.
3418         (type_for_clast_red): Use max_precision_type.
3419         (type_for_clast_bin): Same.
3420         (type_for_clast_for): Same.
3421
3422 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3423
3424         * graphite-clast-to-gimple.c (gcc_type_for_interval): Renamed
3425         type_for_interval.
3426         (gcc_type_for_value): Renamed type_for_value.
3427         (gcc_type_for_clast_term): Renamed type_for_clast_term.
3428         (gcc_type_for_clast_expr): Renamed type_for_clast_expr.
3429         (gcc_type_for_clast_red): Renamed type_for_clast_red.
3430         (gcc_type_for_clast_bin): Renamed type_for_clast_bin.
3431         (gcc_type_for_clast_eq): Renamed type_for_clast_eq.
3432         (graphite_translate_clast_equation): Update calls.
3433         (compute_type_for_level): Renamed type_for_level.
3434         (gcc_type_for_iv_of_clast_loop): Renamed type_for_clast_for.
3435         (build_iv_mapping): Update calls.
3436         (graphite_create_new_loop_guard): Same.
3437
3438 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3439
3440         * graphite-clast-to-gimple.c (clast_get_body_of_loop): Add fixme
3441         comment.
3442
3443 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3444
3445         * graphite-clast-to-gimple.c (struct ivs_params): New.
3446         (clast_name_to_gcc): Use ivs_params to pass around parameters.
3447         (clast_to_gcc_expression): Same.
3448         (clast_to_gcc_expression_red): Same.
3449         (gcc_type_for_clast_term): Same.
3450         (gcc_type_for_clast_expr): Same.
3451         (gcc_type_for_clast_red): Same.
3452         (gcc_type_for_clast_bin): Same.
3453         (gcc_type_for_clast_eq): Same.
3454         (graphite_translate_clast_equation): Same.
3455         (graphite_create_guard_cond_expr): Same.
3456         (graphite_create_new_guard): Same.
3457         (graphite_create_new_loop): Same.
3458         (build_iv_mapping): Same.
3459         (translate_clast_user): Same.
3460         (graphite_create_new_loop_guard): Same.
3461         (translate_clast): Same.
3462         (translate_clast_for_loop): Same.
3463         (translate_clast_for): Same.
3464         (translate_clast_guard): Same.
3465         (initialize_cloog_names): Fix typo.
3466         (gloog): Initialize an ivs_params struct, pass it to translate_clast.
3467
3468 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3469
3470         * graphite-clast-to-gimple.c (struct clast_name_index): Add level.
3471         (new_clast_name_index): Add level parameter.
3472         (clast_name_to_level): New.
3473         (save_clast_name_index): Add level parameter.
3474         (newivs_to_depth_to_newiv): Removed.
3475         (clast_name_to_gcc): Inlined newivs_to_depth_to_newiv.
3476         (graphite_create_new_loop): Add level parameter.  Pass level to
3477         save_clast_name_index.
3478         (translate_clast_for_loop): Pass level to graphite_create_new_loop.
3479         (create_params_index): Pass level to save_clast_name_index.
3480
3481 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3482
3483         * graphite-clast-to-gimple.c (graphite_create_new_loop): Do not
3484         recompute type, lb, and ub.  Get them from...
3485         (graphite_create_new_loop_guard): ...here.  Pass in parameter
3486         pointers to type, lb, and ub.
3487         (translate_clast_for_loop): Update function calls.
3488         (translate_clast_for): Same.
3489
3490 2011-07-21  Sebastian Pop  <sebastian.pop@amd.com>
3491
3492         * graphite-clast-to-gimple.c (compute_bounds_for_level): Call
3493         psct_dynamic_dim.
3494         (translate_clast_for_loop): Pass loop level to dependency_in_loop_p.
3495         (gcc_type_for_iv_of_clast_loop): Update use of level.
3496         (gloog): Start counting nesting level from 0.
3497         * graphite-clast-to-gimple.h (get_scattering_level): Removed.
3498         * graphite-dependences.c (graphite_carried_dependence_level_k): Call
3499         psct_dynamic_dim on level.
3500
3501 2011-07-21  H.J. Lu  <hongjiu.lu@intel.com>
3502
3503         * config/i386/i386.c (ix86_legitimize_address): Convert to
3504         Pmode if needed.
3505
3506 2011-07-21  H.J. Lu  <hongjiu.lu@intel.com>
3507
3508         * config/i386/i386.c (function_value_64): Always return pointers
3509         in Pmode.
3510         (ix86_promote_function_mode): New.
3511         (TARGET_PROMOTE_FUNCTION_MODE): Likewise.
3512
3513 2011-07-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3514
3515         PR tree-optimization/49749
3516         * tree-ssa-reassoc.c (get_rank): Fix operand scan conditions and
3517         remove no-longer-used maxrank variable.
3518
3519 2011-07-21  Georg-Johann Lay  <avr@gjlay.de>
3520
3521         * config/avr/avr.c (final_prescan_insn): Fix printing of rtx_costs.
3522
3523 2011-07-21  Jason Merrill  <jason@redhat.com>
3524
3525         * system.h (HAVE_DESIGNATED_UNION_INITIALIZERS): New.
3526         * recog.h (struct insn_data_d): Check it instead of
3527         HAVE_DESIGNATED_INITIALIZERS.
3528         * genoutput.c (output_insn_data): Likewise.
3529
3530 2011-07-21  Richard Guenther  <rguenther@suse.de>
3531
3532         PR tree-optimization/49770
3533         * tree-ssa-sccvn.c (valueize_refs_1): Return whether we
3534         valueized any operand.  Renamed from ...
3535         (valueize_refs): ... this.  New wrapper around valueize_refs_1.
3536         (valueize_shared_reference_ops_from_ref): Return whether we
3537         valueized any operand.
3538         (vn_reference_lookup): Only when we valueized any operand
3539         use the valueized reference for alias analysis.  Do not preserve
3540         the original reference tree in this case.
3541
3542 2011-07-21  Uros Bizjak  <ubizjak@gmail.com>
3543
3544         * config/i386/i386.c (ix86_decompose_address): Reject all but
3545         register operands and subregs of DImode hard registers in index.
3546
3547 2011-07-21  Kai Tietz  <ktietz@redhat.com>
3548
3549         * fold-const.c (fold_unary_loc): Preserve indirect
3550         comparison cast to none-boolean type.
3551         * tree-ssa.c (useless_type_conversion_p): Preserve cast
3552         from/to boolean-type.
3553         * gimplify.c (gimple_boolify): Handle boolification of comparisons.
3554         (gimplify_expr): Boolifiy non aggregate-typed comparisons.
3555         * tree-cfg.c (verify_gimple_comparison): Check result
3556         type of comparison expression.
3557         * tree-ssa-forwprop.c (forward_propagate_comparison): Adjust test
3558         of condition result and disallow type-cast sinking into comparison.
3559
3560 2011-07-21  Richard Guenther  <rguenther@suse.de>
3561
3562         * tree-ssa-forwprop.c (combine_conversions): Return whether
3563         we have to run cfg-cleanup.  Properly remove dead stmts.
3564         (ssa_forward_propagate_and_combine): Adjust.
3565
3566 2011-07-21  Richard Sandiford  <richard.sandiford@linaro.org>
3567
3568         * regcprop.c (maybe_mode_change): Check HARD_REGNO_MODE_OK.
3569
3570 2011-07-21  Kai Tietz  <ktietz@redhat.com>
3571
3572         * tree-ssa-propagate.c (substitute_and_fold): Use
3573         do_dce flag to deside, if BB's statements are scanned
3574         in last to first, or first to last order.
3575
3576 2011-07-21  Georg-Johann Lay  <avr@gjlay.de>
3577
3578         * config/avr/avr.c (avr_rtx_costs): Set cost of CONST, LABEL_REF to 0.
3579
3580 2011-07-20  H.J. Lu  <hongjiu.lu@intel.com>
3581             Uros Bizjak  <ubizjak@gmail.com>
3582             Richard Henderson  <rth@redhat.com>
3583
3584         * config/i386/constraints.md (w): New.
3585
3586         * config/i386/i386.c (ix86_output_addr_vec_elt): Check
3587         TARGET_LP64 instead of TARGET_64BIT for ASM_QUAD.
3588
3589         * config/i386/i386.h (CASE_VECTOR_MODE): Check TARGET_LP64
3590         instead of TARGET_64BIT.
3591
3592         * config/i386/i386.md (indirect_jump): Replace
3593         nonimmediate_operand with indirect_branch_operand.
3594         (*indirect_jump): Likewise.  Replace constraint "m" with "w".
3595         (tablejump): Replace nonimmediate_operand with indirect_branch_operand.
3596         Convert operand 0 to Pmode for x32 if not PIC.
3597         (*tablejump_1): Replace nonimmediate_operand with
3598         indirect_branch_operand.  Replace constraint "m" with "w".
3599         (*call_vzeroupper): Replace constraint "m" with "w".
3600         (*call): Likewise.
3601         (*call_rex64_ms_sysv_vzeroupper): Likewise.
3602         (*call_rex64_ms_sysv): Likewise.
3603         (*call_value_vzeroupper): Likewise.
3604         (*call_value): Likewise.
3605         (*call_value_rex64_ms_sysv_vzeroupper): Likewise.
3606         (*call_value_rex64_ms_sysv): Likewise.
3607         (set_got_offset_rex64): Check TARGET_LP64 instead of TARGET_64BIT.
3608
3609         * config/i386/predicates.md (indirect_branch_operand): New.
3610         (call_insn_operand): Support x32.
3611
3612 2011-07-20  Michael Eager  <eager@eagercon.com>
3613
3614         * params.def (PARAM_MAX_VARTRACK_EXPR_DEPTH): Default to 12.
3615
3616 2011-07-20  Richard Henderson  <rth@redhat.com>
3617
3618         * cfg.c (dump_bb_info): Dump basic_block->flags.
3619         * cfgrtl.c (print_rtl_with_bb): Use dump_bb_info.
3620
3621 2011-07-20  Uros Bizjak  <ubizjak@gmail.com>
3622
3623         * config/i386/i386.c (ix86_decompose_address): Allow only subregs
3624         of DImode hard registers in index.
3625         (ix86_legitimate_address_p): Allow subregs of base and index to span
3626         more than a word.  Assert that subregs of base and index satisfy
3627         register_no_elim_operand predicates.  Reject addresses where
3628         base and index have different modes.
3629
3630 2011-07-20  Robert Millan  <rmh@gnu.org>
3631
3632         * config.gcc (mips*-*-linux*): Remove redundant tm_file entry.
3633
3634 2011-07-20  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3635
3636         * bb-reorder.c (fix_crossing_conditional_branches): Fix crash by
3637         removing now-unnecessary assignment.
3638
3639 2011-07-20  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3640
3641         * emit-rtl.c (set_mem_attributes_minus_bitpos): Restore setting
3642         memory address space to the type's address space.
3643
3644 2011-07-20  Georg-Johann Lay  <avr@gjlay.de>
3645
3646         PR target/36467
3647         PR target/49687
3648         * config/avr/avr.md (mulhi3): Use register_or_s9_operand for operand2
3649         and expand appropriately if there is a CONST_INT in operand2.
3650         (usmulqihi3): New insn.
3651         (*sumulqihi3): New insn.
3652         (*osmulqihi3): New insn.
3653         (*oumulqihi3): New insn.
3654         (*muluqihi3.uconst): New insn_and_split.
3655         (*muluqihi3.sconst): New insn_and_split.
3656         (*mulsqihi3.sconst): New insn_and_split.
3657         (*mulsqihi3.uconst): New insn_and_split.
3658         (*mulsqihi3.oconst): New insn_and_split.
3659         (*ashifthi3.signx.const): New insn_and_split.
3660         (*ashifthi3.signx.const7): New insn_and_split.
3661         (*ashifthi3.zerox.const): New insn_and_split.
3662         (mulsqihi3): New insn.
3663         (muluqihi3): New insn.
3664         (muloqihi3): New insn.
3665         * config/avr/predicates.md (const_2_to_7_operand): New.
3666         (const_2_to_6_operand): New.
3667         (u8_operand): New.
3668         (s8_operand): New.
3669         (o8_operand): New.
3670         (s9_operand): New.
3671         (register_or_s9_operand): New.
3672
3673 2011-07-20  Kai Tietz  <ktietz@redhat.com>
3674
3675         * builtins.c (fold_builtin_expect): See through the cast
3676         from truthvalue_type_node to long.
3677
3678 2011-07-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
3679
3680         * config/rs6000/vsx.md (vsx_fma*): Use 4 argument fma instructions
3681         where we can use them from the standard and altivec instruction
3682         sets, instead of always using the 3 operand VSX forms that require
3683         the destination to overlap one of the inputs.
3684         (vsx_fms*): Ditto.
3685         (vsx_fnma*): Ditto.
3686         (vsx_fnms*): Ditto.
3687
3688         * config/rs6000/rs6000.md (fmadf4_fpr): Set fp_type fp_maddsub_d
3689         for DF types.
3690         (fmsdf4_fpr): Ditto.
3691         (nfmadf4_fpr): Ditto.
3692         (nfmsdf4_fpr): Ditto.
3693
3694 2011-07-20  Sandra Loosemore  <sandra@codesourcery.com>
3695
3696         * genrecog.c (make_insn_sequence): Correct position numbering
3697         when filtering out match_scratch and match_dup.
3698
3699 2011-07-20  Richard Guenther  <rguenther@suse.de>
3700
3701         * tree-ssa-forwprop.c (remove_prop_source_from_use): Robustify
3702         against already removed statements.
3703         (forward_propagate_into_comparison): Remove dead defining stmts.
3704         (forward_propagate_into_gimple_cond): Likewise.
3705         (forward_propagate_into_cond): Simplify.
3706         (ssa_forward_propagate_and_combine): Handle changed cfg from
3707         forward_propagate_into_comparison.
3708         * tree-ssa-phiopt.c (conditional_replacement): Use proper
3709         locations for newly built statements.
3710
3711 2011-07-20  Georg-Johann Lay  <avr@gjlay.de>
3712
3713         * config/avr/avr.c (avr_rtx_costs): Set cost of SYMBOL_REF to 0.
3714
3715 2011-07-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3716
3717         * config/s390/s390.c (s390_class_max_nregs): Fix return type.
3718         * config/s390/s390-protos.h (s390_class_max_nregs): Likewise.
3719
3720 2011-07-20  Richard Guenther  <rguenther@suse.de>
3721
3722         PR middle-end/18908
3723         * tree.c (integer_all_onesp): Use TYPE_PRECISION, not mode precision.
3724         * tree-ssa-forwprop.c (simplify_bitwise_binary): Remove bogus
3725         ADDR_EXPR folding.  Canonicalize X ^ ~0 as ~X.
3726
3727 2011-07-20  Vladimir Makarov  <vmakarov@redhat.com>
3728
3729         * config/frv/frv.c (frv_register_move_cost): Define explicitly
3730         costs for subclasses of GR_REGS.
3731
3732 2011-07-20  Uros Bizjak  <ubizjak@gmail.com>
3733
3734         PR target/49780
3735         * config/i386/predicates.md (no_seg_addres_operand): No more special.
3736         * config/i386/i386.c (ix86_decompose_address): Allow only subregs
3737         of DImode hard registers in base.
3738         (ix86_legitimate_address_p): Allow SImode and DImode base and index
3739         registers.
3740
3741 2011-07-20  Richard Guenther  <rguenther@suse.de>
3742
3743         * tree-ssa-structalias.c (new_var_info): Allocate oldsolution lazily.
3744         (unify_nodes): Deal with that.
3745         (solve_graph): Likewise.
3746
3747 2011-07-20  Chung-Lin Tang  <cltang@codesourcery.com>
3748
3749         * config/arm/arm.c (arm_canonicalize_comparison): Add case to
3750         canonicalize left operand from ZERO_EXTEND to AND.
3751
3752 2011-07-20  Anatoly Sokolov  <aesok@post.ru>
3753
3754         * target.def (class_max_nregs): New hook.
3755         * doc/tm.texi.in (TARGET_CLASS_MAX_NREGS): Document.
3756         * doc/tm.texi: Regenerate.
3757         * targhooks.c (default_class_max_nregs): New function.
3758         * targhooks.h (default_class_max_nregs): Declare.
3759         * ira.h (target_ira): Change type x_ira_reg_class_max_nregs and
3760         x_ira_reg_class_min_nregs arrays to unsigned char.
3761         * ira.c (setup_reg_class_nregs): Use TARGET_CLASS_MAX_NREGS target
3762         hook instead of CLASS_MAX_NREGS macro.
3763         * reginfo.c (restore_register_info): Ditto.
3764         * ira-conflicts.c (process_regs_for_copy): Use
3765         ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro.
3766         Change type rclass and aclass vars to reg_class_t.
3767         * ira-costs.c (record_reg_classes): Use ira_reg_class_max_nregs
3768         array instead of CLASS_MAX_NREGS macro. Change type rclass var to
3769         reg_class_t.
3770         * reload.c (combine_reloads, find_reloads, find_reloads_address_1):
3771         Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro.
3772
3773         * config/i386/i386.h (CLASS_MAX_NREGS): Remove.
3774         * config/i386/i386.c (ix86_class_max_nregs): New function.
3775         (ix86_register_move_cost): Use TARGET_CLASS_MAX_NREGS target hook
3776         instead of CLASS_MAX_NREGS macro.
3777         (TARGET_CLASS_MAX_NREGS): Define.
3778         * config/avr/avr.h (CLASS_MAX_NREGS): Remove.
3779         * config/avr/avr-protos.h (class_max_nregs): Remove declaration.
3780         * config/avr/avr.c (class_max_nregs): Remove function.
3781         * config/alpha/alpha.h (CLASS_MAX_NREGS): Remove.
3782         * config/spu/spu.h (CLASS_MAX_NREGS): Remove.
3783         * config/mep/mep.h (CLASS_MAX_NREGS): Remove.
3784         * config/m32r/m32r.h (CLASS_MAX_NREGS): Remove.
3785         * config/microblaze/microblaze.h (CLASS_MAX_NREGS): Remove.
3786         * config/xtensa/xtensa.h (CLASS_MAX_NREGS): Remove.
3787         * config/stormy16/stormy16.h (CLASS_MAX_NREGS): Remove.
3788         * config/lm32/lm32.h (CLASS_MAX_NREGS): Remove.
3789         * config/moxie/moxie.h (CLASS_MAX_NREGS): Remove.
3790         * config/iq2000/iq2000.h (CLASS_MAX_NREGS): Remove.
3791         * config/mn10300/mn10300.h (CLASS_MAX_NREGS): Remove.
3792         * config/score/score.h (CLASS_MAX_NREGS): Remove.
3793         * config/vax/vax.h (CLASS_MAX_NREGS): Remove.
3794         * config/h8300/h8300.h (CLASS_MAX_NREGS): Remove.
3795         * config/v850/v850.h (CLASS_MAX_NREGS): Remove.
3796
3797 2011-07-19  Eric Botcazou  <ebotcazou@adacore.com>
3798
3799         * cif-code.def (OVERWRITABLE): Fix typo and move around.
3800         (TARGET_OPTIMIZATION_MISMATCH): Delete.
3801         (EH_PERSONALITY): Fix typo.
3802         (NON_CALL_EXCEPTIONS): Fix message.
3803         (OPTIMIZATION_MISMATCH): Adjust message.
3804         * ipa-inline.c (can_inline_edge_p): Use CIF_OPTIMIZATION_MISMATCH.
3805
3806 2011-07-19  Ian Lance Taylor  <iant@google.com>
3807
3808         * doc/install.texi (Configuration): Document
3809         --enable-build-poststage1-with-cxx.
3810
3811 2011-07-19  Robert Millan  <rmh@gnu.org>
3812
3813         * config/mips/gnu-user.h: Copy from linux.h.  Update comments.
3814         (GLIBC_DYNAMIC_LINKER): Remove.
3815
3816         * config/mips/gnu-user64.h: Copy from linux64.h.  Update comments.
3817         (GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64)
3818         (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
3819         (BIONIC_DYNAMIC_LINKERN32, GNU_USER_DYNAMIC_LINKERN32): Remove.
3820         (LINK_SPEC): Use GNU_USER_DYNAMIC_LINKER32,
3821         GNU_USER_DYNAMIC_LINKER64 and GNU_USER_LINK_EMULATIONN32.
3822
3823         * config/mips/linux.h: Remove everything except for ...
3824         (GLIBC_DYNAMIC_LINKER): ... this macro.
3825
3826         * config/mips/linux64.h: Remove everything except for ...
3827         (GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64)
3828         (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
3829         (BIONIC_DYNAMIC_LINKERN32): ... these macros.
3830         (GNU_USER_LINK_EMULATION32, GNU_USER_LINK_EMULATION64)
3831         (GNU_USER_LINK_EMULATIONN32): New macros.
3832
3833         * config.gcc (mips64*-*-linux* | mipsisa64*-*-linux* | mips-*-linux*):
3834         Use the new headers.
3835
3836 2011-07-19  Richard Sandiford  <rdsandiford@googlemail.com>
3837
3838         * rtl.h (mem_attrs): Turn offset and size fields into HOST_WIDE_INTs.
3839         Add offset_known_p and size_known_p fields.
3840         (MEM_OFFSET_KNOWN_P): Update accordingly.
3841         (MEM_OFFSET, MEM_SIZE_KNOWN_P, MEM_SIZE): Likewise.
3842         * emit-rtl.c (mem_attrs_htab_hash): Update after mem_attrs changes.
3843         (mem_attrs_eq_p, set_mem_attributes_minus_bitpos, set_mem_offset)
3844         (clear_mem_offset, set_mem_size, clear_mem_size, change_address)
3845         (adjust_address_1, widen_memory_access, set_mem_attrs_for_spill)
3846         (init_emit_regs): Likewise.
3847
3848 2011-07-19  Richard Sandiford  <rdsandiford@googlemail.com>
3849
3850         * doc/rtl.texi (MEM_OFFSET_KNOWN_P): Document.
3851         (MEM_OFFSET): Change from returning an rtx to returning a
3852         HOST_WIDE_INT.
3853         * rtl.h (MEM_OFFSET_KNOWN_P): New macro.
3854         (MEM_OFFSET): Return a HOST_WIDE_INT rather than an rtx.
3855         * emit-rtl.h (set_mem_offset): Take a HOST_WIDE_INT rather than an rtx.
3856         (clear_mem_offset): Declare.
3857         * alias.c (ao_ref_from_mem): Adjust uses of MEM_OFFSET, using
3858         MEM_OFFSET_KNOWN_P to test whether the offset is known, and
3859         MEM_OFFSET to get a HOST_WIDE_INT offset.
3860         (nonoverlapping_memrefs_p): Likewise.  Adjust calls to...
3861         (adjust_offset_for_component_ref): Take a bool "known_p"
3862         parameter and a HOST_WIDE_INT "offset" parameter.
3863         * builtins.c (get_memory_rtx): As for ao_ref_from_mem.
3864         Adjust calls to set_mem_offset, passing a HOST_WIDE_INT rather
3865         than an rtx.  Use clear_mem_offset to clear the offset.
3866         * cfgcleanup.c (merge_memattrs): Likewise.
3867         * dwarf2out.c (tls_mem_loc_descriptor): Likewise.
3868         * function.c (assign_parm_find_stack_rtl): Likewise.
3869         (assign_parm_setup_stack): Likewise.
3870         * print-rtl.c (print_rtx): Likewise.
3871         * reload.c (find_reloads_subreg_address): Likewise.
3872         * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
3873         * var-tracking.c (INT_MEM_OFFSET): Likewise.
3874         * emit-rtl.c (set_reg_attrs_from_value): Likewise.
3875         (get_mem_align_offset): Likewise.
3876         (set_mem_offset): Take a HOST_WIDE_INT rather than an rtx.
3877         (clear_mem_offset): New function.
3878         * config/mips/mips.c (r10k_safe_mem_expr_p): Take a HOST_WIDE_INT
3879         offset rather than an rtx.  Assume both the expressio and offset
3880         are available.
3881         (r10k_needs_protection_p_1): Update accordingly, checking the
3882         expression and offset availability here instead.
3883
3884 2011-07-19  Richard Sandiford  <rdsandiford@googlemail.com>
3885
3886         * doc/rtl.texi (MEM_SIZE_KNOWN_P): Document.
3887         (MEM_SIZE): Change from returning an rtx to returning a HOST_WIDE_INT.
3888         * rtl.h (MEM_SIZE_KNOWN_P): New macro.
3889         (MEM_SIZE): Return a HOST_WIDE_INT rather than an rtx.
3890         * emit-rtl.h (set_mem_size): Take a HOST_WIDE_INT rather than an rtx.
3891         (clear_mem_size): Declare.
3892         * emit-rtl.c (set_mem_size): Take a HOST_WIDE_INT rather than an rtx.
3893         (clear_mem_size): New function.
3894         * alias.c (ao_ref_from_mem): Adjust uses of MEM_SIZE, using
3895         MEM_SIZE_KNOWN_P to test whether the size is known, and MEM_SIZE
3896         to get a HOST_WIDE_INT size.  Adjust calls to set_mem_size,
3897         passing a HOST_WIDE_INT rather than an rtx.  Use clear_mem_size
3898         to clear the size.
3899         (nonoverlapping_memrefs_p): Likewise.
3900         * builtins.c (get_memory_rtx, expand_builtin_memcmp): Likewise.
3901         (expand_builtin_init_trampoline): Likewise.
3902         * calls.c (compute_argument_addresses): Likewise.
3903         * cfgcleanup.c (merge_memattrs): Likewise.
3904         * dce.c (find_call_stack_args): Likewise.
3905         * dse.c (record_store, scan_insn): Likewise.
3906         * dwarf2out.c (dw_sra_loc_expr): Likewise.
3907         * expr.c (emit_block_move_hints): Likewise.
3908         * function.c (assign_parm_find_stack_rtl): Likewise.
3909         * print-rtl.c (print_rtx): Likewise.
3910         * reload.c (find_reloads_subreg_address): Likewise.
3911         * rtlanal.c (may_trap_p_1): Likewise.
3912         * var-tracking.c (track_expr_p): Likewise.
3913         * varasm.c (assemble_trampoline_template): Likewise.
3914         * config/arm/arm.c (arm_print_operand): Likewise.
3915         * config/h8300/h8300.c (h8sx_emit_movmd): Likewise.
3916         * config/i386/i386.c (expand_movmem_via_rep_mov): Likewise.
3917         (expand_setmem_via_rep_stos, expand_constant_movmem_prologue)
3918         (expand_constant_setmem_prologue): Likewise.
3919         * config/mips/mips.c (mips_get_unaligned_mem): Likewise.
3920         * config/rs6000/rs6000.c (expand_block_move): Likewise.
3921         (adjacent_mem_locations): Likewise.
3922         * config/s390/s390.c (s390_expand_setmem): Likewise.
3923         (s390_expand_insv): Likewise.
3924         * config/s390/s390.md (*extzv<mode>, *extv<mode>): Likewise.
3925         (*extendqi<mode>2_short_displ): Likewise.
3926         * config/sh/sh.c (expand_block_move): Likewise.
3927         * config/sh/sh.md (extv, extzv): Likewise.
3928
3929 2011-07-19  Richard Sandiford  <rdsandiford@googlemail.com>
3930
3931         * emit-rtl.c (mem_attrs_eq_p): New function, split out from...
3932         (mem_attrs_htab_eq): ...here.
3933         (find_mem_attrs): Replace with...
3934         (set_mem_attrs): ...this function.  Take a mem_attrs structure
3935         rather than individual fields.
3936         (set_mem_attributes_minus_bitpos, set_mem_alias_set)
3937         (set_mem_addr_space, set_mem_align, set_mem_expr, set_mem_offset)
3938         (set_mem_size, change_address, adjust_address_1, offset_address)
3939         (widen_memory_access, get_spill_slot_decl, set_mem_attrs_for_spill):
3940         Update accordingly.
3941
3942 2011-07-19  Richard Sandiford  <rdsandiford@googlemail.com>
3943
3944         * rtl.h (MEM_ALIAS_SET, MEM_EXPR, MEM_OFFSET, MEM_ADDR_SPACE)
3945         (MEM_SIZE, MEM_ALIGN): Redefine in terms of get_mem_attrs.
3946         Provide a dummy definition of MEM_ADDR_SPACE for generators.
3947         (target_rtl): Add x_mode_mem_attrs.
3948         (mode_mem_attrs): New macro.
3949         (get_mem_attrs): New function.
3950         * emit-rtl.c (get_mem_attrs): Rename to...
3951         (find_mem_attrs): ...this.
3952         (set_mem_attributes_minus_bitpos, set_mem_alias_set)
3953         (set_mem_addr_space, set_mem_align, set_mem_expr, set_mem_offset)
3954         (set_mem_size, change_address, adjust_address_1, offset_address)
3955         (widen_memory_access, get_spill_slot_decl, set_mem_attrs_for_spill):
3956         Update accordingly.
3957         (init_emit_regs): Initialize mode_mem_attrs.
3958
3959 2011-07-19  Richard Guenther  <rguenther@suse.de>
3960
3961         * tree-ssa-forwprop.c (lookup_logical_inverted_value): Remove
3962         TRUTH_*_EXPR handling.
3963         * tree-ssa-operands.c (get_expr_operands): Likewise.
3964         * tree-ssa-pre.c (fully_constant_expression): Likewise.
3965         * tree-ssa-uninit.c (use_pred_not_overlap_with_undef_path_pre):
3966         Likewise.
3967         (is_and_or_or): Likewise.
3968         (is_norm_cond_subset_of): Likewise.
3969
3970 2011-07-19  Richard Guenther  <rguenther@suse.de>
3971
3972         * tree.h (fold_build_pointer_plus_loc): New helper function.
3973         (fold_build_pointer_plus_hwi_loc): Likewise.
3974         (fold_build_pointer_plus): Define.
3975         (fold_build_pointer_plus_hwi): Likewise.
3976         * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus.
3977         (fold_builtin_memory_op): Likewise.
3978         (fold_builtin_stpcpy): Likewise.
3979         (fold_builtin_memchr): Likewise.
3980         (fold_builtin_strstr): Likewise.
3981         (fold_builtin_strchr): Likewise.
3982         (fold_builtin_strrchr): Likewise.
3983         (fold_builtin_strpbrk): Likewise.
3984         (fold_builtin_strcat): Likewise.
3985         (expand_builtin_memory_chk): Likewise.
3986         (fold_builtin_memory_chk): Likewise.
3987         * c-typeck.c (build_unary_op): Likewise.
3988         * cgraphunit.c (thunk_adjust): Likewise.
3989         * fold-const.c (build_range_check): Likewise.
3990         (fold_binary_loc): Likewise.
3991         * omp-low.c (extract_omp_for_data): Likewise.
3992         (expand_omp_for_generic): Likewise.
3993         (expand_omp_for_static_nochunk): Likewise.
3994         (expand_omp_for_static_chunk): Likewise.
3995         * tree-affine.c (add_elt_to_tree): Likewise.
3996         * tree-data-ref.c (split_constant_offset_1): Likewise.
3997         * tree-loop-distribution.c (generate_memset_zero): Likewise.
3998         * tree-mudflap.c (mf_xform_derefs_1): Likewise.
3999         * tree-predcom.c (ref_at_iteration): Likewise.
4000         * tree-ssa-address.c (tree_mem_ref_addr): Likewise.
4001         (add_to_parts): Likewise.
4002         (create_mem_ref): Likewise.
4003         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
4004         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise.
4005         (number_of_iterations_le): Likewise.
4006         * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise.
4007         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.