OSDN Git Service

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