OSDN Git Service

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