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