OSDN Git Service

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