OSDN Git Service

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