OSDN Git Service

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