OSDN Git Service

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