OSDN Git Service

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