OSDN Git Service

5e319121cb4911f0c48c654affa57152eca6bd61
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2011-12-28  Ian Lance Taylor  <iant@google.com>
2
3         * dwarf2out.c (gen_compile_unit_die): Use DW_LANG_Go for Go.
4
5 2011-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
6
7         PR target/51623
8         * config/rs6000/rs6000.c (rs6000_assemble_integer): Don't call
9         unlikely_text_section_p.  Instead check for being in a code
10         section.
11
12 2011-12-28  Ira Rosen  <irar@il.ibm.com>
13
14         PR tree-optimization/51684
15         * tree-vect-slp.c (vect_schedule_slp_instance): Get gsi of original
16         statement in case of a pattern.
17         (vect_schedule_slp): Likewise.
18
19 2011-12-27  Eric Botcazou  <ebotcazou@adacore.com>
20
21         PR rtl-optimization/51667
22         * ree.c (insn_merge_code): Delete.
23         (is_insn_merge_attempted): Likewise.
24         (get_insn_status): Likewise.
25         (set_insn_status): Likewise.
26         (struct ext_cand): Add CODE and MODE fields.
27         (combine_set_extend): Rename to...
28         (combine_set_extension): ...this.  Use above fields and tidy up.
29         (transform_ifelse): Likewise.
30         (get_defs): Return the chain of definitions.
31         (is_this_a_cmove): Merge into...
32         (is_cond_copy_insn): ...this.  Return bool.
33         (make_defs_and_copies_lists): Adjust calls to get_defs and simplify.
34         (merge_def_and_ext): Adjust call to combine_set_extend.
35         (combine_reaching_defs): Remove calls to {g|s}et_insn_status.
36         (struct extend_info): Rename to...
37         (struct re_info): ...this.  Add DEF_MAP field.
38         (add_ext_candidate): Merge into...
39         (add_removable_extension): ...this.  Adjust calls to get_defs.  Ensure
40         reaching definitions are associated with only one kind of extension.
41         (find_removable_extensions): Create and destroy the definition map.
42         (find_and_remove_re): Return void.  Change 'long' variables to 'int'.
43         Do not deal with is_insn_merge_attempted.
44
45 2011-12-25  Jan Hubicka  <jh@suse.cz>
46
47         PR middle-end/48641 
48         * tree-ssa-threadupdate.c (redirect_edges): Watch for overflow.
49
50 2011-12-26  Oleg Endo  <oleg.endo@t-online.de>
51
52         * config/sh/sync.md: Add soft atomics ABI description.
53         (fetchop_name): Use 'or' instead of 'ior'.
54         (fetchop_insn): Remove.
55         (atomic_compare_and_swap<mode>_soft):
56         Don't insert aligning nop after the write-back instruction.  Fix
57         multi-line asm output formatting style.
58         (atomic_fetch_<fetchop_name><mode>_soft): Likewise.
59         (atomic_fetch_nand<mode>_soft): Likewise.
60         (atomic_<fetchop_name>_fetch<mode>_soft): Likewise.
61         (atomic_nand_fetch<mode>_soft): Likewise.
62
63 2011-12-23  Richard Henderson  <rth@redhat.com>
64
65         * tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR): Remove.
66         * cfgexpand.c (expand_debug_expr): Don't handle them.
67         * expr.c (expand_expr_real_2): Likewise.
68         * fold-const.c (fold_binary_loc): Likewise.
69         * gimple-pretty-print.c (dump_binary_rhs): Likewise.
70         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
71         * tree-inline.c (estimate_operator_cost): Likewise.
72         * tree-pretty-print.c (dump_generic_node): Likewise.
73         * tree-vect-generic.c (expand_vector_operations_1): Likewise.
74         * optabs.c (optab_for_tree_code): Likewise.
75         (can_vec_perm_for_code_p): Remove.
76         (expand_binop): Don't try it.
77         (init_optabs): Don't init vec_extract_even/odd_optab.
78         * genopinit.c (optabs): Likewise.
79         * optabs.h (OTI_vec_extract_even, OTI_vec_extract_odd): Remove.
80         (vec_extract_even_optab, vec_extract_odd_optab): Remove.
81         * tree-vect-data-refs.c (vect_strided_store_supported): Tidy code.
82         (vect_permute_store_chain): Use TYPE_VECTOR_SUBPARTS instead of
83         GET_MODE_NUNITS; check vect_gen_perm_mask return value instead of
84         asserting vect_strided_store_supported.
85         (vect_strided_load_supported): Use can_vec_perm_p.
86         (vect_permute_load_chain): Use VEC_PERM_EXPR.
87
88         * doc/generic.texi (VEC_EXTRACT_EVEN_EXPR): Remove.
89         (VEC_EXTRACT_ODD_EXPR): Remove.
90         * doc/md.texi (vec_extract_even, vec_extract_odd): Remove.
91
92 2011-12-23  Anatoly Sokolov  <aesok@post.ru>
93
94         * config/score/score.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
95         * config/score/score-protos.h (score_register_move_cost): Remove.
96         * config/score/score.c (TARGET_REGISTER_MOVE_COST): Define.
97         (score_register_move_cost): Make static. Change arguments type from
98         enum reg_class to reg_class_t.
99
100 2011-12-23  Jakub Jelinek  <jakub@redhat.com>
101             Richard Henderson  <rth@redhat.com>
102
103         * tree.def (VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): Remove.
104         * gimple-pretty-print.c (dump_binary_rhs): Don't handle
105         VEC_INTERLEAVE_HIGH_EXPR and VEC_INTERLEAVE_LOW_EXPR.
106         * expr.c (expand_expr_real_2): Likewise.
107         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
108         * cfgexpand.c (expand_debug_expr): Likewise.
109         * tree-inline.c (estimate_operator_cost): Likewise.
110         * tree-pretty-print.c (dump_generic_node): Likewise.
111         * tree-vect-generic.c (expand_vector_operations_1): Likewise.
112         * fold-const.c (fold_binary_loc): Likewise.
113         * doc/generic.texi (VEC_INTERLEAVE_HIGH_EXPR,
114         VEC_INTERLEAVE_LOW_EXPR): Remove documentation.
115         * optabs.c (optab_for_tree_code): Don't handle
116         VEC_INTERLEAVE_HIGH_EXPR and VEC_INTERLEAVE_LOW_EXPR.
117         (expand_binop, init_optabs): Remove vec_interleave_high_optab
118         and vec_interleave_low_optab.
119         * genopinit.c (optabs): Likewise.
120         * optabs.h (OTI_vec_interleave_high, OTI_vec_interleave_low): Remove.
121         (vec_interleave_high_optab, vec_interleave_low_optab): Remove.
122         * doc/md.texi (vec_interleave_high, vec_interleave_low): Remove
123         documentation.
124         * tree-vect-stmts.c (gen_perm_mask): Renamed to...
125         (vect_gen_perm_mask): ... this.  No longer static.
126         (perm_mask_for_reverse, vectorizable_load): Adjust callers.
127         * tree-vectorizer.h (vect_gen_perm_mask): New prototype.
128         * tree-vect-data-refs.c (vect_strided_store_supported): Don't try
129         VEC_INTERLEAVE_*_EXPR, use can_vec_perm_p instead of
130         can_vec_perm_for_code_p.
131         (vect_permute_store_chain): Generate VEC_PERM_EXPR with interleaving
132         masks instead of VEC_INTERLEAVE_HIGH_EXPR and VEC_INTERLEAVE_LOW_EXPR.
133         * config/i386/i386.c (expand_vec_perm_interleave2): If
134         expand_vec_perm_interleave3 would handle it, return false.
135         (expand_vec_perm_broadcast_1): Don't use vec_interleave_*_optab.
136
137 2011-12-23  Richard Henderson  <rth@redhat.com>
138
139         * config/mips/loongson.md (UNSPEC_LOONGSON_PINSR_0,
140         UNSPEC_LOONGSON_PINSR_1, UNSPEC_LOONGSON_PINSR_2,
141         UNSPEC_LOONGSON_PINSR_3): Replace with...
142         (UNSPEC_LOONGSON_PINSRH): ... this.
143         (UNSPEC_LOONGSON_VINIT): New.
144         (UNSPEC_LOONGSON_DSLL, UNSPEC_LOONGSON_DSRL): New.
145         (VWB): New mode iterator.
146         (V_inner): New mode attribute.
147         (loongson_vec_init1_<VHB>): New.
148         (*vec_concatv2si): New.
149         (and<VWHB>3, ior<VWHB>3, xor<VWHB>3, one_cmpl<VWHB>2): New.
150         (*loongson_nor): New.
151         (loongson_pextrh): Un-macro-ify.
152         (loongson_pmaddhw): Likewise.
153         (smaxv4hi3, umaxv8qi3, sminv4hi3, uminv8qi3): Likewise.
154         (loongson_pinsrh_0): Represent with vec_select+vec_concat.
155         (loongson_pinsrh_1, loongson_pinsrh_2, loongson_pinsrh_3): Likewise.
156         (*vec_setv4hi, vec_setv4hi): New.
157         (sdot_prodv4hi): New.
158         (smax<VWB>3, smin<VWB>3): New.
159         (reduc_uplus_v8qi): New.
160         (loongson_pshufh): Remove destination matching input.
161         (ashl<VWH>3, ashr<VWH>3, lshr<VWH>3): Fix type attribute.
162         (vec_interleave_high<VWHB>, vec_interleave_low<VWHB>): Remove.
163         (loongson_punpckhbh, loongson_punpckhhw, loongson_punpckhhw_qi,
164         loongson_punpckhwd, loongson_punpckhwd_qi, loongson_punpckhwd_hi,
165         loongson_punpcklbh, loongson_punpcklhw, loongson_punpcklhw_qi,
166         loongson_punpcklwd, loongson_punpcklwd_qi, loongson_punpcklwd_hi,
167         vec_perm_const<VWHB>, vec_unpacks_lo_<VHB>, vec_unpacks_hi_<VHB>,
168         vec_unpacku_lo_<VHB>, vec_unpacku_hi_<VHB>, vec_shl_<VWHBDI>,
169         vec_shr_<VWHBDI>, reduc_uplus_<VWH>, reduc_splus_<VWHB>,
170         reduc_smax_<VWHB>, reduc_smin_<VWHB>, reduc_umax_<VWHB>,
171         reduc_umin_<VB>): New.
172         * config/mips/mips-ps-3d.md (vec_perm_const_ps): New.
173         (mips_pul_ps, mips_puu_ps, mips_pll_ps, mips_plu_ps): Expand in
174         terms of vec_perm_const_ps.
175         (vec_perm_constv2sf): New.
176         (vec_initv2sf): Use mips_expand_vector_init.
177         (vec_concatv2sf): Rename from vec_initv2sf_internal.
178         (vec_setv2sf): Use vec_perm_const_ps.
179         (reduc_splus_v2sf, reduc_smin_v2sf, reduc_smax_v2sf): New.
180         * config/mips/loongson.h (pshufh_u, pshufh_s): Don't pass dest to
181         the builtin.
182         * config/mips/mips-modes.def (V16QI, V8HI, V4SI, V4SF): New modes.
183         * config/mips/mips-protos.h: Update.
184         * config/mips/mips.c (mips_get_arg_info): Match V2SFmode, not all
185         MODE_VECTOR_FLOAT.
186         (mips_return_mode_in_fpr_p): Likewise.
187         (mips_cannot_change_mode_class): Allow 8-byte integral mode changes.
188         (CODE_FOR_loongson_punpckhbh, CODE_FOR_loongson_punpckhhw,
189         CODE_FOR_loongson_punpckhwd, CODE_FOR_loongson_punpcklbh,
190         CODE_FOR_loongson_punpcklhw, CODE_FOR_loongson_punpcklwd): Remove.
191         (mips_builtins): Remove first operand for loongson pshufh builtins.
192         (MAX_VECT_LEN, struct expand_vec_perm_d): New.
193         (mips_expand_vselect, mips_expand_vselect_vconcat,
194         mips_expand_vpc_loongson_even_odd, mips_expand_vpc_loongson_pshufh,
195         mips_expand_vpc_loongson_bcast, mips_expand_vec_perm_const_1,
196         mips_expand_vec_perm_const, mips_vectorize_vec_perm_const_ok,
197         mips_expand_vec_unpack, mips_constant_elt_p, mips_expand_vi_broadcast,
198         mips_expand_vi_constant, mips_expand_vi_loongson_one_pinsrh,
199         mips_expand_vi_general, mips_expand_vec_reduc, mips_expand_vec_minmax,
200         TARGET_VECTORIZE_VEC_PERM_CONST_OK): New.
201         (mips_expand_vector_init): Rewrite.
202         * config/mips/predicates.md (const_2_or_3_operand): New.
203         (const_0_to_3_operand): New.
204
205 2011-12-23  Dmitry Plotnikov  <dplotnikov@ispras.ru>
206
207         * config/arm/neon.md (float<mode><V_cvtto>2): New.
208         (floatuns<mode><V_cvtto>2): New.
209         (fix_trunc<mode><V_cvtto>2): New.
210         (fix_truncuns<mode><V_cvtto>2): New.
211         * config/arm/iterators.md (V_cvtto): New iterator.
212
213 2011-12-23  Richard Guenther  <rguenther@suse.de>
214
215         PR rtl-optimization/50396
216         * simplify-rtx.c (simplify_binary_operation_1): Properly
217         guard code that only works for integers.
218
219 2011-12-23  Tristan Gingold  <gingold@adacore.com>
220
221         * config/vms/vms-crtlmap.map (log10): Fix typo.
222
223 2011-12-23  Tristan Gingold  <gingold@adacore.com>
224
225         * config/ia64/vms.h (SUPPORTS_ONE_ONLY): Define.
226
227 2011-12-22  Bin Cheng  <bin.cheng@arm.com>
228         Richard Guenther  <rguenther@suse.de>
229
230         PR tree-optimization/43491
231         * tree-ssa-pre.c (eliminate): Don't replace global register
232         variable when it is the RHS of a single assign.
233
234 2011-12-22  Joey Ye  <joey.ye@arm.com>
235
236         * toplev.c (process_options): Fix typo.
237
238 2011-12-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
239
240         PR middle-end/51252
241         * config/pa/pa.c (pa_som_tm_clone_table_section): New function.
242         (som_tm_clone_table_section): Declare.
243         (pa_file_start_space): Create $TM_CLONE_TABLE$ subspace.
244         (pa_som_asm_init_sections): Init som_tm_clone_table_section.
245         * config/pa/som.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): Define.
246
247 2011-12-22  Richard Sandiford  <rdsandiford@googlemail.com>
248
249         * doc/tm.texi.in (TARGET_PREPARE_PCH_SAVE): New hook.
250         * doc/tm.texi: Regenerate.
251         * target.def (prepare_pch_save): New hook.
252         * c-family/c-pch.c (c_common_write_pch): Call it.
253         * config/mips/mips.c (was_mips16_pch_p): Delete.
254         (mips_set_mips16_mode): Don't refer to was_mips16_pch_p.
255         (mips_prepare_pch_save): New function.
256         (TARGET_PREPARE_PCH_SAVE): Define.
257
258 2011-12-22  Aldy Hernandez  <aldyh@redhat.com>
259
260         PR middle-end/51212
261         * opts.c (finish_options): Call sorry on -fgnu-tm and
262         -fnon-call-exceptions combination.
263
264 2011-12-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
265
266         * doc/invoke.texi (C++ Dialect Options): Add missing options and
267         move -Wzero-as-null-pointer-constant to ...
268         (Warning Options): ... here.
269
270 2011-12-22  Jonathan Wakely  <jwakely.gcc@gmail.com>
271
272         PR target/47643
273         * doc/invoke.texi (i386 and x86-64 Options): Fix description of
274         -mtune without -march.
275
276 2011-12-21  Richard Earnshaw  <rearnsha@arm.com>
277
278         PR target/51643
279         * arm.c (arm_function_ok_for_sibcall): Use DECL_WEAK in previous
280         change.
281
282 2011-12-22  Tristan Gingold  <gingold@adacore.com>
283
284         * config/ia64/ia64.c (ia64_promote_function_mode): Remove.
285         (TARGET_PROMOTE_FUNCTION_MODE): Remove.
286         (ia64_function_value): Call promote_function_mode instead of
287         ia64_promote_function_mode.
288         * config/ia64/vms.h (PROMOTE_MODE): Define.
289         (TARGET_PROMOTE_FUNCTION_MODE): Define.
290
291 2011-12-22  Uros Bizjak  <ubizjak@gmail.com>
292
293         PR target/27468
294         * common/config/alpha/alpha-common.c (alpha_option_optimization_table):
295         Enable flag_ree at -O2 or higher.
296
297 2011-12-22  Richard Guenther  <rguenther@suse.de>
298
299         PR lto/51650
300         * lto.c (uniquify_nodes): Register TYPE_DECLs with the
301         debuginfo machinery.
302
303 2011-12-22  Bernd Schmidt  <bernds@codesourcery.com>
304
305         * tree-pass.h (pass_reload): Declare.
306         * ira.c (overall_cost_before, saved_flag_ira_share_spill_slots):
307         New global variables, moved out of ira.
308         (do_reload): New static function, split off from the second half
309         of ...
310         (ira): ... here.
311         (gate_ira): Remove.
312         (pass_ira): Use TV_IRA, set gate to NULL, and set flags to
313         TODO_dump_func.
314         (rest_of_handle_reload): New static function.
315         (pass_reload): New.
316
317 2011-12-22  Uros Bizjak  <ubizjak@gmail.com>
318
319         * common/config/i386/i386-common.c (ix86_option_optimization_table):
320         Move OPT_free processing from ...
321         * config/i386/i386.c (ix86_option_override_internal):  ... here.
322
323 2011-12-21  Richard Earnshaw  <rearnsha@arm.com>
324
325         PR target/51643
326         * arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a
327         weak function on bare-metal EABI targets.
328
329 2011-12-21  Jonathan Wakely  <jwakely.gcc@gmail.com>
330             Jim Avera  <james_avera@yahoo.com>
331
332         * doc/extend.texi (__builtin_expect): Improve example.
333
334 2011-12-21  Uros Bizjak  <ubizjak@gmail.com>
335
336         * config/i386/i386.c (ix86_option_override_internal): Enable flag_ree
337         also for 32bit targets.
338
339 2011-12-21  Richard Henderson  <rth@redhat.com>
340
341         PR target/51552
342         * dwarf2cfi.c (dwarf2out_frame_debug): Move any_cfis_emitted code...
343         (scan_trace): ... here.
344
345 2011-12-21  Jason Merrill  <jason@redhat.com>
346
347         * doc/standards.texi (C++ language): Update for C++11.
348
349 2011-12-21  Jakub Jelinek  <jakub@redhat.com>
350
351         * tree-vect-patterns.c (vect_operation_fits_smaller_type): Initialize
352         *op0 and *op1 to NULL_TREE first to avoid warnings.
353         * calls.c (initialize_argument_information): Initialize base to avoid
354         warnings.
355
356         PR middle-end/51644
357         PR middle-end/51647
358         * tree-eh.c (decide_copy_try_finally): At -O0, return true
359         even when ndests is not 1, if there are only gimple_clobber_p
360         (or debug) stmts in the finally sequence.
361         * tree-inline.c (estimate_num_insns): Return 0 for gimple_clobber_p
362         stmts.
363
364 2011-12-21  Aldy Hernandez  <aldyh@redhat.com>
365
366         PR middle-end/51472
367         * trans-mem.c (tm_log_add): Use create_tmp_var_reg.
368
369 2011-12-21  Martin Jambor  <mjambor@suse.cz>
370
371         * tree-into-ssa.c (rewrite_update_stmt): Do not dump extra newlines.
372         (rewrite_update_enter_block): Likewise.
373         (dump_update_ssa): Likewise.
374         (update_ssa): Likewise but also dump a newline at the beginning.
375
376 2011-12-21  Enkovich Ilya  <ilya.enkovich@intel.com>
377
378         PR target/50038
379         * implicit-zee.c: Delete.
380         * ree.c: New file.
381         * Makefile.in: Replace implicit-zee.c with ree.c.
382         * config/i386/i386.c (ix86_option_override_internal): Rename
383         flag_zee to flag_ree.
384         * common.opt (fzee): Ignored.
385         (free): New.
386         * passes.c (init_optimization_passes): Replace pass_implicit_zee
387         with pass_ree.
388         * tree-pass.h (pass_implicit_zee): Delete.
389         (pass_ree): New.
390         * timevar.def (TV_ZEE): Delete.
391         (TV_REE): New.
392         * doc/invoke.texi: Add -free description.
393
394 2011-12-21  Tristan Gingold  <gingold@adacore.com>
395
396         * config/vms/vms-protos.h (vms_function_section): New prototype.
397         * config/vms/vms.c (vms_function_section): New function.
398         * config/vms/vms.h (TARGET_ASM_FUNCTION_SECTION): Define.
399
400 2011-12-21  Richard Guenther  <rguenther@suse.de>
401
402         PR lto/41159
403         * tree-outof-ssa.c (insert_value_copy_on_edge): Use the
404         mode of the pseudo as destination mode.  Only assert that
405         is equal to the promoted mode of the decl if it is a REG.
406
407 2011-12-21  Tristan Gingold  <gingold@adacore.com>
408
409         * config/vms/xm-vms.h (STANDARD_EXEC_PREFIX): Remove define.
410
411 2011-12-20  Richard Henderson  <rth@redhat.com>
412
413         * config/ia64/ia64.c (MAX_VECT_LEN): New.
414         (struct expand_vec_perm_d): New.
415         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): New.
416         (ia64_unpack_assemble): Use ia64_expand_vec_perm_const_1.
417         (expand_vselect, expand_vselect_vconcat): New.
418         (expand_vec_perm_identity, expand_vec_perm_shrp): New.
419         (expand_vec_perm_1, expand_vec_perm_broadcast): New.
420         (expand_vec_perm_interleave_2, expand_vec_perm_v4hi_5): New.
421         (ia64_expand_vec_perm_const_1, ia64_expand_vec_perm_const): New.
422         (ia64_vectorize_vec_perm_const_ok): New.
423         (ia64_expand_vec_setv2sf, ia64_expand_vec_perm_even_odd): New.
424         * config/ia64/ia64-protos.h: Update.
425         * config/ia64/vect.md (VEC): New mode iterator.
426         (vecint): New mode attribute.
427         (vec_interleave_lowv8qi, vec_interleave_highv8qi): Privatize with '*'.
428         (vec_interleave_lowv4hi, vec_interleave_highv4hi): Likewise.
429         (vec_interleave_lowv2si, vec_interleave_highv2si): Likewise.
430         (vec_interleave_lowv2sf, vec_interleave_highv2sf): Likewise.
431         (mix1_even, mix1_odd, mux1_alt): Likewise.
432         (mux1_brcst_qi): Remove '*' from name.
433         (vec_extract_evenv8qi, vec_extract_oddv8qi): Remove.
434         (vec_extract_evenv4hi, vec_extract_oddv4hi): Remove.
435         (vec_extract_evenv2si, vec_extract_oddv2si): Remove.
436         (vec_extract_evenv2sf, vec_extract_oddv2sf): Remove.
437         (vec_extract_evenodd_helper): Remove.
438         (vec_setv2sf): Use ia64_expand_vec_setv2sf.
439         (vec_pack_trunc_v4hi): Use ia64_expand_vec_perm_even_odd.
440         (vec_pack_trunc_v2si): Likewise.
441         (vec_perm_const<VEC>): New.
442
443 2011-12-20  Richard Henderson  <rth@redhat.com>
444
445         * tree-vect-generic.c (expand_vector_operations_1): Correct tests
446         for vector types -- use the type not the mode.  Fix optab selection
447         for vector shifts by a scalar.  Handle over-large integer modes
448         like BLKmode.
449
450 2011-12-20  Richard Henderson  <rth@redhat.com>
451
452         * config/arm/arm.md (*arm_xorsi3): Match iorsi3 and perform
453         post-reload splitting.
454
455         * config/arm/arm.md (*arm_cmpdi_unsigned): Enable for thumb2.
456         * config/arm/arm.c (arm_select_cc_mode): Use it.
457
458 2011-12-20  Richard Sandiford  <rdsandiford@googlemail.com>
459
460         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Restrict
461         handling of signedness differences to integer types.  Only build
462         a new optype if type1 isn't correct.
463
464 2011-12-20  Vladimir Makarov  <vmakarov@redhat.com>
465
466         PR target/49865
467         * ira-costs.c (find_costs_and_classes): Prefer registers even
468         if the memory cost is the same.
469
470 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
471
472         * c-decl.c (diagnose_mismatched_decls, grokdeclarator, grokfield)
473         (finish_struct): Refer to C11 in comments.  Use flag_isoc11.
474         * c-parser.c (c_parser_static_assert_declaration)
475         (c_parser_static_assert_declaration_no_semi, c_parser_declspecs)
476         (c_parser_alignas_specifier, c_parser_alignof_expression): Refer
477         to C11 in comments.  Use flag_isoc11.
478         * c-typeck.c (comptypes_check_different_types): Refer to C11 in
479         comment.
480         * doc/cpp.texi (Overview): Refer to -std=c11 instead of -std=c1x.
481         * doc/cppopts.texi (-std=c11, -std=gnu11): Document in preference
482         to -std=c1x and -std=gnu1x.
483         * doc/extend.texi (Inline, Alternate Keywords, Other Builtins)
484         (__builtin_complex, Unnamed Fields): Refer to -std=c11 and C11
485         instead of -std=c1x and C1X.
486         * doc/invoke.texi (-std=c11, -std=iso9899:2011): Document in
487         preference to -std=c1x.
488         (-std=gnu11): Document in preference to -std=gnu1x.
489         * doc/standards.texi: Document C11 instead of C1X.  Document C11
490         as actual standard.  Document headers required from freestanding
491         C11 implementations.
492         * ginclude/float.h, ginclude/stddef.h: Test __STDC_VERSION__ >=
493         201112L for C11.  Update comments to refer to C11.
494
495 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
496
497         * configure: Regenerate.
498
499 2011-12-20  Bernd Schmidt  <bernds@codesourcery.com>
500
501         PR middle-end/51200
502         * expr.c (store_field): Avoid a direct store if the mode is larger
503         than the size of the bit field.
504         * stor-layout.c (layout_decl): If flag_strict_volatile_bitfields,
505         treat non-volatile bit fields like volatile ones.
506         * toplev.c (process_options): Disallow combination of
507         -fstrict-volatile-bitfields and ABI versions less than 2.
508         * config/arm/arm.c (arm_option_override): Don't enable
509         flag_strict_volatile_bitfields if the ABI version is less than 2.
510         * config/h8300/h8300.c (h8300_option_override): Likewise.
511         * config/rx/rx.c (rx_option_override): Likewise.
512         * config/m32c/m32c.c (m32c_option_override): Likewise.
513         * config/sh/sh.c (sh_option_override): Likewise.
514
515 2011-12-20  Richard Guenther  <rguenther@suse.de>
516
517         PR lto/46796
518         * dwarf2out.c (modified_type_die): When the type variant
519         chain is corrupt use the types name, if available, instead
520         of __unknown__.
521
522 2011-12-20  Tristan Gingold  <gingold@adacore.com>
523
524         * config/alpha/alpha.c (alpha_start_function): Adjust condition to
525         create VMS trampoline entry point.
526
527 2011-12-19  Richard Sandiford  <rdsandiford@googlemail.com>
528
529         PR rtl-optimization/42839
530         * fwprop.c (forward_propagate_subreg): Skip the SIGN/ZERO_EXTEND
531         optimization if the source register is already extended.
532
533 2011-12-19  Richard Sandiford  <rdsandiford@googlemail.com>
534
535         * lower-subreg.c (can_decompose_p): Check every word of a hard
536         register.
537
538 2011-12-19  Sandra Loosemore  <sandra@codesourcery.com>
539             Tom de Vries <tom@codesourcery.com>
540
541         PR rtl-opt/50380
542         * cse.c (find_comparison_args): Detect fixed point and
543         bail early.
544
545 2011-12-19  Aldy Hernandez  <aldyh@redhat.com>
546
547         PR middle-end/51411
548         * trans-mem.c (ipa_tm_create_version): Unset DECL_WEAK.
549
550 2011-12-19  Quentin Neill  <quentin.neill@amd.com>
551
552         PR target/48743
553         * config/i386/driver-i386.c (host_detect_local_cpu): Also check
554         family to distinguish PROCESSOR_ATHLON.
555
556 2011-12-19  Richard Guenther  <rguenther@suse.de>
557
558         PR lto/51573
559         * streamer-hooks.h (struct streamer_hooks): Add second
560         ref_p parameter to write_tree.
561         (stream_write_tree): Adjust.
562         (stream_write_tree_shallow_non_ref): New define.
563         * lto-streamer.h (lto_output_tree): Adjust.
564         * lto-streamer-out.c (lto_output_tree): Likewise.
565         * tree-streamer-out.c (streamer_write_chain): Only
566         force the immediate tree to be streamed as non-reference.
567
568 2011-12-19  Martin Jambor  <mjambor@suse.cz>
569
570         PR tree-optimization/51583
571         * tree-sra.c (load_assign_lhs_subreplacements): Call
572         force_gimple_operand_gsi when necessary also in case of no
573         corresponding replacement on the RHS.
574
575 2011-12-19  Jakub Jelinek  <jakub@redhat.com>
576
577         * gimple.h (gimplify_seq_add_stmt): Rename to...
578         (gimple_seq_add_stmt_without_update): ... this.
579         * gimplify.c (gimplify_seq_add_stmt): Rename to...
580         (gimple_seq_add_stmt_without_update): ... this.
581         (gimplify_seq_add_stmt): New inline wrapper for it.
582         * tree-vect-patterns.c (append_pattern_def_seq): Use
583         gimple_seq_add_stmt_without_update instead of gimplify_seq_add_stmt.
584
585         PR tree-optimization/51596
586         * tree-cfg.c (replace_uses_by): Call gimple_purge_dead_eh_edges
587         when needed.
588
589         PR middle-end/51590
590         PR tree-optimization/51606
591         * tree-vect-patterns.c (append_pattern_def_seq, new_pattern_def_seq):
592         New inline functions.
593         (vect_recog_over_widening_pattern,
594         vect_recog_vector_vector_shift_pattern,
595         vect_recog_sdivmod_pow2_pattern, vect_recog_mixed_size_cond_pattern,
596         adjust_bool_pattern_cast, vect_recog_bool_pattern): Use them.
597
598 2011-12-19  Richard Guenther  <rguenther@suse.de>
599
600         PR lto/51572
601         * tree.c (free_lang_data_in_type): Do not unlink TYPE_DECL
602         from TYPE_FIELDS.
603         (find_decls_types_r): Walk TYPE_DECLs in TYPE_FIELDS.
604         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Do
605         not stream TREE_CHAIN.
606         (write_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
607         using streamer_write_chain.
608         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
609         Do not stream TREE_CHAIN.
610         (lto_input_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
611         using streamer_read_chain.
612         * gimple-streamer-in.c (input_gimple_stmt): Skip non-FIELD_DECLs.
613         * gimple.c (gimple_canonical_types_compatible_p): Properly
614         handle trailing non-FIELD_DECLs in TYPE_FIELDS.
615
616 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
617
618         * configure: Regenerate.
619
620 2011-12-19  Bernd Schmidt  <bernds@codesourcery.com>
621
622         * emit-rtl.c (init_emit_once): Initialize const_tiny_rtx[3] for
623         partial integer modes.
624
625 2011-12-19  Andreas Schwab  <schwab@linux-m68k.org>
626
627         PR target/51532
628         * config/m68k/m68k.h (FL_CAS, TARGET_CAS): Define.
629         * config/m68k/m68k.c (FL_FOR_isa_20): Add FL_CAS.
630         * config/m68k/sync.md: Use TARGET_CAS instead of (TARGET_68020 ||
631         TARGET_68040).
632
633 2011-12-18  Anatoly Sokolov  <aesok@post.ru>
634
635         * config/ia64/ia64.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P,
636         LEGITIMATE_ADDRESS_REG, LEGITIMATE_ADDRESS_DISP,
637         GO_IF_LEGITIMATE_ADDRESS): Remove macros.
638         * config/ia64/ia64.c (TARGET_LEGITIMATE_ADDRESS_P): Define.
639         (ia64_reg_ok_for_base_p, ia64_legitimate_address_reg,
640         ia64_legitimate_address_disp, ia64_legitimate_address_p): New
641         functions.
642
643 2011-12-17  Tom de Vries  <tom@codesourcery.com>
644
645         PR tree-optimization/51491
646         * tree-ssa-ccp.c (insert_clobber_before_stack_restore)
647         (gsi_prev_dom_bb_nondebug, insert_clobbers_for_var): New function.
648         (ccp_fold_stmt): Use insert_clobbers_for_var after a successful
649         fold_builtin_alloca_with_align.
650         (ccp_visit_stmt): Calculate and free dominator info.
651
652 2011-12-16  Eric Botcazou  <ebotcazou@adacore.com>
653
654         * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
655         (frame_blockage): New expander.
656         (frame_blockage<P:mode>): New instruction.
657         * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
658         instructions establishing the frame isn't atomic, emit frame blockage.
659
660 2011-12-16  Tristan Gingold  <gingold@adacore.com>
661
662         * config/alpha/vms.h (USE_TM_CLONE_REGISTRY): Define.
663
664 2011-12-16  Tristan Gingold  <gingold@adacore.com>
665
666         * config/alpha/alpha.c (alpha_use_linkage): Follow transparent alias.
667         (alpha_write_one_linkage): Use assemble_name to emit linkage name.
668
669 2011-12-16  Tristan Gingold  <gingold@adacore.com>
670
671         * config/vms/t-vms (vms.o, vms-c.o): Force output filename.
672
673 2011-12-16  Tristan Gingold  <gingold@adacore.com>
674
675         * config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
676         (vms_patch_builtins): Handle.
677         * config/vms/vms-crtlmap.map: Add an entry for environ.
678
679 2011-12-16  Jakub Jelinek  <jakub@redhat.com>
680
681         PR debug/51557
682         * sel-sched-ir.c (create_copy_of_insn_rtx): Copy all notes
683         other than REG_EQUAL, REG_EQUIV and REG_LABEL_OPERAND.
684
685         PR tree-optimization/51576
686         * tree-cfg.c (replace_uses_by): Call maybe_clean_or_replace_eh_stmt
687         even if fold_stmt didn't change anything.
688
689 2011-12-16  Richard Guenther  <rguenther@suse.de>
690
691         PR lto/51572
692         * dwarf2out.c (gen_type_die_with_usage): Use the context of
693         the TYPE_DECL as well if it is file-scope.
694
695 2011-12-15  DJ Delorie  <dj@redhat.com>
696
697         * config/rl78/rl78.md (return): Rename to rl78_return.
698         * config/rl78/rl78.c (rl78_expand_epilogue): Use new name.
699         (rl78_expand_eh_epilogue): Use new name.
700         (rl78_calculate_death_notes): Likewise.
701
702 2011-12-15  Jakub Jelinek  <jakub@redhat.com>
703
704         * tree-vectorizer.h (struct _stmt_vec_info): Remove pattern_def_stmt
705         field, add pattern_def_seq.
706         (STMT_VINFO_PATTERN_DEF_STMT): Remove.
707         (STMT_VINFO_PATTERN_DEF_SEQ): Define.
708         (NUM_PATTERNS): Bump to 10.
709         * tree-vect-loop.c (vect_determine_vectorization_factor,
710         vect_transform_loop): Adjust for pattern def changing from a single
711         gimple stmt to gimple_seq.
712         * tree-vect-stmts.c (vect_analyze_stmt, new_stmt_vec_info,
713         free_stmt_vec_info): Likewise.
714         * tree-vect-patterns.c (vect_recog_over_widening_pattern,
715         vect_recog_vector_vector_shift_pattern,
716         vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast,
717         adjust_bool_pattern, vect_mark_pattern_stmts): Likewise.
718         (vect_recog_sdivmod_pow2_pattern): New function.
719         (vect_vect_recog_func_ptrs): Add it.
720
721         * config/i386/sse.md (vcond<V_256:mode><VI_256:mode>,
722         vcond<V_128:mode><VI124_128:mode>, vcond<VI8F_128:mode>v2di):
723         Use general_operand instead of nonimmediate_operand for
724         operand 5 and no predicate for operands 1 and 2.
725         * config/i386/i386.c (ix86_expand_int_vcond): Optimize
726         x < 0 ? -1 : 0 and x < 0 ? 1 : 0 into vector arithmetic
727         resp. logical shift.
728
729 2011-12-15  Georg-Johann Lay  <avr@gjlay.de>
730
731         * config/avr/avr-protos.h (print_operand): Remove.
732         (print_operand_address): Remove.
733         * config/avr/avr.h (PRINT_OPERAND): Remove.
734         (PRINT_OPERAND_ADDRESS): Remove.
735         (PRINT_OPERAND_PUNCT_VALID_P): Remove.
736         * config/avr/avr.c (TARGET_PRINT_OPERAND): New hook define.
737         (TARGET_PRINT_OPERAND_ADDRESS): New hook define.
738         (TARGET_PRINT_OPERAND_PUNCT_VALID_P): New hook define.
739         (print_operand_address): Rename to...
740         (avr_print_operand_address): ...this and make static.
741         (print_operand): Rename to...
742         (avr_print_operand): ...this and make static.
743         (avr_print_operand_punct_valid_p): New static function.
744
745 2011-12-15  Andreas Tobler  <andreast@fgznet.ch>
746
747         * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define.
748
749 2011-12-15  Jakub Jelinek  <jakub@redhat.com>
750
751         PR c/51360
752         * c-parser.c (c_parser_omp_clause_num_threads,
753         c_parser_omp_clause_schedule): Call mark_exp_read.
754
755 2011-12-15  Romain Geissler  <romain.geissler@gmail.com>
756
757         * builtins.def (BUILT_IN_STPNCPY_CHK): New definition.
758         * builtins.c (expand_builtin, fold_builtin_4, maybe_emit_chk_warning):
759         Add BUILT_IN_STPNCPY_CHK case.
760         * gimple-fold.c (gimple_fold_builtin): Likewise.
761         * tree-object-size.c (pass_through_call): Likewise.
762         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
763         call_may_clobber_ref_p_1): Likewise.
764         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call,
765         find_func_clobbers): Likewise.
766         * tree.h (fold_builtin_strncpy_chk): Rename to fold_builtin_stxncpy_chk
767         * builtins.c (fold_builtin_strncpy_chk): Likewise.
768         Rewrite stpncpy_chk calls to strncpy_chk calls if returned value is
769         ignored.
770
771 2011-12-15  Richard Guenther  <rguenther@suse.de>
772
773         PR lto/51567
774         * gimple.c (compare_type_names_p): Also compare the TREE_CODE.
775         (iterative_hash_name): Also hash the TREE_CODE.
776         (gimple_types_compatible_p_1): For types with a TYPE_DECL
777         name and a type DECL_CONTEXT recurse to that type.
778         (iterative_hash_gimple_type): Likewise.
779
780 2011-12-15  Iain Sandoe  <iains@gcc.gnu.org>
781
782         * config/rs6000/rs6000.c  (rs6000_emit_prologue): Move update of
783         VRSave mask to save_world() when that is in use.
784
785 2011-12-15  Richard Guenther  <rguenther@suse.de>
786
787         * lto-wrapper.c (run_gcc): In non-parallel mode remove
788         ltrans inputs immediately after processing them.  In parallel
789         mode truncate the ltrans inputs in the make rule that processes
790         them if temporary files are not to be preserved.
791
792 2011-12-15  Anatoly Sokolov  <aesok@post.ru>
793
794         * config/arm/arm.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
795         * config/arm/arm.c (arm_memory_move_cost, arm_register_move_cost):
796         New functions.
797         (TARGET_REGISTER_MOVE_COST, TARGET_MEMORY_MOVE_COST): Define.
798
799 2011-12-15  Richard Guenther  <rguenther@suse.de>
800
801         PR lto/51564
802         * tree.h (REGISTER_DEFS_IN_THIS_STMT, NECESSARY,
803         STMT_IN_SSA_EDGE_WORKLIST): Remove no longer existing flag
804         uses documentation.
805         (TREE_ASM_WRITTEN): Update documentation to mention its use
806         on TYPE_DECLs from debug info generation.
807         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
808         TREE_ASM_WRITTEN as always zero for TYPE_DECLs, similar to
809         all other types.
810
811 2011-12-15  Georg-Johann Lay  <avr@gjlay.de>
812
813         PR target/51050
814         * config/avr/avr.c (expand_epilogue): Don't build SUBREG of fp.
815         (avr_prologue_setup_frame): Ditto.
816
817 2011-12-15  Jakub Jelinek  <jakub@redhat.com>
818
819         PR debug/51517
820         * tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test
821         !DECL_IGNORED_P instead of !DECL_ARTIFICIAL.
822
823 2012-12-15  Richard Guenther  <rguenther@suse.de>
824
825         Revert
826         PR lto/48437
827         * lto-streamer-out.c (tree_is_indexable): Exclude block-local
828         extern declarations.
829
830         PR lto/48508
831         PR lto/48437
832         * tree-streamer-out.c (streamer_write_chain): Stream DECL_EXTERNAL
833         VAR_DECLs and FUNCTION_DECLs locally.
834
835 2011-12-14  Richard Henderson  <rth@redhat.com>
836
837         * config/arm/arm.md (*addsi3_compare0_scratch): Set predicable.
838         (*compare_negsi_si, *compare_addsi2_op0): Likewise.
839         (*compare_addsi2_op1, *zeroextractsi_compare0_scratch): Likewise.
840         (*compareqi_eq0, *arm_cmpsi_insn, *arm_cmpsi_negshiftsi_si): Likewise.
841
842 2011-12-14  Richard Guenther  <rguenther@suse.de>
843
844         * tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for
845         propagating all kinds of constants.
846
847 2011-12-14  Richard Guenther  <rguenther@suse.de>
848
849         PR lto/51497
850         * lto-streamer-in.c (lto_read_body): Fixup local types
851         TYPE_CANONICAL and variant chain.
852
853 2011-12-14  Richard Guenther  <rguenther@suse.de>
854
855         * tree.c (free_lang_data_in_type): Do not clear fields
856         dependent on debuginfo level setting.
857         (find_decls_types_r): Use TYPE_STUB_DECL rathern than TREE_CHAIN.
858         * tree.h (TYPE_STUB_DECL): Properly check that we access a type.
859
860 2011-12-14  Georg-Johann Lay  <avr@gjlay.de>
861
862         PR target/50931
863         * config/avr/avr.md (mulpsi3): New expander.
864         (*umulqihipsi3, *umulhiqipsi3): New insns.
865         (*mulsqipsi3.libgcc, *mulpsi3.libgcc): New insns.
866         (mulsqipsi3, *mulpsi3): New insn-and-splits.
867         (ashlpsi3): Turn to expander.  Move insn code to...
868         (*ashlpsi3): ...this new insn.
869
870 2011-12-14  Richard Guenther  <rguenther@suse.de>
871
872         * tree-cfg.c (replace_uses_by): Only mark blocks altered
873         that will make a difference.  Only recompute ADDR_EXPR
874         invariantness if it could possibly have changed.  Do so
875         before folding the statement.
876
877 2011-12-13  Eric Botcazou  <ebotcazou@adacore.com>
878
879         * lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
880         * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
881         * lto-streamer-in.c (lto_read_body): Likewise.
882         (lto_input_toplevel_asms): Likewise.
883         * lto-section-in.c (lto_create_simple_input_block): Likewise.
884         * ipa-inline-analysis.c (inline_read_section): Likewise.
885         * ipa-prop.c (ipa_prop_read_section): Likewise.
886
887         * df.h (DF_NOTE): Fix typo in comment.
888
889 2011-12-13  Aldy Hernandez  <aldyh@redhat.com>
890
891         * trans-mem.c (ipa_tm_create_version_alias): Set DECL_CONTEXT and
892         DECL_LANG_SPECIFIC.
893
894 2011-12-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
895
896         * regmove.c (fixup_match_2): Only access call_used_regs with hard regs.
897
898 2011-12-13  Andrew Pinski  <apinski@cavium.com>
899             Adam Nemet  <anemet@caviumnetworks.com>
900
901         * config/mips/mips-cpus.def: Add Octeon2.
902         * config/mips/mips-tables.opt: Regenerate.
903         * config/mips/mips.md (define_attr "cpu"): Add Octeon2.
904         * config/mips/driver-native.c (host_detect_local_cpu): Support Octeon2.
905         * config/mips/octeon.md (octeon_arith): Add Octeon2.
906         (octeon_condmove): Likewise.
907         (octeon_load): Rename to ..
908         (octeon_load_o1): this.
909         (octeon_load_o2): New reserve.
910         (octeon_cop_o2): New reserve.
911         (octeon_store):  Match Octeon2 also.
912         (octeon_brj): Rename to ..
913         (octeon_brj_o1): this.
914         (octeon_brj_o2): New reserve.
915         (octeon_imul3): Rename to ...
916         (octeon_imul3_o1): this.
917         (octeon_imul3_o2): New reserve.
918         (octeon_imul): Rename to ...
919         (octeon_imul_o1): this.
920         (octeon_imul_o2): New reserve.
921         (octeon_mfhilo): Rename to ...
922         (octeon_mfhilo_o1): This.
923         (octeon_mfhilo_o2): New reserve.
924         (octeon_imadd): Rename to ...
925         (octeon_imadd_o1): this.
926         (octeon_imadd_o2): New reserve.
927         (octeon_idiv): Rename to ..
928         (octeon_idiv_o1): This.
929         (octeon_idiv_o2_si): New reserve.
930         (octeon_idiv_o2_di): Likewise.
931         (octeon_unknown): Match Octeon2 also.
932         * config/mips/mips.c (mips_rtx_cost_data): Add Octeon2 cost data.
933         (mips_issue_rate): Octeon2 can issue 2 at a time.
934         * config/mips/mips.h (TARGET_OCTEON): Match Octeon2 also.
935         (TARGET_OCTEON2): New define.
936         (TUNE_OCTEON): Match Octeon2 also.
937
938 2011-12-13  Richard Henderson  <rth@redhat.com>
939
940         * config/sparc/tso.h: New file.
941         * config.gcc (sparc-*-linux*, sparc*-*-solaris2*): Use it.
942         * config/sparc/sparc.c (sparc_option_override): Honor
943         SUBTARGET_DEFAULT_MEMORY_MODEL.
944         * config/sparc/sparc.h (SUBTARGET_DEFAULT_MEMORY_MODEL): New.
945
946 2011-12-13  Aldy Hernandez  <aldyh@redhat.com>
947
948         PR middle-end/51443
949         * trans-mem.c (struct diagnose_tm): Remove saw_unsafe.
950         (diagnose_tm_1): Same.
951         (ipa_tm_execute): Do not test tm_may_enter_irr before we set it.
952         (ipa_tm_scan_irr_function): Return gracefully when no
953         DECL_STRUCT_FUNCTION.
954         (ipa_tm_scan_irr_block): Believe the user on TM attributes.
955
956 2011-12-13  Martin Jambor  <mjambor@suse.cz>
957
958         PR middle-end/50628
959         * tree-sra.c (propagate_subaccesses_across_link): Do not propagate
960         sub-accesses of scalar accesses.
961
962 2011-12-13  Martin Jambor  <mjambor@suse.cz>
963
964         PR tree-optimization/51362
965         * ipa-cp.c (estimate_local_effects): When estimated size of a
966         specialized clone is zero, bump it to one.
967
968 2011-12-13  Richard Guenther  <rguenther@suse.de>
969
970         PR lto/48354
971         * tree.c (find_decls_types_r): Also walk DECL_ORIGINAL_TYPE.
972         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
973         Stream DECL_ORIGINAL_TYPE.
974         * tree-streamer-out.c (write_ts_decl_non_common_tree_pointers):
975         Likewise.
976
977 2011-12-13  Jakub Jelinek  <jakub@redhat.com>
978
979         Revert
980         2011-12-12  Jakub Jelinek  <jakub@redhat.com>
981
982         PR tree-optimization/51481
983         * gimple-fold.c (gimple_fold_call): Call
984         maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
985         edges, but gimple_fold_builtin result can't throw.
986
987 2011-12-13  Jakub Jelinek  <jakub@redhat.com>
988             Michael Matz  <matz@suse.de>
989
990         PR tree-optimization/51117
991         * tree-eh.c (sink_clobbers): New function.
992         (execute_lower_eh_dispatch): Call it for BBs ending with
993         internally throwing RESX.
994         * cfgexpand.c (add_scope_conflicts_1): Add all conflicts only
995         at the first real instruction.
996
997 2011-12-13  Tristan Gingold  <gingold@adacore.com>
998
999         * final.c (final_scan_insn): Guard the call to begin_epilogue
1000         debug hook.
1001
1002 2011-12-13  Tristan Gingold  <gingold@adacore.com>
1003
1004         * vmsdbgout.c (vmsdbgout_write_source_line): New function.
1005         (vmsdbgout_end_prologue): Call vmsdbgout_write_source_line.
1006         (vmsdbgout_begin_epilogue): Likewise.
1007         (vmsdbgout_end_epilogue): Likewise.
1008         (vmsdbgout_source_line): Move code to vmsdbgout_write_source_line.
1009
1010 2011-12-13  Richard Guenther  <rguenther@suse.de>
1011
1012         PR middle-end/51481
1013         * tree-cfg.c (replace_uses_by): Pass proper arguments to
1014         maybe_clean_or_replace_eh_stmt.
1015
1016 2011-12-13  Richard Guenther  <rguenther@suse.de>
1017
1018         PR tree-optimization/51519
1019         * ipa-inline.c (edge_badness): Use edge growth in non-guessed
1020         branch probability case as well.
1021
1022 2011-12-13  Revital Eres  <revital.eres@linaro.org>
1023
1024         * modulo-sched.c (mark_loop_unsched): Free bbs.
1025
1026 2011-12-12  Jakub Jelinek  <jakub@redhat.com>
1027
1028         PR rtl-optimization/51495
1029         * function.c (thread_prologue_and_epilogue_insns): Don't add
1030         to bb_tail basic blocks that have EDGE_COMPLEX predecessor edges
1031         from basic blocks not needing prologue.
1032
1033         PR tree-optimization/51481
1034         * gimple-fold.c (gimple_fold_call): Call
1035         maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
1036         edges, but gimple_fold_builtin result can't throw.
1037
1038 2011-12-12  Vladimir Makarov  <vmakarov@redhat.com>
1039
1040         PR rtl-optimization/21617
1041         * ira-color.c (bucket_allocno_compare_func): Don't compare
1042         allocno classes.  Compare number of hard registers needed.
1043
1044 2011-12-12  Eric Botcazou  <ebotcazou@adacore.com>
1045
1046         PR tree-optimization/50569
1047         * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
1048         in the expression of MODEL instead of just the last one.
1049
1050 2011-12-12  Jakub Jelinek  <jakub@redhat.com>
1051
1052         PR middle-end/51510
1053         * calls.c (internal_arg_pointer_based_exp_scan): Don't use
1054         VEC_safe_grow_cleared if idx is smaller than VEC_length.
1055
1056 2011-12-12  Richard Sandiford  <richard.sandiford@linaro.org>
1057
1058         PR middle-end/50873
1059         * optabs.c (maybe_legitimize_operand_same_code): Use copy_to_mode_reg
1060         instead of force_reg.  Do nothing if the address is already a
1061         non-virtual pseudo register.
1062
1063 2011-12-12  Torvald Riegel  <triegel@redhat.com>
1064
1065         * gimplify.c (voidify_wrapper_expr): Add default handling for
1066         outermost wrapper.
1067
1068 2011-12-12  Torvald Riegel  <triegel@redhat.com>
1069
1070         * tree-ssa-tail-merge.c (gimple_equal_p): Don't treat transaction
1071         commits as equal.
1072
1073 2011-12-12  Iain Sandoe  <iains@gcc.gnu.org>
1074
1075         * config/darwin-sections.def (zobj_const_data_section): Fix over-
1076         length section name.
1077
1078 2011-12-11  Richard Henderson  <rth@redhat.com>
1079
1080         * config/rs6000/rs6000.c (rs6000_expand_interleave): Use
1081         BYTES_BIG_ENDIAN, not TARGET_BIG_ENDIAN.
1082
1083 2011-12-11  Jakub Jelinek  <jakub@redhat.com>
1084
1085         PR tree-optimization/51485
1086         * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
1087         DRs in call stmts.
1088
1089 2011-12-11  Patrick Marlier  <patrick.marlier@gmail.com>
1090
1091         * trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove edge.
1092
1093 2011-12-10  Richard Henderson  <rth@redhat.com>
1094
1095         * config/rs6000/altivec.md (altivec_vmrghb): Rewrite pattern as
1096         vec_select + vec_concat.
1097         (altivec_vmrghh, altivec_vmrghw, altivec_vmrghsf, altivec_vmrglb,
1098         altivec_vmrglh, altivec_vmrglw, altivec_vmrglsf): Likewise.
1099         (vec_perm_constv16qi): New.
1100         (vec_extract_evenv4si, vec_extract_evenv4sf, vpkuhum_nomode,
1101         vpkuwum_nomode, vec_extract_oddv8hi, vec_extract_oddv16qi,
1102         vec_interleave_high<VI>, vec_interleave_low<VI>): Remove.
1103         * config/rs6000/paired.md (paired_merge00): Rewrite pattern as
1104         vec_select + vec_concat.
1105         (paired_merge10, paired_merge01, paired_merge11): Likewise.
1106         (vec_perm_constv2sf): New.
1107         (vec_interleave_highv2sf, vec_interleave_lowv2sf,
1108         vec_extract_evenv2sf, vec_extract_oddv2sf): Remove.
1109         * config/rs6000/spe.md (spe_evmergehi): Rewrite pattern as
1110         vec_select + vec_concat.
1111         (spe_evmergehilo, spe_evmergelo, spe_evmergelohi): New.
1112         (vec_perm_constv2si): New.
1113         * config/rs6000/vector.md (vec_interleave_highv4sf,
1114         vec_interleave_lowv4sf, vec_interleave_high<VEC_64>,
1115         vec_interleave_low<VEC_64>): Remove.
1116         * config/rs6000/vsx.md (VS_double): New mode attribute.
1117         (UNSPEC_VSX_XXPERMDI): Remove.
1118         (vsx_xxpermdi_<VSX_L>_1): Rewrite pattern as vec_select + vec_concat.
1119         (vsx_xxmrghw_<VSX_W>, vsx_xxmrglw_<VSX_W>): Likewise.
1120         (vsx_xxpermdi_<VSX_L>): Change to expander.
1121         (vec_perm_const<VSX_D>): New.
1122         (vsx_mergel_<VSX_D>, vsx_mergeh_<VSX_D>): New.
1123         * config/rs6000/predicates.md (const_0_to_1_operand): New.
1124         (const_2_to_3_operand): New.
1125         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): New.
1126         (altivec_expand_vec_perm_const): New.
1127         (rs6000_expand_vec_perm_const_1, rs6000_expand_vec_perm_const): New.
1128         (rs6000_vectorize_vec_perm_const_ok): New.
1129         (rs6000_do_expand_vec_perm): New.
1130         (rs6000_expand_extract_even, rs6000_expand_interleave): New.
1131         * config/rs6000/rs6000-builtin.def (VEC_MERGE*): Update rtx codes.
1132         * config/rs6000/rs6000-modes.def: Add double-wide vector modes.
1133         * config/rs6000/rs6000-protos.h: Update.
1134
1135 2011-12-10  Richard Henderson  <rth@redhat.com>
1136
1137         * expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Avoid passing a
1138         CONST_INT to expand_vec_perm as the selector.
1139         * optabs.c (expand_vec_perm): Assert the selector is of a proper mode.
1140
1141 2011-12-10  Richard Henderson  <rth@redhat.com>
1142
1143         * genmodes.c (struct mode_data): Remove wider_2x member.
1144         (blank_mode): Adjust initializer.
1145         (calc_wider_mode): Use XALLOCAVEC.
1146         (emit_move_wider): Select double-width same-element vectors for
1147         2xwider vectors.
1148         * machmode.h (GET_MODE_2XWIDER_MODE): Update documentation.
1149         * config/i386/i386.c (doublesize_vector_mode): Remove.
1150         (expand_vselect_vconcat): Use GET_MODE_2XWIDER_MODE instead.
1151
1152 2011-12-10  Joern Rennecke  <joern.rennecke@embecosm.com>
1153
1154         * config/epiphany/epiphany.h (USE_LOAD_POST_INCREMENT): Define.
1155         (USE_LOAD_POST_DECREMENT, USE_STORE_POST_INCREMENT): Likewise.
1156         (USE_STORE_POST_DECREMENT): Likewise.
1157
1158         * config/epiphany/epiphany.h (EPIPHANY_RETURN_REGNO): New macro,
1159         broken out of ..
1160         (INCOMING_RETURN_ADDR_RTX) .. this.  Use EPIPHANY_RETURN_REGNO.
1161         (DWARF_FRAME_RETURN_COLUMN): New macro.
1162
1163         * config/epiphany/epiphany-protos.h (epiphany_start_function): Declare.
1164         * config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute):
1165         Split "timer" value into "timer0" and "timer1".
1166         Handle page_miss, message and wand.  Don't handle static_flag.
1167         Adjust warning text.
1168         (epiphany_start_function): New function.
1169         (epiphany_compute_function_type): Split "timer" value into "timer0"
1170         and "timer1".  Handle page_miss, message and wand.
1171         Don't handle static_flag.
1172         (epiphany_expand_epilogue): Don't use frame_insn for status / iret
1173         restore.
1174         * config/epiphany/epiphany.h: ASM_DECLARE_FUNCTION_NAME: Define.
1175         (enum epiphany_function_type):
1176         Split EPIPHANY_FUNCTION_TIMER value into EPIPHANY_FUNCTION_TIMER0
1177         and EPIPHANY_FUNCTION_TIMER1.
1178         Remove EPIPHANY_FUNCTION_ILINK1 and EPIPHANY_FUNCTION_ILINK2 values.
1179         Add EPIPHANY_FUNCTION_PAGE_MISS and EPIPHANY_FUNCTION_MESSAGE values.
1180         Rename EPIPHANY_FUNCTION_STATIC_FLAG to EPIPHANY_FUNCTION_WAND.
1181
1182 2011-12-10  Nathan Sidwell  <nathan@acm.org>
1183
1184         PR gcov-profile/51449
1185         * coverage.c (coverage_end_function): Always process the coverage
1186         variables.
1187
1188 2011-12-09  Aldy Hernandez  <aldyh@redhat.com>
1189
1190         PR/51291
1191         * tree.c (build_common_builtin_nodes): Do not use TM_PURE
1192         attribute unless language has support for TM.
1193         * config/i386/i386.c (ix86_init_tm_builtins): Exit gracefully in
1194         the absence of TM builtins.
1195
1196 2011-12-09  Eric Botcazou  <ebotcazou@adacore.com>
1197
1198         * gimple-fold.c (gimple_fold_stmt_to_constant_1) <GIMPLE_UNARY_RHS>:
1199         Also check the TYPE_MODE to recognize useless pointer conversions.
1200
1201 2011-12-09  Jakub Jelinek  <jakub@redhat.com>
1202
1203         PR tree-optimization/51117
1204         * tree-eh.c (optimize_clobbers): Don't remove just one
1205         clobber, but all consecutive clobbers before RESX.
1206         Use gimple_clobber_p predicate.
1207
1208 2011-12-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
1209
1210         * config/rs6000/rs6000.c (altivec_expand_builtin): Call
1211         expand_call to return a valid funciton instead of return
1212         cosnt0_rtx/NULL_RTX if there was an error with the builtin.
1213         (altivec_expand_ld_builtin): Ditto.
1214         (rs6000_inner_target_options): If VSX is selected as a target
1215         attribute or pragma, enable ALTIVEC also.
1216         (rs6000_pragma_target_parse): Call rs6000_option_override_internal
1217         to do all of the standard processing when switching options,
1218         including redefining appropriate macros.
1219
1220         PR rtl-optimization/51469
1221         * varasm.c (default_binds_local_p_1): If the symbol is a gnu
1222         indirect function, mark the symbol as non-local.
1223
1224 2011-12-09  H.J. Lu  <hongjiu.lu@intel.com>
1225
1226         PR bootstrap/51479
1227         * Makefile.in (errors.o): Restored.
1228
1229 2011-12-09  Richard Guenther  <rguenther@suse.de>
1230
1231         PR lto/48042
1232         * tree.c (free_lang_data_in_decl): Remove freeing conditional
1233         on debuginfo level.
1234
1235 2011-12-09  Joern Rennecke  <joern.rennecke@embecosm.com>
1236
1237         PR middle-end/40154
1238         * emit-rtl.c (set_dst_reg_note): New function.
1239         * rtl.h (set_dst_reg_note): Declare.
1240         * optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note.
1241         (emit_libcall_block, expand_fix): Likewise.
1242         * function.c (assign_parm_setup_reg, expand_function_start): Likewise.
1243         * expmed.c (expand_mult_const, expand_divmod): Likewise.
1244         * reload1.c (gen_reload): Likewise.
1245
1246         * dse.c (get_stored_val, get_call_args): Use gen_int_mode.
1247         * expmed.c (expand_divmod): Likewise.
1248         * combine.c (simplify_if_then_else): Likewise.
1249
1250 2011-12-09  Kai Tietz  <ktietz@redhat.com>
1251
1252         * ira-color.c (print_hard_regs_subforest): Use
1253         HOST_WIDEST_INT_PRINT_DEC instead of %lld.
1254         (allocno_hard_regs): Change type of cost member to HOST_WIDEST_INT.
1255         (add_allocno_hard_regs): Change type of argument cost
1256         to HOST_WIDEST_INT.
1257         * ira-conflict.c (build_conflict_bit_table): Replace use
1258         of long-long by HOST_WIDEST_INT.
1259
1260 2011-12-09  Georg-Johann Lay  <avr@gjlay.de>
1261
1262         PR target/51425
1263         * config/avr/avr.md (config/avr/avr.md, *sbix_branch_tmp): Use
1264         zero_extract:QIHI instead of zero_extract:HI.
1265
1266 2011-12-09  Jakub Jelinek  <jakub@redhat.com>
1267             Andrew Pinski  <apinski@cavium.com>
1268
1269         PR tree-optimization/51117
1270         * tree-eh.c (optimize_clobbers): New function.
1271         (execute_lower_eh_dispatch): Call it.
1272
1273 2011-12-09  Richard Guenther  <rguenther@suse.de>
1274
1275         PR tree-optimization/51482
1276         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
1277         Make sure to only create REAL_TYPE and INTEGER_TYPE component vectors.
1278
1279 2011-12-09  Kai Tietz  <ktietz@redhat.com>
1280
1281         * implicit-zee.c (num_realized): Change type to long.
1282         (num_ze_opportunities): Likewise.
1283
1284 2011-12-08  Andrew Pinski  <apinski@cavium.com>
1285
1286         * config/mips/mips-cpus.def (octeon+): New CPU.
1287         * config/mips/mips-tables.opt: Regenerate.
1288         * config/mips/mips.h (MIPS_CPP_SET_PROCESSOR): Emit '+' as 'P'.
1289
1290 2011-12-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1291
1292         PR middle-end/39976
1293         * tree-ssa-dom.c (enum expr_kind): Add EXPR_PHI.
1294         (struct hashable_expr): Add struct phi field.
1295         (initialize_hash_element): Handle phis; change to use XCNEWVEC.
1296         (hashable_expr_equal_p): Handle phis.
1297         (iterative_hash_hashable_expr): Likewise.
1298         (print_expr_hash_elt): Likewise.
1299         (free_expr_hash_elt): Likewise.
1300         (dom_opt_enter_block): Create equivalences from redundant phis.
1301         (eliminate_redundant_computations): Handle redundant phis.
1302         (lookup_avail_expr): Handle phis.
1303
1304 2011-12-08  Jakub Jelinek  <jakub@redhat.com>
1305
1306         PR tree-optimization/51466
1307         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy
1308         TREE_SIDE_EFFECTS.
1309
1310 2011-12-08  Richard Guenther  <rguenther@suse.de>
1311
1312         * tree-ssa-operands.c (add_stmt_operand): Do not mark stmts
1313         volatile when processing operands of an ADDR_EXPR.
1314         (get_indirect_ref_operands): Likewise.
1315         (get_tmr_operands): Likewise.
1316         (get_expr_operands): Likewise.
1317
1318 2011-12-08  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1319
1320         PR target/50395
1321         * config/s390/s390.c (s390_mainpool_finish): Emit the jump over
1322         the literal pool as jump insn.
1323
1324 2011-12-08  Richard Guenther  <rguenther@suse.de>
1325
1326         PR tree-optimization/49772
1327         * tree-inline.c (optimize_inline_calls): Remove bail out on errors.
1328
1329 2011-12-08  Richard Guenther  <rguenther@suse.de>
1330
1331         PR lto/50747
1332         * lto-streamer-out.c (produce_symtab): Remove asserts.
1333
1334 2011-12-08  Richard Guenther  <rguenther@suse.de>
1335
1336         PR lto/49945
1337         * lto-streamer-out.c (tree_is_indexable): Localize variably
1338         modified types and their FIELD_DECLs.
1339
1340 2011-12-08  Eric Botcazou  <ebotcazou@adacore.com>
1341
1342         PR tree-optimization/51315
1343         * tree.h (get_object_or_type_alignment): Declare.
1344         * expr.c (get_object_or_type_alignment): Move to...
1345         * builtins.c (get_object_or_type_alignment): ...here.  Add assertion.
1346         * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
1347         (tree_non_aligned_mem_p): ...this.  Add ALIGN parameter.  Look into
1348         MEM_REFs and use get_object_or_type_alignment for them.
1349         (build_accesses_from_assign): Adjust for above change.
1350         (access_precludes_ipa_sra_p): Likewise.
1351
1352 2011-12-08  Richard Guenther  <rguenther@suse.de>
1353
1354         PR lto/48437
1355         * lto-streamer-out.c (tree_is_indexable): Exclude block-local
1356         extern declarations.
1357
1358 2011-12-07  Andrew Pinski  <apinski@cavium.com>
1359
1360         PR middle-end/45416
1361         * expr.c (do_store_flag): Rewrite code that looks for BIT_AND_EXPR for
1362         SSA-expand.
1363
1364 2011-12-07  Richard Guenther  <rguenther@suse.de>
1365
1366         PR tree-optimization/50823
1367         * ipa-inline.c (edge_badness): Do not account for the number of
1368         remaining calls.
1369
1370 2011-12-07  Martin Jambor  <mjambor@suse.cz>
1371
1372         PR tree-optimization/50744
1373         * ipa-cp.c (good_cloning_opportunity_p): Assert size_cost is positive,
1374         compute evaluation in HOST_WIDEST_INT.
1375         (safe_add): New function
1376         (propagate_effects): Use safe_add to accumulate effects.
1377
1378 2011-12-06  Joel Sherrill <joel.sherrill@oarcorp.com>
1379
1380         * config/rs6000/rtems.h: Switch to using global_options_set
1381         in SUBSUBTARGET_OVERRIDE_OPTIONS.
1382
1383 2011-12-06  David S. Miller  <davem@davemloft.net>
1384
1385         * config/sparc/visintrin.h: Add appropriate __VIS__ cpp protection.
1386
1387 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
1388
1389         * config/avr/avr.c (avr_file_start): Fix missing ,
1390
1391 2011-12-06  Jakub Jelinek  <jakub@redhat.com>
1392
1393         PR target/51354
1394         * config/i386/i386.c (ix86_emit_leave): Call ix86_add_cfa_restore_note
1395         unconditionally.
1396
1397 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
1398
1399         Forward-port from gcc-4_6-branch r181936 2011-12-02.
1400         * config/avr/avr-mcus.def (avr_mcu_types): ATtiny4313 and
1401         AT86RF401 have a 16-bit SP (their manual is bogus).
1402
1403 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
1404
1405         Forward-port from gcc-4_6-branch r181936 2011-12-02.
1406
1407         PR target/51002
1408         * config/avr/avr.md (movhi_sp_r): Set insn condition to
1409         !AVR_HAVE_8BIT_SP.
1410         * config/avr/avr.c (output_movhi): Use "clr%B0" instead of "in
1411         %B0,__SP_H__" if AVR_HAVE_8BIT_SP.
1412         (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
1413
1414 2011-12-06  Georg-Johann Lay  <avr@gjlay.de>
1415
1416         PR target/51409
1417         PR target/49868
1418         * config/avr/avr.h (ADDR_SPACE_PGM, ADDR_SPACE_PGM1,
1419         ADDR_SPACE_PGM2, ADDR_SPACE_PGM3, ADDR_SPACE_PGM4,
1420         ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): Write as enum.
1421         (avr_addrspace_t): New typedef.
1422         (avr_addrspace): New declaration.
1423         * config/avr/avr-c.c (avr_toupper): New static function.
1424         (avr_register_target_pragmas, avr_cpu_cpp_builtins): Use
1425         avr_addrspace to get address space information.
1426         * config/avr/avr.c (avr_addrspace): New variable.
1427         (avr_out_lpm, avr_pgm_check_var_decl, avr_insert_attributes,
1428         avr_asm_named_section, avr_section_type_flags,
1429         avr_asm_select_section, avr_addr_space_address_mode,
1430         avr_addr_space_convert, avr_emit_movmemhi): Use it.
1431         (avr_addr_space_pointer_mode): Forward to avr_addr_space_address_mode.
1432         (avr_pgm_segment): Remove.
1433
1434 2011-12-06  Richard Guenther  <rguenther@suse.de>
1435
1436         PR middle-end/50601
1437         * varasm.c (assemble_alias): Move DECL_EXTERNAL implementation
1438         quirk adjustjment ...
1439         * passes.c (rest_of_decl_compilation): ... here.
1440
1441 2011-12-06  Richard Guenther  <rguenther@suse.de>
1442
1443         PR middle-end/51436
1444         * gimple-fold.c (gimplify_and_update_call_from_tree): Guard vdef check
1445         for the fact we do not have virtual operands when not optimizing.
1446
1447 2011-12-06  Richard Guenther  <rguenther@suse.de>
1448
1449         PR tree-optimization/51245
1450         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_constant_for_pieces):
1451         New function.
1452         (vn_reference_lookup_3): Use it.  Properly valueize all refs we create.
1453
1454 2011-12-06  Iain Sandoe  <iains@gcc.gnu.org>
1455
1456         * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
1457         rs6000_current_abi.
1458
1459 2011-12-06  Richard Guenther  <rguenther@suse.de>
1460
1461         PR tree-optimization/51363
1462         * gimple.c (gimple_rhs_has_side_effects): Remove.
1463         * gimple.h (gimple_rhs_has_side_effects): Likewise.
1464         * tree-ssa-dom.c (optimize_stmt): Simplify conditional.
1465
1466 2011-12-06  Alan Modra  <amodra@gmail.com>
1467
1468         PR target/50906
1469         * config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
1470         Do not mark r11 setup as frame-related.  Pass correct offset to
1471         rs6000_emit_savres_rtx.  Correct out-of-line rs6000_frame_related
1472         arguments.  Correct sp_offset.  Remove "offset" fudge from
1473         in-line rs6000_frame_related call.  Rename misleading variable.
1474         Fix comments and whitespace.  Tidy some expressions.
1475         (rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
1476         to r11 in out-of-line case.  Correct sp_offset.  Pass correct
1477         offset to rs6000_emit_savres_rtx.  Rename misleading variable.
1478         Fix comments and whitespace.  Tidy some expressions.
1479         (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
1480         adjustment when !saving_GPRs_inline.  Correct register mode
1481         used in address calcs.
1482         (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
1483         !restoring_GPRs_inline.
1484
1485 2011-12-06  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
1486
1487         * config/arm/vfp.md (*combine_vcvt_f64_<FCVTI32typename>): Fix
1488         formatting character for vmov.f64 case.
1489
1490 2011-12-05  Jakub Jelinek  <jakub@redhat.com>
1491
1492         PR tree-optimization/51396
1493         * tree-ssa-math-opts.c (convert_mult_to_fma): Don't optimize
1494         if MUL_RESULT has zero uses.
1495
1496         PR debug/51410
1497         * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
1498         for debug info if scope is file_scope.
1499
1500         PR c/51339
1501         * c-decl.c (c_finish_incomplete_decl, finish_decl): Call
1502         relayout_decl instead of layout_decl.
1503
1504 2011-12-05  Richard Sandiford  <rdsandiford@googlemail.com>
1505
1506         * resource.c (init_resource_info): Only consider EXIT_IGNORE_STACK
1507         if there is in epilogue.
1508
1509 2011-12-05  Richard Sandiford  <rdsandiford@googlemail.com>
1510
1511         * optabs.c (maybe_emit_sync_lock_test_and_set): Pass a null target
1512         to emit_library_call_value.
1513         (expand_atomic_compare_and_swap): Likewise.
1514
1515 2011-12-05  Vladimir Makarov  <vmakarov@redhat.com>
1516
1517         PR other/50775
1518         * ira-int.h (struct ira_object): Remove add_data.
1519         (OBJECT_ADD_DATA): Remove.
1520
1521         * ira-build.c (ira_create_object): Remove OBJECT_ADD_DATA
1522         initialization.
1523
1524         * ira-color.c (object_hard_regs_t, object_hard_regs): Rename to
1525         allocno_hard_regs_t, allocno_hard_regs.
1526         (object_hard_regs_node_t, object_hard_regs_node): Rename to
1527         allocno_hard_regs_node_t and allocno_hard_regs_node.
1528         (struct allocno_color_data): Add new member last_process.  Move
1529         profitable_hard_regs, hard_regs_node, and hard_regs_subnodes_start
1530         from object_color_data.
1531         (object_color_data_t, object_color_data, OBJECT_COLOR_DATA): Remove.
1532         (curr_allocno_process): New static variable.
1533         (object_hard_regs_eq, object_hard_regs_htab): Rename to
1534         allocno_hard_regs_eq and allocno_hard_regs_htab.
1535         (init_object_hard_regs, finish_object_hard_regs): Rename to
1536         init_allocno_hard_regs and finish_allocno_hard_regs.
1537         (object_hard_regs_compare, object_hard_regs_node_t): Rename to
1538         allocno_hard_regs_compare and allocno_hard_regs_node_t.
1539         (create_new_object_hard_regs_node): Rename to
1540         create_new_allocno_hard_regs_node.
1541         (add_new_object_hard_regs_node_to_forest): Rename to
1542         add_new_allocno_hard_regs_node_to_forest.
1543         (add_object_hard_regs_to_forest, collect_object_hard_regs_cover):
1544         Rename to add_allocno_hard_regs_to_forest and
1545         collect_allocno_hard_regs_cover.
1546         (setup_object_hard_regs_nodes_parent): Rename to
1547         setup_allocno_hard_regs_nodes_parent.
1548         (remove_unused_object_hard_regs_nodes): Rename to
1549         remove_unused_allocno_hard_regs_nodes.
1550         (enumerate_object_hard_regs_nodes, object_hard_regs_nodes_num):
1551         Rename to enumerate_allocno_hard_regs_nodes and
1552         allocno_hard_regs_nodes_num.
1553         (object_hard_regs_nodes, object_hard_regs_subnode_t): Rename to
1554         allocno_hard_regs_nodes and allocno_hard_regs_subnode_t.
1555         (object_hard_regs_subnode, object_hard_regs_subnodes): Rename to
1556         allocno_hard_regs_subnode and allocno_hard_regs_subnodes.
1557         (object_hard_regs_subnode_index): Rename to
1558         allocno_hard_regs_subnode_index.
1559         (setup_object_hard_regs_subnode_index): Rename to
1560         setup_allocno_hard_regs_subnode_index.
1561         (get_object_hard_regs_subnodes_num): Rename to
1562         get_allocno_hard_regs_subnodes_num.
1563         (form_object_hard_regs_nodes_forest): Rename to
1564         form_allocno_hard_regs_nodes_forest.
1565         (finish_object_hard_regs_nodes_tree): Rename to
1566         form_allocno_hard_regs_nodes_forest
1567         (finish_object_hard_regs_nodes_forest): Rename to
1568         finish_allocno_hard_regs_nodes_forest.
1569         (setup_left_conflict_sizes_p): Use allocno data instead of object ones.
1570         Process conflict allocnos once.
1571         (update_left_conflict_sizes_p): Use allocno data instead of object
1572         ones.  Change prototype signature.
1573         (empty_profitable_hard_regs): Use allocno data instead of object ones.
1574         (setup_profitable_hard_regs): Ditto.
1575         (get_conflict_profitable_regs): Rename to
1576         get_conflict_and_start_profitable_regs.  Use allocno data for
1577         profitable regs calculation.
1578         (check_hard_reg_p): Change prototype signature.  Check profitable
1579         regs for allocno not the objects.
1580         (assign_hard_reg): Process conflict allocnos only once for
1581         updating conflict costs.
1582         (setup_allocno_available_regs_num): Use allocno data instead of
1583         object ones.  Modify debug output.
1584         (color_pass): Remove initialization and finalization of object
1585         color data.
1586
1587 2011-12-05  Kazu Hirata  <kazu@codesourcery.com>
1588
1589         PR target/51408
1590         * config/arm/arm.md (*minmax_arithsi): Always require the else
1591         clause in the MINUS case.
1592
1593 2011-12-05  Richard Guenther  <rguenther@suse.de>
1594
1595         PR tree-optimization/50904
1596         * tree-ssa-loop-im.c (struct mem_ref): Remove vops member.
1597         (MEM_ANALYZABLE): New.
1598         (memory_references): Remove clobbered_vops and vop_ref_map
1599         members, add all_refs_stored_in_loop member.
1600         (memref_free): Adjust.
1601         (mem_ref_alloc): Likewise.
1602         (gather_mem_refs_stmt): Do not record clobbers, instead
1603         record refs for unanalyzable stmts.
1604         (gather_mem_refs_in_loops): Do not propagate clobbers.
1605         (struct vop_to_refs_elt, vtoe_hash, vtoe_eq, vtoe_free,
1606         record_vop_access, get_vop_accesses, get_vop_stores,
1607         add_vop_ref_mapping): Remove.
1608         (create_vop_ref_mapping_loop): Adjust to simply record all stores.
1609         (analyze_memory_references): Adjust.
1610         (refs_independent_p): Check for not analyzable refs.
1611         (can_sm_ref_p): Likewise.
1612         (ref_indep_loop_p_1): Simplify.
1613         (tree_ssa_lim_finalize): Adjust.
1614
1615         * tree-ssa-loop-im.c (stmt_cost): Simplify, use LIM_EXPENSIVE
1616         rather than magic constants.  Assign zero cost to PAREN_EXPR
1617         and SSA_NAME copies.  Assign cost proportional to the vector
1618         size for vector constructors.
1619
1620 2011-12-05  Richard Guenther  <rguenther@suse.de>
1621
1622         * tree-ssa-alias.h (struct ao_ref_s): Add volatile_p field.
1623         * tree-ssa-alias.c (ao_ref_init): Initialize it.
1624         (ao_ref_init_from_ptr_and_size): Likewise.
1625         (refs_may_alias_p_1): Two volatile accesses conflict.
1626         (ref_maybe_used_by_call_p_1): Likewise.
1627         (call_may_clobber_ref_p_1): Likewise.
1628         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Initialize
1629         volatile_p field.
1630
1631 2011-12-05  Richard Guenther  <rguenther@suse.de>
1632
1633         * tree-ssa.c (verify_ssa): Verify SSA names in the loop over all SSA
1634         names.  Remove SSA operand checking, call verify_ssa_operands.
1635         * tree-ssa-operands.h (verify_ssa_operands): Declare.
1636         * tree-ssa-operands.c (verify_ssa_operands): New function.
1637
1638 2011-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
1639
1640         * config/arm/arm.c (vfp3_const_double_for_fract_bits): Define.
1641         * config/arm/arm-protos.h (vfp3_const_double_for_fract_bits): Declare.
1642         * config/arm/constraints.md ("Dt"): New constraint.
1643         * config/arm/predicates.md
1644         (const_double_vcvt_power_of_two_reciprocal): New.
1645         * config/arm/vfp.md (FCVTI32typename): New.
1646         (FCVT): New iterator.
1647         (*combine_vcvt_f32_<FCVTI32typename>): New.
1648         (*combine_vcvt_f64_<FCVTI32typename>): New.
1649
1650 2011-12-05  Richard Guenther  <rguenther@suse.de>
1651
1652         * cgraph.c (cgraph_create_edge_1): Initialize
1653         call_stmt_cannot_inline_p from the stmt if possible.
1654         (cgraph_make_edge_direct): Likewise.
1655         * gimple-streamer-in.c (input_gimple_stmt): Do not
1656         call gimple_call_set_cannot_inline.
1657         * gimple.h (enum gf_mask): Remove GF_CALL_CANNOT_INLINE, shift values.
1658         (gimple_call_set_cannot_inline): Remove.
1659         (gimple_call_cannot_inline_p): Likewise.
1660         * ipa-inline-analysis.c (initialize_inline_failed): Look
1661         at the edge call_stmt_cannot_inline_p flag.
1662         * ipa-inline.c (can_inline_edge_p): Likewise.
1663         (early_inliner): Only update the edge flag.
1664         * ipa-prop.c (update_indirect_edges_after_inlining): Likewise.
1665         (ipa_modify_call_arguments): Do not call gimple_call_set_cannot_inline.
1666         * cgraphunit.c (assemble_thunk): Likewise.
1667         * gimple-fold.c (gimple_fold_call): Likewise.
1668
1669         * tree.h (CALL_CANNOT_INLINE_P): Remove.
1670         * tree-mudflap.c (mf_xform_statements): Do not modify alloca calls.
1671         * builtins.c (expand_builtin_alloca): With -fmudflap do not expand
1672         alloca calls inline.
1673         * cfgexpand.c (expand_call_stmt): Do not set CALL_CANNOT_INLINE_P.
1674         * gimple.c (gimple_build_call_from_tree): Do not read
1675         CALL_CANNOT_INLINE_P.
1676         * gimplify.c (gimplify_call_expr): Do not copy CALL_CANNOT_INLINE_P.
1677
1678 2011-12-05  Jakub Jelinek  <jakub@redhat.com>
1679             Eric Botcazou  <ebotcazou@adacore.com>
1680
1681         PR middle-end/51323
1682         PR middle-end/50074
1683         * calls.c (internal_arg_pointer_exp_state): New variable.
1684         (internal_arg_pointer_based_exp_1,
1685         internal_arg_pointer_exp_scan): New functions.
1686         (internal_arg_pointer_based_exp): New function.
1687         (mem_overlaps_already_clobbered_arg_p): Use it.
1688         (expand_call): Free internal_arg_pointer_exp_state.cache vector
1689         and clear internal_arg_pointer_exp_state.scan_start.
1690
1691 2011-12-04  Kaz Kojima  <kkojima@gcc.gnu.org>
1692
1693         * config/sh/linux.h (TARGET_DEFAULT): Add MASK_SOFT_ATOMIC.
1694         * config/sh/sync.md: New file.
1695         * config/sh/sh.md: Include sync.md.
1696         * config/sh/sh.opt (msoft-atomic): New option.
1697         * doc/invoke.texi (SH Options): Document it.
1698
1699 2011-12-04  Nathan Sidwell  <nathan@acm.org>
1700
1701         * gcov-io.h (struct gcov_info): Replace trailing array with
1702         pointer to array.
1703         * profile.c (branch_prob): Only call renamed
1704         coverage_begin_function once.
1705         * coverage.h (coverage_begin_output): Rename to ...
1706         (coverage_begin_function): ... here.
1707         * coverage.c (struct function_list): Rename to ...
1708         (struct coverage_data): ... this.  Update all uses.
1709         (gcov_info_var, gcov_fn_info_type, gcov_fn_info_ptr_type): New globals.
1710         (bbg_file_opened, bbg_function_announced): Remove.
1711         (get_coverage_counts): Adjust message.
1712         (coverage_begin_ouput): Rename to ...
1713         (coverage_begin_function): ... here.  Move file opening to
1714         coverage_init.  Adjust for being called only once.
1715         (coverage_end_function): Remove bbg file and inhibit further
1716         output here on error.
1717         (build_info_type): Adjust for change to pointer to array.
1718         (build_info): Receive array of function pointers and adjust.
1719         (create_coverage): Break into ...
1720         (coverage_obj_init, coverage_obj_fn, coverage_obj_finish):
1721         ... these, and adjust.
1722         (coverage_init): Open the notes file here.  Tidy.
1723         (coverage_finish): Call coverage_obj_init etc.
1724
1725 2011-12-04  Ira Rosen  <ira.rosen@linaro.org>
1726
1727         PR middle-end/51285
1728         * tree-vect-loop.c (vect_create_epilog_for_reduction): Create exit
1729         phi nodes for outer loop in case of double reduction.
1730
1731 2011-12-04  Jérémie Detrey  <Jeremie.Detrey@loria.fr>
1732
1733         PR target/51393
1734         * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
1735         parameter as long long.
1736
1737 2011-12-04  Richard Sandiford  <rdsandiford@googlemail.com>
1738
1739         PR middle-end/51351
1740         * optabs.c (init_sync_libfuncs): Use "or" rather than "ior"
1741         in the external names.
1742
1743 2011-12-03  Jack Howarth <howarth@bromo.med.uc.edu>
1744
1745         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Pass -no_pie for
1746         non-PIC code when targeting 10.7 or later.
1747
1748 2011-12-03  Iain Sandoe  <iains@gcc.gnu.org>
1749
1750         * config/darwin.h (STARTFILE_SPEC): Do not use -lbundle1.o when
1751         Darwin >= 10.
1752         (DARWIN_DYLIB1_SPEC): Do not use -ldylib1.10.5.o when Darwin >= 10.
1753         (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10.
1754
1755 2011-12-03  Jakub Jelinek  <jakub@redhat.com>
1756
1757         * fold-const.c (fold_unary_loc): Fold VEC_UNPACK_LO_EXPR,
1758         VEC_UNPACK_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR and
1759         VEC_UNPACK_FLOAT_HI_EXPR with VECTOR_CST argument.
1760         (fold_binary_loc): Fold VEC_PACK_TRUNC_EXPR,
1761         VEC_PACK_FIX_TRUNC_EXPR, VEC_WIDEN_MULT_LO_EXPR
1762         and VEC_WIDEN_MULT_HI_EXPR with VECTOR_CST arguments.
1763
1764         PR debug/50317
1765         * tree-ssa.c (target_for_debug_bind): Also allow is_gimple_reg_type
1766         vars that aren't referenced.
1767         (tree-ssa-live.c (remove_unused_locals): Don't clear TREE_ADDRESSABLE
1768         of unreferenced local vars.
1769         * cfgexpand.c (expand_debug_expr): For DEBUG_IMPLICIT_PTR allow also
1770         TREE_ADDRESSABLE vars that satisfy target_for_debug_bind.
1771
1772 2011-12-03  Anatoly Sokolov  <aesok@post.ru>
1773
1774         * config/arm/arm.h (LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P): Remove.
1775         * config/arm/arm-protos.h (aapcs_libcall_value): Remove.
1776         * config/arm/arm.c (TARGET_FUNCTION_VALUE_REGNO_P): Define.
1777         (arm_libcall_value_1, arm_function_value_regno_p): New function.
1778         (arm_function_value, arm_libcall_value): Use arm_libcall_value_1.
1779         (aapcs_libcall_value): Make static.
1780         (arm_libcall_value): Add static qualifier.
1781
1782 2011-12-02  Jakub Jelinek  <jakub@redhat.com>
1783
1784         PR target/51387
1785         * config/i386/sse.md (mul<mode>3 with VI1_AVX2 iterator): For
1786         V32QImode use { 0,2,..,14,32,34,..,46,16,18,..,30,48,50,..,62 }
1787         permutation instead of extract even permutation.
1788
1789 2011-12-02  Nathan Sidwell  <nathan@acm.org>
1790
1791         * gcov.c (struct arc_info): Add is_throw field.
1792         (struct (block_info): Add exceptional field, reduce flags size to
1793         account for it.
1794         (struct function_info): Add has_catch field.
1795         (struct line_info): Add unexceptional field.
1796         (process_file): Call find_exception_blocks if necessary.
1797         (read_graph_file): Adjust.  Note if an exceptional edge is seen.
1798         (find_exception_blocks): New.
1799         (add_line_counts): Set line's unexceptional flag if not exceptional.
1800         (output_branch_count): Note exceptional arcs, lines and blocks.
1801         * gcov-dump.c (tag_arcs): Decode arc flags.
1802         * doc/gcov.texi: Document '=====' lines.
1803
1804 2011-12-02  Anatoly Sokolov  <aesok@post.ru>
1805
1806         * config/ia64/ia64.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS,
1807         PRINT_OPERAND_PUNCT_VALID_P): Remove macros.
1808         * config/ia64/ia64-protos.h (ia64_print_operand,
1809         ia64_print_operand_address): Remove.
1810         * config/ia64/ia64.c (TARGET_PRINT_OPERAND,
1811         TARGET_PRINT_OPERAND_ADDRESS, TARGET_PRINT_OPERAND_PUNCT_VALID_P):
1812         Define.
1813         (ia64_print_operand_punct_valid_p): New function.
1814         (ia64_print_operand, ia64_print_operand_address): Make static.
1815
1816 2011-12-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
1817
1818         PR target/51390
1819         * config/rs6000/rs6000.c (def_builtin): Use the correct field to
1820         figure out the function's attributes.
1821         (struct builtin_description): Mark mask field as const since we no
1822         longer need to modify it for SPE and PAIRED builtins.
1823
1824 2011-12-02  Joseph Myers  <joseph@codesourcery.com>
1825
1826         Revert:
1827
1828         2008-09-18  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1829
1830         PR rtl-opt/37451
1831         * loop-doloop.c (doloop_modify): New argument zero_extend_p and
1832         zero extend count after the correction to it is done.
1833         (doloop_optimize): Update call to doloop_modify, don't zero extend
1834         count before call.
1835
1836         2008-11-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1837
1838         PR rtl-opt/37782
1839         * loop-doloop.c (doloop_modify): Add from_mode argument that says what
1840         mode count is in.
1841         (doloop_optimize): Update call to doloop_modify.
1842
1843 2011-12-02  Richard Guenther  <rguenther@suse.de>
1844
1845         PR lto/47259
1846         * ipa.c (varpool_externally_visible_p): Register variables
1847         are always externally visible.
1848
1849 2011-12-02  Sameera Deshpande  <sameera.deshpande@arm.com>
1850
1851         * gimple-pretty-print.c (dump_gimple_call): Dereference fn only if
1852           non-NULL.
1853
1854 2011-12-02  Martin Jambor  <mjambor@suse.cz>
1855
1856         PR tree-optimization/50622
1857         * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
1858         if both lacc and racc are grp_partial_lhs.
1859
1860 2011-12-01  Kaz Kojima  <kkojima@gcc.gnu.org>
1861
1862         PR target/50814.
1863         * config/sh/sh.c (expand_ashiftrt): Handle TARGET_SH2A same as
1864         TARGET_SH3.
1865         (shl_sext_kind): Likewise.
1866         * config/sh/sh.h (SH_DYNAMIC_SHIFT_COST): Likewise.
1867         * config/sh/sh.md (ashlsi3_sh2a, ashrsi3_sh2a, lshrsi3_sh2a): Remove.
1868         (ashlsi3_std): Handle TARGET_SH2A same as TARGET_SH3.
1869         (ashlsi3): Likewise.
1870         (ashrsi3_d): Likewise.
1871         (lshrsi3_d): Likewise.
1872         (lshrsi3): Likewise.
1873
1874 2011-12-01  Diego Novillo  <dnovillo@google.com>
1875
1876         PR bootstrap/51346
1877         * ipa-inline.c (can_inline_edge_p): If the edge E has a statement,
1878         use the statement's inline indicator instead of E's.
1879         Remove consistency check.
1880
1881 2011-12-01  Diego Novillo  <dnovillo@google.com>
1882
1883         PR bootstrap/51346
1884         Revert
1885
1886         2011-11-29  Diego Novillo  <dnovillo@google.com>
1887
1888         * gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
1889         Update field call_stmt_cannot_inline_p from call
1890         graph edge, if needed.
1891         * gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
1892
1893 2011-12-01  Nathan Sidwell  <nathan@acm.org>
1894
1895         PR gcov-profile/51113
1896         * coverage.c (build_var): Keep coverage variables static.
1897
1898 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
1899
1900         PR tree-optimization/51356
1901         * tree-vect-patterns.c (vect_recog_bool_pattern): Give up if
1902         vectype doesn't have VECTOR_MODE_P.
1903
1904         PR debug/50317
1905         * tree-ssa-dce.c (remove_dead_stmt): Add a debug stmt when removing
1906         as unnecessary a store to a variable with gimple reg type.
1907         * tree-ssa-live.c (remove_unused_locals): Clear TREE_ADDRESSABLE bit
1908         on local unreferenced variables.
1909         * cfgexpand.c (expand_gimple_basic_block): Don't emit DEBUG_INSNs
1910         for !target_for_debug_bind variables.
1911
1912 2011-12-01  Patrick Marlier  <patrick.marlier@gmail.com>
1913
1914         PR middle-end/51273
1915         * cgraph.h (cgraph_call_node_duplication_hooks): Declare.
1916         * cgraph.c (cgraph_call_node_duplication_hooks): Make global.
1917         * cgraphunit.c (cgraph_copy_node_for_versioning): Call it.
1918
1919 2011-12-01  Andrew Pinski  <apinski@cavium.com>
1920
1921         PR lto/51198
1922         * tree.c (free_lang_data_in_decl): Clear FIELD_DECL's
1923         DECL_INITIAL also.
1924
1925 2011-12-01  Jakub Jelinek  <jakub@redhat.com>
1926
1927         PR tree-optimization/51246
1928         * tree-predcom.c (replace_ref_with): Handle also clobber on the rhs.
1929
1930         PR rtl-optimization/51014
1931         * loop-unroll.c (apply_opt_in_copies): Ignore label DEBUG_INSNs
1932         both from bb and orig_bb.
1933
1934 2011-12-01  Joern Rennecke  <joern.rennecke@embecosm.com>
1935
1936         PR tree-optimization/50802
1937         * tree-vrp.c (simplify_conversion_using_ranges): Rewrite test
1938         considering what happens to ranges during sign changes and/or
1939         intermediate narrowing conversions.
1940
1941 2011-11-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1942
1943         PR middle-end/50283
1944         * config/pa/pa.md (in_branch_delay): Disallow frame related insns.
1945         (in_nullified_branch_delay): Likewise.
1946         (in_call_delay): Likewise.
1947
1948 2011-11-30  Richard Henderson  <rth@redhat.com>
1949
1950         * predict.c (expr_expected_value_1): Assume compare-and-swap builtin
1951         boolean return is true.
1952
1953 2011-11-30  Jakub Jelinek  <jakub@redhat.com>
1954
1955         PR rtl-optimization/51044
1956         * dse.c (emit_inc_dec_insn_before): Ensure new_insn is an instruction
1957         rather than just insn body.
1958
1959         PR target/50725
1960         * function.c (thread_prologue_and_epilogue_insns): If
1961         stack_realign_drap, add drap_reg to SET_UP_BY_PROLOGUE
1962         regset.
1963
1964         PR middle-end/51089
1965         * tree-eh.c (cleanup_empty_eh_merge_phis): Add check to
1966         avoid creating duplicate edges here.
1967         (cleanup_empty_eh_unsplit): And remove it in the caller.
1968
1969 2011-11-30  Andrew Pinski  <apinski@cavium.com>
1970
1971         PR c/51321
1972         * c-parser.c (c_parser_postfix_expression): Check groktypename results
1973         before looking at the main variant.
1974
1975 2011-11-30  Jakub Jelinek  <jakub@redhat.com>
1976
1977         PR rtl-optimization/48721
1978         * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
1979         reg_pending_barrier to TRUE_BARRIER.
1980
1981         PR rtl-optimization/48721
1982         * sched-ebb.c (begin_move_insn): Insert empty unreachable
1983         block after BARRIER if insn is followed by it.
1984
1985 2011-11-30  Richard Henderson  <rth@redhat.com>
1986
1987         * config/sparc/sparc-opts.h (enum sparc_memory_model_type): New.
1988         * config/sparc/sparc.opt (mmemory-model=): New option.
1989         * doc/invoke.texi (Sparc Options): Document it.
1990         * config/sparc/sparc.c (sparc_option_override): Provide default
1991         for sparc_memory_model.
1992         (sparc_emit_membar_for_model): Omit barrier combinations that are
1993         implied by the memory model.
1994
1995 2011-11-30  Richard Henderson  <rth@redhat.com>
1996
1997         * config/sparc/sync.md (I124MODE): New mode iterator.
1998         (memory_barrier): Remove.
1999         (atomic_exchangesi): New.
2000         (swapsi): Rename from *swapsi.
2001         (atomic_test_and_set<I124MODE>): New.
2002         (ldstubqi): Rename from *ldstubqi, merge with expander.
2003         (ldstub<I24MODE>): Rename from *ldstub<I24MODE>, merge with expander.
2004         (sync_lock_test_and_setsi): Remove.
2005         (sync_lock_test_and_set<I12MODE>): Remove.
2006
2007 2011-11-30  Richard Henderson  <rth@redhat.com>
2008
2009         * config/sparc/constraints.md ("w"): New.
2010         * config/sparc/predicates.md (mem_noofs_operand): New.
2011         * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Make static.
2012         Generate the boolean result of the atomic_compare_exchange.
2013         (sparc_expand_compare_and_swap): New.
2014         * config/sparc/sync.md (atomic_compare_and_swap<I>): New.
2015         (atomic_compare_and_swap<I48MODE>_1): Rename from
2016         *sync_compare_and_swap<I48MODE>, use mem_noofs_operand.
2017         (*atomic_compare_and_swapdi_v8plus): Rename from
2018         *sync_compare_and_swapdi_v8plus, use mem_noofs_operand.
2019         (sync_compare_and_swap<I12MODE>): Remove.
2020         (sync_compare_and_swap<I48MODE>): Remove.
2021
2022 2011-11-30  Richard Henderson  <rth@redhat.com>
2023
2024         * config/sparc/predicates.md (register_or_v9_zero_operand): New.
2025         * config/sparc/sparc.md (UNSPEC_ATOMIC): New.
2026         * config/sparc/sync.md (atomic_load<I>): New.
2027         (atomic_loaddi_1, atomic_store<I>, atomic_storedi_1): New.
2028
2029 2011-11-30  Richard Henderson  <rth@redhat.com>
2030
2031         * config/sparc/predicates.md (zero_or_v7_operand): New.
2032         * config/sparc/sparc.c (sparc_emit_membar_for_model): New.
2033         * config/sparc/sparc-protos.h: Update.
2034         * config/sparc/sync.md (mem_thread_fence): New.
2035         (memory_barrier): Use sparc_emit_membar_for_model.
2036         (membar, *membar_empty, *membar_storestore, *membar_storeload): New.
2037         (*membar_v8): Accept and ignore the membar mask.
2038         (*membar): Accept and print the membar mask.
2039
2040 2011-11-30  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
2041
2042         * config/arm/arm.c (arm_issue_rate): Cortex-A15 can triple issue.
2043         * config/arm/arm.md (mul64): New attribute.
2044         (generic_sched): Cortex-A15 is not scheduled generically.
2045         (cortex-a15.md): Include.
2046         * config/arm/cortex-a15.md: New machine description.
2047         * config/arm/t-arm (MD_INCLUDES): Add cortex-a15.md.
2048
2049 2011-11-30  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
2050
2051         * config/arm/t-arm (MD_INCLUDES): Ensure all md files are listed.
2052
2053 2011-11-30  Iain Sandoe  <iains@gcc.gnu.org>
2054
2055         * doc/tm.texi.in (NEXT_OBJC_RUNTIME): Update macro description.
2056         * doc/tm.texi: Regenerate.
2057         * flags.h (flag_next_runtime): Remove references.
2058         * toplev.c: Likewise.
2059         * defaults.h (NEXT_OBJC_RUNTIME): Provide default.
2060         * gccspec.c (lang_specific_driver): Adjust use of NEXT_OBJC_RUNTIME.
2061         * config/darwin.c (darwin_override_options): Provide default
2062         Objective-C abi settings and target conflict checks.
2063         * config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Remove unused
2064         code. Adjust indenting.
2065
2066 2011-11-29  Joseph Myers  <joseph@codesourcery.com>
2067
2068         * config/sh/sh.h (enum reg_class, REG_CLASS_NAMES)
2069         (REG_CLASS_CONTENTS): Add NON_SP_REGS.
2070         (REGCLASS_HAS_GENERAL_REG): Handle NON_SP_REGS.
2071         * config/sh/constraints.md (u): New constraint.
2072
2073 2011-11-29  Oleg Endo  <oleg.endo@t-online.de>
2074
2075         PR target/51337
2076         * config/sh/sh.c (sh_secondary_reload): Add case when FPUL
2077         register is being loaded from a pseudo in memory.
2078
2079 2011-11-29  DJ Delorie  <dj@redhat.com>
2080
2081         * config.gcc (rl78-*-elf): New case.
2082         * doc/extend.texi: Add RL78 documentation.
2083         * doc/invoke.texi: Likewise.
2084         * doc/md.texi: Likewise.
2085         * doc/contrib.texi: Add RL78.
2086         * doc/install.texi: Add rl78-*-elf.
2087         * config/rl78: New directory for the Renesas RL78.
2088
2089 2011-11-29  Jakub Jelinek  <jakub@redhat.com>
2090
2091         PR tree-optimization/51247
2092         * tree-vrp.c (extract_range_from_assert): For signed 1-bit precision
2093         types instead of adding 1 subtract -1 and instead of subtracting 1
2094         add -1 to avoid overflows.
2095
2096 2011-11-29  Andrew MacLeod  <amacleod@redhat.com>
2097
2098         PR target/50123
2099         * optabs.c (maybe_optimize_fetch_op): New.  Look for more optimal
2100         instructions for a FECTH_OP or OP_FECTH sequence.
2101         (expand_atomic_fetch_op): Call maybe_optimize_fetch_op.
2102
2103 2011-11-29  Uros Bizjak  <ubizjak@gmail.com>
2104
2105         * config/i386/sync.md (UNSPEC_LDA, UNSPEC_STA): New unspecs.
2106         (movdi_via_fpu): Remove.
2107         (loaddi_via_fpu): New insn pattern.
2108         (storedi_via_fpu): Ditto.
2109         (atomic_loaddi_fpu): Use loaddi_via_fpu and storedi_via_fpu.
2110         (atomic_storedi_fpu): Ditto.
2111         * reg-stack.c (get_true_reg): Handle UNSPEC_LDA.
2112         (subst_stack_regs_pat): Handle UNSPEC_STA.
2113
2114 2011-11-29  Uros Bizjak  <ubizjak@gmail.com>
2115
2116         * config/i386/i386.md (*floathi<mode>2_i387_with_temp): Do not
2117         allocate scratch memory for alternative 0.
2118
2119 2011-11-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
2120
2121         * config/rs6000/rs6000-builtins.def: Completely rewrite builtin
2122         handling to centralize more of the builtins in this file.  Change
2123         some builtin enumerations to be more consistant.  Use a new mask
2124         to hold the current builtins, including SPE and PAIRED builtins
2125         which no longer are set via target_flags masks.  Add
2126         -mdebug=builtin debug support.  For power machines, define all
2127         Altivec and VSX buitins when the compiler starts, but don't allow
2128         the use of a builtin unless the appropriate switch is used, or
2129         #pragma GCC target is used to change the options.  If the user
2130         uses #pragma GCC target, update the appropriate hardware macros.
2131         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Ditto.
2132         * config/rs6000/rs6000.opt (rs6000_builtin_mask): Ditto.
2133         * config/rs6000/rs6000-c.c (rs6000_macro_to_expand): Ditto.
2134         (rs6000_define_or_undefine_macro): Ditto.
2135         (rs6000_target_modify_macros): Ditto.
2136         (rs6000_cpu_cpp_builtins): Ditto.
2137         (altivec_overloaded_builtins): Ditto.
2138         (altivec_build_resolved_builtin): Ditto.
2139         * config/rs6000/rs6000.c (rs6000_target_modify_macros_ptr): Ditto.
2140         (rs6000_builtin_info): Ditto.
2141         (def_builtin): Ditto.
2142         (enable_mask_for_builtins): Ditto.
2143         (DEBUG_FMT_X): Ditto.
2144         (rs6000_debug_reg_global): Ditto.
2145         (rs6000_builtin_mask_calculate): Ditto.
2146         (rs6000_option_override_internal): Ditto.
2147         (rs6000_builtin_conversion): Ditto.
2148         (rs6000_builtin_vectorized_function): Ditto.
2149         (bdesc_3arg): Ditto.
2150         (bdesc_dst): Ditto.
2151         (bdesc_2arg): Ditto.
2152         (builtin_description_predicates): Ditto.
2153         (bdesc_altivec_preds): Ditto.
2154         (bdesc_spe_predicates): Ditto.
2155         (bdesc_spe_evsel): Ditto.
2156         (bdesc_paired_preds): Ditto.
2157         (bdesc_abs): Ditto.
2158         (bdesc_1arg): Ditto.
2159         (rs6000_overloaded_builtin_p): Ditto.
2160         (rs6000_expand_unop_builtin): Ditto.
2161         (bdesc_2arg_spe): Ditto.
2162         (spe_expand_builtin): Ditto.
2163         (rs6000_invalid_builtin): Ditto.
2164         (rs6000_expand_builtin): Ditto.
2165         (rs6000_init_builtins): Ditto.
2166         (spe_init_builtins): Ditto.
2167         (paired_init_builtins): Ditto.
2168         (altivec_init_builtins): Ditto.
2169         (builtin_function_type): Ditto.
2170         (rs6000_common_init_builtins): Ditto.
2171         (rs6000_builtin_reciprocal): Ditto.
2172         (rs6000_builtin_mask_names): Ditto.
2173         (rs6000_pragma_target_parse): Ditto.
2174         (rs6000_function_specific_print): Ditto.
2175         * config/rs6000/rs6000.h (MASK_DEBUG_BUILTIN): Ditto.
2176         (MASK_DEBUG_ALL): Ditto.
2177         (TARGET_DEBUG_BUILTIN): Ditto.
2178         (TARGET_EXTRA_BUILTINS): Ditto.
2179         (REGISTER_TARGET_PRAGMAS): Ditto.
2180         (enum rs6000_btc): Ditto.
2181         (RS6000_BTC_*): Ditto.
2182         (RS6000_BTM_*): Ditto.
2183         (enum rs6000_builtins): Ditto.
2184         * config/rs6000/rs6000-protos.h (rs6000_overloaded_builtin_p): Ditto.
2185         (rs6000_target_modify_macros): Ditto.
2186         (rs6000_target_modify_macros_ptr): Ditto.
2187
2188         * config/rs6000/vector.md (unsfloat<VEC_int><mode>2): Use the
2189         standard name for converting vector unsigned values to floating
2190         point.  Delete the TARGET_VECTORIZE_BUILTIN_CONVERSION hook, which
2191         is handled by machine independent code.
2192         * config/rs6000/rs6000.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Ditto.
2193         (rs6000_builtin_conversion): Ditto.
2194
2195 2011-11-29  Dodji Seketeli  <dodji@redhat.com>
2196
2197         * tree-diagnostic (struct loc_t): Rename into struct loc_map_pair.
2198         (maybe_unwind_expanded_macro_loc): Adjust.
2199
2200 2011-11-29  David Edelsohn  <dje.gcc@gmail.com>
2201             Aldy Hernandez  <aldyh@redhat.com>
2202
2203         * trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl
2204         if DECL_ONE_ONLY.
2205         (ipa_tm_create_version): Same.
2206
2207 2011-11-29  Bernd Schmidt  <bernds@codesourcery.com>
2208
2209         * haifa-sched.c (recompute_todo_spec): Simplify and correct the
2210         code checking for a clobber of a condition register when deciding
2211         whether to predicate.
2212
2213 2011-11-29  Diego Novillo  <dnovillo@google.com>
2214
2215         * gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
2216         Update field call_stmt_cannot_inline_p from call graph edge, if needed.
2217         * gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
2218
2219 2011-11-29  Sameera Deshpande  <sameera.deshpande@arm.com>
2220
2221         * config/arm/arm.md (arm_movdi): Update NEG_POOL_RANGE.
2222         (movdf_soft_insn): Likewise.
2223         * config/arm/fpa.md (thumb2_movdf_fpa): Likewise.
2224         * config/arm/neon.md (neon_mov<mode>): Likewise.
2225         * config/arm/vfp.md (movdi_vfp): Likewise.
2226         (movdi_vfp_cortexa8): Likewise.
2227         (movdf_vfp): Likewise.
2228
2229 2011-11-29  Jakub Jelinek  <jakub@redhat.com>
2230
2231         PR middle-end/50074
2232         * expr.c (expand_expr_addr_expr_1): Don't call force_operand for
2233         EXPAND_SUM modifier.
2234
2235 2011-11-29  Ira Rosen  <ira.rosen@linaro.org>
2236
2237         PR tree-optimization/51301
2238         * tree-vect-patterns.c (vect_recog_over_widening_pattern): Check that
2239         the last statement doesn't convert to a bigger type than the original
2240         type of the computation.
2241
2242 2011-11-28  Richard Henderson  <rth@redhat.com>
2243
2244         * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
2245         Handle overlap between retval and oldval.  Always compute boolval
2246         from CR0 EQ value.
2247
2248 2011-11-28  Jakub Jelinek  <jakub@redhat.com>
2249
2250         PR debug/50317
2251         * tree-ssa.c (execute_update_addresses_taken): Remove
2252         var ={v} {CLOBBER} stmts instead of rewriting them into
2253         var_N ={v} {CLOBBER}.
2254
2255         PR middle-end/50907
2256         * function.c (convert_jumps_to_returns): When redirecting an edge
2257         succ to EXIT_BLOCK_PTR, clear EDGE_CROSSING flag.
2258
2259         PR tree-optimization/50078
2260         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
2261         TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
2262
2263         PR tree-optimization/50682
2264         * tree-eh.c (maybe_remove_unreachable_handlers): New function.
2265         * tree-flow.h (maybe_remove_unreachable_handlers): New prototype.
2266         * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call it.
2267
2268 2011-11-28  Georg-Johann Lay  <avr@gjlay.de>
2269
2270         * doc/extend.texi (AVR Built-in Functions): Add documentation for
2271         __builtin_avr_map8 and __builtin_avr_map16.
2272
2273         * config/avr/avr.md: Document new %t and %T asm output codes.
2274         (define_c_enum "unspec"): Add UNSPEC_MAP_BITS.
2275         (adjust_len): Add map_bits.
2276         (map_bitsqi, map_bitshi): New insns.
2277         * config/avr/avr-protos.h (avr_out_map_bits): New.
2278         * config/avr/avr-protos.c (print_operand): Implement %t and %T.
2279         (adjust_insn_length): Handle ADJUST_LEN_MAP_BITS.
2280         (avr_double_int_push_digit): New function.
2281         (avr_map, avr_revert_map, avr_swap_map, avr_id_map): New functions.
2282         (avr_sig_map, avr_map_hamming_byte): New functions.
2283         (avr_out_swap_bits, avr_out_revert_bits, avr_move_bits,
2284         avr_out_map_bits): New functions.
2285         (enum avr_builtin_id): Add AVR_BUILTIN_MAP8, AVR_BUILTIN_MAP16.
2286         (avr_init_builtins): Populate __builtin_avr_map8, __builtin_avr_map16.
2287         (bdesc_2arg): Add __builtin_avr_map8, __builtin_avr_map16 ...
2288         (avr_expand_builtin): ...and expand them.
2289         * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in defines:
2290         __BUILTIN_AVR_MAP8, __BUILTIN_AVR_MAP16.
2291
2292 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
2293
2294         PR target/51278
2295         * config/mips/mips.c (mips_rtx_costs): Handle baddu.
2296
2297 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
2298
2299         * config/mips/mips.c (mips16_unextended_reference_p): Test for BLKmode.
2300
2301 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
2302
2303         * config/mips/mips-protos.h (mips_emit_binary): Declare.
2304         * config/mips/mips.c (mips_emit_binary): Make global.
2305         (mips_set_mips16_mode): Turn off -mfix-r4000 in MIPS16 mode.
2306         (mips_conditional_register_usage): Don't treat LO and HI as
2307         register operands in MIPS16 mode.
2308         (mips_mulsidi3_gen_fn): Use {u,}mulsidi3_{32,64}bit_mips16
2309         for MIPS16 code.
2310         * config/mips/predicates.md (muldiv_target_operand): New predicate.
2311         (move_operand): Allow hilo_operand.
2312         * config/mips/mips.md (mul<mode>3): Explicitly specify LO as the
2313         target of MIPS16 multiplies, then move it into the target register.
2314         (mul<mode>3_internal, *macc2, *msac2): Use muldiv_target_operand.
2315         (<u>mulsidi3_32bit_mips16): New expander.
2316         (<u>mulsidi3_32bit): Use muldiv_target_operand.
2317         (<u>mulsidi3_32bit_r4000): Disable for ISA_HAS_DSP.
2318         (<u>mulsidi3_64bit): Require !TARGET_MIPS16.  Split into
2319         <u>mulsidi3_64bit_split.
2320         (<u>mulsidi3_64bit_mips16): New expander.
2321         (<u>mulsidi3_64bit_split): Likewise, using expansions from
2322         two previous define_splits.
2323         (<u>mulsidi3_64bit_hilo, *muls<u>_di, <u>msubsidi4): Use
2324         muldiv_target_operand.
2325         (<su>mulsi3_highpart): Use <su>mulsi3_highpart_split for MIPS16 code.
2326         (<su>mulsi3_highpart_internal): Require !TARGET_MIPS16.
2327         Split into <su>mulsi3_highpart_split.
2328         (<su>mulsi3_highpart_split): New expander.
2329         (<su>muldi3_highpart): Turn into a define_expand.
2330         Use <su>muldi3_highpart_split for MIPS16 code.
2331         (<su>muldi3_highpart_internal): Renamed from <su>muldi3_highpart.
2332         Require !TARGET_MIPS16.  Split into <su>muldi3_highpart_split.
2333         (<su>muldi3_highpart_split): New expander.
2334         (<u>mulditi3): Explicitly specify LO as the target of MIPS16
2335         multiplies, then move it into the target register.
2336         (<u>mulditi3_internal, <u>maddsidi4): Use muldiv_target_operand.
2337         (divmod<mode>4, udivmod<mode>4): Turn into define_expands.
2338         Use <u>divmod<mode>4_split for MIPS16 code, then explicitly
2339         move LO into operand 0.
2340         (divmod<mode>4_internal, udivmod<mode>4_internal): Renamed
2341         from <u>divmod<mode>4.  Use muldiv_target_operand.
2342         Require !TARGET_MIPS16.  Split into <u>divmod<mode>4_split.
2343         (<u>divmod<mode>4_split): New expander.
2344         (<u>divmod<GPR:mode>4_hilo_<HILO:mode>): Use muldiv_target_operand.
2345         (mfhi<GPR:mode>_<HILO:mode>): Use hilo_operand.
2346
2347 2011-11-27  Richard Sandiford  <rdsandiford@googlemail.com>
2348
2349         * hard-reg-set.h (target_hard_regs): Add x_accessible_reg_set
2350         and x_operand_reg_set.
2351         (accessible_reg_set, operand_reg_set): New macros.
2352         * reginfo.c (init_reg_sets): Initialize accessible_reg_set and
2353         operand_reg_set.
2354         (saved_accessible_reg_set, saved_operand_reg_set): New variables.
2355         (save_register_info): Save them.
2356         (restore_register_info): Restore them.
2357         (init_reg_sets_1): Limit operand_reg_set to accessible_reg_set.
2358         Remove NO_REGS registers from operand_reg_set.  Treat members
2359         of operand_reg_set as fixed.
2360         * recog.c (general_operand): Check operand_reg_set rather than NO_REGS.
2361         (register_operand, nonmemory_operand): Likewise.
2362         * varasm.c (make_decl_rtl): Always use DECL_MODE as the mode of
2363         register variables.  Check accessible_reg_set and operand_reg_set.
2364         * config/mips/mips.c (mips_conditional_register_usage): Remove
2365         inaccessible register from accessible_reg_set, rather than just
2366         making them fixed.
2367
2368 2011-11-27  Gerald Pfeifer  <gerald@pfeifer.com>
2369
2370         * config/pa/pa-linux.h (TARGET_GAS): Remove comment.
2371
2372 2011-11-26  Richard Henderson  <rth@redhat.com>
2373
2374         * config/arm/arm.c (arm_init_libfuncs): Call init_sync_libfuncs
2375         for Linux.
2376
2377 2011-11-26  Richard Henderson  <rth@redhat.com>
2378
2379         * optabs.c (expand_atomic_fetch_op): Always return result.
2380
2381         * optabs.c (init_sync_libfuncs_1): Include max in iteration.
2382
2383         * omp-low.c (expand_omp_atomic): Assume anything aligned to
2384         BIGGEST_ALIGNMENT is aligned.
2385
2386 2011-11-26  Richard Henderson  <rth@redhat.com>
2387
2388         * config/m68k/m68k.md (UNSPECV_CAS_1, UNSPECV_CAS_2): New.
2389         (UNSPECV_TAS_1, UNSPECV_TAS_2): New.
2390         (I): New mode iterator.
2391         (xz): New mode attribute.
2392         * config/m68k/sync.md: New file.
2393
2394         * config/m68k/linux.h (TARGET_INIT_LIBFUNCS): New.
2395         * config/m68k/m68k.c (m68k_init_sync_libfuncs): New.
2396
2397 2011-11-26  Nathan Sidwell  <nathan@acm.org>
2398
2399         PR gcov-profile/51297
2400         * gcov.c (main): Allocate initial names and sources arrays.
2401         (find_source): Don't check for null name or source arrays here.
2402
2403 2011-11-26  Jakub Jelinek  <jakub@redhat.com>
2404
2405         PR rtl-optimization/49912
2406         * cfgrtl.c (rtl_verify_flow_info_1): Ignore also EDGE_PRESERVE bit
2407         when counting n_branch.
2408
2409 2011-11-26  Uros Bizjak  <ubizjak@gmail.com>
2410
2411         * config/i386/sync.md (movdi_via_fpu): Add %Z insn suffixes.
2412
2413 2011-11-26  Joern Rennecke  <joern.rennecke@embecosm.com>
2414
2415         PR middle-end/50074
2416         * calls.c (mem_overlaps_already_clobbered_arg_p):
2417         Return false if no outgoing arguments have been stored so far.
2418
2419 2011-11-25  Georg-Johann Lay  <avr@gjlay.de>
2420
2421         * config/avr/avr.c (print_operand): Support code = 'i' for CONST_INT.
2422
2423 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
2424
2425         PR other/51011
2426         * tree.h (is_builtin_name): No longer external.
2427         * builtins.c (is_builtin_name): Make static.
2428         * varasm.c (incorporeal_function_p): __sync and __atomic external calls
2429         are not incorporeal and may need asm label processing.
2430
2431 2011-11-25  Georg-Johann Lay  <avr@gjlay.de>
2432
2433         PR target/50566
2434         * config/avr/avr-protos.h (avr_log_t): Add field .builtin.
2435         * config/avr/avr-log.c (avr_log_set_avr_log): Initialize it.
2436         Don't bypass TARGET_ALL_DEBUG.  Print self-info with ?.
2437         (avr_log_vadump): Support %D and %X to print double_int.
2438         (avr_double_int_pop_digit): New static function.
2439         (avr_dump_double_int_hex): New static function.
2440
2441 2011-11-24  Enkovich Ilya  <ilya.enkovich@intel.com>
2442
2443         PR target/51287
2444         * config/i386/i386.c (distance_non_agu_define_in_bb): Fix insn
2445         attr check.
2446
2447 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
2448
2449         * optab.c (maybe_emit_atomic_exchange): New.  Try to emit an
2450         atomic_exchange pattern.
2451         (maybe_emit_sync_lock_test_and_set): New.  Try to emit an exchange
2452         using __sync_lock_test_and_set.
2453         (maybe_emit_compare_and_swap_exchange_loop): New. Try to emit an
2454         exchange using a compare_and_swap loop.
2455         (expand_sync_lock_test_and_set): New.  Expand sync_lock_test_and_set.
2456         (expand_atomic_test_and_set): New.  Expand test_and_set operation.
2457         (expand_atomic_exchange): Use new maybe_emit_* functions.
2458         (expand_atomic_store): Use new maybe_emit_* functions.
2459         * builtins.c (expand_builtin_sync_lock_test_and_set): Call
2460         expand_sync_lock_test_and_set routine.
2461         (expand_builtin_atomic_exchange): Remove parameter from call.
2462         (expand_builtin_atomic_clear): Use atomic_clear pattern if present.
2463         (expand_builtin_atomic_test_and_set): Add target and simply call
2464         expand_atomic_test_and_set.
2465         (expand_builtin): Add target to expand_builtin_atomic_test_and_set.
2466         * expr.h (expand_atomic_exchange): Add parameter.
2467         (expand_sync_lock_test_and_set): New prototype.
2468         (expand_atomic_test_and_set, expand_atomic_clear): New prototypes.
2469
2470 2011-11-24  H.J. Lu  <hongjiu.lu@intel.com>
2471
2472         PR target/51134
2473         * config/i386/i386.h (processor_costs): Revert revision 181357.
2474         * config/i386/i386.c (cost models): Likewise.
2475         (core_cost): Likewise.
2476         (promote_duplicated_reg): Likewise.
2477         (promote_duplicated_reg_to_size): Likewise.
2478         (processor_target): Likewise.
2479         (expand_set_or_movmem_via_loop_with_iter): Likewise.
2480         (expand_set_or_movmem_via_loop): Likewise.
2481         (emit_strset): Likewise.
2482         (expand_movmem_epilogue): Likewise.
2483         (expand_setmem_epilogue): Likewise.
2484         (expand_movmem_prologue): Likewise.
2485         (expand_setmem_prologue): Likewise.
2486         (expand_constant_movmem_prologue): Likewise.
2487         (expand_constant_setmem_prologue): Likewise.
2488         (decide_alg): Likewise.
2489         (decide_alignment): Likewise.
2490         (ix86_expand_movmem): Likewise.
2491         (ix86_expand_setmem): Likewise.
2492         (ix86_slow_unaligned_access): Likewise.
2493         * config/i386/i386.md (strset): Likewise.
2494         * config/i386/sse.md (vec_dupv4si): Likewise.
2495         (vec_dupv2di): Likewise.
2496
2497 2011-11-24  Georg-Johann Lay  <avr@gjlay.de>
2498
2499         * config/avr/avr.md (*rotlhi2.15): Set length to 4.
2500
2501 2011-11-24  Razya Ladelsky  <razya@il.ibm.com>
2502
2503         * tree-data-ref.c (initialize_data_dependence_relation): Update
2504         comment for the self dependence case.
2505         (compute_self_dependence): Remove.
2506         * tree-vect-data-refs.c (vect_analyze_data_refs): Remove call to
2507         compute_self_dependenc.
2508
2509 2011-11-24  Alan Modra  <amodra@gmail.com>
2510
2511         * c-decl.c (warn_if_shadowing): Don't warn if shadowed
2512         identifier is from system header.
2513
2514 2011-11-23  Jakub Jelinek  <jakub@redhat.com>
2515
2516         PR target/51261
2517         * config/i386/i386.c (decide_alg): Initialize *dynamic_check
2518         even if !optimize.
2519
2520 2011-11-23  Vladimir Makarov  <vmakarov@redhat.com>
2521
2522         PR rtl-optimization/48455
2523         * doc/invoke.texi (-fira-region): Document default values.
2524
2525         * flags-types.h (enum ira_region): Add new value
2526         IRA_REGION_AUTODETECT.
2527
2528         * common.opt (fira-region): Set up initial value to
2529         IRA_REGION_AUTODETECT.
2530
2531         * toplev.c (process_options): Set up flag_ira_region depending on
2532         -O options.
2533
2534         * ira.c (ira.c): Remove optimize guard for ira_build.
2535
2536 2011-11-23  Chung-Lin Tang  <cltang@codesourcery.com>
2537
2538         PR rtl-optimization/50496
2539         * jump.c (redirect_jump): Assert fail on nlabel == NULL_RTX
2540         only after epilogue is created. Add comments.
2541
2542 2011-11-22  Richard Henderson  <rth@redhat.com>
2543
2544         * config/ia64/ia64.c (ia64_expand_atomic_op): Add model parameter.
2545         Generate the barrier required for the memory model.
2546         (rtx_needs_barrier): Handle UNSPEC_FETCHADD_REL, UNSPEC_CMPXCHG_REL.
2547         * config/ia64/ia64-protos.h: Update.
2548         * config/ia64/ia64.md (UNSPEC_FETCHADD_REL): New.
2549         (UNSPEC_CMPXCHG_REL): New.
2550         * config/ia64/sync.md (mem_thread_fence): New.
2551         (atomic_load<IMODE>, atomic_store<IMODE>): New.
2552         (atomic_compare_and_swap<IMODE>): New.
2553         (cmpxchg_acq_<I124MODE>, cmpxchg_acq_di): New.
2554         (atomic_exchange<IMODE>): New.
2555         (xchg_acq_<IMODE>): Rename from sync_lock_test_and_set<IMODE>.
2556         (atomic_<FETCHOP><IMODE>, atomic_nand<IMODE>): New.
2557         (atomic_fetch_<FETCHOP><IMODE>, atomic_fetch_nand<IMODE>): New.
2558         (atomic_<FETCHOP>_fetch<IMODE>, atomic_nand_fetch<IMODE>): New.
2559         (fetchadd_rel_<I48MODE>): New.
2560         (sync_<FETCHOP><IMODE>, sync_nand<IMODE>): Remove.
2561         (sync_old_<FETCHOP><IMODE>, sync_old_nand<IMODE>): Remove.
2562         (sync_new_<FETCHOP><IMODE>, sync_new_nand<IMODE>): Remove.
2563         (sync_compare_and_swap<IMODE>): Remove.
2564         (sync_lock_release<IMODE>): Remove.
2565
2566         * config/ia64/ia64.md: Use define_c_enum for UNSPEC_*
2567         and UNSPECV_* constants.
2568
2569 2011-11-22  Tom de Vries  <tom@codesourcery.com>
2570
2571         PR rtl-optimization/50764
2572         * sched-deps.c (sched_analyze_insn): Make sure frame-related insns are
2573         not moved past preceding jump.
2574
2575 2011-11-22  Jeff Law  <law@redhat.com>
2576
2577         * doc/contrib.texi: Add entry for David Binderman.
2578
2579 2011-11-22  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2580
2581         * postreload.c (reload_combine): Mark reg_state as invalid at
2582         volatile insns if there has been a use already.
2583
2584 2011-11-21  Aldy Hernandez  <aldyh@redhat.com>
2585
2586         * opts.c (finish_options): Do not fail for -fgnu-tm.
2587         * gimple-streamer-out.c (output_gimple_stmt): Handle
2588         GIMPLE_TRANSACTION.
2589         * gimple-streamer-in.c (input_gimple_stmt): Same.
2590         * lto-cgraph.c (input_overwrite_node): Read tm_clone bit.
2591         (lto_output_node): Write tm_clone bit.
2592
2593 2011-11-22  Ian Lance Taylor  <iant@google.com>
2594
2595         * doc/install.texi (Configuration): Correct doc of
2596         --enable-build-poststage1-with-cxx: it is not experimental.
2597
2598 2011-11-22  Jakub Jelinek  <jakub@redhat.com>
2599
2600         PR tree-optimization/51074
2601         * fold-const.c (fold_binary_loc): Fix up VEC_INTERLEAVE_*_EXPR
2602         handling for BYTES_BIG_ENDIAN.
2603         * optabs.c (can_vec_perm_for_code_p): Likewise.
2604
2605 2011-11-22  Michael Matz  <matz@suse.de>
2606
2607         PR other/51125
2608         * trans-mem.c (expand_block_tm): Ignore clobbers.
2609
2610 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
2611
2612         *  config/darwin.h (ENDFILE_SPEC): New.
2613         (DARWIN_CRT1_SPEC): Add crttms.o.
2614         (STARTFILE_SPEC): Likewise for dynamic libs and bundles.
2615         * config/i386.h (ENDFILE_SPEC): Amend to include crttme.o.
2616
2617 2011-11-22  Michael Matz  <matz@suse.de>
2618
2619         PR c++/51264
2620         * tree.c (iterative_hash_expr): Remove break after return.
2621
2622 2011-11-22  Iain Sandoe  <iains@gcc.gnu.org>
2623
2624         * target.def (tm_clone_table_section): New hook.
2625         * doc/tm.texi.in (TARGET_ASM_TM_CLONE_TABLE_SECTION): Define.
2626         * doc/tm.texi: Regenerate.
2627         * varasm.c (dump_tm_clone_pairs): Use target tm_clone_table_section.
2628         * output.h (default_clone_table_section): New prototype.
2629         * config/darwin.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): New.
2630         * config/darwin-protos.h (darwin_tm_clone_table_section): New prototype.
2631         * config/darwin.c (darwin_tm_clone_table_section): New.
2632
2633 2011-11-21  Torvald Riegel  <triegel@redhat.com>
2634
2635         * trans-mem.c (diagnose_tm_1): Print an expression instead of a
2636         declaration in error messages for indirect calls.
2637
2638 2011-11-21  David S. Miller  <davem@davemloft.net>
2639
2640         * config/sparc/sparc.c (sparc_regmode_natural_size): New function
2641         implementing REGMODE_NATURAL_SIZE taking into consideration vector
2642         modes.
2643         (sparc_modes_tieable_p): Similarly for MODES_TIEABLE_P.
2644         * config/sparc/sparc-protos.h (sparc_regmode_natural_size,
2645         sparc_modes_tieable_p): Declare.
2646         * gcc/config/sparc/sparc.h (REGMODE_NATURAL_SIZE,
2647         MODES_TIEABLE_P): Use new helper functions.
2648
2649         Revert
2650         2011-11-16  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2651
2652         PR middle-end/50325
2653         * expmed.c (store_bit_field_1): Use extract_bit_field on big
2654         endian targets if the source cannot be exactly covered by word
2655         mode chunks.
2656
2657 2011-11-21  Jakub Jelinek  <jakub@redhat.com>
2658
2659         PR debug/50827
2660         * var-tracking.c (loc_cmp): For ENTRY_VALUEs use ENTRY_VALUE_EXP
2661         macro instead of XEXP.
2662
2663 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
2664
2665         * configure: Regenerate.
2666
2667 2011-11-21  Georg-Johann Lay  <avr@gjlay.de>
2668
2669         * config/avr/avr.c (output_reload_in_const): Loading a byte with 0
2670         must not affect cc0.
2671         * config/avr/avr.md (*movhi, *movpsi, *movsi, *movsf): Zero to any
2672         register does not change cc0. Same for any constant to ld-register.
2673
2674 2011-11-21  Uros Bizjak  <ubizjak@gmail.com>
2675
2676         * config/i386/mmx.md (unspec) <UNSPEC_MOVNTQ, UNSPEC_PFRCP,
2677         UNSPEC_PFRCPIT1, UNSPEC_PFRCPIT2, UNSPEC_PFRSQRT, UNSPEC_PFRSQIT1>:
2678         Move from config/i386/i386.md
2679         (unspecv) <UNSPECV_EMMS, UNSPECV_FEMMS>: Ditto.
2680         * config/i386/sse.md (unspec) <UNSPEC_MOVNT,UNSPEC_MOVU, UNSPEC_LDDQU,
2681         UNSPEC_PSHUFB, UNSPEC_PSIGN, UNSPEC_PALIGNR, UNSPEC_EXTRQI,
2682         UNSPEC_EXTRQ, UNSPEC_INSERTQI, UNSPEC_INSERTQ, UNSPEC_BLENDV,
2683         UNSPEC_INSERTPS, UNSPEC_DP, UNSPEC_MOVNTDQA, UNSPEC_MPSADBW,
2684         UNSPEC_PHMINPOSUW, UNSPEC_PTEST, UNSPEC_PCMPESTR, UNSPEC_PCMPISTR,
2685         UNSPEC_FMADDSUB, UNSPEC_XOP_UNSIGNED_CMP, UNSPEC_XOP_TRUEFALSE,
2686         UNSPEC_XOP_PERMUTE, UNSPEC_FRCZ, UNSPEC_AESENC, UNSPEC_AESENCLAST,
2687         UNSPEC_AESDEC, UNSPEC_AESDECLAST, UNSPEC_AESIMC,
2688         UNSPEC_AESKEYGENASSIST, UNSPEC_PCLMUL, UNSPEC_PCMP, UNSPEC_VPERMIL,
2689         UNSPEC_VPERMIL2, UNSPEC_VPERMIL2F128, UNSPEC_CAST, UNSPEC_VTESTP,
2690         UNSPEC_VCVTPH2PS, UNSPEC_VCVTPS2PH, UNSPEC_VPERMSI, UNSPEC_VPERMDF,
2691         UNSPEC_VPERMSF, UNSPEC_VPERMTI, UNSPEC_GATHER, UNSPEC_VSIBADDR>: Ditto.
2692         (unspecv) <UNSPECV_LDMXCSR, UNSPECV_STMXCSR, UNSPECV_CLFLUSH,
2693         UNSPECV_MONITOR, UNSPECV_MWAIT, UNSPECV_VZEROALL, UNSPECV_VZEROUPPER>:
2694         Ditto.
2695         * config/i386/sync.md (unspec) <UNSPEC_LFENCE, UNSPEC_SFENCE,
2696         UNSPEC_MFENCE, UNSPEC_MOVA>: Ditto.
2697         (unspecv) <UNSPECV_CMPXCHG_1, UNSPECV_CMPXCHG_2, UNSPECV_CMPXCHG_3,
2698         UNSPECV_CMPXCHG_4, UNSPECV_XCHG, UNSPECV_LOCK>: Ditto.
2699         (sse2_lfence): Move from config/i386/sse.md.
2700         (*sse2_lfence): Ditto.
2701         (sse_sfence): Ditto.
2702         (*sse_sfence): Ditto.
2703         (sse2_mfence): Ditto.
2704         (mfence_sse2): Ditto.  Rename from *sse2_mfence.  Enable also
2705         for TARGET_64BIT.
2706         (mem_thread_fence): Use mfence_sse2.
2707
2708 2011-11-21  Georg-Johann Lay  <avr@gjlay.de>
2709
2710         * config/avr/avr.h (struct base_arch_s): Add field sfr_offset.
2711         * config/avr/avr-devices.c: Ditto. And initialize it.
2712         * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in define
2713         __AVR_SFR_OFFSET__.
2714         * config/avr/avr-protos.h (out_movqi_r_mr, out_movqi_mr_r): Remove.
2715         (out_movhi_r_mr, out_movhi_mr_r): Remove.
2716         (out_movsi_r_mr, out_movsi_mr_r): Remove.
2717         * config/avr/avr.md (*cbi, *sbi): Use %i instead of %m-0x20.
2718         (*insv.io, *insv.not.io): Ditto.
2719         * config/avr/avr.c (out_movsi_r_mr, out_movsi_mr_r): Make static.
2720         (print_operand): Implement "%i" to print address as I/O address.
2721         (output_movqi): Clean up call of out_movqi_mr_r.
2722         (output_movhi): Clean up call of out_movhi_mr_r.
2723         (avr_file_start): Use avr_current_arch->sfr_offset instead of
2724         magic -0x20. Use TMP_REGNO, ZERO_REGNO instead of 0, 1.
2725         (avr_out_sbxx_branch): Use %i instead of %m-0x20.
2726         (out_movqi_r_mr, out_movqi_mr_r): Ditto. And make static.
2727         (out_movhi_r_mr, out_movhi_mr_r): Ditto. And use avr_asm_len.
2728         (out_shift_with_cnt): Clean up code: Use avr_asm_len.
2729         (output_movsisf): Use output_reload_insisf for all CONSTANT_P sources.
2730         (avr_out_movpsi): USE avr_out_reload_inpsi for all CONSTANT_P sources.
2731         Clean up call of avr_out_store_psi.
2732         (output_reload_in_const): Don't cut symbols longer than 2 bytes.
2733         (output_reload_insisf): Filter CONST_INT_P or CONST_DOUBLE_P to
2734         try if setting pre-cleared register is advantageous.
2735         (avr_out_plus_1): Use gen_int_mode instead of GEN_INT.
2736
2737 2011-11-20  Joey Ye  <joey.ye@arm.com>
2738
2739         * expr.c (expand_expr_real_1): Correctly handle strict volatile
2740         bitfield loads smaller than mode size.
2741
2742 2011-11-20  Richard Henderson  <rth@redhat.com>
2743
2744         * config/mips/mips.c (mips_init_libfuncs): Call init_sync_libfuncs.
2745
2746 2011-11-20  Uros Bizjak  <ubizjak@gmail.com>
2747
2748         PR target/51235
2749         * config/i386/i386.c (ix86_expand_vcond): Generate TARGET_XOP
2750         patterns for supported mode only.
2751
2752         PR target/51236
2753         * config/i386/i386.c (ix86_expand_builtin)
2754         <IX86_BUILTIN_GATHERALTSIV4DI>: Use CODE_FOR_avx2_gathersiv4di.
2755
2756 2011-11-20  Uros Bizjak  <ubizjak@gmail.com>
2757
2758         * config/i386/i386.md (UNSPEC_MOVNTI): Remove.
2759         (UNSPEC_MOVNTQ): New unspec.
2760         * config/i386/mmx.md (sse_movntq): Rename from sse_movntdi.
2761         Use UNSPEC_MOVNTQ instead of UNSPEC_MOVNT.
2762         * config/i386/sse.md (sse2_movnti<mode>): Use UNSPEC_MOVNT instead of
2763         UNSPEC_MOVNTI.
2764         (STORENT_MODE): Add DI and V4DI modes.
2765
2766 2011-11-20  Nathan Sidwell  <nathan@acm.org>
2767
2768         PR gcov-profile/51113
2769         * coverage.c (build_var): Propagate visibility for public
2770         decls.  Use make_decl_one_only for PIC correctness.
2771
2772         testsuite/
2773         * gcc.misc-tests/gcov-13.c: Check gcovpart-13b coverage
2774         * gcc.misc-tests/gcov-16.c: New.
2775         * gcc.misc-tests/gcov-17.c: New.
2776         * g++.dg/gcov/gcov-8.C: New.
2777         * g++.dg/gcov/gcov-9.C: New.
2778         * g++.dg/gcov/gcov-10.C: New.
2779
2780 2011-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2781
2782         PR rtl-optimization/51187
2783         * reorg.c (relax_delay_slots): Do not consider a jump useless if there
2784         is a barrier between the jump and its target label.
2785
2786 2011-11-19  Patrick Marlier  <patrick.marlier@gmail.com>
2787
2788         PR middle-end/51211
2789         * tracer.c (ignore_bb_p): Don't copy GIMPLE_TRANSACTION.
2790
2791 2011-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2792
2793         * expmed.c (store_bit_field_1): Revert bogus formatting change.
2794
2795 2011-11-19  Richard Earnshaw  <rearnsha@arm.com>
2796
2797         PR target/50493
2798         * config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial
2799         overlap of src and dest operands.
2800
2801 2011-11-19  Iain Sandoe  <iains@gcc.gnu.org>
2802
2803         * config/darwin.h (ASM_DEBUG_SPEC): New.
2804         * config/darwin9.h (ASM_DEBUG_SPEC): New.
2805
2806 2011-11-18  Jan Hubicka  <jh@suse.cz>
2807
2808         * config/i386/i386.c (atom_cost): Disable SSE loop until alignment
2809         issues are fixed.
2810
2811 2011-11-18  Anatoly Sokolov  <aesok@post.ru>
2812
2813         * config/cris/cris.c (cris_function_value_regno_p): Make static.
2814         (TARGET_FUNCTION_VALUE_REGNO_P): Define.
2815         * config/cris/cris.h (FUNCTION_VALUE_REGNO_P): Remove.
2816         * config/cris/cris-protos.h (cris_function_value_regno_p): Remove.
2817
2818 2011-11-18  H.J. Lu  <hongjiu.lu@intel.com>
2819
2820         PR target/33944
2821         * doc/extend.texi: Document __builtin_ia32_movnti64.
2822
2823         * config/i386/emmintrin.h (_mm_stream_si64): New.
2824
2825         * config/i386/i386-builtin-types.def: Add VOID_FTYPE_PLONGLONG_LONGLONG.
2826
2827         * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_MOVNTI64.
2828         (bdesc_special_args): Update __builtin_ia32_movnti.  Add
2829         __builtin_ia32_movnti64.
2830         (ix86_expand_special_args_builtin): Handle
2831         VOID_FTYPE_PLONGLONG_LONGLONG.
2832
2833         * config/i386/i386.md (UNSPEC_MOVNTI): New.
2834
2835         * config/i386/sse.md (sse2_movntsi): Renamed to ...
2836         (sse2_movnti<mode>): This.
2837
2838 2011-11-18  Georg-Johann Lay  <avr@gjlay.de>
2839
2840         PR target/49868
2841         * config/avr/avr.h (base_arch_s): Add field n_segments.
2842         (ADDR_SPACE_PGM1, ADDR_SPACE_PGM2, ADDR_SPACE_PGM3,
2843         ADDR_SPACE_PGM4, ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): New address spaces.
2844         (AVR_HAVE_ELPM, AVR_HAVE_ELPMX): New defines.
2845         (INIT_EXPANDERS): New define.
2846         * config/avr/avr-protos.h (avr_mem_pgmx_p): New.
2847         (avr_init_expanders): New.
2848         (avr_emit_movmemhi, avr_out_movmem): New.
2849         (avr_xload_libgcc_p): New.
2850         * config/avr/avr-c.c (avr_register_target_pragmas): Register
2851         address spaces __pgm1, __pgm2,  __pgm3,  __pgm4  __pgm5,  __pgmx.
2852         (avr_cpu_cpp_builtins): Add built-in defines __PGM1,
2853         __PGM2, __PGM3, __PGM4, __PGM5, __PGMX.
2854         * config/avr/avr-devices.c (avr_arch_types): Set field n_segments.
2855
2856         * config/avr/avr.c (AVR_SECTION_PROGMEM): Change define to cover
2857         3 bits instead of just 1.
2858         (xstring_empty, xstring_e, rampz_rtx): New static GTYed variables.
2859         (progmem_section): Change from section to array of sections.
2860         (progmem_section_prefix): New static variable.
2861         (avr_file_start): Print set for __RAMPZ__
2862         (avr_option_override): Move initialization of RTXes from here...
2863         (avr_init_expanders): ...to this new function.
2864         (avr_pgm_segment): New static function.
2865         (avr_decl_pgm_p): Handle error_mark_node.
2866         (avr_mem_pgmx_p, avr_decl_pgmx_p): New static functions.
2867         (avr_out_xload, avr_find_unused_d_reg): New static functions.
2868         (expand_prologue, expand_epilogue): Use rampz_rtx.
2869         (print_operand): Hande CONST_STRING.
2870         (avr_xload_libgcc_p): New static function.
2871         (avr_out_lpm_no_lpmx, avr_out_lpm): Handle ELPM.
2872         (avr_progmem_p): Return 2 for 24-bit flash address space.
2873         (avr_out_sbxx_branch): Clean-up code from ASn macros.
2874         (out_movqi_r_mr, out_movqi_mr_r): Ditto. And recognize RAMPZ's
2875         address and print symbolically.
2876         (avr_asm_named_section, avr_section_type_flags,
2877         avr_encode_section_info, avr_asm_select_section,
2878         avr_addr_space_address_mode, avr_addr_space_pointer_mode,
2879         avr_addr_space_legitimate_address_p, avr_addr_space_convert,
2880         avr_addr_space_legitimize_address): Handle new address spaces.
2881         (avr_output_progmem_section_asm_op): New static function.
2882         (avr_asm_init_sections): Initialize progmem_section[].
2883         (adjust_insn_length): Handle ADJUST_LEN_XLOAD, ADJUST_LEN_MOVMEM.
2884         (avr_const_address_lo16): New static function.
2885         (avr_assemble_integer): Use it to handle 3-byte integers.
2886         (avr_emit_movmemhi, avr_out_movmem): New functions.
2887
2888         * config/avr/predicates.md (nox_general_operand): Handle new
2889         address spaces.
2890         * config/avr/avr.md (unspec): Add UNSPEC_MOVMEM.
2891         (adjust_len): Add xload, movmem.
2892         (SP_ADDR): New define_constants.
2893         (isa): Add "lpm", "lpmx", "elpm", "elpmx".
2894         (enabled): Handle them.
2895         (load<mode>_libgcc): New expander.
2896         (*load.<mode>.libgcc): Rename to load_<mode>_libgcc.
2897         (xload8_A, xload<mode>_A): New insn-and-splits.
2898         (xload_8, xload_<mode>_libgcc, xload_<mode>, loadmem_elpm): New insns.
2899         (mov<mode>): Handle new address spaces.
2900         (movmemhi): Rewrite using avr_emit_movmemhi.
2901         (MOVMEM_r_d): New mode attribute.
2902         (movmem_<mode>, movmem_qi_elpm): New insns.
2903         (setmemhi, *clrmemqi, *clrmemhi, strlenhi, *strlenhi): Unquote
2904         C-code.  Use label instead of hard-coded instrunction lengths.
2905
2906 2011-11-18  Martin Jambor  <mjambor@suse.cz>
2907
2908         PR tree-optimization/50605
2909         * gimple.c (is_gimple_ip_invariant_address): Also handle MEM_REFs
2910         of IPA invariant decls.
2911
2912 2011-11-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2913
2914         * tree-outof-ssa.c (insert_back_edge_copies):  Add call to
2915         mark_dfs_back_edges.
2916
2917 2011-11-18  Iain Sandoe  <iains@gcc.gnu.org>
2918
2919         PR target/49992
2920         * configure.ac: Remove ranlib special-casing for Darwin.
2921         * configure: Regenerate.
2922
2923 2011-11-18  Uros Bizjak  <ubizjak@gmail.com>
2924
2925         PR tree-optimization/51118
2926         * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure
2927         before using TREE_TYPE accessor on expr.
2928
2929 2011-11-17  Jan Hubicka  <jh@suse.cz>
2930
2931         PR bootstrap/51134
2932         * i386.c (atom_cost): Fix 32bit memset description.
2933         (expand_set_or_movmem_via_loop_with_iter): Output proper bounds check
2934         for epilogue loops.
2935         (expand_movmem_epilogue): Handle epilogues up to size 15 w/o producing
2936         byte loop.
2937         (decide_alg): sse_loop is not useable wthen SSE2 is disabled;
2938         when not optimizing always use rep movsb or lincall; do not produce
2939         word sized loops when optimizing memset for size (to avoid need
2940         for large constants).
2941         (ix86_expand_movmem): Get into sync with ix86_expand_setmem;
2942         choose unroll factors better; always do 128bit moves when producing
2943         SSE loops; do not produce loopy epilogue when size is too small.
2944         (promote_duplicated_reg_to_size): Do not look into desired alignments
2945         when doing vector expansion.
2946         (ix86_expand_setmem): Track better when promoted value is available;
2947         choose unroll factors more sanely. Output loopy epilogue only
2948         when needed.
2949
2950 2011-11-17  Steve Ellcey  <sje@cup.hp.com>
2951
2952         PR middle-end/51144
2953         * output.h (fprint_w): Remove.
2954         * final.c (fprint_w): Remove.
2955         (output_addr_const): Change fprint_w back to fprintf.
2956
2957 2011-11-17  Andrew Pinski  <apinski@cavium.com>
2958
2959         * config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for MIPS.
2960
2961 2011-11-17  Andrew MacLeod  <amacleod@redhat.com>
2962
2963         * builtins.c (expand_builtin): Remove 4th parameter representing
2964         weak/strong mode when __atomic_compare_exchange becomes a library call.
2965
2966 2011-11-17  Richard Henderson  <rth@redhat.com>
2967
2968         * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
2969         new pseudo for target after convert_modes.
2970         (rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2971
2972 2011-11-17  Richard Henderson  <rth@redhat.com>
2973
2974         * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
2975         new pseudo for target after convert_modes.
2976         (rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2977
2978 2011-11-17  Richard Henderson  <rth@redhat.com>
2979
2980         * builtins.c (expand_builtin_mem_thread_fence): Remove.
2981         (expand_builtin_mem_signal_fence): Remove.
2982         (expand_builtin_atomic_thread_fence): Use expand_mem_thread_fence.
2983         (expand_builtin_sync_synchronize): Likewise.
2984         (expand_builtin_atomic_signal_fence): Use expand_mem_signal_fence.
2985         * optabs.c (expand_asm_memory_barrier): Split out from
2986         expand_builtin_mem_signal_fence.
2987         (expand_mem_thread_fence): New, a combination of code from
2988         expand_builtin_mem_thread_fence and expand_builtin_sync_synchronize.
2989         (expand_mem_signal_fence): Moved and renamed from
2990         expand_builtin_mem_signal_fence.
2991         (expand_atomic_exchange): Use expand_mem_thread_fence.
2992         (expand_atomic_load, expand_atomic_store): Likewise.
2993         * expr.h, optabs.h: Update decls.
2994
2995 2011-11-17  Bin Cheng  <bin.cheng@arm.com>
2996
2997         PR rtl-optimization/50663
2998         * cprop.c (implicit_set_indexes): New global variable.
2999         (insert_set_in_table): Add additional parameter and record implicit
3000         set information.
3001         (hash_scan_set): Add additional parameter and pass it to above.
3002         (hash_scan_insn): Pass false to hash_scan_set.
3003         (compute_hash_table_work): Pass true to hash_scan_set.
3004         (compute_cprop_data): Add implicit set to AVIN of block which the
3005         implicit set is recorded for.
3006         (one_cprop_pass): Handle implicit_set_indexes array.
3007
3008 2011-11-17  Michael Matz  <matz@suse.de>
3009
3010         PR middle-end/50644
3011         PR middle-end/50741
3012         * tree-ssa-live.c (mark_all_vars_used_1): Recurse only for decls of
3013         current function.
3014         (remove_unused_locals): Ditto.
3015
3016 2011-11-16  Richard Henderson  <rth@redhat.com>
3017
3018         * config/alpha/alpha.c (alpha_split_compare_and_swap_12): Copy
3019         ALIAS_SET_MEMORY_BARRIER when creating a new memory.
3020         (alpha_split_atomic_exchange_12): Likewise.
3021         * config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Likewise.
3022
3023 2011-11-16  Joseph Myers  <joseph@codesourcery.com>
3024
3025         * config/i386/i386elf.h (PREFERRED_DEBUGGING_TYPE): Remove.
3026
3027 2011-11-16  David Edelsohn  <dje.gcc@gmail.com>
3028
3029         * config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags):
3030         Default to minimum alignment if decl is NULL.
3031
3032 2011-11-16  Uros Bizjak  <ubizjak@gmail.com>
3033
3034         * config/i386/sse.md (round<mode>2_vec_pack_sfix): Optimize V2DFmode
3035         sequence for AVX.
3036         (<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
3037
3038 2011-11-16  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
3039
3040         * doc/invoke.texi: Document AMD bdver1 and btver1.
3041
3042 2011-11-16  Richard Earnshaw  <rearnsha@arm.com>
3043             Bernd Schmidt <bernds@coudesourcery.com>
3044             Sebastian Huber <sebastian.huber@embedded-brains.de>
3045
3046         PR target/49641
3047         * config/arm/arm.c (store_multiple_sequence): Avoid cases where
3048         the base reg is stored iff compiling for Thumb1.
3049
3050 2011-11-16  Razya Ladelsky  <razya@il.ibm.com>
3051
3052         PR tree-optimization/49960
3053         * tree-data-ref.c (initialize_data_dependence_relation): Add
3054         initializations.
3055         Remove call to compute_self_dependence.
3056         (compute_affine_dependence): Remove the !DDR_SELF_REFERENCE condition.
3057         (compute_self_dependence): Remove old code. Add call to
3058         compute_affine_dependence.
3059         (compute_all_dependences): Remove call to compute_self_dependence.
3060         Add call to compute_affine_dependence.
3061
3062 2011-11-16  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3063
3064         PR middle-end/50325
3065         * expmed.c (store_bit_field_1): Use extract_bit_field on big
3066         endian targets if the source cannot be exactly covered by word
3067         mode chunks.
3068
3069 2011-11-15  Joseph Myers  <joseph@codesourcery.com>
3070
3071         * config/i386/i386elf.h (ASM_OUTPUT_ASCII): Change STRING_LIMIT to
3072         ELF_STRING_LIMIT.
3073
3074 2011-11-15  Richard Henderson  <rth@redhat.com>
3075
3076         * config/alpha/alpha.c (alpha_pre_atomic_barrier): New.
3077         (alpha_post_atomic_barrier): New.
3078         (alpha_split_atomic_op): New memmodel argument; honor it.
3079         (alpha_split_compare_and_swap): Take array of operands.  Honor
3080         memmodel; always set bool output
3081         (alpha_expand_compare_and_swap_12): Similarly.
3082         (alpha_split_compare_and_swap_12): Similarly.
3083         (alpha_split_atomic_exchange): Similarly.  Rename from
3084         alpha_split_lock_test_and_set.
3085         (alpha_expand_atomic_exchange_12): Similarly.  Rename from
3086         alpha_expand_lock_test_and_set_12.
3087         (alpha_split_atomic_exchange_12): Similarly.  Rename from
3088         alpha_split_lock_test_and_set_12.
3089         * config/alpha/alpha-protos.h: Update.
3090         * config/alpha/alpha.md (UNSPECV_CMPXCHG): New.
3091         * config/alpha/constraints.md ("w"): New.
3092         * config/alpha/predicates.md (mem_noofs_operand): New.
3093         * config/alpha/sync.md (atomic_compare_and_swap<mode>): Rename from
3094         sync_compare_and_swap<mode>; add the new parameters.
3095         (atomic_exchange<mode>): Update from sync_test_and_set<mode>.
3096         (atomic_fetch_<op><mode>): Update from sync_old_<op><mode>.
3097         (atomic_<op>_fetch<mode>): Update from sync_new_<op><mode>.
3098         (atomic_<op><mode>): Update from sync_<op><mode>.
3099
3100 2011-11-16  Tom de Vries  <tom@codesourcery.com>
3101
3102         * tree-ssa-tail-merge.c (replace_block_by): Add frequency of bb2 to bb1.
3103
3104 2011-11-16  Alan Modra  <amodra@gmail.com>
3105
3106         PR rtl-optimization/51051
3107         PR bootstrap/51086
3108         * function.c (thread_prologue_and_epilogue_insns): Guard
3109         emitting return with single_succ_p test.
3110
3111 2011-11-15  Joern Rennecke  <joern.rennecke@embecosm.com>
3112
3113         * config/epiphany/epiphany.md (mov<mode>cc): Fix code to
3114         get mode from CMP_OP1 if CMP_OP0 is VOIDmode.
3115
3116 2011-11-15  Uros Bizjak  <ubizjak@gmail.com>
3117
3118         * config/i386/sse.md (vec_pack_trunc_v2df): Optimize sequence for AVX.
3119         (vec_pack_sfix_trunc_v2df): Ditto.
3120         (vec_pack_sfix_v2df): Ditto.
3121         (vec_pack_sfix_trunc_v4df): Generate fix_truncv4dfv4si2 and
3122         avx_vec_concatv8si patterns.
3123         (vec_pack_sfix_v4df): Generate avx_cvtpd2dq256 and
3124         avx_vec_concatv8si patterns.
3125
3126 2011-11-15  Torvald Riegel  <triegel@redhat.com>
3127
3128         * c-parser.c (c_parser_transaction_expression): Require parentheses
3129         when parsing transaction expressions.
3130
3131 2011-11-15  Tristan Gingold  <gingold@adacore.com>
3132
3133         * incpath.c (get_added_cpp_dirs): New function.
3134         * incpath.h (get_added_cpp_dirs): Declare.
3135         * config/vms/vms-c.c (vms_c_register_includes): New function.
3136         (vms_std_modules): New variable.
3137         * config/vms/vms.h (TARGET_EXTRA_INCLUDES): Define.
3138         (vms_c_register_includes): Declare.
3139
3140 2011-11-15  Tristan Gingold  <gingold@adacore.com>
3141
3142         * c-family/c-pragma.h (pragma_extern_prefix): Declare.
3143         * c-family/c-pragma.c (pragma_extern_prefix): Make it public.
3144         * config/vms/vms-c.c (saved_extern_prefix): New variable.
3145         (vms_pragma_extern_prefix): New function.
3146         (vms_c_register_pragma): Register vms_pragma_extern_prefix.
3147
3148 2011-11-15  Georg-Johann Lay  <avr@gjlay.de>
3149
3150         PR target/49868
3151         * config/avr/avr.h (ADDR_SPACE_PGM): New address spaces.
3152         (REGISTER_TARGET_PRAGMAS): New define.
3153         * config/avr/avr-protos.h (avr_mem_pgm_p): New.
3154         (avr_load_libgcc_p): New.
3155         (avr_register_target_pragmas): New.
3156         (asm_output_external_libcall): Remove.
3157         (avr_log_t): Add field "progmem".  Order alphabetically.
3158         * config/avr/avr-log.c (avr_log_set_avr_log): Set avr_log.progmem.
3159         * config/avr/avr-c.c (langhooks.h): New include.
3160         (avr_register_target_pragmas): New function. Register address
3161         space __pgm.
3162         (avr_cpu_cpp_builtins): Add built-in define __PGM.
3163
3164         * config/avr/avr.c: Include "c-family/c-common.h".
3165         (TARGET_LEGITIMATE_ADDRESS_P): Remove define.
3166         (TARGET_LEGITIMIZE_ADDRESS): Remove define.
3167         (TARGET_ADDR_SPACE_SUBSET_P): Define to...
3168         (avr_addr_space_subset_p): ...this new static function.
3169         (TARGET_ADDR_SPACE_CONVERT): Define to...
3170         (avr_addr_space_convert): ...this new static function.
3171         (TARGET_ADDR_SPACE_ADDRESS_MODE): Define to...
3172         (avr_addr_space_address_mode): ...this new static function.
3173         (TARGET_ADDR_SPACE_POINTER_MODE): Define to...
3174         (avr_addr_space_pointer_mode): ...this new static function.
3175         (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define to...
3176         (avr_addr_space_legitimate_address_p): ...this new static function.
3177         (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Define to...
3178         (avr_addr_space_legitimize_address): ...this new static function.
3179         (avr_mode_code_base_reg_class): Handle address spaces.
3180         (avr_regno_mode_code_ok_for_base_p): Ditto.
3181         (lpm_addr_reg_rtx, lpm_reg_rtx, all_regs_rtx): New static variables.
3182         (avr_option_override): Initialize them.
3183         (output_reload_in_const): Use all_regs_rtx. Fix signedness of loop
3184         variables.
3185         (avr_pgm_segment): New static function.
3186         (avr_decl_pgm_p, avr_mem_pgm_p): New static functions.
3187         (avr_out_lpm, avr_out_lpm_no_lpmx): New static functions.
3188         (output_movqi, output_movhi, output_movsisf, avr_out_movpsi): Call
3189         avr_out_lpm to handle loads from progmem.
3190         (avr_load_libgcc_p): New static function.
3191         (avr_progmem_p): Test if decl is in flash.
3192         (avr_pgm_pointer_const_p): New static function.
3193         (avr_nonconst_pointer_addrspace): New static function.
3194         (avr_pgm_check_var_decl): New static function.
3195         (avr_insert_attributes): Use it.  Change error message to report
3196         cause (progmem or address space) when code wants to write to flash.
3197         (avr_section_type_flags): Unset section flag SECTION_BSS for
3198         data in progmem.
3199
3200         * config/avr/predicates.md (nop_general_operand): New predicate.
3201         (nox_general_operand): New predicate.
3202         * config/avr/avr.md (LPM_REGNO): New define_constant.
3203         (load<mode>_libgcc): New expander.
3204         (*load.<mode>.libgcc): New insn.
3205         (mov<mode>): Handle loads from non-generic AS.
3206         (movmemhi): Ditto.  Propagate address space information to newly
3207         created MEM.
3208         (movqi_insn, *movhi, *movpsi, *movsi, *movsf): Change predicate #1
3209         to nox_general_operand.
3210         (ashrqi3, ashrhi3, ashrsi3): Change predicate #1 to
3211         nop_general_operand.
3212         (ashlqi3, *ashlqi3, ashlhi3, ashlsi3): Ditto.
3213         (lshrqi3, *lshrqi3, lshrhi3, lshrsi3): Ditto.
3214         (split-lpmx): New split.
3215         (*ashlhi3_const, *ashlsi3_const, *ashrhi3_const, *ashrsi3_const,
3216         *lshrhi3_const, *lshrsi3_const): Indent, unquote C.
3217
3218 2011-11-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
3219
3220         * ipa-cp.c (ipa_value_from_jfunc): Make global.
3221         (ipa_cst_from_jfunc): Remove, use ipa_value_from_jfunc instead.
3222         (get_indirect_edge_target): Rename, make global.
3223         (devirtualization_time_bonus, estimate_local_effects,)
3224         (ipcp_discover_new_direct_edges): Update.
3225         * ipa-inline-analysis.c (evaluate_conditions_for_edge):
3226         Generalize to also handle types.  Rename to ...
3227         (evaluate_properties_for_edge): Use instead of
3228         evaluate_conditions_for_edge.
3229         (estimate_edge_devirt_benefit): New function.
3230         (estimate_calls_size_and_time): Use it.
3231         (estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,)
3232         (inline_merge_summary): Update.
3233         (do_estimate_edge_time, do_estimate_edge_growth): Update.  Calculate
3234         parameter information at the call site and pass it on to subroutines.
3235         * tree-inline.c (estimate_num_insns): Distinguish between direct and
3236         indirect calls.
3237         (init_inline_once): Set size and time costs or indirect calls.
3238         * tree-inline.h (eni_weights): Add indirect_call_cost.
3239
3240 2011-11-15  Tom de Vries  <tom@codesourcery.com>
3241
3242         PR tree-optimization/51005
3243         * tree-ssa-tail-merge.c (delete_basic_block_same_succ): Rename to
3244         mark_basic_block_deleted.
3245         (update_worklist): Inline purge_bbs.
3246         (purge_bbs, unlink_virtual_phi, update_vuses, vop_at_entry)
3247         (delete_block_update_dominator_info): Remove.
3248         (replace_block_by): Remove update_vops parameter.  Partially evaluate
3249         for update_vops == false.
3250         (apply_clusters): Remove update_vops parameter.  Remove update_vops
3251         argument in replace_block_by call.
3252         (update_debug_stmts): Remove MAY_HAVE_DEBUG_STMTS test.
3253         (tail_merge_optimize): Remove update_vops argument to apply_clusters.
3254         Remove call to purge_bbs.  Add calls to calculate_dominance_info and
3255         free_dominance_info.  Add MAY_HAVE_DEBUG_STMTS  before calling
3256         update_debug_stmts.  Mark vop var for renaming, if necessary.
3257
3258 2011-11-15  Bernd Schmidt  <bernds@codesourcery.com>
3259
3260         PR rtl-optimization/51051
3261         * cfgrtl.c (cfg_layout_can_merge_blocks_p): Return FALSE if the
3262         move would cause fallthrough into the exit block.
3263
3264 2011-11-14  Richard Henderson  <rth@redhat.com>
3265
3266         * config/rs6000/rs6000.c (emit_load_locked): Assert the mode is
3267         handled.
3268         (emit_store_conditional): Likewise.
3269         (rs6000_pre_atomic_barrier, rs6000_post_atomic_barrier): New.
3270         (rs6000_adjust_atomic_subword): New.
3271         (rs6000_mask_atomic_subword, rs6000_finish_atomic_subword): New.
3272         (rs6000_expand_atomic_op): Rename from rs6000_emit_sync; rewrite
3273         for pre-reload expansion.
3274         (rs6000_split_compare_and_swap, rs6000_split_compare_and_swapqhi,
3275         rs6000_expand_compare_and_swapqhi): Merge into ...
3276         (rs6000_expand_atomic_compare_and_swap): ... here.  New function.
3277         rs6000_split_lock_test_and_set; expand immediately.  Handle
3278         QImode and HImode.
3279         * config/rs6000/rs6000.md (UNSPEC_LWSYNC): Move and rename
3280         from UNSPECV_LWSYNC.
3281         * config/rs6000/sync.md (fetchopsi_constr, fetchopdi_constr): Remove.
3282         (mem_thread_fence): New.
3283         (hwsync): Rename from memory_barrier.
3284         (*hwsync): Rename from *sync_internal.
3285         (lwsync, *lwsync): Mirror hwsync implementation.
3286         (isync): Don't reference memory.
3287         (loadsync): New.
3288         (atomic_load<INT>, atomic_store<INT>): New.
3289         (ATOMIC): New mode iterator.
3290         (load_locked<ATOMIC>): Rename from load_locked_<GPR>.
3291         (store_conditional<ATOMIC>): Rename from store_conditional_<GPR>.
3292         (sync_compare_and_swap<GPR>): Remove.
3293         (sync_compare_and_swaphi, sync_compare_and_swapqi): Remove.
3294         (sync_compare_and_swapqhi_internal): Remove.
3295         (sync_lock_test_and_set<GPR>): Remove.
3296         (sync_<FETCHOP><INT1>): Remove.
3297         (*sync_<FETCHOP>si_internal, *sync_<FETCHOP>di_internal): Remove.
3298         (sync_nand<INT1>, *sync_nand<GPR>_internal): Remove.
3299         (sync_old_<FETCHOP><GPR>): Remove.
3300         (*sync_old_<FETCHOP>si_internal): Remove.
3301         (*sync_old_<FETCHOP>di_internal): Remove.
3302         (sync_old_nand<INT1>): Remove.
3303         (*sync_old_nand<GPR>_internal): Remove.
3304         (sync_new_<FETCHOP><GPR>): Remove.
3305         (*sync_new_<FETCHOP>si_internal): Remove.
3306         (*sync_new_<FETCHOP>di_internal): Remove.
3307         (sync_new_nand<INT1>): Remove.
3308         (*sync_new_nand<GPR>_internal): Remove.
3309         (*atomic_andsi, *atomic_anddi): Remove.
3310         (*sync_addshort_internal, *sync_subshort_internal): Remove.
3311         (*sync_andsi_internal, *sync_boolsi_internal): Remove.
3312         (*sync_boolcshort_internal): Remove.
3313         (sync_lock_release<INT1>): Remove.
3314         (atomic_compare_and_swap<INT1>): New.
3315         (atomic_exchange<INT1>): New.
3316         (atomic_<FETCHOP><INT1>, atomic_nand<INT1>): New.
3317         (atomic_fetch_<FETCHOP><INT1>, atomic_fetch_nand<INT1>): New.
3318         (atomic_<FETCHOP>_fetch<INT1>, atomic_nand_fetch<INT1>): New.
3319
3320 2011-11-14  Uros Bizjak  <ubizjak@gmail.com>
3321
3322         * config/i386/sse.md (round<mode>2): Use register_operand for
3323         operand 1 predicate.
3324         (round<mode>2_sfix): Ditto.
3325         (round<mode>2_vec_pack_sfix): Ditto for operand 1 and operand 2.
3326
3327 2011-11-14  Nathan Sidwell  <nathan@acm.org>
3328
3329         * gcov.c (canonicalize_name): Protect use of S_ISLNK.
3330
3331 2011-11-14  Jan Hubicka  <jh@suse.cz>
3332
3333         PR target/51126
3334         * config/i386/i386.c (core cost model): Correct pasto.
3335
3336 2011-11-14  Uros Bizjak  <ubizjak@gmail.com>
3337
3338         * config/i386/sse.md (round<mode>2_sfix): New expander.
3339         (round<mode>2_vec_pack_sfix): Ditto.
3340         (<sse4_1>_round<ssemodesuffix>_sfix<avxsizesuffix>): Ditto.
3341         (<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
3342         * config/i386/builtin-types.def (V4SI_FTYPE_V4SF_ROUND,
3343         V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND,
3344         V8SI_FTYPE_V4DF_V4DF_ROUND): New builtin types.
3345         * config/i386/i386.c (ix86_builtins): Add
3346         IX86_BUILTIN_{FLOORPD,CEILPD,ROUNDPD_AZ}_VEC_PACK_SFIX{,256} and
3347         IX86_BUILTIN_{FLOORPS,CEILPS,ROUNDPS_AZ}_SFIX{,256} defines.
3348         (bdesc_args): Add __builtin_ia32_{floorpd,ceilpd}_vec_pack_sfix{,256},
3349         __builtin_ia32_roundpd_az_vec_pack_sfix{,256},
3350         __builtin_ia32_{floorps,ceilps}_sfix{,256}and
3351         __builtin_ia32_roundps_az_sfix{,256} descriptions.
3352         (ix86_expand_sse_round_vec_pack_sfix): New.
3353         (ix86_expand_args_builtin): Handle V4SI_FTYPE_V4SF_ROUND,
3354         V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND and
3355         V8SI_FTYPE_V4DF_V4DF_ROUND types.  Check last argument of
3356         CODE_FOR_sse4_1_roundpd_vec_pack_sfix, CODE_FOR_sse4_1_roundps_sfix,
3357         CODE_FOR_avx_roundpd_vec_pack_sfix256 and CODE_FOR_avx_roundps_sfix256.
3358         (ix86_builtin_vectorized_function): Handle
3359         BUILT_IN_{I,L,LL}FLOOR{,F}, BUILT_IN_{I,L,LL}CEIL{,F} and
3360         BUILT_IN_{I,L,LL}ROUND{,F}
3361
3362 2011-11-14  Jan Hubicka  <jh@suse.cz>
3363
3364         PR middle-end/50598
3365         * cgraph.h (varpool_externally_visible_p): Declare.
3366         (varpool_add_new_variable): Declare.
3367         * tree-emultls.c (get_emutls_init_templ_addr,
3368         new_emutls_decl): Use varpool_add_new_variable.
3369         * ipa.c (varpool_externally_visible_p): Export.
3370         * varpool.c (varpool_add_new_variable): New function.
3371
3372 2011-11-14  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>
3373             Jan Hubicka  <jh@suse.cz>
3374
3375         * config/i386/i386.h (processor_costs): Add second dimension to
3376         stringop_algs array.
3377         * config/i386/i386.c (cost models): Initialize second dimension of
3378         stringop_algs arrays.
3379         (core_cost): New costs based on generic64 costs with updated stringop
3380         values.
3381         (promote_duplicated_reg): Add support for vector modes, add
3382         declaration.
3383         (promote_duplicated_reg_to_size): Likewise.
3384         (processor_target): Set core costs for core variants.
3385         (expand_set_or_movmem_via_loop_with_iter): New function.
3386         (expand_set_or_movmem_via_loop): Enable reuse of the same iters in
3387         different loops, produced by this function.
3388         (emit_strset): New function.
3389         (expand_movmem_epilogue): Add epilogue generation for bigger sizes,
3390         use SSE-moves where possible.
3391         (expand_setmem_epilogue): Likewise.
3392         (expand_movmem_prologue): Likewise for prologue.
3393         (expand_setmem_prologue): Likewise.
3394         (expand_constant_movmem_prologue): Likewise.
3395         (expand_constant_setmem_prologue): Likewise.
3396         (decide_alg): Add new argument align_unknown.  Fix algorithm of
3397         strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop
3398         (decide_alignment): Update desired alignment according to chosen move
3399         mode.
3400         (ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves.
3401         (ix86_expand_setmem): Likewise.
3402         (ix86_slow_unaligned_access): Implementation of new hook
3403         slow_unaligned_access.
3404         * config/i386/i386.md (strset): Enable half-SSE moves.
3405         * config/i386/sse.md (vec_dupv4si): Add expand for vec_dupv4si.
3406         (vec_dupv2di): Add expand for vec_dupv2di.
3407
3408 2011-11-14  Dimitrios Apostolou  <jimis@gmx.net>
3409
3410         PR bootstrap/51094
3411         PR middle-end/51116
3412         * config/elfos.h (TARGET_ASM_INTERNAL_LABEL): Remove.
3413         * varasm.c (default_elf_internal_label): Remove.
3414
3415 2011-11-14  Kai Tietz  <ktietz@redhat.com>
3416
3417         * gcov.c (generate_results): Add missing semicolon and correct indent.
3418
3419 2011-11-14  Ira Rosen  <ira.rosen@linaro.org>
3420
3421         PR bootstrap/51112
3422         * tree-vect-stmts.c (vectorizable_condition): Initialize comp_vectype.
3423
3424 2011-11-14  Mingjie Xing  <mingjie.xing@gmail.com>
3425
3426         * doc/invoke.texi (Wunused-result): Change @pxref{Variable Attributes}
3427         to @pxref{Function Attributes}.
3428
3429 2011-11-13  Oleg Endo  <oleg.endo@t-online.de>
3430
3431         PR target/50694
3432         * config/sh/sh.h (IS_LITTLE_ENDIAN_OPTION, UNSUPPORTED_SH2A):
3433         New macros.
3434         (DRIVER_SELF_SPECS): Use new macros to filter out unsupported options
3435         taking the default configuration into account.
3436
3437 2011-11-13  Jonathan Wakely  <jwakely.gcc@gmail.com>
3438
3439         * doc/install.texi (Specific): Fix anchor for
3440         x86_64-*-solaris2.1[0-9]*.
3441
3442 2011-11-13  Nathan Sidwell  <nathan@acm.org>
3443
3444         * gcov.c (source_prefix, source_length): New globals.
3445         (flag_relative_only): Likewise.
3446         (print_usage, options, process_args): Update.
3447         (generate_results): Use coverage.name, check
3448         flag_relative_only. Adjust messages.
3449         (find_source): Check s