Commit Graph

118482 Commits

Author SHA1 Message Date
Uros Bizjak 920ac8043e sse.md (xop integer multiply/add insns): Use register_operand for operand 3 predicate.
* config/i386/sse.md (xop integer multiply/add insns): Use
	register_operand for operand 3 predicate.
	(xop_phadd<u>bq):  Fix vec_select selectors.

From-SVN: r190314
2012-08-11 13:37:02 +02:00
Martin Jambor 8810cc52c9 re PR fortran/48636 (Enable more inlining with -O2 and higher)
2012-08-11  Martin Jambor  <mjambor@suse.cz>

	PR fortran/48636
	* ipa-inline.h (condition): New fields offset, agg_contents and by_ref.
	* ipa-inline-analysis.c (agg_position_info): New type.
	(add_condition): New parameter aggpos, also store agg_contents, by_ref
	and offset.
	(dump_condition): Also dump aggregate conditions.
	(evaluate_conditions_for_known_args): Also handle aggregate
	conditions.  New parameter known_aggs.
	(evaluate_properties_for_edge): Gather known aggregate contents.
	(inline_node_duplication_hook): Pass NULL known_aggs to
	evaluate_conditions_for_known_args.
	(unmodified_parm): Split into unmodified_parm and unmodified_parm_1.
	(unmodified_parm_or_parm_agg_item): New function.
	(set_cond_stmt_execution_predicate): Handle values passed in
	aggregates.
	(set_switch_stmt_execution_predicate): Likewise.
	(will_be_nonconstant_predicate): Likewise.
	(estimate_edge_devirt_benefit): Pass new parameter known_aggs to
	ipa_get_indirect_edge_target.
	(estimate_calls_size_and_time): New parameter known_aggs, pass it
	recrsively to itself and to estimate_edge_devirt_benefit.
	(estimate_node_size_and_time): New vector known_aggs, pass it o
	functions which need it.
	(remap_predicate): New parameter offset_map, use it to remap aggregate
	conditions.
	(remap_edge_summaries): New parameter offset_map, pass it recursively
	to itself and to remap_predicate.
	(inline_merge_summary): Also create and populate vector offset_map.
	(do_estimate_edge_time): New vector of known aggregate contents,
	passed to functions which need it.
	(inline_read_section): Stream new fields of condition.
	(inline_write_summary): Likewise.
	* ipa-cp.c (ipa_get_indirect_edge_target): Also examine the aggregate
	contents.  Let all local callers pass NULL for known_aggs.

	* testsuite/gfortran.dg/pr48636.f90: New test.

From-SVN: r190313
2012-08-11 12:50:24 +02:00
Jan Hubicka ab96cc5b4d lto-cgraph.c (output_cgraph): Rename to ...
* lto-cgraph.c (output_cgraph): Rename to ...
	(output_symtab): ... this one. Update for LTO_section_symtab_nodes.
	(input_cgraph): Rename to ...
	(input_symtab): ... this one. Update for LTO_section_symtab_nodes.
	* lto-streamer-out.c (create_output_block): Do not set
	section_type.
	(produce_asm): Likewise.
	(lto_output_toplevel_asms): Likewise.
	(produce_asm_for_decls): Likewise.
	(lto_output): Use output_symtab.
	* lto-section-in.c (lto_section_name): Update.
	* lto-section-out.c (lto_destroy_simple_output_block): Remove section_type.
	* lto-streamer.h (enum lto_section_type): Remove LTO_section_varpool;
	rename LTO_section_cgraph to LTO_section_symtab_nodes.
	(struct lto_header): Remove section_type.

	* lto.c (read_cgraph_and_symbols): Use input_symtab.

From-SVN: r190312
2012-08-11 08:38:59 +00:00
Ian Lance Taylor 3af76e5a95 compiler: Reject type switch using non-interface type.
Fixes issue 16.

