OSDN Git Service

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