1 2011-12-22 Richard Guenther <rguenther@suse.de>
4 * lto.c (uniquify_nodes): Register TYPE_DECLs with the
7 2011-12-22 Bernd Schmidt <bernds@codesourcery.com>
9 * tree-pass.h (pass_reload): Declare.
10 * ira.c (overall_cost_before, saved_flag_ira_share_spill_slots):
11 New global variables, moved out of ira.
12 (do_reload): New static function, split off from the second half
16 (pass_ira): Use TV_IRA, set gate to NULL, and set flags to
18 (rest_of_handle_reload): New static function.
21 2011-12-22 Uros Bizjak <ubizjak@gmail.com>
23 * common/config/i386/i386-common.c (ix86_option_optimization_table):
24 Move OPT_free processing from ...
25 * config/i386/i386.c (ix86_option_override_internal): ... here.
27 2011-12-21 Richard Earnshaw <rearnsha@arm.com>
30 * arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a
31 weak function on bare-metal EABI targets.
33 2011-12-21 Jonathan Wakely <jwakely.gcc@gmail.com>
34 Jim Avera <james_avera@yahoo.com>
36 * doc/extend.texi (__builtin_expect): Improve example.
38 2011-12-21 Uros Bizjak <ubizjak@gmail.com>
40 * config/i386/i386.c (ix86_option_override_internal): Enable flag_ree
41 also for 32bit targets.
43 2011-12-21 Richard Henderson <rth@redhat.com>
46 * dwarf2cfi.c (dwarf2out_frame_debug): Move any_cfis_emitted code...
47 (scan_trace): ... here.
49 2011-12-21 Jason Merrill <jason@redhat.com>
51 * doc/standards.texi (C++ language): Update for C++11.
53 2011-12-21 Jakub Jelinek <jakub@redhat.com>
55 * tree-vect-patterns.c (vect_operation_fits_smaller_type): Initialize
56 *op0 and *op1 to NULL_TREE first to avoid warnings.
57 * calls.c (initialize_argument_information): Initialize base to avoid
62 * tree-eh.c (decide_copy_try_finally): At -O0, return true
63 even when ndests is not 1, if there are only gimple_clobber_p
64 (or debug) stmts in the finally sequence.
65 * tree-inline.c (estimate_num_insns): Return 0 for gimple_clobber_p
68 2011-12-21 Aldy Hernandez <aldyh@redhat.com>
71 * trans-mem.c (tm_log_add): Use create_tmp_var_reg.
73 2011-12-21 Martin Jambor <mjambor@suse.cz>
75 * tree-into-ssa.c (rewrite_update_stmt): Do not dump extra newlines.
76 (rewrite_update_enter_block): Likewise.
77 (dump_update_ssa): Likewise.
78 (update_ssa): Likewise but also dump a newline at the beginning.
80 2011-12-21 Enkovich Ilya <ilya.enkovich@intel.com>
83 * implicit-zee.c: Delete.
85 * Makefile.in: Replace implicit-zee.c with ree.c.
86 * config/i386/i386.c (ix86_option_override_internal): Rename
88 * common.opt (fzee): Ignored.
90 * passes.c (init_optimization_passes): Replace pass_implicit_zee
92 * tree-pass.h (pass_implicit_zee): Delete.
94 * timevar.def (TV_ZEE): Delete.
96 * doc/invoke.texi: Add -free description.
98 2011-12-21 Tristan Gingold <gingold@adacore.com>
100 * config/vms/vms-protos.h (vms_function_section): New prototype.
101 * config/vms/vms.c (vms_function_section): New function.
102 * config/vms/vms.h (TARGET_ASM_FUNCTION_SECTION): Define.
104 2011-12-21 Richard Guenther <rguenther@suse.de>
107 * tree-outof-ssa.c (insert_value_copy_on_edge): Use the
108 mode of the pseudo as destination mode. Only assert that
109 is equal to the promoted mode of the decl if it is a REG.
111 2011-12-21 Tristan Gingold <gingold@adacore.com>
113 * config/vms/xm-vms.h (STANDARD_EXEC_PREFIX): Remove define.
115 2011-12-20 Richard Henderson <rth@redhat.com>
117 * config/ia64/ia64.c (MAX_VECT_LEN): New.
118 (struct expand_vec_perm_d): New.
119 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): New.
120 (ia64_unpack_assemble): Use ia64_expand_vec_perm_const_1.
121 (expand_vselect, expand_vselect_vconcat): New.
122 (expand_vec_perm_identity, expand_vec_perm_shrp): New.
123 (expand_vec_perm_1, expand_vec_perm_broadcast): New.
124 (expand_vec_perm_interleave_2, expand_vec_perm_v4hi_5): New.
125 (ia64_expand_vec_perm_const_1, ia64_expand_vec_perm_const): New.
126 (ia64_vectorize_vec_perm_const_ok): New.
127 (ia64_expand_vec_setv2sf, ia64_expand_vec_perm_even_odd): New.
128 * config/ia64/ia64-protos.h: Update.
129 * config/ia64/vect.md (VEC): New mode iterator.
130 (vecint): New mode attribute.
131 (vec_interleave_lowv8qi, vec_interleave_highv8qi): Privatize with '*'.
132 (vec_interleave_lowv4hi, vec_interleave_highv4hi): Likewise.
133 (vec_interleave_lowv2si, vec_interleave_highv2si): Likewise.
134 (vec_interleave_lowv2sf, vec_interleave_highv2sf): Likewise.
135 (mix1_even, mix1_odd, mux1_alt): Likewise.
136 (mux1_brcst_qi): Remove '*' from name.
137 (vec_extract_evenv8qi, vec_extract_oddv8qi): Remove.
138 (vec_extract_evenv4hi, vec_extract_oddv4hi): Remove.
139 (vec_extract_evenv2si, vec_extract_oddv2si): Remove.
140 (vec_extract_evenv2sf, vec_extract_oddv2sf): Remove.
141 (vec_extract_evenodd_helper): Remove.
142 (vec_setv2sf): Use ia64_expand_vec_setv2sf.
143 (vec_pack_trunc_v4hi): Use ia64_expand_vec_perm_even_odd.
144 (vec_pack_trunc_v2si): Likewise.
145 (vec_perm_const<VEC>): New.
147 2011-12-20 Richard Henderson <rth@redhat.com>
149 * tree-vect-generic.c (expand_vector_operations_1): Correct tests
150 for vector types -- use the type not the mode. Fix optab selection
151 for vector shifts by a scalar. Handle over-large integer modes
154 2011-12-20 Richard Henderson <rth@redhat.com>
156 * config/arm/arm.md (*arm_xorsi3): Match iorsi3 and perform
157 post-reload splitting.
159 * config/arm/arm.md (*arm_cmpdi_unsigned): Enable for thumb2.
160 * config/arm/arm.c (arm_select_cc_mode): Use it.
162 2011-12-20 Richard Sandiford <rdsandiford@googlemail.com>
164 * tree-ssa-math-opts.c (convert_plusminus_to_widen): Restrict
165 handling of signedness differences to integer types. Only build
166 a new optype if type1 isn't correct.
168 2011-12-20 Vladimir Makarov <vmakarov@redhat.com>
171 * ira-costs.c (find_costs_and_classes): Prefer registers even
172 if the memory cost is the same.
174 2011-12-20 Joseph Myers <joseph@codesourcery.com>
176 * c-decl.c (diagnose_mismatched_decls, grokdeclarator, grokfield)
177 (finish_struct): Refer to C11 in comments. Use flag_isoc11.
178 * c-parser.c (c_parser_static_assert_declaration)
179 (c_parser_static_assert_declaration_no_semi, c_parser_declspecs)
180 (c_parser_alignas_specifier, c_parser_alignof_expression): Refer
181 to C11 in comments. Use flag_isoc11.
182 * c-typeck.c (comptypes_check_different_types): Refer to C11 in
184 * doc/cpp.texi (Overview): Refer to -std=c11 instead of -std=c1x.
185 * doc/cppopts.texi (-std=c11, -std=gnu11): Document in preference
186 to -std=c1x and -std=gnu1x.
187 * doc/extend.texi (Inline, Alternate Keywords, Other Builtins)
188 (__builtin_complex, Unnamed Fields): Refer to -std=c11 and C11
189 instead of -std=c1x and C1X.
190 * doc/invoke.texi (-std=c11, -std=iso9899:2011): Document in
191 preference to -std=c1x.
192 (-std=gnu11): Document in preference to -std=gnu1x.
193 * doc/standards.texi: Document C11 instead of C1X. Document C11
194 as actual standard. Document headers required from freestanding
196 * ginclude/float.h, ginclude/stddef.h: Test __STDC_VERSION__ >=
197 201112L for C11. Update comments to refer to C11.
199 2011-12-20 Andreas Schwab <schwab@linux-m68k.org>
201 * configure: Regenerate.
203 2011-12-20 Bernd Schmidt <bernds@codesourcery.com>
206 * expr.c (store_field): Avoid a direct store if the mode is larger
207 than the size of the bit field.
208 * stor-layout.c (layout_decl): If flag_strict_volatile_bitfields,
209 treat non-volatile bit fields like volatile ones.
210 * toplev.c (process_options): Disallow combination of
211 -fstrict-volatile-bitfields and ABI versions less than 2.
212 * config/arm/arm.c (arm_option_override): Don't enable
213 flag_strict_volatile_bitfields if the ABI version is less than 2.
214 * config/h8300/h8300.c (h8300_option_override): Likewise.
215 * config/rx/rx.c (rx_option_override): Likewise.
216 * config/m32c/m32c.c (m32c_option_override): Likewise.
217 * config/sh/sh.c (sh_option_override): Likewise.
219 2011-12-20 Richard Guenther <rguenther@suse.de>
222 * dwarf2out.c (modified_type_die): When the type variant
223 chain is corrupt use the types name, if available, instead
226 2011-12-20 Tristan Gingold <gingold@adacore.com>
228 * config/alpha/alpha.c (alpha_start_function): Adjust condition to
229 create VMS trampoline entry point.
231 2011-12-19 Richard Sandiford <rdsandiford@googlemail.com>
233 PR rtl-optimization/42839
234 * fwprop.c (forward_propagate_subreg): Skip the SIGN/ZERO_EXTEND
235 optimization if the source register is already extended.
237 2011-12-19 Richard Sandiford <rdsandiford@googlemail.com>
239 * lower-subreg.c (can_decompose_p): Check every word of a hard
242 2011-12-19 Sandra Loosemore <sandra@codesourcery.com>
243 Tom de Vries <tom@codesourcery.com>
246 * cse.c (find_comparison_args): Detect fixed point and
249 2011-12-19 Aldy Hernandez <aldyh@redhat.com>
252 * trans-mem.c (ipa_tm_create_version): Unset DECL_WEAK.
254 2011-12-19 Quentin Neill <quentin.neill@amd.com>
257 * config/i386/driver-i386.c (host_detect_local_cpu): Also check
258 family to distinguish PROCESSOR_ATHLON.
260 2011-12-19 Richard Guenther <rguenther@suse.de>
263 * streamer-hooks.h (struct streamer_hooks): Add second
264 ref_p parameter to write_tree.
265 (stream_write_tree): Adjust.
266 (stream_write_tree_shallow_non_ref): New define.
267 * lto-streamer.h (lto_output_tree): Adjust.
268 * lto-streamer-out.c (lto_output_tree): Likewise.
269 * tree-streamer-out.c (streamer_write_chain): Only
270 force the immediate tree to be streamed as non-reference.
272 2011-12-19 Martin Jambor <mjambor@suse.cz>
274 PR tree-optimization/51583
275 * tree-sra.c (load_assign_lhs_subreplacements): Call
276 force_gimple_operand_gsi when necessary also in case of no
277 corresponding replacement on the RHS.
279 2011-12-19 Jakub Jelinek <jakub@redhat.com>
281 * gimple.h (gimplify_seq_add_stmt): Rename to...
282 (gimple_seq_add_stmt_without_update): ... this.
283 * gimplify.c (gimplify_seq_add_stmt): Rename to...
284 (gimple_seq_add_stmt_without_update): ... this.
285 (gimplify_seq_add_stmt): New inline wrapper for it.
286 * tree-vect-patterns.c (append_pattern_def_seq): Use
287 gimple_seq_add_stmt_without_update instead of gimplify_seq_add_stmt.
289 PR tree-optimization/51596
290 * tree-cfg.c (replace_uses_by): Call gimple_purge_dead_eh_edges
294 PR tree-optimization/51606
295 * tree-vect-patterns.c (append_pattern_def_seq, new_pattern_def_seq):
296 New inline functions.
297 (vect_recog_over_widening_pattern,
298 vect_recog_vector_vector_shift_pattern,
299 vect_recog_sdivmod_pow2_pattern, vect_recog_mixed_size_cond_pattern,
300 adjust_bool_pattern_cast, vect_recog_bool_pattern): Use them.
302 2011-12-19 Richard Guenther <rguenther@suse.de>
305 * tree.c (free_lang_data_in_type): Do not unlink TYPE_DECL
307 (find_decls_types_r): Walk TYPE_DECLs in TYPE_FIELDS.
308 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Do
309 not stream TREE_CHAIN.
310 (write_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
311 using streamer_write_chain.
312 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
313 Do not stream TREE_CHAIN.
314 (lto_input_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
315 using streamer_read_chain.
316 * gimple-streamer-in.c (input_gimple_stmt): Skip non-FIELD_DECLs.
317 * gimple.c (gimple_canonical_types_compatible_p): Properly
318 handle trailing non-FIELD_DECLs in TYPE_FIELDS.
320 2011-12-19 Andreas Schwab <schwab@linux-m68k.org>
322 * configure: Regenerate.
324 2011-12-19 Bernd Schmidt <bernds@codesourcery.com>
326 * emit-rtl.c (init_emit_once): Initialize const_tiny_rtx[3] for
327 partial integer modes.
329 2011-12-19 Andreas Schwab <schwab@linux-m68k.org>
332 * config/m68k/m68k.h (FL_CAS, TARGET_CAS): Define.
333 * config/m68k/m68k.c (FL_FOR_isa_20): Add FL_CAS.
334 * config/m68k/sync.md: Use TARGET_CAS instead of (TARGET_68020 ||
337 2011-12-18 Anatoly Sokolov <aesok@post.ru>
339 * config/ia64/ia64.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P,
340 LEGITIMATE_ADDRESS_REG, LEGITIMATE_ADDRESS_DISP,
341 GO_IF_LEGITIMATE_ADDRESS): Remove macros.
342 * config/ia64/ia64.c (TARGET_LEGITIMATE_ADDRESS_P): Define.
343 (ia64_reg_ok_for_base_p, ia64_legitimate_address_reg,
344 ia64_legitimate_address_disp, ia64_legitimate_address_p): New
347 2011-12-17 Tom de Vries <tom@codesourcery.com>
349 PR tree-optimization/51491
350 * tree-ssa-ccp.c (insert_clobber_before_stack_restore)
351 (gsi_prev_dom_bb_nondebug, insert_clobbers_for_var): New function.
352 (ccp_fold_stmt): Use insert_clobbers_for_var after a successful
353 fold_builtin_alloca_with_align.
354 (ccp_visit_stmt): Calculate and free dominator info.
356 2011-12-16 Eric Botcazou <ebotcazou@adacore.com>
358 * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
359 (frame_blockage): New expander.
360 (frame_blockage<P:mode>): New instruction.
361 * config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
362 instructions establishing the frame isn't atomic, emit frame blockage.
364 2011-12-16 Tristan Gingold <gingold@adacore.com>
366 * config/alpha/vms.h (USE_TM_CLONE_REGISTRY): Define.
368 2011-12-16 Tristan Gingold <gingold@adacore.com>
370 * config/alpha/alpha.c (alpha_use_linkage): Follow transparent alias.
371 (alpha_write_one_linkage): Use assemble_name to emit linkage name.
373 2011-12-16 Tristan Gingold <gingold@adacore.com>
375 * config/vms/t-vms (vms.o, vms-c.o): Force output filename.
377 2011-12-16 Tristan Gingold <gingold@adacore.com>
379 * config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
380 (vms_patch_builtins): Handle.
381 * config/vms/vms-crtlmap.map: Add an entry for environ.
383 2011-12-16 Jakub Jelinek <jakub@redhat.com>
386 * sel-sched-ir.c (create_copy_of_insn_rtx): Copy all notes
387 other than REG_EQUAL, REG_EQUIV and REG_LABEL_OPERAND.
389 PR tree-optimization/51576
390 * tree-cfg.c (replace_uses_by): Call maybe_clean_or_replace_eh_stmt
391 even if fold_stmt didn't change anything.
393 2011-12-16 Richard Guenther <rguenther@suse.de>
396 * dwarf2out.c (gen_type_die_with_usage): Use the context of
397 the TYPE_DECL as well if it is file-scope.
399 2011-12-15 DJ Delorie <dj@redhat.com>
401 * config/rl78/rl78.md (return): Rename to rl78_return.
402 * config/rl78/rl78.c (rl78_expand_epilogue): Use new name.
403 (rl78_expand_eh_epilogue): Use new name.
404 (rl78_calculate_death_notes): Likewise.
406 2011-12-15 Jakub Jelinek <jakub@redhat.com>
408 * tree-vectorizer.h (struct _stmt_vec_info): Remove pattern_def_stmt
409 field, add pattern_def_seq.
410 (STMT_VINFO_PATTERN_DEF_STMT): Remove.
411 (STMT_VINFO_PATTERN_DEF_SEQ): Define.
412 (NUM_PATTERNS): Bump to 10.
413 * tree-vect-loop.c (vect_determine_vectorization_factor,
414 vect_transform_loop): Adjust for pattern def changing from a single
415 gimple stmt to gimple_seq.
416 * tree-vect-stmts.c (vect_analyze_stmt, new_stmt_vec_info,
417 free_stmt_vec_info): Likewise.
418 * tree-vect-patterns.c (vect_recog_over_widening_pattern,
419 vect_recog_vector_vector_shift_pattern,
420 vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast,
421 adjust_bool_pattern, vect_mark_pattern_stmts): Likewise.
422 (vect_recog_sdivmod_pow2_pattern): New function.
423 (vect_vect_recog_func_ptrs): Add it.
425 * config/i386/sse.md (vcond<V_256:mode><VI_256:mode>,
426 vcond<V_128:mode><VI124_128:mode>, vcond<VI8F_128:mode>v2di):
427 Use general_operand instead of nonimmediate_operand for
428 operand 5 and no predicate for operands 1 and 2.
429 * config/i386/i386.c (ix86_expand_int_vcond): Optimize
430 x < 0 ? -1 : 0 and x < 0 ? 1 : 0 into vector arithmetic
433 2011-12-15 Georg-Johann Lay <avr@gjlay.de>
435 * config/avr/avr-protos.h (print_operand): Remove.
436 (print_operand_address): Remove.
437 * config/avr/avr.h (PRINT_OPERAND): Remove.
438 (PRINT_OPERAND_ADDRESS): Remove.
439 (PRINT_OPERAND_PUNCT_VALID_P): Remove.
440 * config/avr/avr.c (TARGET_PRINT_OPERAND): New hook define.
441 (TARGET_PRINT_OPERAND_ADDRESS): New hook define.
442 (TARGET_PRINT_OPERAND_PUNCT_VALID_P): New hook define.
443 (print_operand_address): Rename to...
444 (avr_print_operand_address): ...this and make static.
445 (print_operand): Rename to...
446 (avr_print_operand): ...this and make static.
447 (avr_print_operand_punct_valid_p): New static function.
449 2011-12-15 Andreas Tobler <andreast@fgznet.ch>
451 * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define.
453 2011-12-15 Jakub Jelinek <jakub@redhat.com>
456 * c-parser.c (c_parser_omp_clause_num_threads,
457 c_parser_omp_clause_schedule): Call mark_exp_read.
459 2011-12-15 Romain Geissler <romain.geissler@gmail.com>
461 * builtins.def (BUILT_IN_STPNCPY_CHK): New definition.
462 * builtins.c (expand_builtin, fold_builtin_4, maybe_emit_chk_warning):
463 Add BUILT_IN_STPNCPY_CHK case.
464 * gimple-fold.c (gimple_fold_builtin): Likewise.
465 * tree-object-size.c (pass_through_call): Likewise.
466 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
467 call_may_clobber_ref_p_1): Likewise.
468 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call,
469 find_func_clobbers): Likewise.
470 * tree.h (fold_builtin_strncpy_chk): Rename to fold_builtin_stxncpy_chk
471 * builtins.c (fold_builtin_strncpy_chk): Likewise.
472 Rewrite stpncpy_chk calls to strncpy_chk calls if returned value is
475 2011-12-15 Richard Guenther <rguenther@suse.de>
478 * gimple.c (compare_type_names_p): Also compare the TREE_CODE.
479 (iterative_hash_name): Also hash the TREE_CODE.
480 (gimple_types_compatible_p_1): For types with a TYPE_DECL
481 name and a type DECL_CONTEXT recurse to that type.
482 (iterative_hash_gimple_type): Likewise.
484 2011-12-15 Iain Sandoe <iains@gcc.gnu.org>
486 * config/rs6000/rs6000.c (rs6000_emit_prologue): Move update of
487 VRSave mask to save_world() when that is in use.
489 2011-12-15 Richard Guenther <rguenther@suse.de>
491 * lto-wrapper.c (run_gcc): In non-parallel mode remove
492 ltrans inputs immediately after processing them. In parallel
493 mode truncate the ltrans inputs in the make rule that processes
494 them if temporary files are not to be preserved.
496 2011-12-15 Anatoly Sokolov <aesok@post.ru>
498 * config/arm/arm.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
499 * config/arm/arm.c (arm_memory_move_cost, arm_register_move_cost):
501 (TARGET_REGISTER_MOVE_COST, TARGET_MEMORY_MOVE_COST): Define.
503 2011-12-15 Richard Guenther <rguenther@suse.de>
506 * tree.h (REGISTER_DEFS_IN_THIS_STMT, NECESSARY,
507 STMT_IN_SSA_EDGE_WORKLIST): Remove no longer existing flag
509 (TREE_ASM_WRITTEN): Update documentation to mention its use
510 on TYPE_DECLs from debug info generation.
511 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
512 TREE_ASM_WRITTEN as always zero for TYPE_DECLs, similar to
515 2011-12-15 Georg-Johann Lay <avr@gjlay.de>
518 * config/avr/avr.c (expand_epilogue): Don't build SUBREG of fp.
519 (avr_prologue_setup_frame): Ditto.
521 2011-12-15 Jakub Jelinek <jakub@redhat.com>
524 * tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test
525 !DECL_IGNORED_P instead of !DECL_ARTIFICIAL.
527 2012-12-15 Richard Guenther <rguenther@suse.de>
531 * lto-streamer-out.c (tree_is_indexable): Exclude block-local
536 * tree-streamer-out.c (streamer_write_chain): Stream DECL_EXTERNAL
537 VAR_DECLs and FUNCTION_DECLs locally.
539 2011-12-14 Richard Henderson <rth@redhat.com>
541 * config/arm/arm.md (*addsi3_compare0_scratch): Set predicable.
542 (*compare_negsi_si, *compare_addsi2_op0): Likewise.
543 (*compare_addsi2_op1, *zeroextractsi_compare0_scratch): Likewise.
544 (*compareqi_eq0, *arm_cmpsi_insn, *arm_cmpsi_negshiftsi_si): Likewise.
546 2011-12-14 Richard Guenther <rguenther@suse.de>
548 * tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for
549 propagating all kinds of constants.
551 2011-12-14 Richard Guenther <rguenther@suse.de>
554 * lto-streamer-in.c (lto_read_body): Fixup local types
555 TYPE_CANONICAL and variant chain.
557 2011-12-14 Richard Guenther <rguenther@suse.de>
559 * tree.c (free_lang_data_in_type): Do not clear fields
560 dependent on debuginfo level setting.
561 (find_decls_types_r): Use TYPE_STUB_DECL rathern than TREE_CHAIN.
562 * tree.h (TYPE_STUB_DECL): Properly check that we access a type.
564 2011-12-14 Georg-Johann Lay <avr@gjlay.de>
567 * config/avr/avr.md (mulpsi3): New expander.
568 (*umulqihipsi3, *umulhiqipsi3): New insns.
569 (*mulsqipsi3.libgcc, *mulpsi3.libgcc): New insns.
570 (mulsqipsi3, *mulpsi3): New insn-and-splits.
571 (ashlpsi3): Turn to expander. Move insn code to...
572 (*ashlpsi3): ...this new insn.
574 2011-12-14 Richard Guenther <rguenther@suse.de>
576 * tree-cfg.c (replace_uses_by): Only mark blocks altered
577 that will make a difference. Only recompute ADDR_EXPR
578 invariantness if it could possibly have changed. Do so
579 before folding the statement.
581 2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
583 * lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
584 * lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
585 * lto-streamer-in.c (lto_read_body): Likewise.
586 (lto_input_toplevel_asms): Likewise.
587 * lto-section-in.c (lto_create_simple_input_block): Likewise.
588 * ipa-inline-analysis.c (inline_read_section): Likewise.
589 * ipa-prop.c (ipa_prop_read_section): Likewise.
591 * df.h (DF_NOTE): Fix typo in comment.
593 2011-12-13 Aldy Hernandez <aldyh@redhat.com>
595 * trans-mem.c (ipa_tm_create_version_alias): Set DECL_CONTEXT and
598 2011-12-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
600 * regmove.c (fixup_match_2): Only access call_used_regs with hard regs.
602 2011-12-13 Andrew Pinski <apinski@cavium.com>
603 Adam Nemet <anemet@caviumnetworks.com>
605 * config/mips/mips-cpus.def: Add Octeon2.
606 * config/mips/mips-tables.opt: Regenerate.
607 * config/mips/mips.md (define_attr "cpu"): Add Octeon2.
608 * config/mips/driver-native.c (host_detect_local_cpu): Support Octeon2.
609 * config/mips/octeon.md (octeon_arith): Add Octeon2.
610 (octeon_condmove): Likewise.
611 (octeon_load): Rename to ..
612 (octeon_load_o1): this.
613 (octeon_load_o2): New reserve.
614 (octeon_cop_o2): New reserve.
615 (octeon_store): Match Octeon2 also.
616 (octeon_brj): Rename to ..
617 (octeon_brj_o1): this.
618 (octeon_brj_o2): New reserve.
619 (octeon_imul3): Rename to ...
620 (octeon_imul3_o1): this.
621 (octeon_imul3_o2): New reserve.
622 (octeon_imul): Rename to ...
623 (octeon_imul_o1): this.
624 (octeon_imul_o2): New reserve.
625 (octeon_mfhilo): Rename to ...
626 (octeon_mfhilo_o1): This.
627 (octeon_mfhilo_o2): New reserve.
628 (octeon_imadd): Rename to ...
629 (octeon_imadd_o1): this.
630 (octeon_imadd_o2): New reserve.
631 (octeon_idiv): Rename to ..
632 (octeon_idiv_o1): This.
633 (octeon_idiv_o2_si): New reserve.
634 (octeon_idiv_o2_di): Likewise.
635 (octeon_unknown): Match Octeon2 also.
636 * config/mips/mips.c (mips_rtx_cost_data): Add Octeon2 cost data.
637 (mips_issue_rate): Octeon2 can issue 2 at a time.
638 * config/mips/mips.h (TARGET_OCTEON): Match Octeon2 also.
639 (TARGET_OCTEON2): New define.
640 (TUNE_OCTEON): Match Octeon2 also.
642 2011-12-13 Richard Henderson <rth@redhat.com>
644 * config/sparc/tso.h: New file.
645 * config.gcc (sparc-*-linux*, sparc*-*-solaris2*): Use it.
646 * config/sparc/sparc.c (sparc_option_override): Honor
647 SUBTARGET_DEFAULT_MEMORY_MODEL.
648 * config/sparc/sparc.h (SUBTARGET_DEFAULT_MEMORY_MODEL): New.
650 2011-12-13 Aldy Hernandez <aldyh@redhat.com>
653 * trans-mem.c (struct diagnose_tm): Remove saw_unsafe.
654 (diagnose_tm_1): Same.
655 (ipa_tm_execute): Do not test tm_may_enter_irr before we set it.
656 (ipa_tm_scan_irr_function): Return gracefully when no
657 DECL_STRUCT_FUNCTION.
658 (ipa_tm_scan_irr_block): Believe the user on TM attributes.
660 2011-12-13 Martin Jambor <mjambor@suse.cz>
663 * tree-sra.c (propagate_subaccesses_across_link): Do not propagate
664 sub-accesses of scalar accesses.
666 2011-12-13 Martin Jambor <mjambor@suse.cz>
668 PR tree-optimization/51362
669 * ipa-cp.c (estimate_local_effects): When estimated size of a
670 specialized clone is zero, bump it to one.
672 2011-12-13 Richard Guenther <rguenther@suse.de>
675 * tree.c (find_decls_types_r): Also walk DECL_ORIGINAL_TYPE.
676 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
677 Stream DECL_ORIGINAL_TYPE.
678 * tree-streamer-out.c (write_ts_decl_non_common_tree_pointers):
681 2011-12-13 Jakub Jelinek <jakub@redhat.com>
684 2011-12-12 Jakub Jelinek <jakub@redhat.com>
686 PR tree-optimization/51481
687 * gimple-fold.c (gimple_fold_call): Call
688 maybe_clean_or_replace_eh_stmt. Avoid optimization if stmt has EH
689 edges, but gimple_fold_builtin result can't throw.
691 2011-12-13 Jakub Jelinek <jakub@redhat.com>
692 Michael Matz <matz@suse.de>
694 PR tree-optimization/51117
695 * tree-eh.c (sink_clobbers): New function.
696 (execute_lower_eh_dispatch): Call it for BBs ending with
697 internally throwing RESX.
698 * cfgexpand.c (add_scope_conflicts_1): Add all conflicts only
699 at the first real instruction.
701 2011-12-13 Tristan Gingold <gingold@adacore.com>
703 * final.c (final_scan_insn): Guard the call to begin_epilogue
706 2011-12-13 Tristan Gingold <gingold@adacore.com>
708 * vmsdbgout.c (vmsdbgout_write_source_line): New function.
709 (vmsdbgout_end_prologue): Call vmsdbgout_write_source_line.
710 (vmsdbgout_begin_epilogue): Likewise.
711 (vmsdbgout_end_epilogue): Likewise.
712 (vmsdbgout_source_line): Move code to vmsdbgout_write_source_line.
714 2011-12-13 Richard Guenther <rguenther@suse.de>
717 * tree-cfg.c (replace_uses_by): Pass proper arguments to
718 maybe_clean_or_replace_eh_stmt.
720 2011-12-13 Richard Guenther <rguenther@suse.de>
722 PR tree-optimization/51519
723 * ipa-inline.c (edge_badness): Use edge growth in non-guessed
724 branch probability case as well.
726 2011-12-13 Revital Eres <revital.eres@linaro.org>
728 * modulo-sched.c (mark_loop_unsched): Free bbs.
730 2011-12-12 Jakub Jelinek <jakub@redhat.com>
732 PR rtl-optimization/51495
733 * function.c (thread_prologue_and_epilogue_insns): Don't add
734 to bb_tail basic blocks that have EDGE_COMPLEX predecessor edges
735 from basic blocks not needing prologue.
737 PR tree-optimization/51481
738 * gimple-fold.c (gimple_fold_call): Call
739 maybe_clean_or_replace_eh_stmt. Avoid optimization if stmt has EH
740 edges, but gimple_fold_builtin result can't throw.
742 2011-12-12 Vladimir Makarov <vmakarov@redhat.com>
744 PR rtl-optimization/21617
745 * ira-color.c (bucket_allocno_compare_func): Don't compare
746 allocno classes. Compare number of hard registers needed.
748 2011-12-12 Eric Botcazou <ebotcazou@adacore.com>
750 PR tree-optimization/50569
751 * tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
752 in the expression of MODEL instead of just the last one.
754 2011-12-12 Jakub Jelinek <jakub@redhat.com>
757 * calls.c (internal_arg_pointer_based_exp_scan): Don't use
758 VEC_safe_grow_cleared if idx is smaller than VEC_length.
760 2011-12-12 Richard Sandiford <richard.sandiford@linaro.org>
763 * optabs.c (maybe_legitimize_operand_same_code): Use copy_to_mode_reg
764 instead of force_reg. Do nothing if the address is already a
765 non-virtual pseudo register.
767 2011-12-12 Torvald Riegel <triegel@redhat.com>
769 * gimplify.c (voidify_wrapper_expr): Add default handling for
772 2011-12-12 Torvald Riegel <triegel@redhat.com>
774 * tree-ssa-tail-merge.c (gimple_equal_p): Don't treat transaction
777 2011-12-12 Iain Sandoe <iains@gcc.gnu.org>
779 * config/darwin-sections.def (zobj_const_data_section): Fix over-
782 2011-12-11 Richard Henderson <rth@redhat.com>
784 * config/rs6000/rs6000.c (rs6000_expand_interleave): Use
785 BYTES_BIG_ENDIAN, not TARGET_BIG_ENDIAN.
787 2011-12-11 Jakub Jelinek <jakub@redhat.com>
789 PR tree-optimization/51485
790 * tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
793 2011-12-11 Patrick Marlier <patrick.marlier@gmail.com>
795 * trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove edge.
797 2011-12-10 Richard Henderson <rth@redhat.com>
799 * config/rs6000/altivec.md (altivec_vmrghb): Rewrite pattern as
800 vec_select + vec_concat.
801 (altivec_vmrghh, altivec_vmrghw, altivec_vmrghsf, altivec_vmrglb,
802 altivec_vmrglh, altivec_vmrglw, altivec_vmrglsf): Likewise.
803 (vec_perm_constv16qi): New.
804 (vec_extract_evenv4si, vec_extract_evenv4sf, vpkuhum_nomode,
805 vpkuwum_nomode, vec_extract_oddv8hi, vec_extract_oddv16qi,
806 vec_interleave_high<VI>, vec_interleave_low<VI>): Remove.
807 * config/rs6000/paired.md (paired_merge00): Rewrite pattern as
808 vec_select + vec_concat.
809 (paired_merge10, paired_merge01, paired_merge11): Likewise.
810 (vec_perm_constv2sf): New.
811 (vec_interleave_highv2sf, vec_interleave_lowv2sf,
812 vec_extract_evenv2sf, vec_extract_oddv2sf): Remove.
813 * config/rs6000/spe.md (spe_evmergehi): Rewrite pattern as
814 vec_select + vec_concat.
815 (spe_evmergehilo, spe_evmergelo, spe_evmergelohi): New.
816 (vec_perm_constv2si): New.
817 * config/rs6000/vector.md (vec_interleave_highv4sf,
818 vec_interleave_lowv4sf, vec_interleave_high<VEC_64>,
819 vec_interleave_low<VEC_64>): Remove.
820 * config/rs6000/vsx.md (VS_double): New mode attribute.
821 (UNSPEC_VSX_XXPERMDI): Remove.
822 (vsx_xxpermdi_<VSX_L>_1): Rewrite pattern as vec_select + vec_concat.
823 (vsx_xxmrghw_<VSX_W>, vsx_xxmrglw_<VSX_W>): Likewise.
824 (vsx_xxpermdi_<VSX_L>): Change to expander.
825 (vec_perm_const<VSX_D>): New.
826 (vsx_mergel_<VSX_D>, vsx_mergeh_<VSX_D>): New.
827 * config/rs6000/predicates.md (const_0_to_1_operand): New.
828 (const_2_to_3_operand): New.
829 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): New.
830 (altivec_expand_vec_perm_const): New.
831 (rs6000_expand_vec_perm_const_1, rs6000_expand_vec_perm_const): New.
832 (rs6000_vectorize_vec_perm_const_ok): New.
833 (rs6000_do_expand_vec_perm): New.
834 (rs6000_expand_extract_even, rs6000_expand_interleave): New.
835 * config/rs6000/rs6000-builtin.def (VEC_MERGE*): Update rtx codes.
836 * config/rs6000/rs6000-modes.def: Add double-wide vector modes.
837 * config/rs6000/rs6000-protos.h: Update.
839 2011-12-10 Richard Henderson <rth@redhat.com>
841 * expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Avoid passing a
842 CONST_INT to expand_vec_perm as the selector.
843 * optabs.c (expand_vec_perm): Assert the selector is of a proper mode.
845 2011-12-10 Richard Henderson <rth@redhat.com>
847 * genmodes.c (struct mode_data): Remove wider_2x member.
848 (blank_mode): Adjust initializer.
849 (calc_wider_mode): Use XALLOCAVEC.
850 (emit_move_wider): Select double-width same-element vectors for
852 * machmode.h (GET_MODE_2XWIDER_MODE): Update documentation.
853 * config/i386/i386.c (doublesize_vector_mode): Remove.
854 (expand_vselect_vconcat): Use GET_MODE_2XWIDER_MODE instead.
856 2011-12-10 Joern Rennecke <joern.rennecke@embecosm.com>
858 * config/epiphany/epiphany.h (USE_LOAD_POST_INCREMENT): Define.
859 (USE_LOAD_POST_DECREMENT, USE_STORE_POST_INCREMENT): Likewise.
860 (USE_STORE_POST_DECREMENT): Likewise.
862 * config/epiphany/epiphany.h (EPIPHANY_RETURN_REGNO): New macro,
864 (INCOMING_RETURN_ADDR_RTX) .. this. Use EPIPHANY_RETURN_REGNO.
865 (DWARF_FRAME_RETURN_COLUMN): New macro.
867 * config/epiphany/epiphany-protos.h (epiphany_start_function): Declare.
868 * config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute):
869 Split "timer" value into "timer0" and "timer1".
870 Handle page_miss, message and wand. Don't handle static_flag.
872 (epiphany_start_function): New function.
873 (epiphany_compute_function_type): Split "timer" value into "timer0"
874 and "timer1". Handle page_miss, message and wand.
875 Don't handle static_flag.
876 (epiphany_expand_epilogue): Don't use frame_insn for status / iret
878 * config/epiphany/epiphany.h: ASM_DECLARE_FUNCTION_NAME: Define.
879 (enum epiphany_function_type):
880 Split EPIPHANY_FUNCTION_TIMER value into EPIPHANY_FUNCTION_TIMER0
881 and EPIPHANY_FUNCTION_TIMER1.
882 Remove EPIPHANY_FUNCTION_ILINK1 and EPIPHANY_FUNCTION_ILINK2 values.
883 Add EPIPHANY_FUNCTION_PAGE_MISS and EPIPHANY_FUNCTION_MESSAGE values.
884 Rename EPIPHANY_FUNCTION_STATIC_FLAG to EPIPHANY_FUNCTION_WAND.
886 2011-12-10 Nathan Sidwell <nathan@acm.org>
888 PR gcov-profile/51449
889 * coverage.c (coverage_end_function): Always process the coverage
892 2011-12-09 Aldy Hernandez <aldyh@redhat.com>
895 * tree.c (build_common_builtin_nodes): Do not use TM_PURE
896 attribute unless language has support for TM.
897 * config/i386/i386.c (ix86_init_tm_builtins): Exit gracefully in
898 the absence of TM builtins.
900 2011-12-09 Eric Botcazou <ebotcazou@adacore.com>
902 * gimple-fold.c (gimple_fold_stmt_to_constant_1) <GIMPLE_UNARY_RHS>:
903 Also check the TYPE_MODE to recognize useless pointer conversions.
905 2011-12-09 Jakub Jelinek <jakub@redhat.com>
907 PR tree-optimization/51117
908 * tree-eh.c (optimize_clobbers): Don't remove just one
909 clobber, but all consecutive clobbers before RESX.
910 Use gimple_clobber_p predicate.
912 2011-12-09 Michael Meissner <meissner@the-meissners.org>
914 * config/rs6000/rs6000.c (altivec_expand_builtin): Call
915 expand_call to return a valid funciton instead of return
916 cosnt0_rtx/NULL_RTX if there was an error with the builtin.
917 (altivec_expand_ld_builtin): Ditto.
918 (rs6000_inner_target_options): If VSX is selected as a target
919 attribute or pragma, enable ALTIVEC also.
920 (rs6000_pragma_target_parse): Call rs6000_option_override_internal
921 to do all of the standard processing when switching options,
922 including redefining appropriate macros.
924 PR rtl-optimization/51469
925 * varasm.c (default_binds_local_p_1): If the symbol is a gnu
926 indirect function, mark the symbol as non-local.
928 2011-12-09 H.J. Lu <hongjiu.lu@intel.com>
931 * Makefile.in (errors.o): Restored.
933 2011-12-09 Richard Guenther <rguenther@suse.de>
936 * tree.c (free_lang_data_in_decl): Remove freeing conditional
939 2011-12-09 Joern Rennecke <joern.rennecke@embecosm.com>
942 * emit-rtl.c (set_dst_reg_note): New function.
943 * rtl.h (set_dst_reg_note): Declare.
944 * optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note.
945 (emit_libcall_block, expand_fix): Likewise.
946 * function.c (assign_parm_setup_reg, expand_function_start): Likewise.
947 * expmed.c (expand_mult_const, expand_divmod): Likewise.
948 * reload1.c (gen_reload): Likewise.
950 * dse.c (get_stored_val, get_call_args): Use gen_int_mode.
951 * expmed.c (expand_divmod): Likewise.
952 * combine.c (simplify_if_then_else): Likewise.
954 2011-12-09 Kai Tietz <ktietz@redhat.com>
956 * ira-color.c (print_hard_regs_subforest): Use
957 HOST_WIDEST_INT_PRINT_DEC instead of %lld.
958 (allocno_hard_regs): Change type of cost member to HOST_WIDEST_INT.
959 (add_allocno_hard_regs): Change type of argument cost
961 * ira-conflict.c (build_conflict_bit_table): Replace use
962 of long-long by HOST_WIDEST_INT.
964 2011-12-09 Georg-Johann Lay <avr@gjlay.de>
967 * config/avr/avr.md (config/avr/avr.md, *sbix_branch_tmp): Use
968 zero_extract:QIHI instead of zero_extract:HI.
970 2011-12-09 Jakub Jelinek <jakub@redhat.com>
971 Andrew Pinski <apinski@cavium.com>
973 PR tree-optimization/51117
974 * tree-eh.c (optimize_clobbers): New function.
975 (execute_lower_eh_dispatch): Call it.
977 2011-12-09 Richard Guenther <rguenther@suse.de>
979 PR tree-optimization/51482
980 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
981 Make sure to only create REAL_TYPE and INTEGER_TYPE component vectors.
983 2011-12-09 Kai Tietz <ktietz@redhat.com>
985 * implicit-zee.c (num_realized): Change type to long.
986 (num_ze_opportunities): Likewise.
988 2011-12-08 Andrew Pinski <apinski@cavium.com>
990 * config/mips/mips-cpus.def (octeon+): New CPU.
991 * config/mips/mips-tables.opt: Regenerate.
992 * config/mips/mips.h (MIPS_CPP_SET_PROCESSOR): Emit '+' as 'P'.
994 2011-12-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
997 * tree-ssa-dom.c (enum expr_kind): Add EXPR_PHI.
998 (struct hashable_expr): Add struct phi field.
999 (initialize_hash_element): Handle phis; change to use XCNEWVEC.
1000 (hashable_expr_equal_p): Handle phis.
1001 (iterative_hash_hashable_expr): Likewise.
1002 (print_expr_hash_elt): Likewise.
1003 (free_expr_hash_elt): Likewise.
1004 (dom_opt_enter_block): Create equivalences from redundant phis.
1005 (eliminate_redundant_computations): Handle redundant phis.
1006 (lookup_avail_expr): Handle phis.
1008 2011-12-08 Jakub Jelinek <jakub@redhat.com>
1010 PR tree-optimization/51466
1011 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy
1014 2011-12-08 Richard Guenther <rguenther@suse.de>
1016 * tree-ssa-operands.c (add_stmt_operand): Do not mark stmts
1017 volatile when processing operands of an ADDR_EXPR.
1018 (get_indirect_ref_operands): Likewise.
1019 (get_tmr_operands): Likewise.
1020 (get_expr_operands): Likewise.
1022 2011-12-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1025 * config/s390/s390.c (s390_mainpool_finish): Emit the jump over
1026 the literal pool as jump insn.
1028 2011-12-08 Richard Guenther <rguenther@suse.de>
1030 PR tree-optimization/49772
1031 * tree-inline.c (optimize_inline_calls): Remove bail out on errors.
1033 2011-12-08 Richard Guenther <rguenther@suse.de>
1036 * lto-streamer-out.c (produce_symtab): Remove asserts.
1038 2011-12-08 Richard Guenther <rguenther@suse.de>
1041 * lto-streamer-out.c (tree_is_indexable): Localize variably
1042 modified types and their FIELD_DECLs.
1044 2011-12-08 Eric Botcazou <ebotcazou@adacore.com>
1046 PR tree-optimization/51315
1047 * tree.h (get_object_or_type_alignment): Declare.
1048 * expr.c (get_object_or_type_alignment): Move to...
1049 * builtins.c (get_object_or_type_alignment): ...here. Add assertion.
1050 * tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
1051 (tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into
1052 MEM_REFs and use get_object_or_type_alignment for them.
1053 (build_accesses_from_assign): Adjust for above change.
1054 (access_precludes_ipa_sra_p): Likewise.
1056 2011-12-08 Richard Guenther <rguenther@suse.de>
1059 * lto-streamer-out.c (tree_is_indexable): Exclude block-local
1060 extern declarations.
1062 2011-12-07 Andrew Pinski <apinski@cavium.com>
1065 * expr.c (do_store_flag): Rewrite code that looks for BIT_AND_EXPR for
1068 2011-12-07 Richard Guenther <rguenther@suse.de>
1070 PR tree-optimization/50823
1071 * ipa-inline.c (edge_badness): Do not account for the number of
1074 2011-12-07 Martin Jambor <mjambor@suse.cz>
1076 PR tree-optimization/50744
1077 * ipa-cp.c (good_cloning_opportunity_p): Assert size_cost is positive,
1078 compute evaluation in HOST_WIDEST_INT.
1079 (safe_add): New function
1080 (propagate_effects): Use safe_add to accumulate effects.
1082 2011-12-06 Joel Sherrill <joel.sherrill@oarcorp.com>
1084 * config/rs6000/rtems.h: Switch to using global_options_set
1085 in SUBSUBTARGET_OVERRIDE_OPTIONS.
1087 2011-12-06 David S. Miller <davem@davemloft.net>
1089 * config/sparc/visintrin.h: Add appropriate __VIS__ cpp protection.
1091 2011-12-06 Georg-Johann Lay <avr@gjlay.de>
1093 * config/avr/avr.c (avr_file_start): Fix missing ,
1095 2011-12-06 Jakub Jelinek <jakub@redhat.com>
1098 * config/i386/i386.c (ix86_emit_leave): Call ix86_add_cfa_restore_note
1101 2011-12-06 Georg-Johann Lay <avr@gjlay.de>
1103 Forward-port from gcc-4_6-branch r181936 2011-12-02.
1104 * config/avr/avr-mcus.def (avr_mcu_types): ATtiny4313 and
1105 AT86RF401 have a 16-bit SP (their manual is bogus).
1107 2011-12-06 Georg-Johann Lay <avr@gjlay.de>
1109 Forward-port from gcc-4_6-branch r181936 2011-12-02.
1112 * config/avr/avr.md (movhi_sp_r): Set insn condition to
1114 * config/avr/avr.c (output_movhi): Use "clr%B0" instead of "in
1115 %B0,__SP_H__" if AVR_HAVE_8BIT_SP.
1116 (avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
1118 2011-12-06 Georg-Johann Lay <avr@gjlay.de>
1122 * config/avr/avr.h (ADDR_SPACE_PGM, ADDR_SPACE_PGM1,
1123 ADDR_SPACE_PGM2, ADDR_SPACE_PGM3, ADDR_SPACE_PGM4,
1124 ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): Write as enum.
1125 (avr_addrspace_t): New typedef.
1126 (avr_addrspace): New declaration.
1127 * config/avr/avr-c.c (avr_toupper): New static function.
1128 (avr_register_target_pragmas, avr_cpu_cpp_builtins): Use
1129 avr_addrspace to get address space information.
1130 * config/avr/avr.c (avr_addrspace): New variable.
1131 (avr_out_lpm, avr_pgm_check_var_decl, avr_insert_attributes,
1132 avr_asm_named_section, avr_section_type_flags,
1133 avr_asm_select_section, avr_addr_space_address_mode,
1134 avr_addr_space_convert, avr_emit_movmemhi): Use it.
1135 (avr_addr_space_pointer_mode): Forward to avr_addr_space_address_mode.
1136 (avr_pgm_segment): Remove.
1138 2011-12-06 Richard Guenther <rguenther@suse.de>
1141 * varasm.c (assemble_alias): Move DECL_EXTERNAL implementation
1142 quirk adjustjment ...
1143 * passes.c (rest_of_decl_compilation): ... here.
1145 2011-12-06 Richard Guenther <rguenther@suse.de>
1148 * gimple-fold.c (gimplify_and_update_call_from_tree): Guard vdef check
1149 for the fact we do not have virtual operands when not optimizing.
1151 2011-12-06 Richard Guenther <rguenther@suse.de>
1153 PR tree-optimization/51245
1154 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_constant_for_pieces):
1156 (vn_reference_lookup_3): Use it. Properly valueize all refs we create.
1158 2011-12-06 Iain Sandoe <iains@gcc.gnu.org>
1160 * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
1163 2011-12-06 Richard Guenther <rguenther@suse.de>
1165 PR tree-optimization/51363
1166 * gimple.c (gimple_rhs_has_side_effects): Remove.
1167 * gimple.h (gimple_rhs_has_side_effects): Likewise.
1168 * tree-ssa-dom.c (optimize_stmt): Simplify conditional.
1170 2011-12-06 Alan Modra <amodra@gmail.com>
1173 * config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
1174 Do not mark r11 setup as frame-related. Pass correct offset to
1175 rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related
1176 arguments. Correct sp_offset. Remove "offset" fudge from
1177 in-line rs6000_frame_related call. Rename misleading variable.
1178 Fix comments and whitespace. Tidy some expressions.
1179 (rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
1180 to r11 in out-of-line case. Correct sp_offset. Pass correct
1181 offset to rs6000_emit_savres_rtx. Rename misleading variable.
1182 Fix comments and whitespace. Tidy some expressions.
1183 (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
1184 adjustment when !saving_GPRs_inline. Correct register mode
1185 used in address calcs.
1186 (rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
1187 !restoring_GPRs_inline.
1189 2011-12-06 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1191 * config/arm/vfp.md (*combine_vcvt_f64_<FCVTI32typename>): Fix
1192 formatting character for vmov.f64 case.
1194 2011-12-05 Jakub Jelinek <jakub@redhat.com>
1196 PR tree-optimization/51396
1197 * tree-ssa-math-opts.c (convert_mult_to_fma): Don't optimize
1198 if MUL_RESULT has zero uses.
1201 * c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
1202 for debug info if scope is file_scope.
1205 * c-decl.c (c_finish_incomplete_decl, finish_decl): Call
1206 relayout_decl instead of layout_decl.
1208 2011-12-05 Richard Sandiford <rdsandiford@googlemail.com>
1210 * resource.c (init_resource_info): Only consider EXIT_IGNORE_STACK
1211 if there is in epilogue.
1213 2011-12-05 Richard Sandiford <rdsandiford@googlemail.com>
1215 * optabs.c (maybe_emit_sync_lock_test_and_set): Pass a null target
1216 to emit_library_call_value.
1217 (expand_atomic_compare_and_swap): Likewise.
1219 2011-12-05 Vladimir Makarov <vmakarov@redhat.com>
1222 * ira-int.h (struct ira_object): Remove add_data.
1223 (OBJECT_ADD_DATA): Remove.
1225 * ira-build.c (ira_create_object): Remove OBJECT_ADD_DATA
1228 * ira-color.c (object_hard_regs_t, object_hard_regs): Rename to
1229 allocno_hard_regs_t, allocno_hard_regs.
1230 (object_hard_regs_node_t, object_hard_regs_node): Rename to
1231 allocno_hard_regs_node_t and allocno_hard_regs_node.
1232 (struct allocno_color_data): Add new member last_process. Move
1233 profitable_hard_regs, hard_regs_node, and hard_regs_subnodes_start
1234 from object_color_data.
1235 (object_color_data_t, object_color_data, OBJECT_COLOR_DATA): Remove.
1236 (curr_allocno_process): New static variable.
1237 (object_hard_regs_eq, object_hard_regs_htab): Rename to
1238 allocno_hard_regs_eq and allocno_hard_regs_htab.
1239 (init_object_hard_regs, finish_object_hard_regs): Rename to
1240 init_allocno_hard_regs and finish_allocno_hard_regs.
1241 (object_hard_regs_compare, object_hard_regs_node_t): Rename to
1242 allocno_hard_regs_compare and allocno_hard_regs_node_t.
1243 (create_new_object_hard_regs_node): Rename to
1244 create_new_allocno_hard_regs_node.
1245 (add_new_object_hard_regs_node_to_forest): Rename to
1246 add_new_allocno_hard_regs_node_to_forest.
1247 (add_object_hard_regs_to_forest, collect_object_hard_regs_cover):
1248 Rename to add_allocno_hard_regs_to_forest and
1249 collect_allocno_hard_regs_cover.
1250 (setup_object_hard_regs_nodes_parent): Rename to
1251 setup_allocno_hard_regs_nodes_parent.
1252 (remove_unused_object_hard_regs_nodes): Rename to
1253 remove_unused_allocno_hard_regs_nodes.
1254 (enumerate_object_hard_regs_nodes, object_hard_regs_nodes_num):
1255 Rename to enumerate_allocno_hard_regs_nodes and
1256 allocno_hard_regs_nodes_num.
1257 (object_hard_regs_nodes, object_hard_regs_subnode_t): Rename to
1258 allocno_hard_regs_nodes and allocno_hard_regs_subnode_t.
1259 (object_hard_regs_subnode, object_hard_regs_subnodes): Rename to
1260 allocno_hard_regs_subnode and allocno_hard_regs_subnodes.
1261 (object_hard_regs_subnode_index): Rename to
1262 allocno_hard_regs_subnode_index.
1263 (setup_object_hard_regs_subnode_index): Rename to
1264 setup_allocno_hard_regs_subnode_index.
1265 (get_object_hard_regs_subnodes_num): Rename to
1266 get_allocno_hard_regs_subnodes_num.
1267 (form_object_hard_regs_nodes_forest): Rename to
1268 form_allocno_hard_regs_nodes_forest.
1269 (finish_object_hard_regs_nodes_tree): Rename to
1270 form_allocno_hard_regs_nodes_forest
1271 (finish_object_hard_regs_nodes_forest): Rename to
1272 finish_allocno_hard_regs_nodes_forest.
1273 (setup_left_conflict_sizes_p): Use allocno data instead of object ones.
1274 Process conflict allocnos once.
1275 (update_left_conflict_sizes_p): Use allocno data instead of object
1276 ones. Change prototype signature.
1277 (empty_profitable_hard_regs): Use allocno data instead of object ones.
1278 (setup_profitable_hard_regs): Ditto.
1279 (get_conflict_profitable_regs): Rename to
1280 get_conflict_and_start_profitable_regs. Use allocno data for
1281 profitable regs calculation.
1282 (check_hard_reg_p): Change prototype signature. Check profitable
1283 regs for allocno not the objects.
1284 (assign_hard_reg): Process conflict allocnos only once for
1285 updating conflict costs.
1286 (setup_allocno_available_regs_num): Use allocno data instead of
1287 object ones. Modify debug output.
1288 (color_pass): Remove initialization and finalization of object
1291 2011-12-05 Kazu Hirata <kazu@codesourcery.com>
1294 * config/arm/arm.md (*minmax_arithsi): Always require the else
1295 clause in the MINUS case.
1297 2011-12-05 Richard Guenther <rguenther@suse.de>
1299 PR tree-optimization/50904
1300 * tree-ssa-loop-im.c (struct mem_ref): Remove vops member.
1301 (MEM_ANALYZABLE): New.
1302 (memory_references): Remove clobbered_vops and vop_ref_map
1303 members, add all_refs_stored_in_loop member.
1304 (memref_free): Adjust.
1305 (mem_ref_alloc): Likewise.
1306 (gather_mem_refs_stmt): Do not record clobbers, instead
1307 record refs for unanalyzable stmts.
1308 (gather_mem_refs_in_loops): Do not propagate clobbers.
1309 (struct vop_to_refs_elt, vtoe_hash, vtoe_eq, vtoe_free,
1310 record_vop_access, get_vop_accesses, get_vop_stores,
1311 add_vop_ref_mapping): Remove.
1312 (create_vop_ref_mapping_loop): Adjust to simply record all stores.
1313 (analyze_memory_references): Adjust.
1314 (refs_independent_p): Check for not analyzable refs.
1315 (can_sm_ref_p): Likewise.
1316 (ref_indep_loop_p_1): Simplify.
1317 (tree_ssa_lim_finalize): Adjust.
1319 * tree-ssa-loop-im.c (stmt_cost): Simplify, use LIM_EXPENSIVE
1320 rather than magic constants. Assign zero cost to PAREN_EXPR
1321 and SSA_NAME copies. Assign cost proportional to the vector
1322 size for vector constructors.
1324 2011-12-05 Richard Guenther <rguenther@suse.de>
1326 * tree-ssa-alias.h (struct ao_ref_s): Add volatile_p field.
1327 * tree-ssa-alias.c (ao_ref_init): Initialize it.
1328 (ao_ref_init_from_ptr_and_size): Likewise.
1329 (refs_may_alias_p_1): Two volatile accesses conflict.
1330 (ref_maybe_used_by_call_p_1): Likewise.
1331 (call_may_clobber_ref_p_1): Likewise.
1332 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Initialize
1335 2011-12-05 Richard Guenther <rguenther@suse.de>
1337 * tree-ssa.c (verify_ssa): Verify SSA names in the loop over all SSA
1338 names. Remove SSA operand checking, call verify_ssa_operands.
1339 * tree-ssa-operands.h (verify_ssa_operands): Declare.
1340 * tree-ssa-operands.c (verify_ssa_operands): New function.
1342 2011-12-05 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1344 * config/arm/arm.c (vfp3_const_double_for_fract_bits): Define.
1345 * config/arm/arm-protos.h (vfp3_const_double_for_fract_bits): Declare.
1346 * config/arm/constraints.md ("Dt"): New constraint.
1347 * config/arm/predicates.md
1348 (const_double_vcvt_power_of_two_reciprocal): New.
1349 * config/arm/vfp.md (FCVTI32typename): New.
1350 (FCVT): New iterator.
1351 (*combine_vcvt_f32_<FCVTI32typename>): New.
1352 (*combine_vcvt_f64_<FCVTI32typename>): New.
1354 2011-12-05 Richard Guenther <rguenther@suse.de>
1356 * cgraph.c (cgraph_create_edge_1): Initialize
1357 call_stmt_cannot_inline_p from the stmt if possible.
1358 (cgraph_make_edge_direct): Likewise.
1359 * gimple-streamer-in.c (input_gimple_stmt): Do not
1360 call gimple_call_set_cannot_inline.
1361 * gimple.h (enum gf_mask): Remove GF_CALL_CANNOT_INLINE, shift values.
1362 (gimple_call_set_cannot_inline): Remove.
1363 (gimple_call_cannot_inline_p): Likewise.
1364 * ipa-inline-analysis.c (initialize_inline_failed): Look
1365 at the edge call_stmt_cannot_inline_p flag.
1366 * ipa-inline.c (can_inline_edge_p): Likewise.
1367 (early_inliner): Only update the edge flag.
1368 * ipa-prop.c (update_indirect_edges_after_inlining): Likewise.
1369 (ipa_modify_call_arguments): Do not call gimple_call_set_cannot_inline.
1370 * cgraphunit.c (assemble_thunk): Likewise.
1371 * gimple-fold.c (gimple_fold_call): Likewise.
1373 * tree.h (CALL_CANNOT_INLINE_P): Remove.
1374 * tree-mudflap.c (mf_xform_statements): Do not modify alloca calls.
1375 * builtins.c (expand_builtin_alloca): With -fmudflap do not expand
1376 alloca calls inline.
1377 * cfgexpand.c (expand_call_stmt): Do not set CALL_CANNOT_INLINE_P.
1378 * gimple.c (gimple_build_call_from_tree): Do not read
1379 CALL_CANNOT_INLINE_P.
1380 * gimplify.c (gimplify_call_expr): Do not copy CALL_CANNOT_INLINE_P.
1382 2011-12-05 Jakub Jelinek <jakub@redhat.com>
1383 Eric Botcazou <ebotcazou@adacore.com>
1387 * calls.c (internal_arg_pointer_exp_state): New variable.
1388 (internal_arg_pointer_based_exp_1,
1389 internal_arg_pointer_exp_scan): New functions.
1390 (internal_arg_pointer_based_exp): New function.
1391 (mem_overlaps_already_clobbered_arg_p): Use it.
1392 (expand_call): Free internal_arg_pointer_exp_state.cache vector
1393 and clear internal_arg_pointer_exp_state.scan_start.
1395 2011-12-04 Kaz Kojima <kkojima@gcc.gnu.org>
1397 * config/sh/linux.h (TARGET_DEFAULT): Add MASK_SOFT_ATOMIC.
1398 * config/sh/sync.md: New file.
1399 * config/sh/sh.md: Include sync.md.
1400 * config/sh/sh.opt (msoft-atomic): New option.
1401 * doc/invoke.texi (SH Options): Document it.
1403 2011-12-04 Nathan Sidwell <nathan@acm.org>
1405 * gcov-io.h (struct gcov_info): Replace trailing array with
1407 * profile.c (branch_prob): Only call renamed
1408 coverage_begin_function once.
1409 * coverage.h (coverage_begin_output): Rename to ...
1410 (coverage_begin_function): ... here.
1411 * coverage.c (struct function_list): Rename to ...
1412 (struct coverage_data): ... this. Update all uses.
1413 (gcov_info_var, gcov_fn_info_type, gcov_fn_info_ptr_type): New globals.
1414 (bbg_file_opened, bbg_function_announced): Remove.
1415 (get_coverage_counts): Adjust message.
1416 (coverage_begin_ouput): Rename to ...
1417 (coverage_begin_function): ... here. Move file opening to
1418 coverage_init. Adjust for being called only once.
1419 (coverage_end_function): Remove bbg file and inhibit further
1420 output here on error.
1421 (build_info_type): Adjust for change to pointer to array.
1422 (build_info): Receive array of function pointers and adjust.
1423 (create_coverage): Break into ...
1424 (coverage_obj_init, coverage_obj_fn, coverage_obj_finish):
1425 ... these, and adjust.
1426 (coverage_init): Open the notes file here. Tidy.
1427 (coverage_finish): Call coverage_obj_init etc.
1429 2011-12-04 Ira Rosen <ira.rosen@linaro.org>
1432 * tree-vect-loop.c (vect_create_epilog_for_reduction): Create exit
1433 phi nodes for outer loop in case of double reduction.
1435 2011-12-04 Jérémie Detrey <Jeremie.Detrey@loria.fr>
1438 * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
1439 parameter as long long.
1441 2011-12-04 Richard Sandiford <rdsandiford@googlemail.com>
1444 * optabs.c (init_sync_libfuncs): Use "or" rather than "ior"
1445 in the external names.
1447 2011-12-03 Jack Howarth <howarth@bromo.med.uc.edu>
1449 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Pass -no_pie for
1450 non-PIC code when targeting 10.7 or later.
1452 2011-12-03 Iain Sandoe <iains@gcc.gnu.org>
1454 * config/darwin.h (STARTFILE_SPEC): Do not use -lbundle1.o when
1456 (DARWIN_DYLIB1_SPEC): Do not use -ldylib1.10.5.o when Darwin >= 10.
1457 (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10.
1459 2011-12-03 Jakub Jelinek <jakub@redhat.com>
1461 * fold-const.c (fold_unary_loc): Fold VEC_UNPACK_LO_EXPR,
1462 VEC_UNPACK_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR and
1463 VEC_UNPACK_FLOAT_HI_EXPR with VECTOR_CST argument.
1464 (fold_binary_loc): Fold VEC_PACK_TRUNC_EXPR,
1465 VEC_PACK_FIX_TRUNC_EXPR, VEC_WIDEN_MULT_LO_EXPR
1466 and VEC_WIDEN_MULT_HI_EXPR with VECTOR_CST arguments.
1469 * tree-ssa.c (target_for_debug_bind): Also allow is_gimple_reg_type
1470 vars that aren't referenced.
1471 (tree-ssa-live.c (remove_unused_locals): Don't clear TREE_ADDRESSABLE
1472 of unreferenced local vars.
1473 * cfgexpand.c (expand_debug_expr): For DEBUG_IMPLICIT_PTR allow also
1474 TREE_ADDRESSABLE vars that satisfy target_for_debug_bind.
1476 2011-12-03 Anatoly Sokolov <aesok@post.ru>
1478 * config/arm/arm.h (LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P): Remove.
1479 * config/arm/arm-protos.h (aapcs_libcall_value): Remove.
1480 * config/arm/arm.c (TARGET_FUNCTION_VALUE_REGNO_P): Define.
1481 (arm_libcall_value_1, arm_function_value_regno_p): New function.
1482 (arm_function_value, arm_libcall_value): Use arm_libcall_value_1.
1483 (aapcs_libcall_value): Make static.
1484 (arm_libcall_value): Add static qualifier.
1486 2011-12-02 Jakub Jelinek <jakub@redhat.com>
1489 * config/i386/sse.md (mul<mode>3 with VI1_AVX2 iterator): For
1490 V32QImode use { 0,2,..,14,32,34,..,46,16,18,..,30,48,50,..,62 }
1491 permutation instead of extract even permutation.
1493 2011-12-02 Nathan Sidwell <nathan@acm.org>
1495 * gcov.c (struct arc_info): Add is_throw field.
1496 (struct (block_info): Add exceptional field, reduce flags size to
1498 (struct function_info): Add has_catch field.
1499 (struct line_info): Add unexceptional field.
1500 (process_file): Call find_exception_blocks if necessary.
1501 (read_graph_file): Adjust. Note if an exceptional edge is seen.
1502 (find_exception_blocks): New.
1503 (add_line_counts): Set line's unexceptional flag if not exceptional.
1504 (output_branch_count): Note exceptional arcs, lines and blocks.
1505 * gcov-dump.c (tag_arcs): Decode arc flags.
1506 * doc/gcov.texi: Document '=====' lines.
1508 2011-12-02 Anatoly Sokolov <aesok@post.ru>
1510 * config/ia64/ia64.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS,
1511 PRINT_OPERAND_PUNCT_VALID_P): Remove macros.
1512 * config/ia64/ia64-protos.h (ia64_print_operand,
1513 ia64_print_operand_address): Remove.
1514 * config/ia64/ia64.c (TARGET_PRINT_OPERAND,
1515 TARGET_PRINT_OPERAND_ADDRESS, TARGET_PRINT_OPERAND_PUNCT_VALID_P):
1517 (ia64_print_operand_punct_valid_p): New function.
1518 (ia64_print_operand, ia64_print_operand_address): Make static.
1520 2011-12-02 Michael Meissner <meissner@the-meissners.org>
1523 * config/rs6000/rs6000.c (def_builtin): Use the correct field to
1524 figure out the function's attributes.
1525 (struct builtin_description): Mark mask field as const since we no
1526 longer need to modify it for SPE and PAIRED builtins.
1528 2011-12-02 Joseph Myers <joseph@codesourcery.com>
1532 2008-09-18 Andrew Pinski <andrew_pinski@playstation.sony.com>
1535 * loop-doloop.c (doloop_modify): New argument zero_extend_p and
1536 zero extend count after the correction to it is done.
1537 (doloop_optimize): Update call to doloop_modify, don't zero extend
1540 2008-11-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
1543 * loop-doloop.c (doloop_modify): Add from_mode argument that says what
1545 (doloop_optimize): Update call to doloop_modify.
1547 2011-12-02 Richard Guenther <rguenther@suse.de>
1550 * ipa.c (varpool_externally_visible_p): Register variables
1551 are always externally visible.
1553 2011-12-02 Sameera Deshpande <sameera.deshpande@arm.com>
1555 * gimple-pretty-print.c (dump_gimple_call): Dereference fn only if
1558 2011-12-02 Martin Jambor <mjambor@suse.cz>
1560 PR tree-optimization/50622
1561 * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
1562 if both lacc and racc are grp_partial_lhs.
1564 2011-12-01 Kaz Kojima <kkojima@gcc.gnu.org>
1567 * config/sh/sh.c (expand_ashiftrt): Handle TARGET_SH2A same as
1569 (shl_sext_kind): Likewise.
1570 * config/sh/sh.h (SH_DYNAMIC_SHIFT_COST): Likewise.
1571 * config/sh/sh.md (ashlsi3_sh2a, ashrsi3_sh2a, lshrsi3_sh2a): Remove.
1572 (ashlsi3_std): Handle TARGET_SH2A same as TARGET_SH3.
1573 (ashlsi3): Likewise.
1574 (ashrsi3_d): Likewise.
1575 (lshrsi3_d): Likewise.
1576 (lshrsi3): Likewise.
1578 2011-12-01 Diego Novillo <dnovillo@google.com>
1581 * ipa-inline.c (can_inline_edge_p): If the edge E has a statement,
1582 use the statement's inline indicator instead of E's.
1583 Remove consistency check.
1585 2011-12-01 Diego Novillo <dnovillo@google.com>
1590 2011-11-29 Diego Novillo <dnovillo@google.com>
1592 * gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
1593 Update field call_stmt_cannot_inline_p from call
1594 graph edge, if needed.
1595 * gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
1597 2011-12-01 Nathan Sidwell <nathan@acm.org>
1599 PR gcov-profile/51113
1600 * coverage.c (build_var): Keep coverage variables static.
1602 2011-12-01 Jakub Jelinek <jakub@redhat.com>
1604 PR tree-optimization/51356
1605 * tree-vect-patterns.c (vect_recog_bool_pattern): Give up if
1606 vectype doesn't have VECTOR_MODE_P.
1609 * tree-ssa-dce.c (remove_dead_stmt): Add a debug stmt when removing
1610 as unnecessary a store to a variable with gimple reg type.
1611 * tree-ssa-live.c (remove_unused_locals): Clear TREE_ADDRESSABLE bit
1612 on local unreferenced variables.
1613 * cfgexpand.c (expand_gimple_basic_block): Don't emit DEBUG_INSNs
1614 for !target_for_debug_bind variables.
1616 2011-12-01 Patrick Marlier <patrick.marlier@gmail.com>
1619 * cgraph.h (cgraph_call_node_duplication_hooks): Declare.
1620 * cgraph.c (cgraph_call_node_duplication_hooks): Make global.
1621 * cgraphunit.c (cgraph_copy_node_for_versioning): Call it.
1623 2011-12-01 Andrew Pinski <apinski@cavium.com>
1626 * tree.c (free_lang_data_in_decl): Clear FIELD_DECL's
1629 2011-12-01 Jakub Jelinek <jakub@redhat.com>
1631 PR tree-optimization/51246
1632 * tree-predcom.c (replace_ref_with): Handle also clobber on the rhs.
1634 PR rtl-optimization/51014
1635 * loop-unroll.c (apply_opt_in_copies): Ignore label DEBUG_INSNs
1636 both from bb and orig_bb.
1638 2011-12-01 Joern Rennecke <joern.rennecke@embecosm.com>
1640 PR tree-optimization/50802
1641 * tree-vrp.c (simplify_conversion_using_ranges): Rewrite test
1642 considering what happens to ranges during sign changes and/or
1643 intermediate narrowing conversions.
1645 2011-11-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1648 * config/pa/pa.md (in_branch_delay): Disallow frame related insns.
1649 (in_nullified_branch_delay): Likewise.
1650 (in_call_delay): Likewise.
1652 2011-11-30 Richard Henderson <rth@redhat.com>
1654 * predict.c (expr_expected_value_1): Assume compare-and-swap builtin
1655 boolean return is true.
1657 2011-11-30 Jakub Jelinek <jakub@redhat.com>
1659 PR rtl-optimization/51044
1660 * dse.c (emit_inc_dec_insn_before): Ensure new_insn is an instruction
1661 rather than just insn body.
1664 * function.c (thread_prologue_and_epilogue_insns): If
1665 stack_realign_drap, add drap_reg to SET_UP_BY_PROLOGUE
1669 * tree-eh.c (cleanup_empty_eh_merge_phis): Add check to
1670 avoid creating duplicate edges here.
1671 (cleanup_empty_eh_unsplit): And remove it in the caller.
1673 2011-11-30 Andrew Pinski <apinski@cavium.com>
1676 * c-parser.c (c_parser_postfix_expression): Check groktypename results
1677 before looking at the main variant.
1679 2011-11-30 Jakub Jelinek <jakub@redhat.com>
1681 PR rtl-optimization/48721
1682 * sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
1683 reg_pending_barrier to TRUE_BARRIER.
1685 PR rtl-optimization/48721
1686 * sched-ebb.c (begin_move_insn): Insert empty unreachable
1687 block after BARRIER if insn is followed by it.
1689 2011-11-30 Richard Henderson <rth@redhat.com>
1691 * config/sparc/sparc-opts.h (enum sparc_memory_model_type): New.
1692 * config/sparc/sparc.opt (mmemory-model=): New option.
1693 * doc/invoke.texi (Sparc Options): Document it.
1694 * config/sparc/sparc.c (sparc_option_override): Provide default
1695 for sparc_memory_model.
1696 (sparc_emit_membar_for_model): Omit barrier combinations that are
1697 implied by the memory model.
1699 2011-11-30 Richard Henderson <rth@redhat.com>
1701 * config/sparc/sync.md (I124MODE): New mode iterator.
1702 (memory_barrier): Remove.
1703 (atomic_exchangesi): New.
1704 (swapsi): Rename from *swapsi.
1705 (atomic_test_and_set<I124MODE>): New.
1706 (ldstubqi): Rename from *ldstubqi, merge with expander.
1707 (ldstub<I24MODE>): Rename from *ldstub<I24MODE>, merge with expander.
1708 (sync_lock_test_and_setsi): Remove.
1709 (sync_lock_test_and_set<I12MODE>): Remove.
1711 2011-11-30 Richard Henderson <rth@redhat.com>
1713 * config/sparc/constraints.md ("w"): New.
1714 * config/sparc/predicates.md (mem_noofs_operand): New.
1715 * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Make static.
1716 Generate the boolean result of the atomic_compare_exchange.
1717 (sparc_expand_compare_and_swap): New.
1718 * config/sparc/sync.md (atomic_compare_and_swap<I>): New.
1719 (atomic_compare_and_swap<I48MODE>_1): Rename from
1720 *sync_compare_and_swap<I48MODE>, use mem_noofs_operand.
1721 (*atomic_compare_and_swapdi_v8plus): Rename from
1722 *sync_compare_and_swapdi_v8plus, use mem_noofs_operand.
1723 (sync_compare_and_swap<I12MODE>): Remove.
1724 (sync_compare_and_swap<I48MODE>): Remove.
1726 2011-11-30 Richard Henderson <rth@redhat.com>
1728 * config/sparc/predicates.md (register_or_v9_zero_operand): New.
1729 * config/sparc/sparc.md (UNSPEC_ATOMIC): New.
1730 * config/sparc/sync.md (atomic_load<I>): New.
1731 (atomic_loaddi_1, atomic_store<I>, atomic_storedi_1): New.
1733 2011-11-30 Richard Henderson <rth@redhat.com>
1735 * config/sparc/predicates.md (zero_or_v7_operand): New.
1736 * config/sparc/sparc.c (sparc_emit_membar_for_model): New.
1737 * config/sparc/sparc-protos.h: Update.
1738 * config/sparc/sync.md (mem_thread_fence): New.
1739 (memory_barrier): Use sparc_emit_membar_for_model.
1740 (membar, *membar_empty, *membar_storestore, *membar_storeload): New.
1741 (*membar_v8): Accept and ignore the membar mask.
1742 (*membar): Accept and print the membar mask.
1744 2011-11-30 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1746 * config/arm/arm.c (arm_issue_rate): Cortex-A15 can triple issue.
1747 * config/arm/arm.md (mul64): New attribute.
1748 (generic_sched): Cortex-A15 is not scheduled generically.
1749 (cortex-a15.md): Include.
1750 * config/arm/cortex-a15.md: New machine description.
1751 * config/arm/t-arm (MD_INCLUDES): Add cortex-a15.md.
1753 2011-11-30 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1755 * config/arm/t-arm (MD_INCLUDES): Ensure all md files are listed.
1757 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
1759 * doc/tm.texi.in (NEXT_OBJC_RUNTIME): Update macro description.
1760 * doc/tm.texi: Regenerate.
1761 * flags.h (flag_next_runtime): Remove references.
1762 * toplev.c: Likewise.
1763 * defaults.h (NEXT_OBJC_RUNTIME): Provide default.
1764 * gccspec.c (lang_specific_driver): Adjust use of NEXT_OBJC_RUNTIME.
1765 * config/darwin.c (darwin_override_options): Provide default
1766 Objective-C abi settings and target conflict checks.
1767 * config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Remove unused
1768 code. Adjust indenting.
1770 2011-11-29 Joseph Myers <joseph@codesourcery.com>
1772 * config/sh/sh.h (enum reg_class, REG_CLASS_NAMES)
1773 (REG_CLASS_CONTENTS): Add NON_SP_REGS.
1774 (REGCLASS_HAS_GENERAL_REG): Handle NON_SP_REGS.
1775 * config/sh/constraints.md (u): New constraint.
1777 2011-11-29 Oleg Endo <oleg.endo@t-online.de>
1780 * config/sh/sh.c (sh_secondary_reload): Add case when FPUL
1781 register is being loaded from a pseudo in memory.
1783 2011-11-29 DJ Delorie <dj@redhat.com>
1785 * config.gcc (rl78-*-elf): New case.
1786 * doc/extend.texi: Add RL78 documentation.
1787 * doc/invoke.texi: Likewise.
1788 * doc/md.texi: Likewise.
1789 * doc/contrib.texi: Add RL78.
1790 * doc/install.texi: Add rl78-*-elf.
1791 * config/rl78: New directory for the Renesas RL78.
1793 2011-11-29 Jakub Jelinek <jakub@redhat.com>
1795 PR tree-optimization/51247
1796 * tree-vrp.c (extract_range_from_assert): For signed 1-bit precision
1797 types instead of adding 1 subtract -1 and instead of subtracting 1
1798 add -1 to avoid overflows.
1800 2011-11-29 Andrew MacLeod <amacleod@redhat.com>
1803 * optabs.c (maybe_optimize_fetch_op): New. Look for more optimal
1804 instructions for a FECTH_OP or OP_FECTH sequence.
1805 (expand_atomic_fetch_op): Call maybe_optimize_fetch_op.
1807 2011-11-29 Uros Bizjak <ubizjak@gmail.com>
1809 * config/i386/sync.md (UNSPEC_LDA, UNSPEC_STA): New unspecs.
1810 (movdi_via_fpu): Remove.
1811 (loaddi_via_fpu): New insn pattern.
1812 (storedi_via_fpu): Ditto.
1813 (atomic_loaddi_fpu): Use loaddi_via_fpu and storedi_via_fpu.
1814 (atomic_storedi_fpu): Ditto.
1815 * reg-stack.c (get_true_reg): Handle UNSPEC_LDA.
1816 (subst_stack_regs_pat): Handle UNSPEC_STA.
1818 2011-11-29 Uros Bizjak <ubizjak@gmail.com>
1820 * config/i386/i386.md (*floathi<mode>2_i387_with_temp): Do not
1821 allocate scratch memory for alternative 0.
1823 2011-11-29 Michael Meissner <meissner@linux.vnet.ibm.com>
1825 * config/rs6000/rs6000-builtins.def: Completely rewrite builtin
1826 handling to centralize more of the builtins in this file. Change
1827 some builtin enumerations to be more consistant. Use a new mask
1828 to hold the current builtins, including SPE and PAIRED builtins
1829 which no longer are set via target_flags masks. Add
1830 -mdebug=builtin debug support. For power machines, define all
1831 Altivec and VSX buitins when the compiler starts, but don't allow
1832 the use of a builtin unless the appropriate switch is used, or
1833 #pragma GCC target is used to change the options. If the user
1834 uses #pragma GCC target, update the appropriate hardware macros.
1835 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Ditto.
1836 * config/rs6000/rs6000.opt (rs6000_builtin_mask): Ditto.
1837 * config/rs6000/rs6000-c.c (rs6000_macro_to_expand): Ditto.
1838 (rs6000_define_or_undefine_macro): Ditto.
1839 (rs6000_target_modify_macros): Ditto.
1840 (rs6000_cpu_cpp_builtins): Ditto.
1841 (altivec_overloaded_builtins): Ditto.
1842 (altivec_build_resolved_builtin): Ditto.
1843 * config/rs6000/rs6000.c (rs6000_target_modify_macros_ptr): Ditto.
1844 (rs6000_builtin_info): Ditto.
1845 (def_builtin): Ditto.
1846 (enable_mask_for_builtins): Ditto.
1847 (DEBUG_FMT_X): Ditto.
1848 (rs6000_debug_reg_global): Ditto.
1849 (rs6000_builtin_mask_calculate): Ditto.
1850 (rs6000_option_override_internal): Ditto.
1851 (rs6000_builtin_conversion): Ditto.
1852 (rs6000_builtin_vectorized_function): Ditto.
1853 (bdesc_3arg): Ditto.
1855 (bdesc_2arg): Ditto.
1856 (builtin_description_predicates): Ditto.
1857 (bdesc_altivec_preds): Ditto.
1858 (bdesc_spe_predicates): Ditto.
1859 (bdesc_spe_evsel): Ditto.
1860 (bdesc_paired_preds): Ditto.
1862 (bdesc_1arg): Ditto.
1863 (rs6000_overloaded_builtin_p): Ditto.
1864 (rs6000_expand_unop_builtin): Ditto.
1865 (bdesc_2arg_spe): Ditto.
1866 (spe_expand_builtin): Ditto.
1867 (rs6000_invalid_builtin): Ditto.
1868 (rs6000_expand_builtin): Ditto.
1869 (rs6000_init_builtins): Ditto.
1870 (spe_init_builtins): Ditto.
1871 (paired_init_builtins): Ditto.
1872 (altivec_init_builtins): Ditto.
1873 (builtin_function_type): Ditto.
1874 (rs6000_common_init_builtins): Ditto.
1875 (rs6000_builtin_reciprocal): Ditto.
1876 (rs6000_builtin_mask_names): Ditto.
1877 (rs6000_pragma_target_parse): Ditto.
1878 (rs6000_function_specific_print): Ditto.
1879 * config/rs6000/rs6000.h (MASK_DEBUG_BUILTIN): Ditto.
1880 (MASK_DEBUG_ALL): Ditto.
1881 (TARGET_DEBUG_BUILTIN): Ditto.
1882 (TARGET_EXTRA_BUILTINS): Ditto.
1883 (REGISTER_TARGET_PRAGMAS): Ditto.
1884 (enum rs6000_btc): Ditto.
1885 (RS6000_BTC_*): Ditto.
1886 (RS6000_BTM_*): Ditto.
1887 (enum rs6000_builtins): Ditto.
1888 * config/rs6000/rs6000-protos.h (rs6000_overloaded_builtin_p): Ditto.
1889 (rs6000_target_modify_macros): Ditto.
1890 (rs6000_target_modify_macros_ptr): Ditto.
1892 * config/rs6000/vector.md (unsfloat<VEC_int><mode>2): Use the
1893 standard name for converting vector unsigned values to floating
1894 point. Delete the TARGET_VECTORIZE_BUILTIN_CONVERSION hook, which
1895 is handled by machine independent code.
1896 * config/rs6000/rs6000.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Ditto.
1897 (rs6000_builtin_conversion): Ditto.
1899 2011-11-29 Dodji Seketeli <dodji@redhat.com>
1901 * tree-diagnostic (struct loc_t): Rename into struct loc_map_pair.
1902 (maybe_unwind_expanded_macro_loc): Adjust.
1904 2011-11-29 David Edelsohn <dje.gcc@gmail.com>
1905 Aldy Hernandez <aldyh@redhat.com>
1907 * trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl
1909 (ipa_tm_create_version): Same.
1911 2011-11-29 Bernd Schmidt <bernds@codesourcery.com>
1913 * haifa-sched.c (recompute_todo_spec): Simplify and correct the
1914 code checking for a clobber of a condition register when deciding
1915 whether to predicate.
1917 2011-11-29 Diego Novillo <dnovillo@google.com>
1919 * gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
1920 Update field call_stmt_cannot_inline_p from call graph edge, if needed.
1921 * gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
1923 2011-11-29 Sameera Deshpande <sameera.deshpande@arm.com>
1925 * config/arm/arm.md (arm_movdi): Update NEG_POOL_RANGE.
1926 (movdf_soft_insn): Likewise.
1927 * config/arm/fpa.md (thumb2_movdf_fpa): Likewise.
1928 * config/arm/neon.md (neon_mov<mode>): Likewise.
1929 * config/arm/vfp.md (movdi_vfp): Likewise.
1930 (movdi_vfp_cortexa8): Likewise.
1931 (movdf_vfp): Likewise.
1933 2011-11-29 Jakub Jelinek <jakub@redhat.com>
1936 * expr.c (expand_expr_addr_expr_1): Don't call force_operand for
1937 EXPAND_SUM modifier.
1939 2011-11-29 Ira Rosen <ira.rosen@linaro.org>
1941 PR tree-optimization/51301
1942 * tree-vect-patterns.c (vect_recog_over_widening_pattern): Check that
1943 the last statement doesn't convert to a bigger type than the original
1944 type of the computation.
1946 2011-11-28 Richard Henderson <rth@redhat.com>
1948 * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
1949 Handle overlap between retval and oldval. Always compute boolval
1952 2011-11-28 Jakub Jelinek <jakub@redhat.com>
1955 * tree-ssa.c (execute_update_addresses_taken): Remove
1956 var ={v} {CLOBBER} stmts instead of rewriting them into
1957 var_N ={v} {CLOBBER}.
1960 * function.c (convert_jumps_to_returns): When redirecting an edge
1961 succ to EXIT_BLOCK_PTR, clear EDGE_CROSSING flag.
1963 PR tree-optimization/50078
1964 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
1965 TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
1967 PR tree-optimization/50682
1968 * tree-eh.c (maybe_remove_unreachable_handlers): New function.
1969 * tree-flow.h (maybe_remove_unreachable_handlers): New prototype.
1970 * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call it.
1972 2011-11-28 Georg-Johann Lay <avr@gjlay.de>
1974 * doc/extend.texi (AVR Built-in Functions): Add documentation for
1975 __builtin_avr_map8 and __builtin_avr_map16.
1977 * config/avr/avr.md: Document new %t and %T asm output codes.
1978 (define_c_enum "unspec"): Add UNSPEC_MAP_BITS.
1979 (adjust_len): Add map_bits.
1980 (map_bitsqi, map_bitshi): New insns.
1981 * config/avr/avr-protos.h (avr_out_map_bits): New.
1982 * config/avr/avr-protos.c (print_operand): Implement %t and %T.
1983 (adjust_insn_length): Handle ADJUST_LEN_MAP_BITS.
1984 (avr_double_int_push_digit): New function.
1985 (avr_map, avr_revert_map, avr_swap_map, avr_id_map): New functions.
1986 (avr_sig_map, avr_map_hamming_byte): New functions.
1987 (avr_out_swap_bits, avr_out_revert_bits, avr_move_bits,
1988 avr_out_map_bits): New functions.
1989 (enum avr_builtin_id): Add AVR_BUILTIN_MAP8, AVR_BUILTIN_MAP16.
1990 (avr_init_builtins): Populate __builtin_avr_map8, __builtin_avr_map16.
1991 (bdesc_2arg): Add __builtin_avr_map8, __builtin_avr_map16 ...
1992 (avr_expand_builtin): ...and expand them.
1993 * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in defines:
1994 __BUILTIN_AVR_MAP8, __BUILTIN_AVR_MAP16.
1996 2011-11-27 Richard Sandiford <rdsandiford@googlemail.com>
1999 * config/mips/mips.c (mips_rtx_costs): Handle baddu.
2001 2011-11-27 Richard Sandiford <rdsandiford@googlemail.com>
2003 * config/mips/mips.c (mips16_unextended_reference_p): Test for BLKmode.
2005 2011-11-27 Richard Sandiford <rdsandiford@googlemail.com>
2007 * config/mips/mips-protos.h (mips_emit_binary): Declare.
2008 * config/mips/mips.c (mips_emit_binary): Make global.
2009 (mips_set_mips16_mode): Turn off -mfix-r4000 in MIPS16 mode.
2010 (mips_conditional_register_usage): Don't treat LO and HI as
2011 register operands in MIPS16 mode.
2012 (mips_mulsidi3_gen_fn): Use {u,}mulsidi3_{32,64}bit_mips16
2014 * config/mips/predicates.md (muldiv_target_operand): New predicate.
2015 (move_operand): Allow hilo_operand.
2016 * config/mips/mips.md (mul<mode>3): Explicitly specify LO as the
2017 target of MIPS16 multiplies, then move it into the target register.
2018 (mul<mode>3_internal, *macc2, *msac2): Use muldiv_target_operand.
2019 (<u>mulsidi3_32bit_mips16): New expander.
2020 (<u>mulsidi3_32bit): Use muldiv_target_operand.
2021 (<u>mulsidi3_32bit_r4000): Disable for ISA_HAS_DSP.
2022 (<u>mulsidi3_64bit): Require !TARGET_MIPS16. Split into
2023 <u>mulsidi3_64bit_split.
2024 (<u>mulsidi3_64bit_mips16): New expander.
2025 (<u>mulsidi3_64bit_split): Likewise, using expansions from
2026 two previous define_splits.
2027 (<u>mulsidi3_64bit_hilo, *muls<u>_di, <u>msubsidi4): Use
2028 muldiv_target_operand.
2029 (<su>mulsi3_highpart): Use <su>mulsi3_highpart_split for MIPS16 code.
2030 (<su>mulsi3_highpart_internal): Require !TARGET_MIPS16.
2031 Split into <su>mulsi3_highpart_split.
2032 (<su>mulsi3_highpart_split): New expander.
2033 (<su>muldi3_highpart): Turn into a define_expand.
2034 Use <su>muldi3_highpart_split for MIPS16 code.
2035 (<su>muldi3_highpart_internal): Renamed from <su>muldi3_highpart.
2036 Require !TARGET_MIPS16. Split into <su>muldi3_highpart_split.
2037 (<su>muldi3_highpart_split): New expander.
2038 (<u>mulditi3): Explicitly specify LO as the target of MIPS16
2039 multiplies, then move it into the target register.
2040 (<u>mulditi3_internal, <u>maddsidi4): Use muldiv_target_operand.
2041 (divmod<mode>4, udivmod<mode>4): Turn into define_expands.
2042 Use <u>divmod<mode>4_split for MIPS16 code, then explicitly
2043 move LO into operand 0.
2044 (divmod<mode>4_internal, udivmod<mode>4_internal): Renamed
2045 from <u>divmod<mode>4. Use muldiv_target_operand.
2046 Require !TARGET_MIPS16. Split into <u>divmod<mode>4_split.
2047 (<u>divmod<mode>4_split): New expander.
2048 (<u>divmod<GPR:mode>4_hilo_<HILO:mode>): Use muldiv_target_operand.
2049 (mfhi<GPR:mode>_<HILO:mode>): Use hilo_operand.
2051 2011-11-27 Richard Sandiford <rdsandiford@googlemail.com>
2053 * hard-reg-set.h (target_hard_regs): Add x_accessible_reg_set
2054 and x_operand_reg_set.
2055 (accessible_reg_set, operand_reg_set): New macros.
2056 * reginfo.c (init_reg_sets): Initialize accessible_reg_set and
2058 (saved_accessible_reg_set, saved_operand_reg_set): New variables.
2059 (save_register_info): Save them.
2060 (restore_register_info): Restore them.
2061 (init_reg_sets_1): Limit operand_reg_set to accessible_reg_set.
2062 Remove NO_REGS registers from operand_reg_set. Treat members
2063 of operand_reg_set as fixed.
2064 * recog.c (general_operand): Check operand_reg_set rather than NO_REGS.
2065 (register_operand, nonmemory_operand): Likewise.
2066 * varasm.c (make_decl_rtl): Always use DECL_MODE as the mode of
2067 register variables. Check accessible_reg_set and operand_reg_set.
2068 * config/mips/mips.c (mips_conditional_register_usage): Remove
2069 inaccessible register from accessible_reg_set, rather than just
2072 2011-11-27 Gerald Pfeifer <gerald@pfeifer.com>
2074 * config/pa/pa-linux.h (TARGET_GAS): Remove comment.
2076 2011-11-26 Richard Henderson <rth@redhat.com>
2078 * config/arm/arm.c (arm_init_libfuncs): Call init_sync_libfuncs
2081 2011-11-26 Richard Henderson <rth@redhat.com>
2083 * optabs.c (expand_atomic_fetch_op): Always return result.
2085 * optabs.c (init_sync_libfuncs_1): Include max in iteration.
2087 * omp-low.c (expand_omp_atomic): Assume anything aligned to
2088 BIGGEST_ALIGNMENT is aligned.
2090 2011-11-26 Richard Henderson <rth@redhat.com>
2092 * config/m68k/m68k.md (UNSPECV_CAS_1, UNSPECV_CAS_2): New.
2093 (UNSPECV_TAS_1, UNSPECV_TAS_2): New.
2094 (I): New mode iterator.
2095 (xz): New mode attribute.
2096 * config/m68k/sync.md: New file.
2098 * config/m68k/linux.h (TARGET_INIT_LIBFUNCS): New.
2099 * config/m68k/m68k.c (m68k_init_sync_libfuncs): New.
2101 2011-11-26 Nathan Sidwell <nathan@acm.org>
2103 PR gcov-profile/51297
2104 * gcov.c (main): Allocate initial names and sources arrays.
2105 (find_source): Don't check for null name or source arrays here.
2107 2011-11-26 Jakub Jelinek <jakub@redhat.com>
2109 PR rtl-optimization/49912
2110 * cfgrtl.c (rtl_verify_flow_info_1): Ignore also EDGE_PRESERVE bit
2111 when counting n_branch.
2113 2011-11-26 Uros Bizjak <ubizjak@gmail.com>
2115 * config/i386/sync.md (movdi_via_fpu): Add %Z insn suffixes.
2117 2011-11-26 Joern Rennecke <joern.rennecke@embecosm.com>
2120 * calls.c (mem_overlaps_already_clobbered_arg_p):
2121 Return false if no outgoing arguments have been stored so far.
2123 2011-11-25 Georg-Johann Lay <avr@gjlay.de>
2125 * config/avr/avr.c (print_operand): Support code = 'i' for CONST_INT.
2127 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
2130 * tree.h (is_builtin_name): No longer external.
2131 * builtins.c (is_builtin_name): Make static.
2132 * varasm.c (incorporeal_function_p): __sync and __atomic external calls
2133 are not incorporeal and may need asm label processing.
2135 2011-11-25 Georg-Johann Lay <avr@gjlay.de>
2138 * config/avr/avr-protos.h (avr_log_t): Add field .builtin.
2139 * config/avr/avr-log.c (avr_log_set_avr_log): Initialize it.
2140 Don't bypass TARGET_ALL_DEBUG. Print self-info with ?.
2141 (avr_log_vadump): Support %D and %X to print double_int.
2142 (avr_double_int_pop_digit): New static function.
2143 (avr_dump_double_int_hex): New static function.
2145 2011-11-24 Enkovich Ilya <ilya.enkovich@intel.com>
2148 * config/i386/i386.c (distance_non_agu_define_in_bb): Fix insn
2151 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
2153 * optab.c (maybe_emit_atomic_exchange): New. Try to emit an
2154 atomic_exchange pattern.
2155 (maybe_emit_sync_lock_test_and_set): New. Try to emit an exchange
2156 using __sync_lock_test_and_set.
2157 (maybe_emit_compare_and_swap_exchange_loop): New. Try to emit an
2158 exchange using a compare_and_swap loop.
2159 (expand_sync_lock_test_and_set): New. Expand sync_lock_test_and_set.
2160 (expand_atomic_test_and_set): New. Expand test_and_set operation.
2161 (expand_atomic_exchange): Use new maybe_emit_* functions.
2162 (expand_atomic_store): Use new maybe_emit_* functions.
2163 * builtins.c (expand_builtin_sync_lock_test_and_set): Call
2164 expand_sync_lock_test_and_set routine.
2165 (expand_builtin_atomic_exchange): Remove parameter from call.
2166 (expand_builtin_atomic_clear): Use atomic_clear pattern if present.
2167 (expand_builtin_atomic_test_and_set): Add target and simply call
2168 expand_atomic_test_and_set.
2169 (expand_builtin): Add target to expand_builtin_atomic_test_and_set.
2170 * expr.h (expand_atomic_exchange): Add parameter.
2171 (expand_sync_lock_test_and_set): New prototype.
2172 (expand_atomic_test_and_set, expand_atomic_clear): New prototypes.
2174 2011-11-24 H.J. Lu <hongjiu.lu@intel.com>
2177 * config/i386/i386.h (processor_costs): Revert revision 181357.
2178 * config/i386/i386.c (cost models): Likewise.
2179 (core_cost): Likewise.
2180 (promote_duplicated_reg): Likewise.
2181 (promote_duplicated_reg_to_size): Likewise.
2182 (processor_target): Likewise.
2183 (expand_set_or_movmem_via_loop_with_iter): Likewise.
2184 (expand_set_or_movmem_via_loop): Likewise.
2185 (emit_strset): Likewise.
2186 (expand_movmem_epilogue): Likewise.
2187 (expand_setmem_epilogue): Likewise.
2188 (expand_movmem_prologue): Likewise.
2189 (expand_setmem_prologue): Likewise.
2190 (expand_constant_movmem_prologue): Likewise.
2191 (expand_constant_setmem_prologue): Likewise.
2192 (decide_alg): Likewise.
2193 (decide_alignment): Likewise.
2194 (ix86_expand_movmem): Likewise.
2195 (ix86_expand_setmem): Likewise.
2196 (ix86_slow_unaligned_access): Likewise.
2197 * config/i386/i386.md (strset): Likewise.
2198 * config/i386/sse.md (vec_dupv4si): Likewise.
2199 (vec_dupv2di): Likewise.
2201 2011-11-24 Georg-Johann Lay <avr@gjlay.de>
2203 * config/avr/avr.md (*rotlhi2.15): Set length to 4.
2205 2011-11-24 Razya Ladelsky <razya@il.ibm.com>
2207 * tree-data-ref.c (initialize_data_dependence_relation): Update
2208 comment for the self dependence case.
2209 (compute_self_dependence): Remove.
2210 * tree-vect-data-refs.c (vect_analyze_data_refs): Remove call to
2211 compute_self_dependenc.
2213 2011-11-24 Alan Modra <amodra@gmail.com>
2215 * c-decl.c (warn_if_shadowing): Don't warn if shadowed
2216 identifier is from system header.
2218 2011-11-23 Jakub Jelinek <jakub@redhat.com>
2221 * config/i386/i386.c (decide_alg): Initialize *dynamic_check
2224 2011-11-23 Vladimir Makarov <vmakarov@redhat.com>
2226 PR rtl-optimization/48455
2227 * doc/invoke.texi (-fira-region): Document default values.
2229 * flags-types.h (enum ira_region): Add new value
2230 IRA_REGION_AUTODETECT.
2232 * common.opt (fira-region): Set up initial value to
2233 IRA_REGION_AUTODETECT.
2235 * toplev.c (process_options): Set up flag_ira_region depending on
2238 * ira.c (ira.c): Remove optimize guard for ira_build.
2240 2011-11-23 Chung-Lin Tang <cltang@codesourcery.com>
2242 PR rtl-optimization/50496
2243 * jump.c (redirect_jump): Assert fail on nlabel == NULL_RTX
2244 only after epilogue is created. Add comments.
2246 2011-11-22 Richard Henderson <rth@redhat.com>
2248 * config/ia64/ia64.c (ia64_expand_atomic_op): Add model parameter.
2249 Generate the barrier required for the memory model.
2250 (rtx_needs_barrier): Handle UNSPEC_FETCHADD_REL, UNSPEC_CMPXCHG_REL.
2251 * config/ia64/ia64-protos.h: Update.
2252 * config/ia64/ia64.md (UNSPEC_FETCHADD_REL): New.
2253 (UNSPEC_CMPXCHG_REL): New.
2254 * config/ia64/sync.md (mem_thread_fence): New.
2255 (atomic_load<IMODE>, atomic_store<IMODE>): New.
2256 (atomic_compare_and_swap<IMODE>): New.
2257 (cmpxchg_acq_<I124MODE>, cmpxchg_acq_di): New.
2258 (atomic_exchange<IMODE>): New.
2259 (xchg_acq_<IMODE>): Rename from sync_lock_test_and_set<IMODE>.
2260 (atomic_<FETCHOP><IMODE>, atomic_nand<IMODE>): New.
2261 (atomic_fetch_<FETCHOP><IMODE>, atomic_fetch_nand<IMODE>): New.
2262 (atomic_<FETCHOP>_fetch<IMODE>, atomic_nand_fetch<IMODE>): New.
2263 (fetchadd_rel_<I48MODE>): New.
2264 (sync_<FETCHOP><IMODE>, sync_nand<IMODE>): Remove.
2265 (sync_old_<FETCHOP><IMODE>, sync_old_nand<IMODE>): Remove.
2266 (sync_new_<FETCHOP><IMODE>, sync_new_nand<IMODE>): Remove.
2267 (sync_compare_and_swap<IMODE>): Remove.
2268 (sync_lock_release<IMODE>): Remove.
2270 * config/ia64/ia64.md: Use define_c_enum for UNSPEC_*
2271 and UNSPECV_* constants.
2273 2011-11-22 Tom de Vries <tom@codesourcery.com>
2275 PR rtl-optimization/50764
2276 * sched-deps.c (sched_analyze_insn): Make sure frame-related insns are
2277 not moved past preceding jump.
2279 2011-11-22 Jeff Law <law@redhat.com>
2281 * doc/contrib.texi: Add entry for David Binderman.
2283 2011-11-22 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2285 * postreload.c (reload_combine): Mark reg_state as invalid at
2286 volatile insns if there has been a use already.
2288 2011-11-21 Aldy Hernandez <aldyh@redhat.com>
2290 * opts.c (finish_options): Do not fail for -fgnu-tm.
2291 * gimple-streamer-out.c (output_gimple_stmt): Handle
2293 * gimple-streamer-in.c (input_gimple_stmt): Same.
2294 * lto-cgraph.c (input_overwrite_node): Read tm_clone bit.
2295 (lto_output_node): Write tm_clone bit.
2297 2011-11-22 Ian Lance Taylor <iant@google.com>
2299 * doc/install.texi (Configuration): Correct doc of
2300 --enable-build-poststage1-with-cxx: it is not experimental.
2302 2011-11-22 Jakub Jelinek <jakub@redhat.com>
2304 PR tree-optimization/51074
2305 * fold-const.c (fold_binary_loc): Fix up VEC_INTERLEAVE_*_EXPR
2306 handling for BYTES_BIG_ENDIAN.
2307 * optabs.c (can_vec_perm_for_code_p): Likewise.
2309 2011-11-22 Michael Matz <matz@suse.de>
2312 * trans-mem.c (expand_block_tm): Ignore clobbers.
2314 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
2316 * config/darwin.h (ENDFILE_SPEC): New.
2317 (DARWIN_CRT1_SPEC): Add crttms.o.
2318 (STARTFILE_SPEC): Likewise for dynamic libs and bundles.
2319 * config/i386.h (ENDFILE_SPEC): Amend to include crttme.o.
2321 2011-11-22 Michael Matz <matz@suse.de>
2324 * tree.c (iterative_hash_expr): Remove break after return.
2326 2011-11-22 Iain Sandoe <iains@gcc.gnu.org>
2328 * target.def (tm_clone_table_section): New hook.
2329 * doc/tm.texi.in (TARGET_ASM_TM_CLONE_TABLE_SECTION): Define.
2330 * doc/tm.texi: Regenerate.
2331 * varasm.c (dump_tm_clone_pairs): Use target tm_clone_table_section.
2332 * output.h (default_clone_table_section): New prototype.
2333 * config/darwin.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): New.
2334 * config/darwin-protos.h (darwin_tm_clone_table_section): New prototype.
2335 * config/darwin.c (darwin_tm_clone_table_section): New.
2337 2011-11-21 Torvald Riegel <triegel@redhat.com>
2339 * trans-mem.c (diagnose_tm_1): Print an expression instead of a
2340 declaration in error messages for indirect calls.
2342 2011-11-21 David S. Miller <davem@davemloft.net>
2344 * config/sparc/sparc.c (sparc_regmode_natural_size): New function
2345 implementing REGMODE_NATURAL_SIZE taking into consideration vector
2347 (sparc_modes_tieable_p): Similarly for MODES_TIEABLE_P.
2348 * config/sparc/sparc-protos.h (sparc_regmode_natural_size,
2349 sparc_modes_tieable_p): Declare.
2350 * gcc/config/sparc/sparc.h (REGMODE_NATURAL_SIZE,
2351 MODES_TIEABLE_P): Use new helper functions.
2354 2011-11-16 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2357 * expmed.c (store_bit_field_1): Use extract_bit_field on big
2358 endian targets if the source cannot be exactly covered by word
2361 2011-11-21 Jakub Jelinek <jakub@redhat.com>
2364 * var-tracking.c (loc_cmp): For ENTRY_VALUEs use ENTRY_VALUE_EXP
2365 macro instead of XEXP.
2367 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
2369 * configure: Regenerate.
2371 2011-11-21 Georg-Johann Lay <avr@gjlay.de>
2373 * config/avr/avr.c (output_reload_in_const): Loading a byte with 0
2374 must not affect cc0.
2375 * config/avr/avr.md (*movhi, *movpsi, *movsi, *movsf): Zero to any
2376 register does not change cc0. Same for any constant to ld-register.
2378 2011-11-21 Uros Bizjak <ubizjak@gmail.com>
2380 * config/i386/mmx.md (unspec) <UNSPEC_MOVNTQ, UNSPEC_PFRCP,
2381 UNSPEC_PFRCPIT1, UNSPEC_PFRCPIT2, UNSPEC_PFRSQRT, UNSPEC_PFRSQIT1>:
2382 Move from config/i386/i386.md
2383 (unspecv) <UNSPECV_EMMS, UNSPECV_FEMMS>: Ditto.
2384 * config/i386/sse.md (unspec) <UNSPEC_MOVNT,UNSPEC_MOVU, UNSPEC_LDDQU,
2385 UNSPEC_PSHUFB, UNSPEC_PSIGN, UNSPEC_PALIGNR, UNSPEC_EXTRQI,
2386 UNSPEC_EXTRQ, UNSPEC_INSERTQI, UNSPEC_INSERTQ, UNSPEC_BLENDV,
2387 UNSPEC_INSERTPS, UNSPEC_DP, UNSPEC_MOVNTDQA, UNSPEC_MPSADBW,
2388 UNSPEC_PHMINPOSUW, UNSPEC_PTEST, UNSPEC_PCMPESTR, UNSPEC_PCMPISTR,
2389 UNSPEC_FMADDSUB, UNSPEC_XOP_UNSIGNED_CMP, UNSPEC_XOP_TRUEFALSE,
2390 UNSPEC_XOP_PERMUTE, UNSPEC_FRCZ, UNSPEC_AESENC, UNSPEC_AESENCLAST,
2391 UNSPEC_AESDEC, UNSPEC_AESDECLAST, UNSPEC_AESIMC,
2392 UNSPEC_AESKEYGENASSIST, UNSPEC_PCLMUL, UNSPEC_PCMP, UNSPEC_VPERMIL,
2393 UNSPEC_VPERMIL2, UNSPEC_VPERMIL2F128, UNSPEC_CAST, UNSPEC_VTESTP,
2394 UNSPEC_VCVTPH2PS, UNSPEC_VCVTPS2PH, UNSPEC_VPERMSI, UNSPEC_VPERMDF,
2395 UNSPEC_VPERMSF, UNSPEC_VPERMTI, UNSPEC_GATHER, UNSPEC_VSIBADDR>: Ditto.
2396 (unspecv) <UNSPECV_LDMXCSR, UNSPECV_STMXCSR, UNSPECV_CLFLUSH,
2397 UNSPECV_MONITOR, UNSPECV_MWAIT, UNSPECV_VZEROALL, UNSPECV_VZEROUPPER>:
2399 * config/i386/sync.md (unspec) <UNSPEC_LFENCE, UNSPEC_SFENCE,
2400 UNSPEC_MFENCE, UNSPEC_MOVA>: Ditto.
2401 (unspecv) <UNSPECV_CMPXCHG_1, UNSPECV_CMPXCHG_2, UNSPECV_CMPXCHG_3,
2402 UNSPECV_CMPXCHG_4, UNSPECV_XCHG, UNSPECV_LOCK>: Ditto.
2403 (sse2_lfence): Move from config/i386/sse.md.
2404 (*sse2_lfence): Ditto.
2405 (sse_sfence): Ditto.
2406 (*sse_sfence): Ditto.
2407 (sse2_mfence): Ditto.
2408 (mfence_sse2): Ditto. Rename from *sse2_mfence. Enable also
2410 (mem_thread_fence): Use mfence_sse2.
2412 2011-11-21 Georg-Johann Lay <avr@gjlay.de>
2414 * config/avr/avr.h (struct base_arch_s): Add field sfr_offset.
2415 * config/avr/avr-devices.c: Ditto. And initialize it.
2416 * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in define
2418 * config/avr/avr-protos.h (out_movqi_r_mr, out_movqi_mr_r): Remove.
2419 (out_movhi_r_mr, out_movhi_mr_r): Remove.
2420 (out_movsi_r_mr, out_movsi_mr_r): Remove.
2421 * config/avr/avr.md (*cbi, *sbi): Use %i instead of %m-0x20.
2422 (*insv.io, *insv.not.io): Ditto.
2423 * config/avr/avr.c (out_movsi_r_mr, out_movsi_mr_r): Make static.
2424 (print_operand): Implement "%i" to print address as I/O address.
2425 (output_movqi): Clean up call of out_movqi_mr_r.
2426 (output_movhi): Clean up call of out_movhi_mr_r.
2427 (avr_file_start): Use avr_current_arch->sfr_offset instead of
2428 magic -0x20. Use TMP_REGNO, ZERO_REGNO instead of 0, 1.
2429 (avr_out_sbxx_branch): Use %i instead of %m-0x20.
2430 (out_movqi_r_mr, out_movqi_mr_r): Ditto. And make static.
2431 (out_movhi_r_mr, out_movhi_mr_r): Ditto. And use avr_asm_len.
2432 (out_shift_with_cnt): Clean up code: Use avr_asm_len.
2433 (output_movsisf): Use output_reload_insisf for all CONSTANT_P sources.
2434 (avr_out_movpsi): USE avr_out_reload_inpsi for all CONSTANT_P sources.
2435 Clean up call of avr_out_store_psi.
2436 (output_reload_in_const): Don't cut symbols longer than 2 bytes.
2437 (output_reload_insisf): Filter CONST_INT_P or CONST_DOUBLE_P to
2438 try if setting pre-cleared register is advantageous.
2439 (avr_out_plus_1): Use gen_int_mode instead of GEN_INT.
2441 2011-11-20 Joey Ye <joey.ye@arm.com>
2443 * expr.c (expand_expr_real_1): Correctly handle strict volatile
2444 bitfield loads smaller than mode size.
2446 2011-11-20 Richard Henderson <rth@redhat.com>
2448 * config/mips/mips.c (mips_init_libfuncs): Call init_sync_libfuncs.
2450 2011-11-20 Uros Bizjak <ubizjak@gmail.com>
2453 * config/i386/i386.c (ix86_expand_vcond): Generate TARGET_XOP
2454 patterns for supported mode only.
2457 * config/i386/i386.c (ix86_expand_builtin)
2458 <IX86_BUILTIN_GATHERALTSIV4DI>: Use CODE_FOR_avx2_gathersiv4di.
2460 2011-11-20 Uros Bizjak <ubizjak@gmail.com>
2462 * config/i386/i386.md (UNSPEC_MOVNTI): Remove.
2463 (UNSPEC_MOVNTQ): New unspec.
2464 * config/i386/mmx.md (sse_movntq): Rename from sse_movntdi.
2465 Use UNSPEC_MOVNTQ instead of UNSPEC_MOVNT.
2466 * config/i386/sse.md (sse2_movnti<mode>): Use UNSPEC_MOVNT instead of
2468 (STORENT_MODE): Add DI and V4DI modes.
2470 2011-11-20 Nathan Sidwell <nathan@acm.org>
2472 PR gcov-profile/51113
2473 * coverage.c (build_var): Propagate visibility for public
2474 decls. Use make_decl_one_only for PIC correctness.
2477 * gcc.misc-tests/gcov-13.c: Check gcovpart-13b coverage
2478 * gcc.misc-tests/gcov-16.c: New.
2479 * gcc.misc-tests/gcov-17.c: New.
2480 * g++.dg/gcov/gcov-8.C: New.
2481 * g++.dg/gcov/gcov-9.C: New.
2482 * g++.dg/gcov/gcov-10.C: New.
2484 2011-11-19 Eric Botcazou <ebotcazou@adacore.com>
2486 PR rtl-optimization/51187
2487 * reorg.c (relax_delay_slots): Do not consider a jump useless if there
2488 is a barrier between the jump and its target label.
2490 2011-11-19 Patrick Marlier <patrick.marlier@gmail.com>
2493 * tracer.c (ignore_bb_p): Don't copy GIMPLE_TRANSACTION.
2495 2011-11-19 Eric Botcazou <ebotcazou@adacore.com>
2497 * expmed.c (store_bit_field_1): Revert bogus formatting change.
2499 2011-11-19 Richard Earnshaw <rearnsha@arm.com>
2502 * config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial
2503 overlap of src and dest operands.
2505 2011-11-19 Iain Sandoe <iains@gcc.gnu.org>
2507 * config/darwin.h (ASM_DEBUG_SPEC): New.
2508 * config/darwin9.h (ASM_DEBUG_SPEC): New.
2510 2011-11-18 Jan Hubicka <jh@suse.cz>
2512 * config/i386/i386.c (atom_cost): Disable SSE loop until alignment
2515 2011-11-18 Anatoly Sokolov <aesok@post.ru>
2517 * config/cris/cris.c (cris_function_value_regno_p): Make static.
2518 (TARGET_FUNCTION_VALUE_REGNO_P): Define.
2519 * config/cris/cris.h (FUNCTION_VALUE_REGNO_P): Remove.
2520 * config/cris/cris-protos.h (cris_function_value_regno_p): Remove.
2522 2011-11-18 H.J. Lu <hongjiu.lu@intel.com>
2525 * doc/extend.texi: Document __builtin_ia32_movnti64.
2527 * config/i386/emmintrin.h (_mm_stream_si64): New.
2529 * config/i386/i386-builtin-types.def: Add VOID_FTYPE_PLONGLONG_LONGLONG.
2531 * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_MOVNTI64.
2532 (bdesc_special_args): Update __builtin_ia32_movnti. Add
2533 __builtin_ia32_movnti64.
2534 (ix86_expand_special_args_builtin): Handle
2535 VOID_FTYPE_PLONGLONG_LONGLONG.
2537 * config/i386/i386.md (UNSPEC_MOVNTI): New.
2539 * config/i386/sse.md (sse2_movntsi): Renamed to ...
2540 (sse2_movnti<mode>): This.
2542 2011-11-18 Georg-Johann Lay <avr@gjlay.de>
2545 * config/avr/avr.h (base_arch_s): Add field n_segments.
2546 (ADDR_SPACE_PGM1, ADDR_SPACE_PGM2, ADDR_SPACE_PGM3,
2547 ADDR_SPACE_PGM4, ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): New address spaces.
2548 (AVR_HAVE_ELPM, AVR_HAVE_ELPMX): New defines.
2549 (INIT_EXPANDERS): New define.
2550 * config/avr/avr-protos.h (avr_mem_pgmx_p): New.
2551 (avr_init_expanders): New.
2552 (avr_emit_movmemhi, avr_out_movmem): New.
2553 (avr_xload_libgcc_p): New.
2554 * config/avr/avr-c.c (avr_register_target_pragmas): Register
2555 address spaces __pgm1, __pgm2, __pgm3, __pgm4 __pgm5, __pgmx.
2556 (avr_cpu_cpp_builtins): Add built-in defines __PGM1,
2557 __PGM2, __PGM3, __PGM4, __PGM5, __PGMX.
2558 * config/avr/avr-devices.c (avr_arch_types): Set field n_segments.
2560 * config/avr/avr.c (AVR_SECTION_PROGMEM): Change define to cover
2561 3 bits instead of just 1.
2562 (xstring_empty, xstring_e, rampz_rtx): New static GTYed variables.
2563 (progmem_section): Change from section to array of sections.
2564 (progmem_section_prefix): New static variable.
2565 (avr_file_start): Print set for __RAMPZ__
2566 (avr_option_override): Move initialization of RTXes from here...
2567 (avr_init_expanders): ...to this new function.
2568 (avr_pgm_segment): New static function.
2569 (avr_decl_pgm_p): Handle error_mark_node.
2570 (avr_mem_pgmx_p, avr_decl_pgmx_p): New static functions.
2571 (avr_out_xload, avr_find_unused_d_reg): New static functions.
2572 (expand_prologue, expand_epilogue): Use rampz_rtx.
2573 (print_operand): Hande CONST_STRING.
2574 (avr_xload_libgcc_p): New static function.
2575 (avr_out_lpm_no_lpmx, avr_out_lpm): Handle ELPM.
2576 (avr_progmem_p): Return 2 for 24-bit flash address space.
2577 (avr_out_sbxx_branch): Clean-up code from ASn macros.
2578 (out_movqi_r_mr, out_movqi_mr_r): Ditto. And recognize RAMPZ's
2579 address and print symbolically.
2580 (avr_asm_named_section, avr_section_type_flags,
2581 avr_encode_section_info, avr_asm_select_section,
2582 avr_addr_space_address_mode, avr_addr_space_pointer_mode,
2583 avr_addr_space_legitimate_address_p, avr_addr_space_convert,
2584 avr_addr_space_legitimize_address): Handle new address spaces.
2585 (avr_output_progmem_section_asm_op): New static function.
2586 (avr_asm_init_sections): Initialize progmem_section[].
2587 (adjust_insn_length): Handle ADJUST_LEN_XLOAD, ADJUST_LEN_MOVMEM.
2588 (avr_const_address_lo16): New static function.
2589 (avr_assemble_integer): Use it to handle 3-byte integers.
2590 (avr_emit_movmemhi, avr_out_movmem): New functions.
2592 * config/avr/predicates.md (nox_general_operand): Handle new
2594 * config/avr/avr.md (unspec): Add UNSPEC_MOVMEM.
2595 (adjust_len): Add xload, movmem.
2596 (SP_ADDR): New define_constants.
2597 (isa): Add "lpm", "lpmx", "elpm", "elpmx".
2598 (enabled): Handle them.
2599 (load<mode>_libgcc): New expander.
2600 (*load.<mode>.libgcc): Rename to load_<mode>_libgcc.
2601 (xload8_A, xload<mode>_A): New insn-and-splits.
2602 (xload_8, xload_<mode>_libgcc, xload_<mode>, loadmem_elpm): New insns.
2603 (mov<mode>): Handle new address spaces.
2604 (movmemhi): Rewrite using avr_emit_movmemhi.
2605 (MOVMEM_r_d): New mode attribute.
2606 (movmem_<mode>, movmem_qi_elpm): New insns.
2607 (setmemhi, *clrmemqi, *clrmemhi, strlenhi, *strlenhi): Unquote
2608 C-code. Use label instead of hard-coded instrunction lengths.
2610 2011-11-18 Martin Jambor <mjambor@suse.cz>
2612 PR tree-optimization/50605
2613 * gimple.c (is_gimple_ip_invariant_address): Also handle MEM_REFs
2614 of IPA invariant decls.
2616 2011-11-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2618 * tree-outof-ssa.c (insert_back_edge_copies): Add call to
2619 mark_dfs_back_edges.
2621 2011-11-18 Iain Sandoe <iains@gcc.gnu.org>
2624 * configure.ac: Remove ranlib special-casing for Darwin.
2625 * configure: Regenerate.
2627 2011-11-18 Uros Bizjak <ubizjak@gmail.com>
2629 PR tree-optimization/51118
2630 * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure
2631 before using TREE_TYPE accessor on expr.
2633 2011-11-17 Jan Hubicka <jh@suse.cz>
2636 * i386.c (atom_cost): Fix 32bit memset description.
2637 (expand_set_or_movmem_via_loop_with_iter): Output proper bounds check
2639 (expand_movmem_epilogue): Handle epilogues up to size 15 w/o producing
2641 (decide_alg): sse_loop is not useable wthen SSE2 is disabled;
2642 when not optimizing always use rep movsb or lincall; do not produce
2643 word sized loops when optimizing memset for size (to avoid need
2644 for large constants).
2645 (ix86_expand_movmem): Get into sync with ix86_expand_setmem;
2646 choose unroll factors better; always do 128bit moves when producing
2647 SSE loops; do not produce loopy epilogue when size is too small.
2648 (promote_duplicated_reg_to_size): Do not look into desired alignments
2649 when doing vector expansion.
2650 (ix86_expand_setmem): Track better when promoted value is available;
2651 choose unroll factors more sanely. Output loopy epilogue only
2654 2011-11-17 Steve Ellcey <sje@cup.hp.com>
2657 * output.h (fprint_w): Remove.
2658 * final.c (fprint_w): Remove.
2659 (output_addr_const): Change fprint_w back to fprintf.
2661 2011-11-17 Andrew Pinski <apinski@cavium.com>
2663 * config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for MIPS.
2665 2011-11-17 Andrew MacLeod <amacleod@redhat.com>
2667 * builtins.c (expand_builtin): Remove 4th parameter representing
2668 weak/strong mode when __atomic_compare_exchange becomes a library call.
2670 2011-11-17 Richard Henderson <rth@redhat.com>
2672 * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
2673 new pseudo for target after convert_modes.
2674 (rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2676 2011-11-17 Richard Henderson <rth@redhat.com>
2678 * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
2679 new pseudo for target after convert_modes.
2680 (rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2682 2011-11-17 Richard Henderson <rth@redhat.com>
2684 * builtins.c (expand_builtin_mem_thread_fence): Remove.
2685 (expand_builtin_mem_signal_fence): Remove.
2686 (expand_builtin_atomic_thread_fence): Use expand_mem_thread_fence.
2687 (expand_builtin_sync_synchronize): Likewise.
2688 (expand_builtin_atomic_signal_fence): Use expand_mem_signal_fence.
2689 * optabs.c (expand_asm_memory_barrier): Split out from
2690 expand_builtin_mem_signal_fence.
2691 (expand_mem_thread_fence): New, a combination of code from
2692 expand_builtin_mem_thread_fence and expand_builtin_sync_synchronize.
2693 (expand_mem_signal_fence): Moved and renamed from
2694 expand_builtin_mem_signal_fence.
2695 (expand_atomic_exchange): Use expand_mem_thread_fence.
2696 (expand_atomic_load, expand_atomic_store): Likewise.
2697 * expr.h, optabs.h: Update decls.
2699 2011-11-17 Bin Cheng <bin.cheng@arm.com>
2701 PR rtl-optimization/50663
2702 * cprop.c (implicit_set_indexes): New global variable.
2703 (insert_set_in_table): Add additional parameter and record implicit
2705 (hash_scan_set): Add additional parameter and pass it to above.
2706 (hash_scan_insn): Pass false to hash_scan_set.
2707 (compute_hash_table_work): Pass true to hash_scan_set.
2708 (compute_cprop_data): Add implicit set to AVIN of block which the
2709 implicit set is recorded for.
2710 (one_cprop_pass): Handle implicit_set_indexes array.
2712 2011-11-17 Michael Matz <matz@suse.de>
2716 * tree-ssa-live.c (mark_all_vars_used_1): Recurse only for decls of
2718 (remove_unused_locals): Ditto.
2720 2011-11-16 Richard Henderson <rth@redhat.com>
2722 * config/alpha/alpha.c (alpha_split_compare_and_swap_12): Copy
2723 ALIAS_SET_MEMORY_BARRIER when creating a new memory.
2724 (alpha_split_atomic_exchange_12): Likewise.
2725 * config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Likewise.
2727 2011-11-16 Joseph Myers <joseph@codesourcery.com>
2729 * config/i386/i386elf.h (PREFERRED_DEBUGGING_TYPE): Remove.
2731 2011-11-16 David Edelsohn <dje.gcc@gmail.com>
2733 * config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags):
2734 Default to minimum alignment if decl is NULL.
2736 2011-11-16 Uros Bizjak <ubizjak@gmail.com>
2738 * config/i386/sse.md (round<mode>2_vec_pack_sfix): Optimize V2DFmode
2740 (<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
2742 2011-11-16 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2744 * doc/invoke.texi: Document AMD bdver1 and btver1.
2746 2011-11-16 Richard Earnshaw <rearnsha@arm.com>
2747 Bernd Schmidt <bernds@coudesourcery.com>
2748 Sebastian Huber <sebastian.huber@embedded-brains.de>
2751 * config/arm/arm.c (store_multiple_sequence): Avoid cases where
2752 the base reg is stored iff compiling for Thumb1.
2754 2011-11-16 Razya Ladelsky <razya@il.ibm.com>
2756 PR tree-optimization/49960
2757 * tree-data-ref.c (initialize_data_dependence_relation): Add
2759 Remove call to compute_self_dependence.
2760 (compute_affine_dependence): Remove the !DDR_SELF_REFERENCE condition.
2761 (compute_self_dependence): Remove old code. Add call to
2762 compute_affine_dependence.
2763 (compute_all_dependences): Remove call to compute_self_dependence.
2764 Add call to compute_affine_dependence.
2766 2011-11-16 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2769 * expmed.c (store_bit_field_1): Use extract_bit_field on big
2770 endian targets if the source cannot be exactly covered by word
2773 2011-11-15 Joseph Myers <joseph@codesourcery.com>
2775 * config/i386/i386elf.h (ASM_OUTPUT_ASCII): Change STRING_LIMIT to
2778 2011-11-15 Richard Henderson <rth@redhat.com>
2780 * config/alpha/alpha.c (alpha_pre_atomic_barrier): New.
2781 (alpha_post_atomic_barrier): New.
2782 (alpha_split_atomic_op): New memmodel argument; honor it.
2783 (alpha_split_compare_and_swap): Take array of operands. Honor
2784 memmodel; always set bool output
2785 (alpha_expand_compare_and_swap_12): Similarly.
2786 (alpha_split_compare_and_swap_12): Similarly.
2787 (alpha_split_atomic_exchange): Similarly. Rename from
2788 alpha_split_lock_test_and_set.
2789 (alpha_expand_atomic_exchange_12): Similarly. Rename from
2790 alpha_expand_lock_test_and_set_12.
2791 (alpha_split_atomic_exchange_12): Similarly. Rename from
2792 alpha_split_lock_test_and_set_12.
2793 * config/alpha/alpha-protos.h: Update.
2794 * config/alpha/alpha.md (UNSPECV_CMPXCHG): New.
2795 * config/alpha/constraints.md ("w"): New.
2796 * config/alpha/predicates.md (mem_noofs_operand): New.
2797 * config/alpha/sync.md (atomic_compare_and_swap<mode>): Rename from
2798 sync_compare_and_swap<mode>; add the new parameters.
2799 (atomic_exchange<mode>): Update from sync_test_and_set<mode>.
2800 (atomic_fetch_<op><mode>): Update from sync_old_<op><mode>.
2801 (atomic_<op>_fetch<mode>): Update from sync_new_<op><mode>.
2802 (atomic_<op><mode>): Update from sync_<op><mode>.
2804 2011-11-16 Tom de Vries <tom@codesourcery.com>
2806 * tree-ssa-tail-merge.c (replace_block_by): Add frequency of bb2 to bb1.
2808 2011-11-16 Alan Modra <amodra@gmail.com>
2810 PR rtl-optimization/51051
2812 * function.c (thread_prologue_and_epilogue_insns): Guard
2813 emitting return with single_succ_p test.
2815 2011-11-15 Joern Rennecke <joern.rennecke@embecosm.com>
2817 * config/epiphany/epiphany.md (mov<mode>cc): Fix code to
2818 get mode from CMP_OP1 if CMP_OP0 is VOIDmode.
2820 2011-11-15 Uros Bizjak <ubizjak@gmail.com>
2822 * config/i386/sse.md (vec_pack_trunc_v2df): Optimize sequence for AVX.
2823 (vec_pack_sfix_trunc_v2df): Ditto.
2824 (vec_pack_sfix_v2df): Ditto.
2825 (vec_pack_sfix_trunc_v4df): Generate fix_truncv4dfv4si2 and
2826 avx_vec_concatv8si patterns.
2827 (vec_pack_sfix_v4df): Generate avx_cvtpd2dq256 and
2828 avx_vec_concatv8si patterns.
2830 2011-11-15 Torvald Riegel <triegel@redhat.com>
2832 * c-parser.c (c_parser_transaction_expression): Require parentheses
2833 when parsing transaction expressions.
2835 2011-11-15 Tristan Gingold <gingold@adacore.com>
2837 * incpath.c (get_added_cpp_dirs): New function.
2838 * incpath.h (get_added_cpp_dirs): Declare.
2839 * config/vms/vms-c.c (vms_c_register_includes): New function.
2840 (vms_std_modules): New variable.
2841 * config/vms/vms.h (TARGET_EXTRA_INCLUDES): Define.
2842 (vms_c_register_includes): Declare.
2844 2011-11-15 Tristan Gingold <gingold@adacore.com>
2846 * c-family/c-pragma.h (pragma_extern_prefix): Declare.
2847 * c-family/c-pragma.c (pragma_extern_prefix): Make it public.
2848 * config/vms/vms-c.c (saved_extern_prefix): New variable.
2849 (vms_pragma_extern_prefix): New function.
2850 (vms_c_register_pragma): Register vms_pragma_extern_prefix.
2852 2011-11-15 Georg-Johann Lay <avr@gjlay.de>
2855 * config/avr/avr.h (ADDR_SPACE_PGM): New address spaces.
2856 (REGISTER_TARGET_PRAGMAS): New define.
2857 * config/avr/avr-protos.h (avr_mem_pgm_p): New.
2858 (avr_load_libgcc_p): New.
2859 (avr_register_target_pragmas): New.
2860 (asm_output_external_libcall): Remove.
2861 (avr_log_t): Add field "progmem". Order alphabetically.
2862 * config/avr/avr-log.c (avr_log_set_avr_log): Set avr_log.progmem.
2863 * config/avr/avr-c.c (langhooks.h): New include.
2864 (avr_register_target_pragmas): New function. Register address
2866 (avr_cpu_cpp_builtins): Add built-in define __PGM.
2868 * config/avr/avr.c: Include "c-family/c-common.h".
2869 (TARGET_LEGITIMATE_ADDRESS_P): Remove define.
2870 (TARGET_LEGITIMIZE_ADDRESS): Remove define.
2871 (TARGET_ADDR_SPACE_SUBSET_P): Define to...
2872 (avr_addr_space_subset_p): ...this new static function.
2873 (TARGET_ADDR_SPACE_CONVERT): Define to...
2874 (avr_addr_space_convert): ...this new static function.
2875 (TARGET_ADDR_SPACE_ADDRESS_MODE): Define to...
2876 (avr_addr_space_address_mode): ...this new static function.
2877 (TARGET_ADDR_SPACE_POINTER_MODE): Define to...
2878 (avr_addr_space_pointer_mode): ...this new static function.
2879 (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define to...
2880 (avr_addr_space_legitimate_address_p): ...this new static function.
2881 (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Define to...
2882 (avr_addr_space_legitimize_address): ...this new static function.
2883 (avr_mode_code_base_reg_class): Handle address spaces.
2884 (avr_regno_mode_code_ok_for_base_p): Ditto.
2885 (lpm_addr_reg_rtx, lpm_reg_rtx, all_regs_rtx): New static variables.
2886 (avr_option_override): Initialize them.
2887 (output_reload_in_const): Use all_regs_rtx. Fix signedness of loop
2889 (avr_pgm_segment): New static function.
2890 (avr_decl_pgm_p, avr_mem_pgm_p): New static functions.
2891 (avr_out_lpm, avr_out_lpm_no_lpmx): New static functions.
2892 (output_movqi, output_movhi, output_movsisf, avr_out_movpsi): Call
2893 avr_out_lpm to handle loads from progmem.
2894 (avr_load_libgcc_p): New static function.
2895 (avr_progmem_p): Test if decl is in flash.
2896 (avr_pgm_pointer_const_p): New static function.
2897 (avr_nonconst_pointer_addrspace): New static function.
2898 (avr_pgm_check_var_decl): New static function.
2899 (avr_insert_attributes): Use it. Change error message to report
2900 cause (progmem or address space) when code wants to write to flash.
2901 (avr_section_type_flags): Unset section flag SECTION_BSS for
2904 * config/avr/predicates.md (nop_general_operand): New predicate.
2905 (nox_general_operand): New predicate.
2906 * config/avr/avr.md (LPM_REGNO): New define_constant.
2907 (load<mode>_libgcc): New expander.
2908 (*load.<mode>.libgcc): New insn.
2909 (mov<mode>): Handle loads from non-generic AS.
2910 (movmemhi): Ditto. Propagate address space information to newly
2912 (movqi_insn, *movhi, *movpsi, *movsi, *movsf): Change predicate #1
2913 to nox_general_operand.
2914 (ashrqi3, ashrhi3, ashrsi3): Change predicate #1 to
2915 nop_general_operand.
2916 (ashlqi3, *ashlqi3, ashlhi3, ashlsi3): Ditto.
2917 (lshrqi3, *lshrqi3, lshrhi3, lshrsi3): Ditto.
2918 (split-lpmx): New split.
2919 (*ashlhi3_const, *ashlsi3_const, *ashrhi3_const, *ashrsi3_const,
2920 *lshrhi3_const, *lshrsi3_const): Indent, unquote C.
2922 2011-11-15 Maxim Kuvyrkov <maxim@codesourcery.com>
2924 * ipa-cp.c (ipa_value_from_jfunc): Make global.
2925 (ipa_cst_from_jfunc): Remove, use ipa_value_from_jfunc instead.
2926 (get_indirect_edge_target): Rename, make global.
2927 (devirtualization_time_bonus, estimate_local_effects,)
2928 (ipcp_discover_new_direct_edges): Update.
2929 * ipa-inline-analysis.c (evaluate_conditions_for_edge):
2930 Generalize to also handle types. Rename to ...
2931 (evaluate_properties_for_edge): Use instead of
2932 evaluate_conditions_for_edge.
2933 (estimate_edge_devirt_benefit): New function.
2934 (estimate_calls_size_and_time): Use it.
2935 (estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,)
2936 (inline_merge_summary): Update.
2937 (do_estimate_edge_time, do_estimate_edge_growth): Update. Calculate
2938 parameter information at the call site and pass it on to subroutines.
2939 * tree-inline.c (estimate_num_insns): Distinguish between direct and
2941 (init_inline_once): Set size and time costs or indirect calls.
2942 * tree-inline.h (eni_weights): Add indirect_call_cost.
2944 2011-11-15 Tom de Vries <tom@codesourcery.com>
2946 PR tree-optimization/51005
2947 * tree-ssa-tail-merge.c (delete_basic_block_same_succ): Rename to
2948 mark_basic_block_deleted.
2949 (update_worklist): Inline purge_bbs.
2950 (purge_bbs, unlink_virtual_phi, update_vuses, vop_at_entry)
2951 (delete_block_update_dominator_info): Remove.
2952 (replace_block_by): Remove update_vops parameter. Partially evaluate
2953 for update_vops == false.
2954 (apply_clusters): Remove update_vops parameter. Remove update_vops
2955 argument in replace_block_by call.
2956 (update_debug_stmts): Remove MAY_HAVE_DEBUG_STMTS test.
2957 (tail_merge_optimize): Remove update_vops argument to apply_clusters.
2958 Remove call to purge_bbs. Add calls to calculate_dominance_info and
2959 free_dominance_info. Add MAY_HAVE_DEBUG_STMTS before calling
2960 update_debug_stmts. Mark vop var for renaming, if necessary.
2962 2011-11-15 Bernd Schmidt <bernds@codesourcery.com>
2964 PR rtl-optimization/51051
2965 * cfgrtl.c (cfg_layout_can_merge_blocks_p): Return FALSE if the
2966 move would cause fallthrough into the exit block.
2968 2011-11-14 Richard Henderson <rth@redhat.com>
2970 * config/rs6000/rs6000.c (emit_load_locked): Assert the mode is
2972 (emit_store_conditional): Likewise.
2973 (rs6000_pre_atomic_barrier, rs6000_post_atomic_barrier): New.
2974 (rs6000_adjust_atomic_subword): New.
2975 (rs6000_mask_atomic_subword, rs6000_finish_atomic_subword): New.
2976 (rs6000_expand_atomic_op): Rename from rs6000_emit_sync; rewrite
2977 for pre-reload expansion.
2978 (rs6000_split_compare_and_swap, rs6000_split_compare_and_swapqhi,
2979 rs6000_expand_compare_and_swapqhi): Merge into ...
2980 (rs6000_expand_atomic_compare_and_swap): ... here. New function.
2981 rs6000_split_lock_test_and_set; expand immediately. Handle
2983 * config/rs6000/rs6000.md (UNSPEC_LWSYNC): Move and rename
2984 from UNSPECV_LWSYNC.
2985 * config/rs6000/sync.md (fetchopsi_constr, fetchopdi_constr): Remove.
2986 (mem_thread_fence): New.
2987 (hwsync): Rename from memory_barrier.
2988 (*hwsync): Rename from *sync_internal.
2989 (lwsync, *lwsync): Mirror hwsync implementation.
2990 (isync): Don't reference memory.
2992 (atomic_load<INT>, atomic_store<INT>): New.
2993 (ATOMIC): New mode iterator.
2994 (load_locked<ATOMIC>): Rename from load_locked_<GPR>.
2995 (store_conditional<ATOMIC>): Rename from store_conditional_<GPR>.
2996 (sync_compare_and_swap<GPR>): Remove.
2997 (sync_compare_and_swaphi, sync_compare_and_swapqi): Remove.
2998 (sync_compare_and_swapqhi_internal): Remove.
2999 (sync_lock_test_and_set<GPR>): Remove.
3000 (sync_<FETCHOP><INT1>): Remove.
3001 (*sync_<FETCHOP>si_internal, *sync_<FETCHOP>di_internal): Remove.
3002 (sync_nand<INT1>, *sync_nand<GPR>_internal): Remove.
3003 (sync_old_<FETCHOP><GPR>): Remove.
3004 (*sync_old_<FETCHOP>si_internal): Remove.
3005 (*sync_old_<FETCHOP>di_internal): Remove.
3006 (sync_old_nand<INT1>): Remove.
3007 (*sync_old_nand<GPR>_internal): Remove.
3008 (sync_new_<FETCHOP><GPR>): Remove.
3009 (*sync_new_<FETCHOP>si_internal): Remove.
3010 (*sync_new_<FETCHOP>di_internal): Remove.
3011 (sync_new_nand<INT1>): Remove.
3012 (*sync_new_nand<GPR>_internal): Remove.
3013 (*atomic_andsi, *atomic_anddi): Remove.
3014 (*sync_addshort_internal, *sync_subshort_internal): Remove.
3015 (*sync_andsi_internal, *sync_boolsi_internal): Remove.
3016 (*sync_boolcshort_internal): Remove.
3017 (sync_lock_release<INT1>): Remove.
3018 (atomic_compare_and_swap<INT1>): New.
3019 (atomic_exchange<INT1>): New.
3020 (atomic_<FETCHOP><INT1>, atomic_nand<INT1>): New.
3021 (atomic_fetch_<FETCHOP><INT1>, atomic_fetch_nand<INT1>): New.
3022 (atomic_<FETCHOP>_fetch<INT1>, atomic_nand_fetch<INT1>): New.
3024 2011-11-14 Uros Bizjak <ubizjak@gmail.com>
3026 * config/i386/sse.md (round<mode>2): Use register_operand for
3027 operand 1 predicate.
3028 (round<mode>2_sfix): Ditto.
3029 (round<mode>2_vec_pack_sfix): Ditto for operand 1 and operand 2.
3031 2011-11-14 Nathan Sidwell <nathan@acm.org>
3033 * gcov.c (canonicalize_name): Protect use of S_ISLNK.
3035 2011-11-14 Jan Hubicka <jh@suse.cz>
3038 * config/i386/i386.c (core cost model): Correct pasto.
3040 2011-11-14 Uros Bizjak <ubizjak@gmail.com>
3042 * config/i386/sse.md (round<mode>2_sfix): New expander.
3043 (round<mode>2_vec_pack_sfix): Ditto.
3044 (<sse4_1>_round<ssemodesuffix>_sfix<avxsizesuffix>): Ditto.
3045 (<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
3046 * config/i386/builtin-types.def (V4SI_FTYPE_V4SF_ROUND,
3047 V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND,
3048 V8SI_FTYPE_V4DF_V4DF_ROUND): New builtin types.
3049 * config/i386/i386.c (ix86_builtins): Add
3050 IX86_BUILTIN_{FLOORPD,CEILPD,ROUNDPD_AZ}_VEC_PACK_SFIX{,256} and
3051 IX86_BUILTIN_{FLOORPS,CEILPS,ROUNDPS_AZ}_SFIX{,256} defines.
3052 (bdesc_args): Add __builtin_ia32_{floorpd,ceilpd}_vec_pack_sfix{,256},
3053 __builtin_ia32_roundpd_az_vec_pack_sfix{,256},
3054 __builtin_ia32_{floorps,ceilps}_sfix{,256}and
3055 __builtin_ia32_roundps_az_sfix{,256} descriptions.
3056 (ix86_expand_sse_round_vec_pack_sfix): New.
3057 (ix86_expand_args_builtin): Handle V4SI_FTYPE_V4SF_ROUND,
3058 V8SI_FTYPE_V8SF_ROUND, V4SI_FTYPE_V2DF_V2DF_ROUND and
3059 V8SI_FTYPE_V4DF_V4DF_ROUND types. Check last argument of
3060 CODE_FOR_sse4_1_roundpd_vec_pack_sfix, CODE_FOR_sse4_1_roundps_sfix,
3061 CODE_FOR_avx_roundpd_vec_pack_sfix256 and CODE_FOR_avx_roundps_sfix256.
3062 (ix86_builtin_vectorized_function): Handle
3063 BUILT_IN_{I,L,LL}FLOOR{,F}, BUILT_IN_{I,L,LL}CEIL{,F} and
3064 BUILT_IN_{I,L,LL}ROUND{,F}
3066 2011-11-14 Jan Hubicka <jh@suse.cz>
3069 * cgraph.h (varpool_externally_visible_p): Declare.
3070 (varpool_add_new_variable): Declare.
3071 * tree-emultls.c (get_emutls_init_templ_addr,
3072 new_emutls_decl): Use varpool_add_new_variable.
3073 * ipa.c (varpool_externally_visible_p): Export.
3074 * varpool.c (varpool_add_new_variable): New function.
3076 2011-11-14 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
3077 Jan Hubicka <jh@suse.cz>
3079 * config/i386/i386.h (processor_costs): Add second dimension to
3080 stringop_algs array.
3081 * config/i386/i386.c (cost models): Initialize second dimension of
3082 stringop_algs arrays.
3083 (core_cost): New costs based on generic64 costs with updated stringop
3085 (promote_duplicated_reg): Add support for vector modes, add
3087 (promote_duplicated_reg_to_size): Likewise.
3088 (processor_target): Set core costs for core variants.
3089 (expand_set_or_movmem_via_loop_with_iter): New function.
3090 (expand_set_or_movmem_via_loop): Enable reuse of the same iters in
3091 different loops, produced by this function.
3092 (emit_strset): New function.
3093 (expand_movmem_epilogue): Add epilogue generation for bigger sizes,
3094 use SSE-moves where possible.
3095 (expand_setmem_epilogue): Likewise.
3096 (expand_movmem_prologue): Likewise for prologue.
3097 (expand_setmem_prologue): Likewise.
3098 (expand_constant_movmem_prologue): Likewise.
3099 (expand_constant_setmem_prologue): Likewise.
3100 (decide_alg): Add new argument align_unknown. Fix algorithm of
3101 strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop
3102 (decide_alignment): Update desired alignment according to chosen move
3104 (ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves.
3105 (ix86_expand_setmem): Likewise.
3106 (ix86_slow_unaligned_access): Implementation of new hook
3107 slow_unaligned_access.
3108 * config/i386/i386.md (strset): Enable half-SSE moves.
3109 * config/i386/sse.md (vec_dupv4si): Add expand for vec_dupv4si.
3110 (vec_dupv2di): Add expand for vec_dupv2di.
3112 2011-11-14 Dimitrios Apostolou <jimis@gmx.net>
3116 * config/elfos.h (TARGET_ASM_INTERNAL_LABEL): Remove.
3117 * varasm.c (default_elf_internal_label): Remove.
3119 2011-11-14 Kai Tietz <ktietz@redhat.com>
3121 * gcov.c (generate_results): Add missing semicolon and correct indent.
3123 2011-11-14 Ira Rosen <ira.rosen@linaro.org>
3126 * tree-vect-stmts.c (vectorizable_condition): Initialize comp_vectype.
3128 2011-11-14 Mingjie Xing <mingjie.xing@gmail.com>
3130 * doc/invoke.texi (Wunused-result): Change @pxref{Variable Attributes}
3131 to @pxref{Function Attributes}.
3133 2011-11-13 Oleg Endo <oleg.endo@t-online.de>
3136 * config/sh/sh.h (IS_LITTLE_ENDIAN_OPTION, UNSUPPORTED_SH2A):
3138 (DRIVER_SELF_SPECS): Use new macros to filter out unsupported options
3139 taking the default configuration into account.
3141 2011-11-13 Jonathan Wakely <jwakely.gcc@gmail.com>
3143 * doc/install.texi (Specific): Fix anchor for
3144 x86_64-*-solaris2.1[0-9]*.
3146 2011-11-13 Nathan Sidwell <nathan@acm.org>
3148 * gcov.c (source_prefix, source_length): New globals.
3149 (flag_relative_only): Likewise.
3150 (print_usage, options, process_args): Update.
3151 (generate_results): Use coverage.name, check
3152 flag_relative_only. Adjust messages.
3153 (find_source): Check source_prefix.
3154 (output_lines): Use coverage.name, adjust messages.
3155 * doc/gcov.texi (Invoking Gcov): Document new options.
3157 2011-11-12 Jason Merrill <jason@redhat.com>
3160 * gimplify.c (gimplify_target_expr): Add a clobber to the cleanup.
3161 (gimplify_modify_expr): Don't try to simplify it.
3163 2011-11-12 Dimitrios Apostolou <jimis@gmx.net>
3166 * config/elfos.h (STRING_ASM_OP): Define.
3167 * varasm.c (default_elf_asm_output_limited_string): Use it.
3170 * gcc/configure.ac: Check for stpcpy declaration.
3171 * system.h: Declare it if not.
3172 * config.in, configure: Regenerate.
3174 2011-11-12 Richard Henderson <rth@redhat.com>
3176 * config/rs6000/rs6000.md (fix_trunc<SFDF>si2_stfiwx): Use
3177 nonimmediate_operand for the destination.
3178 (fixuns_trunc<SFDF>si2_stfiwx): Likewise.
3180 * builtins.c (expand_builtin_compare_and_swap): If target is const0,
3181 don't pass the target to expand_atomic_compare_and_swap.
3182 (expand_builtin_atomic_compare_exchange): Likewise.
3184 * config/sh/linux.h (TARGET_INIT_LIBFUNCS): New.
3185 * config/sh/sh.c (sh_init_sync_libfuncs): New.
3187 * config/pa/pa-linux.h (TARGET_SYNC_LIBCALL): New.
3188 * config/pa/pa.h (TARGET_SYNC_LIBCALL): New default.
3189 * config/pa/pa.c (pa_init_libfuncs): Use init_sync_libfuncs.
3191 2011-11-12 Iain Sandoe <iains@gcc.gnu.org>
3194 * config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
3195 Only expand a symbol ref. into an access when the entity is defined
3198 2011-11-12 Jan Hubicka <jh@suse.cz>
3201 * cgraphunit.c (output_weakrefs): Output really only weakrefs.
3203 2011-11-12 Nathan Sidwell <nathan@acm.org>
3205 * gcov.c (struct name_map): New.
3206 (names, n_names, a_names): New global vars.
3207 (print_usage): Adjust usage.
3208 (generate_results): Canonicalize main file name.
3209 (release_structures): Adjust.
3210 (name_search, name_sort): New callbacks.
3211 (find_source): Look for and create a canonical name.
3212 (canonicalize_name): New.
3213 (make_gcov_file_name): Reimplement and fix mangling.
3215 * doc/gcov.texi: Update documentation about path preservation.
3217 2011-11-11 David S. Miller <davem@davemloft.net>
3219 * config/sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Delete.
3220 * config/sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Delete.
3222 2011-11-11 Jakub Jelinek <jakub@redhat.com>
3224 * config/i386/i386-protos.h (ix86_maybe_emit_epilogue_vzeroupper):
3226 * config/i386/i386.c (ix86_maybe_emit_epilogue_vzeroupper): New
3228 (ix86_expand_epilogue): Use it.
3229 * config/i386/i386.md (return, simple_return): Call it in the
3232 PR tree-optimization/51091
3233 * tree-stdarg.c (execute_optimize_stdarg): Ignore TREE_CLOBBER_P
3234 rhs also in the va_list_simple_ptr case.
3236 PR tree-optimization/51058
3237 * tree-vect-slp.c (vect_remove_slp_scalar_calls): New function.
3238 (vect_schedule_slp): Call it.
3239 * tree-vect-stmts.c (vectorizable_call): If slp_node != NULL,
3240 don't replace scalar calls with setting of their lhs to zero here.
3242 PR tree-optimization/51074
3243 * fold-const.c (vec_cst_ctor_to_array, fold_vec_perm): New functions.
3244 (fold_binary_loc): Handle VEC_EXTRACT_EVEN_EXPR,
3245 VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR and
3246 VEC_INTERLEAVE_LOW_EXPR with VECTOR_CST or CONSTRUCTOR operands.
3247 (fold_ternary_loc): Handle VEC_PERM_EXPR with VECTOR_CST or
3248 CONSTRUCTOR operands.
3249 * tree-ssa-propagate.c (valid_gimple_rhs_p): Handle ternary
3251 * tree-vect-generic.c (lower_vec_perm): Mask sel_int elements
3252 to 0 .. 2 * elements - 1.
3254 2011-11-11 Richard Henderson <rth@redhat.com>
3256 * gimple-pretty-print.c (dump_gimple_omp_atomic_load): Dump needed.
3257 (dump_gimple_omp_atomic_store): Likewise.
3258 * optabs.c (can_atomic_exchange_p): New.
3259 * optabs.h (can_atomic_exchange_p): Declare.
3260 * omp-low.c (expand_omp_atomic_load): Implement.
3261 (expand_omp_atomic_store): Likewise.
3262 (expand_omp_atomic): Update for new arguments to load/store.
3264 2011-11-11 Eric Botcazou <ebotcazou@adacore.com>
3266 * cprop.c: Adjust outdated comments throughout.
3267 (hash_scan_set): Rename PAT parameter into SET.
3268 (cprop_pavloc): Rename into...
3269 (cprop_avloc): ...this.
3270 (cprop_absaltered): Rename into...
3271 (cprop_kill): ...this.
3272 (alloc_cprop_mem): Adjust for above renaming.
3273 (free_cprop_mem): Likewise.
3274 (compute_cprop_data): Likewise.
3275 (compute_local_properties): Rename TRANSP parameter into KILL and
3276 adjust throughout. Rework comments.
3277 (try_replace_reg): Fix long line.
3278 (cprop_jump): Likewise.
3279 (constprop_register): Fix prototype and take INSN last.
3280 (cprop_insn): Adjust calls to above function. Fix long lines.
3281 (bypass_block): Likewise.
3282 (one_cprop_pass): Likewise.
3284 2011-11-11 Uros Bizjak <ubizjak@gmail.com>
3286 * config/alpha/elf.h (ELF_ASCII_ESCAPES): Rename from ESCAPES.
3287 (ELF_STRING_LIMIT): Rename from STRING_LIMIT.
3289 2011-11-11 Jason Merrill <jason@redhat.com>
3291 * varasm.c (default_elf_asm_output_limited_string): #ifdef
3293 (default_elf_asm_output_ascii): Likewise.
3295 2011-11-11 Uros Bizjak <ubizjak@gmail.com>
3298 * config/i386/constraints.md (j): New address constraint.
3299 * config/i386/predicates.md (lea_address_operand): Redefine as
3301 * config/i386/i386.md (*lea_3_zext): Use "j" constraint for operand 1.
3302 (*lea_4_zext): Ditto.
3304 2011-11-11 David S. Miller <davem@davemloft.net>
3307 2011-11-05 David S. Miller <davem@davemloft.net>
3309 * config/sparc/sparc.md (UNSPEC_SHORT_LOAD): New unspec.
3310 (zero-extend_v8qi_vis, zero_extend_v4hi_vis): New expanders.
3311 (*zero_extend_v8qi_<P:mode>_insn,
3312 *zero_extend_v4hi_<P:mode>_insn): New insns.
3313 * config/sparc/sparc.c (vector_init_move_words,
3314 vector_init_prepare_elts, sparc_expand_vector_init_vis2,
3315 sparc_expand_vector_init_vis1): New functions.
3316 (vector_init_bshuffle): Rewrite to handle more cases and make use
3317 of locs[] array prepared by vector_init_prepare_elts.
3318 (vector_init_fpmerge, vector_init_faligndata): Delete.
3319 (sparc_expand_vector_init): Rewrite using new infrastructure.
3321 2011-11-11 Jakub Jelinek <jakub@redhat.com>
3323 * opts-common.c (generate_canonical_option): Free opt_text
3324 it it has been allocated here and not stored anywhere.
3326 * tree-vect-slp.c (vect_free_slp_tree): Also free SLP_TREE_CHILDREN
3328 (vect_create_new_slp_node): Don't allocate node before checking stmt
3330 (vect_free_oprnd_info): Remove FREE_DEF_STMTS argument, always
3331 free def_stmts vectors and additionally free oprnd_info.
3332 (vect_build_slp_tree): Adjust callers. Call it even if
3333 stop_recursion. If vect_create_new_slp_node or
3334 vect_build_slp_tree fails, properly handle freeing memory.
3335 If it succeeded, clear def_stmts in oprnd_info.
3337 2011-11-11 Dimitrios Apostolou <jimis@gmx.net>
3339 * defaults.h (ASM_OUTPUT_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Expand on
3340 multiple lines for readability.
3341 * output.h (fprint_whex, fprint_w, fprint_ul, sprint_ul): Declare.
3342 (ASM_OUTPUT_LABELREF): Call fputs instead of asm_fprintf.
3343 * dwarf2asm.c (dw2_assemble_integer, dw2_asm_output_data,
3344 dw2_asm_data_uleb128, dw2_asm_delta_uleb128,
3345 dw2_asm_delta_sleb128): Convert fprintf calls to the new functions.
3346 * dwarf2out.c (dwarf2out_source_line): Call fprint_ul instead of
3348 * final.c (fprint_whex, fprint_w, fprint_ul, sprint_ul): New functions
3349 serving as fast replacements for fprintf integer to string conversions.
3350 (sprint_ul_rev): Internal helper for the above.
3351 (output_addr_const) <CONST_INT>: Don't use fprintf.
3352 * varasm.c: Fix some whitespace inconsistencies.
3353 (default_elf_asm_output_limited_string): New.
3354 (default_elf_asm_output_ascii): Likewise.
3355 (default_elf_internal_label): Likewise.
3356 * config/elfos.h (ASM_GENERATE_INTERNAL_LABEL): Use sprint_ul and
3357 stpcpy instead of sprintf.
3358 (TARGET_ASM_INTERNAL_LABEL): Define as default_elf_internal_label.
3359 (ELF_ASCII_ESCAPES, ELF_STRING_LIMIT): Rename from old ESCAPES and
3360 STRING_LIMIT macros.
3361 (ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII): Call functions that
3362 provide the same functionality.
3363 * config/i386/i386.c (print_reg): Call fprint_ul instead of fprintf.
3365 2011-11-10 Andrew MacLeod <amacleod@redhat.com>
3367 * doc/extend.texi: Document __atomic_test_and_set and __atomic_clear.
3369 2011-11-10 Andrew MacLeod <amacleod@redhat.com>
3372 * builtins.c (expand_builtin_atomic_clear): New. Expand atomic_clear.
3373 (expand_builtin_atomic_test_and_set): New. Expand atomic test_and_set.
3374 (expand_builtin): Add cases for test_and_set and clear.
3375 * sync-builtins.def (BUILT_IN_ATOMIC_TEST_AND_SET): New.
3376 (BUILT_IN_ATOMIC_CLEAR): New.
3378 2011-11-10 Roberto Agostino Vitillo <ravitillo@lbl.gov>
3381 * dwarf2out.c (set_cur_line_info_table): Restore the last is_stmt
3382 value in the current line table.
3384 2011-11-10 Nathan Sidwell <nathan@acm.org>
3386 * gcov.c (struct function_info): Make src an index, not a pointer.
3387 (struct source_info): Remove index and next source fields.
3388 (fn_end): New static var.
3389 (sources_index): Remove.
3390 (sources): Now a pointer to an array, not a list.
3391 (n_sources, a_sources): New.
3392 (process_file): Adjust for changes to read_graph_file. Insert
3393 functions into source lists and check line numbers here.
3394 (generate_results): Only allocate lines for sources with
3395 contents. Adjust for source array.
3396 (release_structures): Likewise.
3397 (find_source): Return source index, adjust for source array.
3398 (read_graph_file): Return function list. Don't insert into source
3400 (read_count_file): Take list of functions.
3401 (solve_flow_graph): Reverse the arc lists here.
3402 (add_line_counts): Adjust for source array.
3404 2011-11-10 Jakub Jelinek <jakub@redhat.com>
3407 * tree-object-size.c (addr_object_size): Check TREE_CODE of
3408 MEM_REF's operand rather than code of the MEM_REF itself.
3410 2011-11-10 Andrew MacLeod <amacleod@redhat.com>
3412 PR rtl-optimization/51040
3413 * optabs.c (expand_atomic_fetch_op): Patchup code for NAND should
3414 be AND followed by NOT.
3415 * builtins.c (expand_builtin_atomic_fetch_op): Patchup code for NAND
3416 should be AND followed by NOT.
3418 2011-11-10 Jakub Jelinek <jakub@redhat.com>
3420 * vec.h (VEC_BASE): If base is at offset 0 in the structure,
3421 use &(P)->base even if P is NULL.
3423 PR rtl-optimization/51023
3424 * combine.c (simplify_comparison) <case SIGN_EXTEND>: Don't use
3425 val_signbit_known_clear_p for signed comparison narrowing
3426 optimization. Don't check for non-VOIDmode, use
3427 HWI_COMPUTABLE_MODE_P macro.
3428 <case ZERO_EXTEND>: Don't check for non-VOIDmode.
3429 Optimize even when const_op is equal to GET_MODE_MASK (mode),
3430 don't optimize if const_op is negative.
3432 2011-11-10 Richard Guenther <rguenther@suse.de>
3434 PR tree-optimization/51042
3435 * tree-ssa-pre.c (phi_translate_1): Avoid recursing on
3436 self-referential expressions. Refactor code to avoid duplication.
3438 2011-11-10 Richard Guenther <rguenther@suse.de>
3440 PR tree-optimization/51070
3441 * tree-loop-distribution.c (generate_builtin): Do not replace
3442 the loop with a builtin if the partition contains statements which
3443 results are used outside of the loop.
3444 (pass_loop_distribution): Verify and collect.
3446 2011-11-10 Richard Guenther <rguenther@suse.de>
3448 PR tree-optimization/51030
3449 * tree-ssa-phiopt.c (jump_function_from_stmt): New function.