OSDN Git Service

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