OSDN Git Service

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