From-SVN: r190310
2012-08-11 04:09:21 +00:00
Jan Hubicka 7380e6efdd cgraph.h (vector types for symtab_node): Add.
* cgraph.h (vector types for symtab_node): Add.
	* ipa-reference.c (ipa_reference_write_optimization_summary): Update
	for new symtab encoder.
	(ipa_reference_read_optimization_summary): Likewise.
	* lto-cgraph.c (output_varpool): Remove.
	(input_cgraph_opt_summary): Take symtab nodes vector as argument.
	(LTO_cgraph_tags): Rename to ...
	(LTO_symtab_tags): ... this one; add LTO_symtab_variable.
	(lto_cgraph_encoder_new): Rename to ...
	(lto_symtab_encoder_new): ... this on.
	(lto_cgraph_encoder_encode): Rename to ...
	(lto_symtab_encoder_encode): ... this one.
	(lto_cgraph_encoder_delete): Rename to ...
	(lto_symtab_encoder_delete): ... this one.
	(lto_cgraph_encoder_deref): Rename to ...
	(lto_symtab_encoder_deref): ... this one.
	(lto_cgraph_encoder_encode_body_p): Rename to ...
	(lto_symtab_encoder_encode_body_p): ... this one.
	(lto_varpool_encoder_new, lto_varpool_encoder_delete,
	lto_varpool_encoder_encode, lto_varpool_encoder_lookup,
	lto_varpool_encoder_deref): Remove.
	(lto_varpool_encoder_encode_initializer_p): Rename to ...
	(lto_symtab_encoder_encode_initializer_p): ... this one.
	(lto_set_varpool_encoder_encode_initializer): Rename to ...
	(lto_set_symtab_encoder_encode_initializer): ... this one.
	(lto_output_edge): Update.
	(lto_output_node): Update.
	(lto_output_varpool_node): Update; stream out LTO_symtab_variable tag.
	(lto_output_ref): Drop varpool_encoder; update.
	(add_node_to): Update.
	(add_references): Update.
	(output_outgoing_cgraph_edges): Update.
	(output_refs): Update.	
	(compute_ltrans_boundary): Update.
	(output_cgraph): Update; output varpools too.
	(input_overwrite_node): Update.
	(output_varpool): Remove.
	(input_node): Update.
	(input_ref): Update.
	(input_edge): Update.
	(input_cgraph_1): Update; input varpool too; unify fixup code.
	(input_varpool_1): Remove.
	(input_refs): Update.
	(input_cgraph): Update.
	(output_node_opt_summary): Update.
	(input_cgraph_opt_section): Update.
	(input_cgraph_opt_summary): Update.
	* ipa-pure-const.c (pure_const_write_summary): Update.
	(pure_const_read_summary): Update.
	* lto-streamer-out.c (lto_write_tree): Update.
	(lto_output): Likewise.
	(produce_symtab): Update.
	(produce_asm_for_decls): Update.
	* ipa-inline-analysis.c (inline_read_section): Update.
	(inline_write_summary): Update.
	* ipa-prop.c (ipa_write_node_info): Update.
	(ipa_prop_read_section): Update.
	* lto-streamer.h (lto_cgraph_encoder_d): Rename to ...
	(lto_symtab_encoder_d): ... this one;  add initializer.
	(lto_cgraph_encoder_t): Rename to ...
	(lto_symtab_encoder_t): ... this one.
	(lto_cgraph_encoder_size): Rename to ...
	(lto_symtab_encoder_size): ... this one.
	(lto_varpool_encoder_d): ... remove.
	(lto_varpool_encoder_t): Remove.
	(lto_out_decl_state): Remove cgraph_node_encoder, varpool_node_encoder
	add symtab_node_encoder.
	(lto_file_decl_data): Likewise.
	(lto_cgraph_encoder_deref, lto_cgraph_encoder_lookup,
	lto_cgraph_encoder_new, lto_cgraph_encoder_encode, lto_cgraph_encoder_delete,
	lto_cgraph_encoder_encode_body_p, lto_varpool_encoder_encode_body_p,
	lto_varpool_encoder_deref, lto_varpool_encoder_lookup, lto_varpool_encoder_new,
	lto_varpool_encoder_encode, lto_varpool_encoder_delete,
	lto_varpool_encoder_encode_initializer_p): Remove.
	(lto_symtab_encoder_deref, lto_symtab_encoder_lookup,
	lto_symtab_encoder_t, lto_symtab_encoder_encode, lto_symtab_encoder_delete,
	lto_symtab_encoder_encode_body_p, lto_symtab_encoder_encode_initializer_p):
	New.

From-SVN: r190309
2012-08-11 03:04:35 +00:00
GCC Administrator 46b496e997 Daily bump.
From-SVN: r190308
2012-08-11 00:18:07 +00:00
Uros Bizjak 3e5804e1a9 i386.md (isa): Add fma and fma4.
* config/i386/i386.md (isa): Add fma and fma4.
	(enabled): Handle fma and fma4.
	* config/i386/sse.md (*fma_fmadd_<mode>): Merge *fma4_fmadd_<mode>.
	(*fma_fmsub_<mode>): Merge *fma4_fmsub_<mode>.
	(*fma_fnmadd_<mode>): Merge *fma4_fnmadd_<mode>.
	(*fma_fnmsub_<mode>): Merge *fma4_fnmsub_<mode>.
	(*fma_fmaddsub_<mode>): Merge *fma4_fmaddsub_<mode>.
	(*fma_fmsubadd_<mode>): Merge *fma4_fmsubadd_<mode>.

From-SVN: r190305
2012-08-11 00:25:17 +02:00
Uros Bizjak b0d5396c7e * config/i386/sse.md (*fma_fmadd_<mode>, *fma_fmsub_<mode>,
*fma_fnmadd_<mode>, *fma_fnmsub_<mode>, *fma_fmaddsub_<mode>,
	*fma_fmsubadd_<mode>): Move FMA3 insn patterns before FMA4 patterns.

From-SVN: r190304
2012-08-10 22:46:15 +02:00
Jakub Jelinek a2a40ee85b vector-shuffle1.c (f): Pass vectors indirectly to avoid warnings.
* gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly
	to avoid warnings.
	(main): Adjust caller.

From-SVN: r190302
2012-08-10 22:21:23 +02:00
Uros Bizjak 4bf02aaf4d i386.md (simple LEA peephole2s): Add zero-extend variants of PLUS and MULT simple LEA patterns.
* config/i386/i386.md (simple LEA peephole2s): Add zero-extend
	variants of PLUS and MULT simple LEA patterns.  Disable PLUS
	patterns for TARGET_OPT_AGU.

