OSDN Git Service

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