OSDN Git Service

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