From-SVN: r190301
2012-08-10 19:20:09 +02:00
Richard Guenther 04f92ff4fc Makefile.in (OBJS): Remove matrix-reorg.o.
2012-08-10  Richard Guenther  <rguenther@suse.de>

	* Makefile.in (OBJS): Remove matrix-reorg.o.
	(matrix-reorg.o): Remove dependence rule.
	(GTFILES): Remove matrix-reorg.c.
	* matrix-reorg.c: Remove.
	* passes.c (init_optimization_passes): Do not schedule
	pass_ipa_matrix_reorg.
	* tree-pass.h (pass_ipa_matrix_reorg): Remove.
	* common.opt (fipa-matrix-reorg): Stub out.
	* doc/invoke.texi (fipa-matrix-reorg): Remove documentation.

	* gcc.dg/matrix/*.c: Adjust and move ...
	* gcc.dg/torture/: ... here.
	* gcc.dg/matrix: Remove directory.

From-SVN: r190298
2012-08-10 14:19:09 +00:00
Richard Guenther 09e4850d7e re PR middle-end/54219 (__builtin_shuffle mask reversed)
2012-08-10  Richard Guenther  <rguenther@suse.de>

	PR middle-end/54219
	* fold-const.c (fold_ternary_loc): Do not reverse the mask
	when canonicalizing it when folding VEC_PERM_EXPR.

	* gcc.dg/torture/vector-shuffle1.c: New testcase.

From-SVN: r190297
2012-08-10 13:35:34 +00:00
Bill Schmidt 99cababb4b re PR middle-end/54211 (ICE: verify_gimple failed building freetype with -Os)
gcc:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR middle-end/54211
	* gimple-ssa-strength-reduction.c (analyze_candidates_and_replace):
	Use cand_type to determine whether pointer arithmetic will be generated.

gcc/testsuite:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR middle-end/54211
	* gcc.dg/tree-ssa/pr54211.c: New test.

From-SVN: r190294
2012-08-10 12:16:04 +00:00
Bill Schmidt 75bc384117 sourcebuild.texi: Document long_neq_int effective target.
gcc:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* doc/sourcebuild.texi: Document long_neq_int effective target.


testsuite:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* lib/target-supports.exp (check_effective_target_long_neq_int): New.
	* gcc.dg/tree-ssa/slsr-30.c: Check for long_neq_int effective target.

From-SVN: r190293
2012-08-10 12:11:29 +00:00
Richard Guenther ab509eb535 re PR middle-end/54109 (ICE at tree-ssa-structalias.c:3049 in get_constraint_for_component_ref)
2012-08-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/54109
	* tree-ssa-forwprop.c
	(forward_propagate_addr_into_variable_array_index): Remove.
	(forward_propagate_addr_expr_1): Adjust.

	* gcc.dg/torture/pr54109.c: New testcase.
	* gcc.dg/tree-ssa/forwprop-1.c: Adjust.
	* gcc.dg/tree-ssa/forwprop-2.c: Likewise.

From-SVN: r190291
2012-08-10 12:00:05 +00:00
Richard Guenther e28b8a6054 tree-cfg.c (dump_function_to_file): Make sure to dump anonymous SSA names when there are no local decls.
2012-08-10  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (dump_function_to_file): Make sure to dump
	anonymous SSA names when there are no local decls.

From-SVN: r190290
2012-08-10 11:54:55 +00:00
Steven Bosscher 580b2c2ef6 tree-ssa-pre.c (alloc_expression_id): Fix use of VEC_reserve.
* tree-ssa-pre.c (alloc_expression_id): Fix use of VEC_reserve.
	* tree-into-ssa.c (get_ssa_name_ann): Likewise.
	(mark_phi_for_rewrite): Likewise.
	(compute_global_livein): Use VEC_reserve outside the innermost
	loop and VEC_quick_push instead of VEC_safe_push in that loop.
	(update_ssa): Re-organize to avoid unnecessary sbitmap_zero'ing
	of new_ssa_names and old_ssa_names.  Allocate phis_to_rewrite to
	the correct initial size.

From-SVN: r190289
2012-08-10 09:27:31 +00:00
Richard Guenther 83d5977e2f tree-ssa-pre.c (pretemp, [...]): Remove.
2012-08-10  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (pretemp, storetemp, prephitemp): Remove.
	(need_creation): Remove.
	(get_representative_for): Use anonymous named SSA names.
	(create_expression_by_pieces): Likewise.
	(insert_into_preds_of_block): Likewise.
	(init_pre): Do not init removed vars.
	(fini_pre): Do not free need_creation.
	* tree-ssa-forwprop.c (simplify_bitwise_binary): Use anonymous
	SSA names.
	* tree-ssa-loop-manip.c (create_iv): Likewise.
	* value-prof.c (gimple_divmod_fixed_value): Likewise.
	(gimple_mod_pow2): Likewise.
	(gimple_mod_subtract): Likewise.
	(gimple_ic): Likewise.
	(gimple_stringop_fixed_value): Likewise.
	* tree-ssa-phiopt.c (condstoretemp): Remove.
	(tree_ssa_phiopt_worker): Use anonymous named SSA names.
	(conditional_replacement): Likewise.
	(abs_replacement): Likewise.
	(cond_store_replacement): Likewise.
	(cond_if_else_store_replacement_1): Likewise.
	* tree-ssa-loop-im.c (rewrite_reciprocal): Likewise.
	(rewrite_bittest): Likewise.
	* tree-ssa-reassoc.c (build_and_add_sum): Get type from callers
	and build anonymous SSA names.
	(undistribute_ops_list): Adjust.
	(eliminate_redundant_comparison): Use anonymous SSA names.
	(rewrite_expr_tree_parallel): Likewise.
	(get_reassoc_pow_ssa_name): Remove.
	(attempt_builtin_powi): Adjust.
	(reassociate_bb): Likewise.
	* tree-ssa-strlen.c (get_string_length): Use anonymous SSA names.
	* tree-switch-conversion.c (emit_case_bit_tests): Likewise.
	(build_arrays): Likewise.
	* tree-tailcall.c (adjust_return_value_with_ops): Likewise.
	(create_tailcall_accumulator): Likewise.
	* tree-vect-generic.c (expand_vector_divmod): Likewise.
	* tree-profile.c (gcov_type_tmp_var): Remove.
	(gimple_init_edge_profiler): Do not initialize it and use anonymous
	SSA names.
	(gimple_gen_ic_profiler): Likewise.
	(tree_profiling): Adjust.
	* tree-sra.c (build_ref_for_offset): Use anonymous SSA names.
	* tree-ssa-math-opts.c (execute_cse_sincos_1): Likewise.
	(powi_as_mults_1): Likewise.
	(powi_as_mults): Likewise.
	(build_and_insert_call): Adjust.
	(build_and_insert_binop): Likewise.
	(build_and_insert_ref): Likewise.
	(build_and_insert_cast): Likewise.
	(gimple_expand_builtin_pow): Likewise.
	(gimple_expand_builtin_cabs): Likewise.
	(execute_optimize_bswap): Use anonymous SSA names.
	(convert_mult_to_widen): Likewise.
	(convert_plusminus_to_widen): Likewise.
	* tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
	* tree-ssa-propagate.c (update_call_from_tree): Likewise.
	* tree-if-conv.c (ifc_temp_var): Likewise.
	* tree-loop-distribution.c (generate_memset_builtin): Likewise.
	* tree-parloops.c (take_address_of): Likewise.
	* tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
	(vect_permute_load_chain): Likewise.
	* tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
	* tree-vect-patterns.c (vect_recog_temp_ssa_var): Likewise.
	(vect_handle_widen_op_by_const): Likewise.
	(vect_operation_fits_smaller_type): Likewise.
	(vect_recog_over_widening_pattern): Likewise.
	* tree-vect-stmts.c (vect_init_vector): Likewise.
	* tree-vrp.c (simplify_truth_ops_using_ranges): Likewise.
	(simplify_float_conversion_using_ranges): Likewise.

From-SVN: r190288
2012-08-10 09:20:29 +00:00
Michael Zolotukhin 7b5e682ae5 i386.c (ix86_init_mmx_sse_builtins): Fix builtin target mask of __builtin_ia32_rdseed_di_step.
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Fix builtin
	target mask of __builtin_ia32_rdseed_di_step.

From-SVN: r190287
2012-08-10 08:39:47 +00:00
Richard Guenther a28729836a re PR tree-optimization/54027 (possible mis-optimization of signed left shift in c89 mode)
2012-08-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/54027
	* tree-vrp.c (extract_range_from_binary_expr_1): Merge RSHIFT_EXPR
	and LSHIFT_EXPR handling, force -fwrapv for the multiplication used
	to handle LSHIFT_EXPR with a constant.

	* gcc.dg/torture/pr54027.c: New testcase.

From-SVN: r190286
2012-08-10 08:33:57 +00:00
Richard Guenther 70b5e7dc73 tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE is recorded as var.
2012-08-10  Richard Guenther  <rguenther@suse.de>

	* tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE
	is recorded as var.
	(SSA_NAME_IDENTIFIER): Return the IDENTIFIER_NODE of the SSA_NAME
	or its SSA_NAME_VAR.
	(SET_SSA_NAME_VAR_OR_IDENTIFIER): New setter.
	* tree-ssanames.c (make_ssa_name_fn): Handle creating anonymous
	SSA names by passing a type instead of a variable decl.
	(release_ssa_name): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
	(copy_ssa_name_fn): Handle anonymous SSA names.
	(replace_ssa_name_symbol): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
	* tree-flow-inline.h (make_temp_ssa_name): New inline function.
	* tree-pretty-print.c (dump_generic_node): Use SSA_NAME_IDENTIFIER,
	dump SSA names without a name as <anon>.
	* cfgexpand.c (expand_used_vars): Assing anonymous SSA names we are
	going to expand a decl.
	(gimple_expand_cfg): Assign all SSA names of a partition the
	decl we created for its leader.
	* tree-ssa.c (target_for_debug_bind): Handle SSA_NAMEs.
	(verify_ssa_name): Handle anonymous SSA names.
	(verify_def): Likewise.
	* tree-predcom.c (eliminate_temp_copies): Likewise.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
	* tree-ssa-live.c (var_map_base_init): Compute conflicts for
	anonymous SSA names with the same type.
	(mark_all_vars_used_1): Handle anonymous SSA names.
	(verify_live_on_entry): Likewise.
	* tree-ssa-coalesce.c (abnormal_corrupt): Remove.
	(create_outofssa_var_map): Adjust with respect to conflicts we
	compute for anonymous SSA names.  Do not restrict abnormal
	coalescing.
	(coalesce_partitions): Do not restrict abnormal coalescing.
	Assert we only ever coalesce variables we computed conflicts for.
	* tree-ssa-ter.c (process_replaceable): Do not restrict TER
	of anonymous names.
	* expr.c (expand_expr_real_1): Handle anonymous SSA names
	expanded from IVOPTs by creating a raw REG here.
	* tree-cfg.c (replace_ssa_name): Handle anonymous SSA names.
	(dump_function_to_file): Dump anonymous SSA names alongside
	with their types in the variable list.
	(verify_gimple_return): Guard use of SSA_NAME_VAR.
	* tree-into-ssa.c (mark_for_renaming): Handle a NULL symbol.
	(rewrite_into_ssa): Make SSA names anonymous.
	* tree-ssa-structalias.c (alias_get_name): Rewrite.
	* tree-ssa-uninit.c (ssa_undefined_value_p): Handle anonymous
	SSA names.
	(warn_uninitialized_phi): Likewise.
	* tree-ssa-loop-ivopts.c (prepare_decl_rtl): Defer expanding
	anonymous SSA names to the expander.
	(determine_iv_cost): Anonymous SSA names are artificial.
	* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
	Handle anonymous SSA names.
	* lto-streamer-out.c (output_ssa_names): Stream SSA_NAME_VAR
	or if NULL, the type of the SSA name.
	* tree-inline.c (remap_ssa_name): Handle anonymous SSA names,
	remap names as anonymous where appropriate.
	(insert_init_stmt): Pass SSA names down to insert_init_debug_bind.
	* tree-ssa-uncprop.c (uncprop_into_successor_phis): Adjust
	according to what we create conflicts for in out-of-SSA
	coalescing.
	* tree-parloops.c (separate_decls_in_region_name): Handle
	anonymous SSA names.
	(add_field_for_name): Likewise.
	* tree.c (get_name): Handle SSA names.
	* tree-ssa-loop-im.c (gen_lsm_tmp_name): Defer to get_name for
	SSA_NAMEs.
	* tree-vect-loop-manip.c (adjust_debug_stmts): Use
	virtual_operand_p.
	* tree-sra.c (create_access_replacement): Give up generating
	a DECL_DEBUG_EXPR for SSA names in the memory reference.
	(replace_removed_params_ssa_names): Guard use of SSA_NAME_VAR.
	* tree-complex.c (get_component_ssa_name): Handle anonymous
	SSA names.
	(set_component_ssa_name): Likewise.
	* tree-ssa-sccvn.c (visit_reference_op_load): Likewise.
	* tree-object-size.c (collect_object_sizes_for): Handle
	uninitialized SSA names properly.
	* ipa-inline-analysis.c (eliminated_by_inlining_prob): Guard use of
	SSA_NAME_VAR.
	* ipa-split.c (test_nonssa_use): Likewise.
	(consider_split): Likewise.
	(mark_nonssa_use): Likewise.

	c-family/
	* c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.

	cp/
	* error.c (dump_expr): Likewise.

	* g++.dg/plugin/selfassign.c: Adjust.
	* gcc.dg/plugin/selfassign.c: Likewise.
	* gcc.dg/strlenopt-11.c: Likewise.
	* gcc.dg/strlenopt-13.c: Likewise.
	* gcc.dg/no-strict-overflow-4.c: Likewise.
	* gcc.dg/strict-overflow-4.c: Likewise.
	* gcc.dg/tree-ssa/alias-11.c: Likewise.
	* gcc.dg/tree-ssa/alias-6.c: Likewise.
	* gcc.dg/tree-ssa/asm-3.c: Likewise.
	* gcc.dg/tree-ssa/pr18908.c: Likewise.
	* gcc.dg/tree-ssa/pr19431.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-21.c: Likewise.
	* gcc.dg/tree-ssa/phi-opt-10.c: Likewise.
	* gcc.dg/tree-ssa/phi-opt-7.c: Likewise.
	* gcc.dg/tree-ssa/slsr-27.c: Likewise.
	* gcc.dg/tree-ssa/slsr-28.c: Likewise.
	* gcc.dg/tree-ssa/slsr-29.c: Likewise.
	* gcc.dg/pr46309.c: Likewise.
	* gcc.dg/tree-ssa/loop-5.c: Likewise.

From-SVN: r190284
2012-08-10 08:29:29 +00:00
Jan Hubicka c170d40f35 re PR middle-end/54146 (Very slow compile with attribute((flatten)))
PR middle-end/54146
	* ipa-inline-transform.c (inline_call): Add UPDATE_OVERALL_SUMMARY
	parameter; honnor it.
	* ipa-inline.c (recursive_inlining): Update call
	of inline_call.
	(inline_small_functions): Likewise.
	(ipa_inline): Likewise.
	(inline_always_inline_functions): Likewise.
	(early_inline_small_functions): Likewise.
	(flatten_function): Do separate update of summary info.
	* ipa-inline.h (inline_update_overall_summary): Declare.
	(inline_call): Update.
	* ipa-inline-analysis.c (inline_merge_summary): Break out
	updating code to ...
	(inline_update_overall_summary): Likewise.

From-SVN: r190283
2012-08-10 07:52:23 +00:00
Ian Lance Taylor 938ff79ae7 runtime: use sched_getaffinity for runtime.NumCPU() on Linux
Fixes Go issue 3921 for gccgo.

From Shenghou Ma.

From-SVN: r190282
2012-08-10 06:08:11 +00:00
Richard Henderson 0d8e4dacd4 s390: Use VOIDmode with gen_rtx_SET
* config/s390/s390.c (s390_expand_insv): Use VOIDmode in gen_rtx_SET.

From-SVN: r190281
2012-08-09 19:39:50 -07:00
Richard Henderson 4e1ffb63c7 s390: Rearrange temporary moves for use of CRJ
* config/s390/s390.c (s390_expand_cs_hqi): Copy val to a temp before
	performing the compare for the restart loop.

From-SVN: r190280
2012-08-09 19:12:56 -07:00
DJ Delorie 1c6b102126 rl78.c (rl78_alloc_physical_registers): Check for SET before extracting SET_SRC.
* config/rl78/rl78.c (rl78_alloc_physical_registers): Check for
SET before extracting SET_SRC.
(rl78_remove_unused_sets): Check for REG before extractnig REGNO.

From-SVN: r190278
2012-08-09 20:45:29 -04:00
GCC Administrator 23459cbecd Daily bump.
From-SVN: r190277
2012-08-10 00:17:48 +00:00
Oleg Endo 70d4736c9a re PR target/54089 ([SH] Refactor shift patterns)
PR target/54089
	* config/sh/sh-protos (shift_insns_rtx): Delete.
	(sh_ashlsi_clobbers_t_reg_p): Add.
	* config/sh/sh.c (shift_insns, shift_amounts, ext_shift_insns,
	ext_shift_amounts): Merge arrays of ints to array of structs.
	Adapt usage of arrays throughout the file.
	(shift_insns_rtx): Delete unused function.
	(sh_ashlsi_clobbers_t_reg_p): New function.
	* config/sh/sh.md (ashlsi3): Emit ashlsi3_n_clobbers_t insn if the
	final shift sequence will clobber T_REG.
	(ashlsi3_n): Split only if the final shift sequence will not
	clobber T_REG.
	(ashlsi3_n_clobbers_t): New insn_and_split.

From-SVN: r190273
2012-08-09 23:27:51 +00:00
Jonathan Wakely 9ab48d6e6c acinclude.m4: Update references to final C++11 standard.
* acinclude.m4: Update references to final C++11 standard.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/bits/unique_ptr.h: Likewise.
	* include/std/chrono: Likewise.
	* include/std/thread: Likewise.

From-SVN: r190271
2012-08-09 23:45:20 +01:00
Steven Bosscher 5829cc0fe4 calls.c (mem_overlaps_already_clobbered_arg_p): Use SBITMAP_SIZE instead of looking at sbitmap n_bits member directly.
* calls.c (mem_overlaps_already_clobbered_arg_p): Use SBITMAP_SIZE
	instead of looking at sbitmap n_bits member directly.
	* gcse.c (hoist_code): Likewise.
	* sched-rgn.c (split_edges): Likewise.
	* tree-into-ssa.c (is_old_name, is_new_name, add_new_name_mapping,
	update_ssa): Likewise.

From-SVN: r190268
2012-08-09 21:59:32 +00:00
Uros Bizjak b197fc48f9 i386.h (LIMIT_RELOAD_CLASS): Return preferred single unit register class for classes that contain registers...
* config/i386/i386.h (LIMIT_RELOAD_CLASS): Return preferred
	single unit register class for classes that contain registers form
	multiple units.
	(REG_CLASS_CONTENTS): Add missing "frame" register to FLOAT_INT_REGS,
	INT_SSE_REGS and FLOAT_INT_SSE_REGS register classes.

testsuite/ChangeLog:

	* gcc.c-torture/compile/20120727-1.c (dg-options): Add -mfpmath=387
	for x86 targets.
	* gcc.c-torture/compile/20120727-2.c: New test.

From-SVN: r190261
2012-08-09 20:30:13 +02:00
Martin Jambor 8b7773a4ee cgraph.h (cgraph_indirect_call_info): Field anc_offse renamd to offset, updated all users.
2012-08-09  Martin Jambor  <mjambor@suse.cz>

	* cgraph.h (cgraph_indirect_call_info): Field anc_offse renamd to
	offset, updated all users.  New field agg_contents.
	* ipa-prop.h (jump_func_type): Removed IPA_JF_CONST_MEMBER_PTR.
	(ipa_pass_through_data): New field agg_preserved.
	(ipa_ancestor_jf_data): Likewise.
	(ipa_member_ptr_cst): Removed.
	(ipa_agg_jf_item): New type.
	(ipa_agg_jump_function): Likewise.
	(ipa_jump_func): New field agg.  Removed field member_cst.
	(ipa_get_jf_pass_through_agg_preserved): New function.
	(ipa_get_jf_ancestor_agg_preserved): Likewise.
	(ipa_get_jf_member_ptr_pfn): Removed.
	(ipa_find_agg_cst_for_param): Declare.
	(ipa_load_from_parm_agg): Likewise.
	* ipa-prop.c (param_analysis_info): Fields modified and
	visited_statements rename to parm_modified and parm_visited_statements
	respectively, added fields ref_modified, ref_visited_statements,
	pt_modified and pt_visited_statements.
	(ipa_print_node_jump_functions_for_edge): Do not dump const member
	functions.  Dump agg_preserved flags and aggregate jump functions.
	(ipa_set_jf_simple_pass_through): Set also agg_preserved.
	(ipa_set_ancestor_jf): Likewise.
	(ipa_set_jf_arith_pass_through): Clear agg_preserved.
	(ipa_set_jf_member_ptr_cst): Removed.
	(is_parm_modified_before_stmt): Logic reversed, renamed to
	parm_preserved_before_stmt_p.  Cache visited bitmap only for
	naked DECL parameters.  All callers updated.
	(load_from_unmodified_param): Allow NULL parms_ainfo.
	(parm_ref_data_preserved_p): New function.
	(parm_ref_data_pass_through_p): Likewise.
	(ipa_load_from_parm_agg_1): Likewise.
	(ipa_load_from_parm_agg): Likewise.
	(compute_complex_assign_jump_func): Check if aggregate contents are
	preserved.
	(compute_complex_ancestor_jump_func): Likewise.
	(compute_scalar_jump_functions): Removed.
	(type_like_member_ptr_p): Also check field position are known and
	sane.
	(compute_pass_through_member_ptrs): Removed.
	(determine_cst_member_ptr): Likewise.
	(ipa_known_agg_contents_list): New type.
	(determine_known_aggregate_parts): New function.
	(compute_cst_member_ptr_arguments): Removed.
	(ipa_compute_jump_functions_for_edge): Compute all kinds of jump
	functions (scalar, aggregate and member pointer).
	(ipa_get_member_ptr_load_param): Incorporate into
	ipa_get_stmt_member_ptr_load_param, also pass back an offset.
	(ipa_note_param_call): Clear agg_contents.
	(ipa_analyze_indirect_call_uses): Also look for simple pointers loaded
	from aggregates.  In such cases, store offset of the called field.
	(ipa_analyze_node): Initialize new fields of param_analysis_info.
	(update_jump_functions_after_inlining): Handle aggregate contents.
	(ipa_find_agg_cst_for_param): New function.
	(try_make_edge_direct_simple_call): Handle called aggregate values.
	(update_indirect_edges_after_inlining): Make sure aggregate preserving
	jump functions comply with type compatibility requirements.
	(ipa_edge_duplication_hook): Copy also aggregate jump functions.
	(ipa_write_jump_function): Stream agg_preserved flags and aggregate
	jump functions.  Do not stream member pointer constant jump functions.
	(ipa_read_jump_function): Likewise.
	(ipa_write_indirect_edge_info): Stream new cgraph_indirect_call_info
	fields.
	(ipa_read_indirect_edge_info): Likewise.

	* testsuite/gcc.dg/ipa/iinline-4.c: New test.
	* testsuite/gcc.dg/ipa/iinline-5.c: Likewise.
	* testsuite/gcc.dg/ipa/iinline-6.c: Likewise.
	* testsuite/gcc.dg/ipa/iinline-7.c: Likewise.
	* testsuite/gcc.dg/lto/20120723_0.c: Likewise.
	* testsuite/gcc.dg/lto/20120723_1.c: Likewise.

From-SVN: r190260
2012-08-09 18:05:46 +02:00
Oleg Endo b67b3838e9 re PR target/39423 ([SH] performance regression: lost mov @(disp,Rn))
PR target/39423
	* config/sh/predicates.md (mem_index_disp_operand): New predicate.
	* config/sh/sh.md (*movsi_index_disp): Rewrite insns to use the new
	mem_index_disp_operand predicate.

	PR target/39423
	* gcc.target/sh/pr39423-1.c: New.

From-SVN: r190259
2012-08-09 15:58:04 +00:00
Oleg Endo 78ff60c1ad re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
PR target/51244
	* config/sh/sh.md: Add negc extu sequence peephole.
	(movrt, movnegt, movrt_negc, nott): Use t_reg_operand predicate.
	(*movrt_negc): New insn.
	* config/sh/sync.md (atomic_test_and_set): Pass gen_t_reg_rtx to
	gen_movnegt.
	* config/sh/sh.c (expand_cbranchsi4, sh_emit_scc_to_t,
	sh_emit_compare_and_branch, sh_emit_compare_and_set): Use get_t_reg_rtx.
	(sh_expand_t_scc): Pass gen_t_reg_rtx to gen_movnegt.

	PR target/51244
	* gcc.target/sh/pr51244-5: New.
	* gcc.target/sh/pr51244-6: New.

From-SVN: r190258
2012-08-09 15:55:18 +00:00
Oleg Endo 284c32cfd8 re PR target/50751 (SH Target: Displacement addressing does not work for QImode and HImode)
PR target/50751
	* config/sh/sh.md (*extendqisi2_compact_reg, *extendhisi2_compact_reg):
	Use arith_reg_operand predicate instead of register_operand.
	* config/sh/predicates.md (movsrc_no_disp_mem_operand): Accept
	only mem, simplify.

From-SVN: r190257
2012-08-09 15:51:20 +00:00
Uros Bizjak 3eda5123a4 alpha.c (alpha_pad_noreturn): Rename to ...
* config/alpha/alpha.c (alpha_pad_noreturn): Rename to ...
        (alpha_pad_function_end): ... this.  Also insert NOP between
        sibling call and GP load.
        (alpha_reorg): Update call to alpha_pad_function_end.  Expand comment.

From-SVN: r190255
2012-08-09 17:02:36 +02:00
Michael Zolotukhin 9319fa21f4 adxintrin.h: Remove guarding __ADX__ check.
Changelog
        * config/i386/adxintrin.h: Remove guarding __ADX__ check.
        * config/i386/x86intrin.h: Likewise.
        * config/i386/i386.c (ix86_init_mmx_sse_builtins): Remove
        OPTION_MASK_ISA_ADX from needed options for
        __builtin_ia32_addcarryx_u32 and __builtin_ia32_addcarryx_u64.
        (ix86_expand_builtin): Use add<mode>3_carry in expanding of
        IX86_BUILTIN_ADDCARRYX32 and IX86_BUILTIN_ADDCARRYX64.

testsuite/Changelog
        * gcc.target/i386/adx-addxcarry32-3.c: New.
        * gcc.target/i386/adx-addxcarry64-3.c: New.

From-SVN: r190254
2012-08-09 14:35:02 +00:00
Andrey Belevantsev 0c02ab396e re PR rtl-optimization/53701 (ICE on ia64 (when building Allegro 4.4) in sel-sched)
PR rtl-optimization/53701
    * sel-sched.c (vinsn_vec_has_expr_p): Clarify function comment.
    Process not only expr's vinsns but all old vinsns from expr's
    history of changes.
    (update_and_record_unavailable_insns): Clarify comment.

    * gcc.dg/pr53701.c: New test.

From-SVN: r190253
2012-08-09 18:08:31 +04:00
Bernd Schmidt 82ad0aaf6e reload.c (find_valid_class_1): New static function.
* reload.c (find_valid_class_1): New static function.
	(push_reload): Use it when reloading a SYMBOL_REG as the inner
	of a subreg.  Keep better track of needed classes for the
	secondary memory case.
	* config/i386/i386.h (LIMIT_RELOAD_CLASS): Limit INT_SSE_REGS to
	GENERAL_REGS.
	* reload1.c (replaced_subreg): New static function.
	(gen_reload): Use it when deciding whether to use secondary
	memory.

	* gcc.c-torture/compile/20120727-1.c: New test.

From-SVN: r190252
2012-08-09 13:18:05 +00:00
Tobias Burnus 62d6a5bbc8 re PR fortran/54199 (Superfluous diagnostic "is also the name of an intrinsic" for internal procedures)
2012-08-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54199
        * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
        for internal procedures.

2012-08-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54199
        * gfortran.dg/intrinsic_shadow_4.f90: New.

From-SVN: r190251
2012-08-09 14:06:31 +02:00
Richard Guenther 6738604187 tree.h (SSA_VAR_P): Simplify.
2012-08-09  Richard Guenther  <rguenther@suse.de>

	* tree.h (SSA_VAR_P): Simplify.
	* tree-ssanames.c (make_ssa_name_fn): Strengthen assert.
	* fold-const.c (fold_comparison): Check for default def first
	before checking for PARM_DECL.
	* tree-complex.c (get_component_ssa_name): Likewise.
	* tree-inline.c (remap_ssa_name): Likewise.
	* tree-ssa-loop-ivopts.c (parm_decl_cost): Likewise.
	* tree-ssa-structalias.c (get_fi_for_callee): Likewise.
	(find_what_p_points_to): Likewise.
	* tree-ssa-operands.c (add_stmt_operand): Simplify.

From-SVN: r190250
2012-08-09 11:00:11 +00:00
Dodji Seketeli 4531d13af5 Use accessor functions to manipulate xmlOutputBuffer
This is a fix to prepare the xmlj_io.c file of gnu classpath to a coming
API change in libxml2.

Basically, we were previously accessing fields inside the
xmlOutputBuffer struct of libxml2.  In a coming version of libxml2,
that won't be possible anymore.  Client code will have to use accessor
functions instead.  For the gory details, there is an interestin note
of Daniel Veillard (author of libxml2) at
https://mail.gnome.org/archives/desktop-devel-list/2012-August/msg00007.html.

This patch defines too accessor macros that, depending on the version
of libxml2 we are using will either access the fields of
xmlOutputBuffer directly, or use the new accessor function.

Tested on x86_64-unknown-linux-gnu against trunk.

libjava/classpath/

	* native/jni/xmlj/xmlj_io.c (GET_XML_OUTPUT_BUFFER_CONTENT)
	(GET_XML_OUTPUT_BUFFER_SIZE): New macros.
	(xmljOutputWriteCallback): Use them.

From-SVN: r190249
2012-08-09 12:33:48 +02:00
GCC Administrator 5100dfce9d Daily bump.
From-SVN: r190246
2012-08-09 00:18:12 +00:00
H.J. Lu ac295cf1ae Require non-ilp32 for gcc.dg/tree-ssa/slsr-30.c
* gcc.dg/tree-ssa/slsr-30.c: Require non-ilp32.  Remove
	dg-skip-if.

From-SVN: r190242
2012-08-08 15:47:07 -07:00
Joseph Myers e7160b278e simplify-rtx.c (simplify_binary_operation_1): Do not simplify IOR to a constant if one operand has side effects.
* simplify-rtx.c (simplify_binary_operation_1): Do not simplify
	IOR to a constant if one operand has side effects.

testsuite:
	* gcc.c-torture/execute/20120808-1.c: New test.

From-SVN: r190237
2012-08-08 20:42:58 +01:00
Ulrich Weigand 215770ada8 builtins.c (expand_builtin_atomic_compare_exchange): Pass old value operand as MEM to expand_atomic_compare_and_swap.
* builtins.c (expand_builtin_atomic_compare_exchange): Pass old
	value operand as MEM to expand_atomic_compare_and_swap.

	* config/s390/s390.md ("atomic_compare_and_swap<mode>"): Accept
	nonimmediate_operand for old value; generate load and store if
	needed.
	* config/s390/s390.c (s390_expand_cs_hqi): Accept any operand
	as vtarget.

From-SVN: r190236
2012-08-08 18:03:37 +00:00
Steven Bosscher 07c5a154bb re PR middle-end/54146 (Very slow compile with attribute((flatten)))
PR middle-end/54146
	* gimpify.c (gimplify_body): Only verify_gimple_in_seq with
	checking enabled.
	* tree-ssa-loop-manip.c (add_exit_phis_var): Assert that var is
	a gimple_reg if checking is enabled.
	(find_uses_to_rename_stmt): Only look at non-virtual USE operands.
	* tree-into-ssa (compute_global_livein): Change the worklist
	type from an array to a VEC.

From-SVN: r190235
2012-08-08 17:39:46 +00:00
Richard Guenther a471762f68 tree-ssa-operands.h (virtual_operand_p): Declare.
2012-08-08  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.h (virtual_operand_p): Declare.
	* tree-ssa-operands.c (virtual_operand_p): New predicate.
	* gimple.c (is_gimple_reg): Use virtual_operand_p.
	* tree-into-ssa.c (prepare_block_for_update): Likewise.
	* tree-vect-loop-manip.c (adjust_debug_stmts): Likewise.

From-SVN: r190231
2012-08-08 14:51:26 +00:00
Uros Bizjak aa5d8db019 ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI when things are wrong.
* src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
	just return FFI_BAD_ABI when things are wrong.

From-SVN: r190230
2012-08-08 16:48:43 +02:00
Richard Guenther 6b4a85ad6f tree-call-cdce.c (check_pow): Simplify.
2012-08-08  Richard Guenther  <rguenther@suse.de>

	* tree-call-cdce.c (check_pow): Simplify.
	(gen_conditions_for_pow_int_base): Likewise.
	* tree-ssa-dom.c (propagate_rhs_into_lhs): Do not handle
	virtual operands here.
	* tree-ssa-operands.c (get_name_decl): Remove unused function.
	* gimplify.c (gimple_regimplify_operands): Remove dead code.
	* tree-vrp.c (get_value_range): Move SSA_NAME_VAR access.
	* tree-parloops.c (create_phi_for_local_result): Use copy_ssa_name.
	* value-prof.c (gimple_ic): Use duplicate_ssa_name.
	(gimple_stringop_fixed_value): Likewise.
	* tree.c (needs_to_live_in_memory): Remove SSA name handling.
	* tree-stdarg.c (find_va_list_reference): Store SSA_NAME_VERSIONs
	in the bitmap alongside shifted DECL_UIDs.
	(va_list_counter_struct_op): Likewise.
	(va_list_ptr_read): Likewise.
	(va_list_ptr_write): Likewise.
	(check_va_list_escapes): Likewise.
	(check_all_va_list_escapes): Likewise.
	(execute_optimize_stdarg): Likewise.
	* tree-outof-ssa.c (insert_backedge_copies): Use copy_ssa_name.

From-SVN: r190229
2012-08-08 14:40:30 +00:00