OSDN Git Service

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