OSDN Git Service

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