Commit Graph

112 Commits

Author SHA1 Message Date
Richard Biener 381d45ed49 gimple-fold.c (fold_stmt_1): Remove unnecessary code.
2012-11-27  Richard Biener  <rguenther@suse.de>

	* gimple-fold.c (fold_stmt_1): Remove unnecessary code.

From-SVN: r193844
2012-11-27 12:06:52 +00:00
Richard Biener 77d19c725f re PR middle-end/55331 (ICE: SIGSEGV in substitute_and_fold with -O2 -fno-tree-fre)
2012-11-27  Richard Biener  <rguenther@suse.de>

	PR middle-end/55331
	* gimple-fold.c (gimplify_and_update_call_from_tree): Replace
	stmt with a NOP instead of removing it.

	* g++.dg/opt/pr55331.C: New testcase.

From-SVN: r193839
2012-11-27 09:20:02 +00:00
Eric Botcazou 506190022d re PR tree-optimization/54986 (segfault on constant initialized to object address at -O)
PR tree-optimization/54986
	* gimple-fold.c (canonicalize_constructor_val): Strip again all no-op
	conversions on entry but add them back on exit if needed.

From-SVN: r193188
2012-11-05 21:39:02 +00:00
Marc Glisse ae22ac3c62 tree.c (truth_type_for): New function.
2012-09-29  Marc Glisse  <marc.glisse@inria.fr>

	* tree.c (truth_type_for): New function.
	* tree.h (truth_type_for): Declare.
	* gimple-fold.c (and_comparisons_1): Call it.
	(or_comparisons_1): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_into_cond): Don't use
	boolean_type_node for vectors.

From-SVN: r191848
2012-09-29 08:23:23 +00:00
Marc Glisse 31ed622658 re PR c++/54427 (Expose more vector extensions)
2012-09-14  Marc Glisse  <marc.glisse@inria.fr>
	PR c++/54427

gcc/ChangeLog
	* fold-const.c (fold_unary_loc): Disable for VECTOR_TYPE.
	(fold_binary_loc): Likewise.
	* gimple-fold.c (and_comparisons_1): Handle VECTOR_TYPE.
	(or_comparisons_1): Likewise.

gcc/cp/ChangeLog
	* typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
	NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.

gcc/testsuite/ChangeLog
	* g++.dg/other/vector-compare.C: New testcase.
	* gcc/testsuite/c-c++-common/vector-compare-3.c: New testcase.
	* gcc.dg/vector-shift.c: Move ...
	* c-c++-common/vector-shift.c: ... here.
	* gcc.dg/vector-shift1.c: Move ...
	* c-c++-common/vector-shift1.c: ... here.
	* gcc.dg/vector-shift3.c: Move ...
	* c-c++-common/vector-shift3.c: ... here.
	* gcc.dg/vector-compare-1.c: Move ...
	* c-c++-common/vector-compare-1.c: ... here.
	* gcc.dg/vector-compare-2.c: Move ...
	* c-c++-common/vector-compare-2.c: ... here.
	* gcc.c-torture/execute/vector-compare-1.c: Move ...
	* c-c++-common/torture/vector-compare-1.c: ... here.
	* gcc.c-torture/execute/vector-compare-2.x: Delete.
	* gcc.c-torture/execute/vector-compare-2.c: Move ...
	* c-c++-common/torture/vector-compare-2.c: ... here.
	* gcc.c-torture/execute/vector-shift.c: Move ...
	* c-c++-common/torture/vector-shift.c: ... here.
	* gcc.c-torture/execute/vector-shift2.c: Move ...
	* c-c++-common/torture/vector-shift2.c: ... here.
	* gcc.c-torture/execute/vector-subscript-1.c: Move ...
	* c-c++-common/torture/vector-subscript-1.c: ... here.
	* gcc.c-torture/execute/vector-subscript-2.c: Move ...
	* c-c++-common/torture/vector-subscript-2.c: ... here.
	* gcc.c-torture/execute/vector-subscript-3.c: Move ...
	* c-c++-common/torture/vector-subscript-3.c: ... here.

From-SVN: r191308
2012-09-14 17:17:01 +00:00
Richard Guenther 5a27a197d8 re PR middle-end/54515 (cc1plus sigsegv -O2 anonymous namespace)
2012-09-11  Richard Guenther  <rguenther@suse.de>

	PR middle-end/54515
	* gimple.c (get_base_address): Do not return NULL_TREE apart
	from for WITH_SIZE_EXPR.
	* gimple-fold.c (canonicalize_constructor_val): Do not call
	get_base_address when not necessary.

	* g++.dg/tree-ssa/pr54515.C: New testcase.

From-SVN: r191174
2012-09-11 08:32:29 +00:00
Lawrence Crowl 27bcd47cfa Modify gcc/*.[hc] double_int call sites to use the new interface.
This change entailed adding a few new methods to double_int.

The change results in a 0.163% time improvement with a 70% confidence.

Tested on x86_64.


Index: gcc/ChangeLog

2012-09-06  Lawrence Crowl  <crowl@google.com>

	* double-int.h (double_int::operator &=): New.
	(double_int::operator ^=): New.
	(double_int::operator |=): New.
	(double_int::mul_with_sign): Modify overflow parameter to bool*.
	(double_int::add_with_sign): New.
	(double_int::ule): New.
	(double_int::sle): New.
	(binary double_int::operator *): Remove parameter name.
	(binary double_int::operator +): Likewise.
	(binary double_int::operator -): Likewise.
	(binary double_int::operator &): Likewise.
	(double_int::operator |): Likewise.
	(double_int::operator ^): Likewise.
	(double_int::and_not): Likewise.
	(double_int::from_shwi): Tidy formatting.
	(double_int::from_uhwi): Likewise.
	(double_int::from_uhwi): Likewise.
	* double-int.c (double_int::mul_with_sign): Modify overflow parameter
	to bool*.
	(double_int::add_with_sign): New.
	(double_int::ule): New.
	(double_int::sle): New.
	* builtins.c: Modify to use the new double_int interface.
	* cgraph.c: Likewise.
	* combine.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* fixed-value.c: Likewise.
	* fold-const.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimplify-rtx.c: Likewise.
	* ipa-prop.c: Likewise.
	* loop-iv.c: Likewise.
	* optabs.c: Likewise.
	* stor-layout.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-object-size.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-sccvn: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.h: Likewise.
	* tree.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r191047
2012-09-07 00:06:35 +00:00
Richard Guenther 491e0b9b0c re PR middle-end/54327 (Segmentation fault in init_ggc)
2012-08-20  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/54327
	* gimple-fold.c (get_maxval_strlen): Do not walk use-def chains
	if the use is registered for SSA update.

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

From-SVN: r190528
2012-08-20 10:26:45 +00:00
Richard Guenther 46eb666a79 tree-dfa.c (referenced_var_lookup): Remove.
2012-08-02  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (referenced_var_lookup): Remove.
	(find_referenced_vars): Remove.
	(pass_referenced_vars): Likewise.
	(make_rename_temp): Do not add referenced vars.
	(dump_referenced_vars): Remove.
	(debug_referenced_vars): Likewise.
	(dump_dfa_stats): Do not dump referenced var stats.
	(find_vars_r): Remove.
	(find_referenced_vars_in): Likewise.
	(referenced_var_check_and_insert): Likewise.
	(add_referenced_var_1): Likewise.
	(remove_referenced_var): Likewise.
	* tree-flow.h (referenced_var_lookup): Likewise.
	(struct gimple_df): Remove referenced_vars member.
	(typedef referenced_var_iterator): Remove.
	(FOR_EACH_REFERENCED_VAR): Likewise.
	(num_referenced_vars): Likewise.
	(debug_referenced_vars, dump_referenced_vars): Likewise.
	(add_referenced_var_1, add_referenced_var): Likewise.
	(remove_referenced_var): Likewise.
	(find_referenced_vars_in): Likewise.
	* tree-flow-inline.h (gimple_referenced_vars): Remove.
	(first_referenced_var): Likewise.
	(end_referenced_vars_p): Likewise.
	(next_referenced_var): Likewise.
	* cfgexpand.c (update_alias_info_with_stack_vars): Remove assert.
	* gimple-pretty-print.c (pp_points_to_solution): Dump UIDs
	unconditionally.
	* tree-into-ssa.c (dump_decl_set): Likewise.
	(pass_build_ssa): Do not require PROP_referenced_vars.
	* tree-ssa.c (target_for_debug_bind): Virtual operands are
	not suitable, but all register type vars are.
	(init_tree_ssa): Do not allocate referenced vars.
	(delete_tree_ssa): Do not free referenced vars.
	* cgraphunit.c (init_lowered_empty_function): Do not set
	PROP_referenced_vars.
	(assemble_thunk): Do not add referenced vars.
	* gimple-fold.c (canonicalize_constructor_val): Likewise.
	(gimplify_and_update_call_from_tree): Likewise.
	* gimple-streamer-in.c (input_bb): Likewise.
	* passes.c (init_optimization_passes): Do not run
	pass_referenced_vars.
	(dump_properties): Do not dump PROP_referenced_vars.
	* tree-inline.c (remap_decl): Do not add referenced vars.
	(remap_gimple_op_r): Likewise.
	(copy_tree_body_r): Likewise.
	(copy_bb): Likewise.
	(setup_one_parameter): Likewise.
	(declare_return_variable): Likewise.
	(copy_decl_for_dup_finish): Likewise.
	(copy_arguments_for_versioning): Likewise.
	(tree_function_versioning): Likewise.
	* tree-pass.h (PROP_referenced_vars): Remove.
	(pass_referenced_vars): Likewise.
	* tree-profile.c (gimple_gen_edge_profiler): Do not add referenced vars.
	(gimple_gen_interval_profiler): Likewise.
	(gimple_gen_pow2_profiler): Likewise.
	(gimple_gen_one_value_profiler): Likewise.
	(gimple_gen_ic_profiler): Likewise.
	(gimple_gen_average_profiler): Likewise.
	(gimple_gen_ior_profiler): Likewise.
	* tree-ssa-live.c (remove_unused_locals): Do not touch referenced vars.
	* tree-cfg.c (replace_ssa_name): Do not add referenced vars.
	(move_stmt_op): Likewise.
	* tree-ssa-operands.c (create_vop_var): Likewise.
	* gimple-low.c (record_vars_into): Likewise.
	* gimplify.c (gimple_regimplify_operands): Likewise.
	(force_gimple_operand_1): Likewise.
	* omp-low.c (expand_omp_for_generic): Likewise.
	(expand_omp_for_static_chunk): Likewise.
	(expand_omp_atomic_pipeline): Likewise.
	* graphite-clast-to-gimple.c (graphite_create_new_loop): Likewise.
	(translate_clast_assignment): Likewise.
	* graphite-sese-to-poly.c (create_zero_dim_array): Likewise.
	(handle_scalar_deps_crossing_scop_limits): Likewise.
	* ipa-prop.c (ipa_modify_formal_parameters): Likewise.
	* ipa-split.c (split_function): Likewise.
	* matrix-reorg.c (transform_access_sites): Likewise.
	* trans-mem.c (tm_log_add): Likewise.
	(ipa_tm_insert_gettmclone_call): Likewise.
	* tree-complex.c (create_one_component_var): Likewise.
	* tree-if-conv.c (ifc_temp_var): Likewise.
	* tree-parloops.c (take_address_of): Likewise.
	(initialize_reductions): Likewise.
	(separate_decls_in_region_name): Likewise.
	(create_call_for_reduction_1): Likewise.
	(separate_decls_in_region): Likewise.
	* tree-predcom.c (predcom_tmp_var): Likewise.
	(reassociate_to_the_same_stmt): Likewise.
	* tree-sra.c (build_ref_for_offset): Likewise.
	(create_access_replacement): Likewise.
	(get_replaced_param_substitute): Likewise.
	(sra_ipa_reset_debug_stmts): Likewise.
	* tree-ssa-loop-im.c (rewrite_reciprocal): Likewise.
	(rewrite_bittest): Likewise.
	* tree-ssa-loop-ivopts.c (create_new_iv): Likewise.
	* tree-ssa-loop-manip.c (create_iv): Likewise.
	(tree_transform_and_unroll_loop): Likewise.
	* tree-ssa-math-opts.c (powi_as_mults): Likewise.
	(build_and_insert_call): Likewise.
	(gimple_expand_builtin_cabs): Likewise.
	(execute_optimize_bswap): Likewise.
	* tree-ssa-phiopt.c (conditional_replacement): Likewise.
	(abs_replacement): Likewise.
	(cond_store_replacement): Likewise.
	(cond_if_else_store_replacement_1): Likewise.
	* tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
	* tree-ssa-pre.c (get_representative_for): Likewise.
	(create_expression_by_pieces): Likewise.
	(insert_into_preds_of_block): Likewise.
	* tree-ssa-propagate.c (update_call_from_tree): Likewise.
	* tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
	(eliminate_redundant_comparison): Likewise.
	(rewrite_expr_tree_parallel): Likewise.
	(get_reassoc_pow_ssa_name): Likewise.
	* tree-ssa-strlen.c (get_string_length): Likewise.
	* 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-data-refs.c (vect_get_new_vect_var): Likewise.
	(vect_create_addr_base_for_vector_ref): Likewise.
	(vect_permute_store_chain): Likewise.
	(vect_permute_load_chain): Likewise.
	* tree-vect-generic.c (expand_vector_divmod): Likewise.
	* tree-vect-loop-manip.c (set_prologue_iterations): Likewise.
	(vect_build_loop_niters): Likewise.
	(vect_generate_tmps_on_preheader): Likewise.
	(vect_update_ivs_after_vectorizer): Likewise.
	(vect_gen_niters_for_prolog_loop): Likewise.
	(vect_do_peeling_for_alignment): Likewise.
	(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.

	* gcc.dg/torture/pta-callused-1.c: Adjust.
	* gcc.dg/torture/pta-ptrarith-3.c: Likewise.
	* gcc.dg/torture/ssa-pta-fn-1.c: Likewise.
	* gcc.dg/tree-ssa/alias-19.c: Likewise.
	* gcc.dg/tree-ssa/pta-escape-1.c: Likewise.
	* gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
	* gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.

From-SVN: r190067
2012-08-02 08:14:54 +00:00
Eric Botcazou a3628196ec gimple-fold.c (canonicalize_constructor_val): Strip only useless type conversions.
* gimple-fold.c (canonicalize_constructor_val): Strip only useless type
	conversions.

From-SVN: r189685
2012-07-19 21:22:04 +00:00
Steven Bosscher 7ee2468b92 system.h (dump_file): Do not define.
gcc/
	* system.h (dump_file): Do not define.
	* tree-pass.h: Include dumpfile.h, which is a new file containing...
	(enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
	dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
	dump_flag_name, dump_file, dump_flags, dump_file_name,
	get_dump_file_info, struct dump_file_info): all of this, moved to...
	* dumpfile.h: Here, new file.
	* tree-dump.h: Include dumpfile.h, but not tree-pass.h.
	(dump_stmt): Remove prototype for C++ specific function.
	(dump_enumerated_decls): Move prototype from here...
	* tree-flow.h (dump_enumerated_decls): ... to here.
	(get_ref_base_and_extent) Move prototype from here ...
	* tree.h (get_ref_base_and_extent) ... to here.
	* tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
	gimple-pretty-print.h is enough.  Do not include tree-dump.h,
	include timevar.h and dumpfile.h instead.
	(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
	* tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
	dump_enumerated_decls_push, dump_enumerated_decls):... to here.
	Do not include timevar.h.
	* tree.c: Do not include timevar.h.
	* tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
	timevar.h.
	(dump_cfg_stats): Use current_function_name.
	(gimple_cfg2vcg): Likewise.
	(dump_function_to_file): Likewise.
	* df-scan.c: Do not include tree-pass.h and timevar.h.
	Include dumpfile.h.
	(df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
	use print_current_pass.
	* df-problems.c: Include dumpfile.h.
	Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
	leads to errors in the code not selected.
	(df_note_compute): Do not print_rtl_with_bb here.  Fix compilation
	bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
	* lcm.c: Include dumpfile.h.
	Remove obsolete include of insn-attr.h.
	* dojump.c (do_compare_rtx_and_jump): Remove failure printing for
	missing probability notes.
	* stmt.c: Include dumpfile.h.
	(emit_case_decision_tree): Re-enable printing expand details only
	if TDF_DETAILS.
	* alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, 
	cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, 
	cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, 
	coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, 
	dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, 
	function.c, fwprop.c, gcse.c, gimple-fold.c, 
	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, 
	gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, 
	graphite-dependences.c, graphite-interchange.c, 
	graphite-optimize-isl.c, graphite-poly.c, 
	graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, 
	ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, 
	ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, 
	ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, 
	jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, 
	loop-unroll.c, loop-unswitch.c, lower-subreg.c, 
	lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, 
	mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, 
	plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c, 
	print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, 
	regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, 
	sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, 
	store-motion.c, tracer.c, trans-mem.c, tree-affine.c, 
	tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, 
	tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
	tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, 
	tree-mudflap.c, tree-nrv.c, tree-object-size.c, 
	tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, 
	tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, 
	tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c, 
	tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, 
	tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c, 
	tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, 
	tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, 
	tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, 
	tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, 
	tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, 
	tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, 
	tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, 
	tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, 
	tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, 
	tree-ssa-threadedge.c, tree-ssa-threadupdate.c, 
	tree-ssa-uncprop.c, tree-ssa-uninit.c, 
	tree-switch-conversion.c, tree-tailcall.c, 
	tree-vect-data-refs.c, tree-vect-loop.c, 
	tree-vect-loop-manip.c, tree-vectorizer.c, 
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, 
	tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
	only if needed.  If tree-pass.h is included, do not include timevar.h
	and dumpfile.h.  If tree-pass.h is not included but dump_file, or
	dump_flags, or the TDF_* flags are used, include dumpfile.h.
	If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
	Remove assorted unnecessary includes.

	* config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
	Include dumpfile.h.
	* config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.
	* arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep,
	spu/t-spu-elf: Fix dependencies.

c-family/
	* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
	* c-ada-spec.c: Likewise.
	* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.

c/
	* c-decl.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

cp/
	* dump.c (dump_stmt): Moved here from c-dump.c.
	* optimize.c: Include dumpfile.h instead of tree-dump.h.
	* class.c: Likewise.
	* decl2.c: Likewise.
	* Make-lang.in: Fix dependencies.

fortran/
	* f95-lang.c: Include dumpfile.h instead of tree-dump.h.
	* Make-lang.in: Fix dependencies.

java/
	* java-gimplify.c Include dumpfile.h instead of tree-dump.h
	* Make-lang.in: Fix dependencies.

lto/
	* lto.c: Do not include timevar.h.
	* Make-lang.in: Fix dependencies.

ada/
	* gcc-interface/utils.c: Include timevar.h.
	* Make-lang.in: Fix dependencies.

From-SVN: r189519
2012-07-16 11:32:42 +00:00
Richard Guenther 23af816cc9 re PR middle-end/53433 (ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap)
2012-07-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/53433
	* gimple-fold.c (get_base_constructor): Do not return an
	error_mark_node DECL_INITIAL.

From-SVN: r189260
2012-07-04 13:47:18 +00:00
Michael Matz 6da8be895c gimplify.c (gimplify_modify_expr): Fold generated statements.
* gimplify.c (gimplify_modify_expr): Fold generated statements.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Check flag_ltrans.

testsuite/
	* gcc.dg/debug/dwarf2/inline3.c: Adjust.
	* gcc.dg/tree-ssa/foldstring-1.c: Adjust.

From-SVN: r188664
2012-06-15 14:40:38 +00:00
Michael Matz ca5f433123 expr.c (expand_expr_real_1 <normal_inner_ref>): Don't allocate a kept temp.
* expr.c (expand_expr_real_1 <normal_inner_ref>): Don't allocate
	a kept temp.
	(expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Make unreachable.
	* gimple-fold.c (canonicalize_constructor_val): Canonicalize 
	COMPOUND_LITERAL_EXPR.
	* function.c (expand_function_start): Don't call expand_decl,
	instead assert that we have RTL assigned.
	* tree-ssa-live.c (remove_unused_locals): Clear
	nonlocal_goto_save_area if its backing variable is removed.
	* stmt.c (expand_asm_operands): Remove handling of non-lvalues
	as mem inputs.
	(expand_decl): Assert that this does nothing.
	* calls.c (expand_call): Don't call mark_temp_addr_taken.

	* c-tree.h (c_expand_decl): Remove prototype.

c-family/
	* c-common.h (c_expand_decl): Remove prototype.

ada/
	* gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl.

From-SVN: r187962
2012-05-29 14:41:53 +00:00
Joseph Myers 073a899888 LANGUAGES: Fix typos.
* LANGUAGES: Fix typos.
	* Makefile.in: Fix typos.
	* alias.c: Fix typos.
	* auto-inc-dec.c: Fix typos.
	* bb-reorder.c: Fix typos.
	* cfgcleanup.c: Fix typos.
	* cgraph.c: Fix typos.
	* cgraph.h: Fix typos.
	* cgraphunit.c: Fix typos.
	* collect2-aix.h: Fix typos.
	* collect2.c: Fix typos.
	* compare-elim.c: Fix typos.
	* config/alpha/vms.h: Fix typos.
	* config/arm/README-interworking: Fix typos.
	* config/arm/arm.c: Fix typos.
	* config/arm/iterators.md: Fix typos.
	* config/arm/vxworks.h: Fix typos.
	* config/avr/avr.c: Fix typos.
	* config/avr/avr.h: Fix typos.
	* config/avr/avr.md: Fix typos.
	* config/avr/builtins.def: Fix typos.
	* config/c6x/c6x.c: Fix typos.
	* config/cr16/cr16.c: Fix typos.
	* config/cr16/cr16.md: Fix typos.
	* config/cris/cris.md: Fix typos.
	* config/darwin.c: Fix typos.
	* config/darwin.opt: Fix typos.
	* config/i386/i386-c.c: Fix typos.
	* config/i386/i386.c: Fix typos.
	* config/ia64/ia64.c: Fix typos.
	* config/m68k/cf.md: Fix typos.
	* config/mep/mep.c: Fix typos.
	* config/microblaze/microblaze.c: Fix typos.
	* config/microblaze/microblaze.h: Fix typos.
	* config/mn10300/mn10300.c: Fix typos.
	* config/mn10300/mn10300.md: Fix typos.
	* config/pa/pa.c: Fix typos.
	* config/picochip/picochip.h: Fix typos.
	* config/rs6000/a2.md: Fix typos.
	* config/rs6000/rs6000.c: Fix typos.
	* config/rs6000/vector.md: Fix typos.
	* config/rx/rx.md: Fix typos.
	* config/rx/rx.opt: Fix typos.
	* config/s390/2097.md: Fix typos.
	* config/s390/s390.c: Fix typos.
	* config/s390/s390.h: Fix typos.
	* config/sh/sh.c: Fix typos.
	* config/sh/sh.md: Fix typos.
	* config/sparc/sync.md: Fix typos.
	* config/spu/spu.c: Fix typos.
	* config/spu/spu.md: Fix typos.
	* config/vms/vms.c: Fix typos.
	* config/vxworks-dummy.h: Fix typos.
	* config/vxworks.h: Fix typos.
	* cselib.c: Fix typos.
	* df-scan.c: Fix typos.
	* df.h: Fix typos.
	* doc/extend.texi: Fix typos.
	* doc/install.texi: Fix typos.
	* doc/invoke.texi: Fix typos.
	* doc/md.texi: Fix typos.
	* doc/plugins.texi: Fix typos.
	* doc/rtl.texi: Fix typos.
	* dse.c: Fix typos.
	* dwarf2asm.c: Fix typos.
	* dwarf2out.c: Fix typos.
	* except.h: Fix typos.
	* expr.c: Fix typos.
	* fold-const.c: Fix typos.
	* gcc.c: Fix typos.
	* gcse.c: Fix typos.
	* genautomata.c: Fix typos.
	* gengtype-state.c: Fix typos.
	* gengtype.c: Fix typos.
	* genhooks.c: Fix typos.
	* gimple-fold.c: Fix typos.
	* gimple-pretty-print.c: Fix typos.
	* gimple.c: Fix typos.
	* gimple.h: Fix typos.
	* gimplify.c: Fix typos.
	* graphite-interchange.c: Fix typos.
	* graphite-sese-to-poly.c: Fix typos.
	* ifcvt.c: Fix typos.
	* input.c: Fix typos.
	* ipa-cp.c: Fix typos.
	* ipa-inline-analysis.c: Fix typos.
	* ipa-inline-transform.c: Fix typos.
	* ipa-inline.c: Fix typos.
	* ipa-pure-const.c: Fix typos.
	* ipa-ref.h: Fix typos.
	* ipa-reference.c: Fix typos.
	* ipa-utils.c: Fix typos.
	* ipa.c: Fix typos.
	* ira-emit.c: Fix typos.
	* ira-lives.c: Fix typos.
	* lto-streamer.c: Fix typos.
	* lto-streamer.h: Fix typos.
	* lto-wrapper.c: Fix typos.
	* mcf.c: Fix typos.
	* mode-switching.c: Fix typos.
	* modulo-sched.c: Fix typos.
	* plugin.c: Fix typos.
	* postreload.c: Fix typos.
	* sched-deps.c: Fix typos.
	* sel-sched-ir.c: Fix typos.
	* sel-sched-ir.h: Fix typos.
	* sel-sched.c: Fix typos.
	* sese.c: Fix typos.
	* stor-layout.c: Fix typos.
	* target-hooks-macros.h: Fix typos.
	* target.def: Fix typos.
	* trans-mem.c: Fix typos.
	* tree-eh.c: Fix typos.
	* tree-predcom.c: Fix typos.
	* tree-sra.c: Fix typos.
	* tree-ssa-address.c: Fix typos.
	* tree-ssa-loop-ivopts.c: Fix typos.
	* tree-ssa-loop-niter.c: Fix typos.
	* tree-ssa-math-opts.c: Fix typos.
	* tree-ssa-pre.c: Fix typos.
	* tree-ssa-propagate.c: Fix typos.
	* tree-ssa-reassoc.c: Fix typos.
	* tree-ssa-sccvn.c: Fix typos.
	* tree-ssa-ter.c: Fix typos.
	* tree-ssa-uninit.c: Fix typos.
	* tree-ssanames.c: Fix typos.
	* tree-vect-generic.c: Fix typos.
	* tree-vect-slp.c: Fix typos.
	* tree.c: Fix typos.
	* tree.h: Fix typos.
	* varasm.c: Fix typos.
	* varpool.c: Fix typos.

From-SVN: r187959
2012-05-29 15:14:06 +01:00
Richard Guenther 0faa05629e tree-flow.h (create_var_ann): Remove.
2012-05-24  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (create_var_ann): Remove.
	* tree-dfa.c (create_var_ann): Remove and inline into its
	single caller ...
	(add_referenced_var_1): ... here.
	* varpool.c (add_new_static_var): Do not call add_referenced_var
	for global vars.
	* gimple-fold.c (canonicalize_constructor_val): Likewise.
	* tree-switch-conversion.c (build_one_array): Likewise.
	* tree-profile.c (gimple_gen_ic_profiler): Likewise.
	* tree-flow-inline.h (gimple_referenced_vars): Guard against
	NULL fn argument.
	* tree-inline.c (remap_gimple_op_r): Likewise.  Check
	gimple_referenced_vars instead of gimple_in_ssa_p.
	(copy_tree_body_r): Likewise.
	(setup_one_parameter): Likewise.
	(declare_return_variable): Likewise.
	(tree_function_versioning): Likewise.

From-SVN: r187829
2012-05-24 12:33:49 +00:00
Jan Hubicka c44c2088f7 cgraphbuild.c (record_reference): Update.
* cgraphbuild.c (record_reference): Update.
	* lto-cgraph.c (lto_output_varpool_node): External vars
	are not in other partition even if they are not output
	in current partition.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Take FROM_DECL
	argument; fix.
	(canonicalize_constructor_val): Take FROM_DECL argument.
	(fold_ctor_reference, fold_string_cst_ctor_reference,
	fold_array_ctor_reference, fold_nonarray_ctor_reference,
	fold_ctor_reference): Likewise.
	(fold_const_aggregate_ref_1, gimple_get_virt_method_for_binfo): Update.
	* gimple.h (gimple_fold_builtin): Likewise.

From-SVN: r187678
2012-05-19 09:49:47 +00:00
Jan Hubicka 6649df51ec lto-symtab.c (lto_symtab_resolve_symbols): Preffer decl with constructor over decl without.
* lto-symtab.c (lto_symtab_resolve_symbols): Preffer decl with constructor
	over decl without.
	* cgraph.c (cgraph_remove_node): Clear also body of unanalyzed nodes.
	* cgraph.h (varpool_can_remove_if_no_refs): Handle external correctly.
	* cgraphunit.c (process_function_and_variable_attributes): Finalize 
	extrnal decls.
	(mark_functions_to_output): Also accept bodies for functions with clones.
	(output_in_order): Skip external vars.
	* lto-cgraph.c (lto_output_node): External functions are never in other
	partition.
	(lto_output_varpool_node): Likewise.
	* lto-streamer-out.c (lto_write_tree): Always use error_mark_nodes for
	forgotten initializers.
	* ipa.c (process_references): Handle external vars.
	(symtab_remove_unreachable_nodes): Update to handle external vars.
	(varpool_externally_visible_p): External vars are externally visible.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Update.
	* varpool.c (varpool_remove_node): Remove constructor.
	(decide_is_variable_needed): Handle externals.
	(varpool_remove_unreferenced_decls): Likewise.

	* lto-partition.c (add_references_to_partition): Handle external vars.
	(partition_varpool_node_p): Likewise.
	(lto_promote_cross_file_statics): Do not promote externals.

From-SVN: r187631
2012-05-17 16:37:33 +00:00
Andrew Pinski 763dc99dd3 gimple-fold.c (get_maxval_strlen): Move COND_EXPR handling under GIMPLE_ASSIGN.
2012-05-16  Andrew Pinski  <apinski@cavium.com>

	* gimple-fold.c (get_maxval_strlen): Move COND_EXPR handling under
	GIMPLE_ASSIGN.

From-SVN: r187608
2012-05-16 13:22:03 -07:00
Richard Guenther 835c9db01f tree-flow.h (referenced_var_check_and_insert): Remove.
2012-05-11  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (referenced_var_check_and_insert): Remove.
	(find_new_referenced_vars): Likewise.
	* tree-dfa.c (referenced_var_check_and_insert): Make static.
	(find_new_referenced_vars_1, find_new_referenced_vars): Remove.
	* tree-inline.c (copy_bb): Use find_referenced_vars_in
	instead of find_new_referenced_vars.
	* gimple-fold.c (gimplify_and_update_call_from_tree): Likewise.

From-SVN: r187408
2012-05-11 14:08:30 +00:00
Eric Botcazou b48e22b2bd tree-dfa.c (get_ref_base_and_extent): Do the offset computation using the precision of the index type.
* tree-dfa.c (get_ref_base_and_extent) <ARRAY_REF>: Do the offset
	computation using the precision of the index type.
	* gimple-fold.c (fold_const_aggregate_ref_1) <ARRAY_REF>: Likewise.
	(fold_array_ctor_reference): Do index computations in the index type.

From-SVN: r187268
2012-05-07 18:57:23 +00:00
Michael Matz 355a767352 coretypes.h (gimple_seq, [...]): Typedef as gimple.
* coretypes.h (gimple_seq, const_gimple_seq): Typedef as gimple.
	* gimple.h (struct gimple_seq_node_d, struct gimple_seq_d): Remove.
	(const_gimple_seq_node): Remove.
	(gimple_seq_node): Typedef as gimple.
	(struct gimple_statement_base): Add next and prev members,
	adjust all WORD markers in using structs.
	(union gimple_statement_d): Link via gsbase.next field for GC and PCH.
	(gimple_seq_first, gimple_seq_first_stmt, gimple_seq_last,
	gimple_seq_last_stmt): Adjust as gimple_seq, gimple_seq_node and
	gimple are the same.
	(gimple_seq_set_last, gimple_seq_set_first): Don't allocate
	gimple_seq, adjust.
	(gimple_init_singleton): New function.
	(gsi_start_1, gsi_last_1, gsi_end_p, gsi_one_before_end_p): Adjust.
	(gsi_next, gsi_prev): Adjust, handle prev cyclic list correctly.
	(gsi_stmt): Adjust.
	(gsi_stmt_ptr): Remove.
	(enum gimple_alloc_kind): Remove gimple_alloc_kind_seq member.

	* gimple-iterator.c (update_bb_for_stmts): Take last parameter
	again, adjust for above changes.
	(update_call_edge_frequencies): Adjust for above changes.
	(gsi_insert_seq_nodes_before): Rewrite for new data structure.
	(gsi_insert_seq_nodes_after): Ditto.
	(gsi_split_seq_after): Ditto.
	(gsi_set_stmt): Ditto.
	(gsi_split_seq_before): Ditto.
	(gsi_remove): Ditto.
	(gsi_insert_seq_before_without_update): Don't free sequence.
	(gsi_insert_seq_after_without_update): Ditto.
	(gsi_replace): Assert some more invariants.
	(gsi_insert_before_without_update, gsi_insert_after_without_update):
	Tidy.
	(gsi_for_stmt): Don't search for stmt.
	(gsi_insert_on_edge_immediate): Tidy.

	* gimple.c (gimple_alloc_k): Remove "sequences".
	(gimple_seq_cache): Remove.
	(gimple_alloc_stat): Make stmt a singleton sequence.
	(gimple_seq_alloc, gimple_seq_free): Remove.
	(gimple_assign_set_rhs_with_ops_1): Ensure new stmt is a singleton.
	(gimple_copy): Ditto.
	* gimplify.c (gimplify_cleanup_point_expr): Use gsi_set_stmt,
	create iterator from correct sequence.
	* tree-phinodes.c (make_phi_node): Make stmt a singleton.


	* gimple.h (gimple_stmt_iterator <seq>): Make it be pointer to
	gimple_seq.
	(gimple_seq_set_last, gimple_seq_set_first): Take pointer to
	sequence, lazily allocate it.
	(bb_seq_addr): New function.
	(gsi_start_1): Rename from gsi_start, but take pointer to sequence.
	(gsi_start): Macro to wrap gsi_start_1 taking pointer of argument.
	(gsi_none): New function.
	(gsi_start_bb): Adjust.
	(gsi_last_1): Rename from gsi_last, but take pointer to sequence.
	(gsi_last): Macro to wrap gsi_last_1 taking pointer of argument.
	(gsi_last_bb): Adjust.
	(gsi_seq): Adjust.
	* tree-flow-inline.h (phi_nodes_ptr): New function.

	* gimple-iterator.c (gsi_insert_seq_nodes_before): Adjust to 
	datastructure and interface change.
	(gsi_insert_seq_before_without_update): Ditto.
	(gsi_insert_seq_nodes_after): Ditto.
	(gsi_insert_seq_after_without_update): Ditto.
	(gsi_split_seq_after): Ditto, don't use gimple_seq_alloc.
	(gsi_split_seq_before): Ditto.
	(gsi_start_phis): Adjust.
	* tree-vect-loop.c (vect_determine_vectorization_factor): Use
	gsi_none.
	(vect_transform_loop): Ditto.
	* gimple.c (gimple_seq_add_stmt, gimple_seq_add_seq,
	gimple_seq_copy): Don't use gimple_seq_alloc.
	* gimplify.c (gimple_seq_add_stmt_without_update): Ditto.
	(gimplify_seq_add_seq): Ditto.
	* lto-streamer-in.c (make_new_block): Ditto.
	* tree-cfg.c (create_bb): Ditto.
	* tree-sra.c (initialize_parameter_reductions): Ditto.


	* gimple.h (gimple_seq_first, gimple_seq_first_stmt, gimple_seq_last,
	gimple_seq_last_stmt, gimple_seq_set_last, gimple_seq_set_first,
	gimple_seq_empty_p, gimple_seq_alloc_with_stmt, bb_seq,
	set_bb_seq): Move down to after gimple_statement_d definition.


	* gimple-fold.c (gimplify_and_update_call_from_tree): Use
	gsi_replace_with_seq, instead of inserting itself.
	* gimple-iterator.c (gsi_replace_with_seq): New function.
	* tree-ssa-forwprop.c (forward_propagate_comparison): Take
	iterator instead of statement, advance it.
	(ssa_forward_propagate_and_combine): Adjust call to above.


	* tree-phinodes.c (add_phi_node_to_bb): Tidy, don't use
	gimple_seq_alloc.
	* omp-low.c (finalize_task_copyfn): Don't use gimple_seq_alloc.
	* tree-nested.c (walk_gimple_omp_for): Ditto.
	* trans-mem.c (lower_transaction): Ditto.
	* tree-eh.c (do_return_redirection): Ditto.
	(do_goto_redirection): Ditto.
	(lower_try_finally_switch): Ditto.
	* gimplify.c (gimplify_stmt): Ditto.
	(gimplify_scan_omp_clauses): Ditto.
	(gimplify_omp_for): Ditto.
	(gimplify_function_tree): Ditto.
	* gimple-fold.c (gimplify_and_update_call_from_tree): Ditto.
	* tree-mudflap.c (mf_decl_cache_locals): Ditto.
	(mf_build_check_statement_for): Ditto.
	(mx_register_decls): Ditto.
	* graphite-sese-to-poly.c (remove_invariant_phi): Ditto,
	and don't use itertors to append.
	(insert_stmts): Ditto.
	(insert_out_of_ssa_copy): Ditto.
	(insert_out_of_ssa_copy_on_edge): Ditto.


	* gimple.h (gimple_bind_body_ptr): New function.
	(gimple_bind_body): Use it.
	(gimple_catch_handler): Use gimple_catch_handler_ptr.
	(gimple_eh_filter_failure_ptr): New function.
	(gimple_eh_filter_failure): Use it.
	(gimple_eh_else_n_body_ptr): New function.
	(gimple_eh_else_n_body): Use it.
	(gimple_eh_else_e_body_ptr): New function.
	(gimple_eh_else_e_body): Use it.
	(gimple_try_eval_ptr): New function.
	(gimple_try_eval): Use it.
	(gimple_try_cleanup_ptr): New function.
	(gimple_try_cleanup): Use it.
	(gimple_wce_cleanup_ptr): New function.
	(gimple_wce_cleanup): Use it.
	(gimple_omp_body_ptr): New function.
	(gimple_omp_body): Use it.
	(gimple_omp_for_pre_body_ptr): New function.
	(gimple_omp_for_pre_body): Use it.
	(gimple_transaction_body_ptr): New function.
	(gimple_transaction_body): Use it.
	(gsi_split_seq_before): Adjust to return nothing and take pointer
	to sequence.
	(gsi_set_stmt): Declare.
	(gsi_replace_with_seq): Declare.
	(walk_gimple_seq_mod): Declare.
	* function.h (struct function <gimple_body>): Use typedef gimple_seq.

	* gimple-iterator.c (gsi_set_stmt): New function.
	(gsi_split_seq_before): Return new sequence via pointer argument.
	(gsi_replace): Use gsi_set_stmt.

	* tree-ssa-loop-im.c (move_computations_stmt): First remove
	then insert stmt.
	* tree-complex.c (update_complex_components_on_edge): Don't
	copy gsi.
	* tree-phinodes.c (resize_phi_node): Don't resize stmt in-place,
	return new stmt.
	(reserve_phi_args_for_new_edge): Change call to above,
	use gsi_set_stmt.

	* omp-low.c (lower_omp): Change prototype to take pointer to
	sequence.
	(lower_rec_input_clauses): Use gimple_seq_add_seq instead of
	iterators.  Adjust call to lower_omp.
	(lower_lastprivate_clauses): Adjust call to lower_omp.
	(lower_reduction_clauses): Ditto.
	(expand_omp_taskreg): Nullify non-cfg body of child_fn.
	(lower_omp_sections): Don't explicitely count sequence length,
	nullify lowered bodies earlier, ensure stmts are part of only
	one sequence, adjust call to lower_omp.
	(lower_omp_single): Ensure stmts are part of only one sequence,
	adjust call to lower_omp.
	(lower_omp_master): Ditto.
	(lower_omp_ordered): Ditto.
	(lower_omp_critical): Ditto.
	(lower_omp_for): Ditto.
	(lower_omp_taskreg): Ditto, tidy.
	(lower_omp_1): Adjust calls to lower_omp.
	(execute_lower_omp): Ditto.
	(lower_omp): Adjust to take pointer to sequence.
	(diagnose_sb_2): Use walk_gimple_seq_mod.
	(diagnose_omp_structured_block_errors): Ditto and set possibly
	changed function body.
	* gimple-low.c (lower_function_body): Set function body after
	it stabilizes.
	(lower_sequence): Adjust to take pointer to sequence.
	(lower_omp_directive): Ensure stmt isn't put twice into the
	sequence, adjust call to lower_sequence.
	(lower_stmt): Adjust calls to lower_sequence.
	(lower_gimple_bind): Ditto.
	(gimple_try_catch_may_fallthru): Call gsi_start with lvalue.
	* tree-nested.c (walk_body): Take pointer to sequence, use
	walk_gimple_seq_mod.
	(walk_function): Adjust call to walk_body, set possibly changed
	body.
	(walk_gimple_omp_for): Adjust calls to walk_body.
	(convert_nonlocal_omp_clauses): Ditto.
	(convert_nonlocal_reference_stmt): Ditto.
	(convert_local_omp_clauses): Ditto.
	(convert_local_reference_stmt): Ditto.
	(convert_tramp_reference_stmt): Ditto.
	(convert_gimple_call): Ditto.
	(convert_nl_goto_reference): Use local iterator copy.
	* gimple.c (walk_gimple_seq_mod): Renamed from walk_gimple_seq,
	but taking pointer to sequence, ensure gsi_start is called with
	callers lvalue.
	(walk_gimple_seq): New wrapper around walk_gimple_seq_mod,
	asserting that the sequence head didn't change.
	(walk_gimple_stmt): Replace all calls to walk_gimple_seq with
	walk_gimple_seq_mod.
	* trans-mem.c (lower_transaction): Use walk_gimple_seq_mod.
	(execute_lower_tm): Ditto, and set possibly changed body.
	* tree-eh.c (lower_eh_constructs_1): Take pointer to sequence,
	call gsi_start with that lvalue.
	(replace_goto_queue_stmt_list): Ditto.
	(replace_goto_queue_1): Adjust calls to replace_goto_queue_stmt_list.
	(replace_goto_queue): Ditto.
	(lower_try_finally_nofallthru): Adjust calls to lower_eh_constructs_1.
	(lower_try_finally_onedest): Ditto.
	(lower_try_finally_copy): Ditto.
	(lower_try_finally_switch): Ditto.
	(lower_try_finally): Ditto.
	(lower_eh_filter): Ditto.
	(lower_eh_must_not_throw): Ditto.
	(lower_cleanup): Ditto.
	(lower_eh_constructs_2): Ditto.
	(lower_catch): Ditto, and ensure gsi_start is called with lvalue.
	(lower_eh_constructs): Adjust calls to lower_eh_constructs_1, and
	set possibly changed body.
	(optimize_double_finally): Call gsi_start with lvalue.

	* tree-cfg.c (make_blocks): Adjust call to gsi_split_seq_before.
	(gimple_split_block): Ditto.
	(gimple_merge_blocks): Use gsi_start_phis.
	(move_stmt_r): Use walk_gimple_seq_mod.
	* tree-ssa-dse.c (dse_enter_block): Use gsi_last_bb.
	* cgraphbuild.c (build_cgraph_edges): Use gsi_start_phis.
	(rebuild_cgraph_edges): Ditto.
	(cgraph_rebuild_references): Ditto.
	* ipa-prop.c (ipa_analyze_params_uses): Ditto.
	* tree-inline.c (copy_phis_for_bb): Ditto.
	* tree-ssa-dce.c: Ditto.

	* cgraphunit.c (cgraph_analyze_function): Use gimple_has_body_p.

From-SVN: r187053
2012-05-02 16:41:48 +00:00
Jan Hubicka ead84f73b0 lto-symtab.c (lto_cgraph_replace_node): Merge needed instead of force flags.
* lto-symtab.c (lto_cgraph_replace_node): Merge needed instead of force flags.
	* cgraph.c (cgraph_add_thunk): Use mark_reachable_node.
	(cgraph_remove_node): Update.
	(cgraph_mark_needed_node): Remove.
	(cgraph_mark_force_output_node): New.
	(dump_cgraph_node): Do not dump needed flag.
	(cgraph_node_cannot_be_local_p_1): Update.
	(cgraph_can_remove_if_no_direct_calls_and_refs): Update.
	* cgraph.h (symtab_node_base): Add force_output flag.
	(cgraph_node): Remove needed flag.
	(varpool_node): Remove force_output flag.
	(cgraph_mark_needed_node): Remove.
	(cgraph_mark_force_output_node): New.
	(cgraph_only_called_directly_or_aliased_p,
	varpool_can_remove_if_no_refs, varpool_all_refs_explicit_p): Update.
	* ipa-cp.c (ipcp_generate_summary): Remove out of date assert.
	* cgraphunit.c (cgraph_decide_is_function_needed): rewrite.
	(cgraph_add_new_function); Update.
	(cgraph_mark_if_needed); Update.
	(verify_cgraph_node): Update.
	(cgraph_analyze_function): Alias target is reachable.
	(process_function_and_variable_attributes): Update: externally_visible
	flag makes function reachable.
	(cgraph_analyze_functions): Update dumping.
	* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
	input_overwrite_node, input_varpool_node): Update streaming.
	* lto-streamer-out.c (produce_symtab): Use force_output.
	* ipa.c (process_references): Weakrefs must be processed.
	(cgraph_remove_unreachable_nodes): Likewise; update for new
	force_output flag.
	(varpool_externally_visible_p); Weakrefs are externally visible
	even if they are not.
	(function_and_variable_visibility): Update; when processing alias
	pair force the targets to be output.
	(whole_program_function_and_variable_visility): Use mark_reachable_node.
	* trans-mem.c (ipa_tm_mark_needed_node): Remove
	(ipa_tm_mark_force_output_node): New function.
	(ipa_tm_create_version_alias, ipa_tm_create_version): Update.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Be lax about aliases.
	* varasm.c (mark_decl_referenced): Update.
	(find_decl_and_mark_needed): Remove.
	(find_decl): New function.
	(weak_finish, finish_aliases_1, assemble_alias): Update; do not mark
	alias targets as needed.
	(dump_tm_clone_pairs): Update.
	* tree-inline.c (copy_bb): Update check.
	* symtab.c (dump_symtab_base): Dump force_output.
	* tree-ssa-structalias.c (ipa_pta_execute): Use force_output.
	* passes.c (execute_todo): Fix dumping.
	* varpool.c (decide_is_variable_needed, varpool_finalize_decl): Update.
	(varpool_analyze_pending_decls): Alias target is reachable.
	(varpool_create_variable_alias): Finalize weakrefs.

	* class.c (make_local_function_alias): Do not mark symbol referenced.

	* objc-acct.c (mark_referenced_methods); Use
	cgraph_mark_force_output_node.

	* gcc-interface/utils.c (gnat_write_global_declarations): Update for new
	force_output placement.

	* lto/lto-partition.c (partition_cgraph_node_p): Use force_output.

From-SVN: r186624
2012-04-20 14:09:11 +00:00
Martin Jambor 8e8483e6dc re PR middle-end/52939 (ice in gimple_get_virt_method_for_binfo with -O3)
2012-04-13  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/52939
	* gimple-fold.c (gimple_get_virt_method_for_binfo): Bail out if
	fold_ctor_reference returns a zero constant.

	* testsuite/g++.dg/ipa/pr52939.C: New test.

From-SVN: r186428
2012-04-13 19:57:21 +02:00
Mike Stump d25c4172fb * gimple-fold.c (gimple_fold_stmt_to_constant_1): Avoid warning.
From-SVN: r186202
2012-04-06 23:00:11 +00:00
Richard Guenther 6bcfb75385 tree-flow.h (struct pre_expr_d): Remove forward declaration.
2012-03-29  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (struct pre_expr_d): Remove forward declaration.
	(add_to_value): Remove.
	(print_value_expressions): Likewise.
	* tree-ssa-pre.c (add_to_value): Make static.
	(print_value_expressions): Likewise.
	* gimple.h (gimple_adjust_this_by_delta): Remove.
	* gimple-fold.c (gimple_adjust_this_by_delta): Likewise.

From-SVN: r185956
2012-03-29 12:47:51 +00:00
Richard Guenther d2a12ae77f tree.h (TREE_VECTOR_CST_ELTS): Remove.
2012-03-16  Richard Guenther  <rguenther@suse.de>

	* tree.h (TREE_VECTOR_CST_ELTS): Remove.
	(VECTOR_CST_NELTS, VECTOR_CST_ELTS, VECTOR_CST_ELT): New defines.
	(struct tree_vector): Remove elements member, add variable size
	elts array member.
	(build_vector_stat): Declare.
	(build_vector): Define in terms of build_vector_stat.
	* tree.c (build_vector): Rename to ...
	(build_vector_stat): ... this.  Take array of trees as parameter.
	(build_vector_from_ctor): Adjust.
	(integer_zerop, integer_onep, integer_all_onesp, iterative_hash_expr,
	initializer_zerop): Adjust.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* expr.c (categorize_ctor_elements_1, expand_expr_real_1,
	const_vector_from_tree): Likewise.
	* fold-const.c (const_binop, operand_equal_p, native_encode_vector,
	native_interpret_vector, fold_unary_loc, vec_cst_ctor_to_array,
	fold_vec_perm, fold_binary_loc, fold_ternary_loc): Likewise.
	* tree-streamer-in.c (streamer_alloc_tree): Handle TS_VECTOR.
	(lto_input_ts_vector_tree_pointers): Adjust.
	* tree-streamer-out.c (streamer_write_tree_header): Handle TS_VECTOR.
	(write_ts_vector_tree_pointers): Adjust.
	* varasm.c (const_hash_1, compare_constant, copy_constant,
	output_constant): Adjust.
	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Adjust.
	* print-tree.c (print_node): Adjust.
	* tree-pretty-print.c (dump_generic_node): Adjust.
	* tree-vect-generic.c (uniform_vector_p, vector_element,
	lower_vec_perm): Adjust.
	* tree-vect-loop.c (get_initial_def_for_reduction): Adjust.
	* tree-vect-slp.c (vect_get_constant_vectors,
	vect_transform_slp_perm_load): Adjust.
	* tree-vect-stmts.c (vect_gen_perm_mask): Adjust.
	* expmed.c (make_tree): Adjust.

	* config/i386/i386.c (ix86_expand_builtin): Adjust.
	* config/sparc/sparc.c (sparc_handle_vis_mul8x16): Adjust interface
	and implementation.
	(sparc_fold_builtin): Adjust.

	c-family/
	* c-pretty-print.c (pp_c_initializer_list): Adjust.

From-SVN: r185458
2012-03-16 09:47:09 +00:00
Richard Guenther 7501ca28e3 re PR c++/52582 (g++ ICE when compiling qt-4.8.0 with -O2 on PPC (32bit))
2012-03-14  Richard Guenther  <rguenther@suse.de>

	PR middle-end/52582
	* gimple-fold.c (canonicalize_constructor_val): Make sure
	we have a cgraph node for a FUNCTION_DECL that comes from
	a constructor.
	(gimple_get_virt_method_for_binfo): Likewise.

From-SVN: r185381
2012-03-14 13:01:46 +00:00
Richard Guenther 3e888a5ed4 re PR middle-end/52329 (Invalid MEM_REF encountered in set_mem_attributes_minus_bitpos)
2012-02-22  Richard Guenther  <rguenther@suse.de>

	PR middle-end/52329
	* gimple-fold.c (fold_stmt_1): Also canonicalize ADDR_EXPRs
	for GIMPLE_DEBUG stmts.

From-SVN: r184466
2012-02-22 11:21:48 +00:00
Jakub Jelinek 949e47e576 re PR tree-optimization/52318 (ICE: in execute_todo, at passes.c:1748 with -O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce and stpcpy_chk())
PR tree-optimization/52318
	* gimple-fold.c (gimplify_and_update_call_from_tree): Add
	vdef also to non-pure/const call stmts in the sequence.

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

From-SVN: r184428
2012-02-21 10:24:42 +01:00
Romain Geissler f3fc9b804a builtins.def (BUILT_IN_STPNCPY_CHK): New definition.
* builtins.def (BUILT_IN_STPNCPY_CHK): New definition.
	* builtins.c (expand_builtin, fold_builtin_4, maybe_emit_chk_warning):
	Add BUILT_IN_STPNCPY_CHK case.
	* gimple-fold.c (gimple_fold_builtin): Likewise.
	* tree-object-size.c (pass_through_call): Likewise.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
	call_may_clobber_ref_p_1): Likewise.
	* tree-ssa-structalias.c (find_func_aliases_for_builtin_call,
	find_func_clobbers): Likewise.
	* tree.h (fold_builtin_strncpy_chk): Rename to fold_builtin_stxncpy_chk
	* builtins.c (fold_builtin_strncpy_chk): Likewise.
	Rewrite stpncpy_chk calls to strncpy_chk calls if returned value is
	ignored.

	* gcc.c-torture/execute/builtins/chk.h (stpncpy, stpncpy_disallowed):
	New definitions.
	* gcc.c-torture/execute/builtins/lib/chk.c (stpncpy_disallowed):
	Likewise.
	(stpncpy, __stpncpy_chk): New functions.
	* gcc.c-torture/execute/builtins/stpncpy-chk-lib.c: New file.
	* gcc.c-torture/execute/builtins/stpncpy-chk.c: Likewise.

From-SVN: r182378
2011-12-15 18:26:10 +01:00
Jakub Jelinek f6dbed3269 Revert
2011-12-12  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/51481
	* gimple-fold.c (gimple_fold_call): Call
	maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
	edges, but gimple_fold_builtin result can't throw.

From-SVN: r182284
2011-12-13 15:00:58 +01:00
Jakub Jelinek c88388e674 re PR tree-optimization/51481 (ice: dead STMT in EH table)
PR tree-optimization/51481
	* gimple-fold.c (gimple_fold_call): Call
	maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
	edges, but gimple_fold_builtin result can't throw.

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

From-SVN: r182264
2011-12-12 21:59:28 +01:00
Eric Botcazou 8f420307e0 gimple-fold.c (gimple_fold_stmt_to_constant_1): Also check the TYPE_MODE to recognize useless pointer conversions.
* gimple-fold.c (gimple_fold_stmt_to_constant_1) <GIMPLE_UNARY_RHS>:
	Also check the TYPE_MODE to recognize useless pointer conversions.

From-SVN: r182178
2011-12-09 21:11:21 +00:00
Richard Guenther 52f26be409 re PR middle-end/51436 (ICE(segfault) in gimplify_and_update_call_from_tree gimple-fold.c:603)
2011-12-06  Richard Guenther  <rguenther@suse.de>

	PR middle-end/51436
	* gimple-fold.c (gimplify_and_update_call_from_tree): Guard
	vdef check for the fact we do not have virtual operands when
	not optimizing.

	* g++.dg/torture/pr51436.C: New testcase.

From-SVN: r182045
2011-12-06 12:17:31 +00:00
Richard Guenther 89faf322d8 cgraph.c (cgraph_create_edge_1): Initialize call_stmt_cannot_inline_p from the stmt if possible.
2011-12-05  Richard Guenther  <rguenther@suse.de>

	* cgraph.c (cgraph_create_edge_1): Initialize
	call_stmt_cannot_inline_p from the stmt if possible.
	(cgraph_make_edge_direct): Likewise.
	* gimple-streamer-in.c (input_gimple_stmt): Do not
	call gimple_call_set_cannot_inline.
	* gimple.h (enum gf_mask): Remove GF_CALL_CANNOT_INLINE, shift
	values.
	(gimple_call_set_cannot_inline): Remove.
	(gimple_call_cannot_inline_p): Likewise.
	* ipa-inline-analysis.c (initialize_inline_failed): Look
	at the edge call_stmt_cannot_inline_p flag.
	* ipa-inline.c (can_inline_edge_p): Likewise.
	(early_inliner): Only update the edge flag.
	* ipa-prop.c (update_indirect_edges_after_inlining): Likewise.
	(ipa_modify_call_arguments): Do not call gimple_call_set_cannot_inline.
	* cgraphunit.c (assemble_thunk): Likewise.
	* gimple-fold.c (gimple_fold_call): Likewise.

	* tree.h (CALL_CANNOT_INLINE_P): Remove.
	* tree-mudflap.c (mf_xform_statements): Do not modify alloca calls.
	* builtins.c (expand_builtin_alloca): With -fmudflap do not expand
	alloca calls inline.
	* cfgexpand.c (expand_call_stmt): Do not set CALL_CANNOT_INLINE_P.
	* gimple.c (gimple_build_call_from_tree): Do not read
	CALL_CANNOT_INLINE_P.
	* gimplify.c (gimplify_call_expr): Do not copy CALL_CANNOT_INLINE_P.

From-SVN: r182001
2011-12-05 08:51:53 +00:00
Richard Guenther c5bdb340d6 gimple-fold.c (canonicalize_constructor_val): Mark address-taken variables addressable.
2011-11-09  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (canonicalize_constructor_val): Mark
	address-taken variables addressable.

From-SVN: r181197
2011-11-09 08:32:26 +00:00
Richard Guenther 4835617e59 gimple-fold.c (canonicalize_constructor_val): Make sure we have referenced vars setup before adding to them.
2011-11-08  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (canonicalize_constructor_val): Make sure
	we have referenced vars setup before adding to them.

From-SVN: r181155
2011-11-08 11:23:11 +00:00
Richard Guenther e021c122e5 re PR middle-end/50890 (ICE in fold_convert_loc, at fold-const.c:1894)
2010-11-02  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50890
	* gimple.h (gimple_fold_call): Remove.
	* gimple-fold.c (fold_stmt_1): Move all call related code to ...
	(gimple_fold_call): ... here.  Make static.  Update the
	cannot-inline flag on direct calls.
	* ipa-inline.c (early_inliner): Copy the cannot-inline flag
	from the statements to the edges.

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

From-SVN: r180763
2011-11-02 08:46:08 +00:00
Richard Guenther e256dfce35 re PR tree-optimization/50768 (ICE: in execute_todo, at passes.c:1731 with -O2 -ftracer)
2011-10-19  Richard Guenther  <rguenther@suse.de>

	PR middle-end/50768
	* gimple-fold.c (gimplify_and_update_call_from_tree): Rewrite.

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

From-SVN: r180187
2011-10-19 12:59:21 +00:00
Richard Guenther a24ac4609a re PR tree-optimization/50389 (ICE: in execute_todo, at passes.c:1730 with -O -freorder-blocks -ftracer and __builtin___memcpy_chk())
2011-10-10  Richard Guenther  <rguenther@suse.de>

	PR middle-end/50389
	* gimple-fold.c (gimplify_and_update_call_from_tree): Do not
	mark symbols for renaming.  Append the VUSE to all statements
	that possibly can have one.

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

From-SVN: r179757
2011-10-10 15:45:53 +00:00
Jakub Jelinek e7f9dae09c tree.h (avoid_folding_inline_builtin): New prototype.
* tree.h (avoid_folding_inline_builtin): New prototype.
	* builtins.c (avoid_folding_inline_builtin): No longer static.
	* gimple-fold.c (gimple_fold_builtin): Give up if
	avoid_folding_inline_builtin returns true.

From-SVN: r179614
2011-10-06 16:34:48 +02:00
Richard Guenther d3878abfcc gimple-fold.c (gimple_fold_stmt_to_constant_1): For ternary ops with an embedded expression valueize and fold that as well.
2011-10-05  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (gimple_fold_stmt_to_constant_1): For
	ternary ops with an embedded expression valueize and fold
	that as well.
	* tree-ssa-sccvn.c (try_to_simplify): Also allow SSA name
	results from gimple_fold_stmt_to_constant_1.

From-SVN: r179543
2011-10-05 10:54:14 +00:00
Richard Guenther eb8f1123d9 re PR middle-end/50609 (FAIL: gcc.c-torture/execute/pr23135.c compilation, -O2 -flto (ICE))
2011-10-05  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50609
	* gimple-fold.c (fold_array_ctor_reference): Also handle
	vector typed constructors.
	(fold_ctor_reference): Dispatch to fold_array_ctor_reference
	for vector typed constructors.

From-SVN: r179540
2011-10-05 09:31:40 +00:00
Jakub Jelinek 383841506e re PR inline-asm/50571 (Undesirable folding in "m" constrained asm operands)
PR inline-asm/50571
	* gimple-fold.c (fold_stmt_1) <case GIMPLE_ASM>: If
	input constraints allow mem and not reg, pass true instead of
	false as second argument to maybe_fold_reference.

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

From-SVN: r179389
2011-09-30 17:01:27 +02:00
Jakub Jelinek 2186081438 gimple-fold.c (gimplify_and_update_call_from_tree): Set gctx.into_ssa after push_gimplify_context.
* gimple-fold.c (gimplify_and_update_call_from_tree): Set
	gctx.into_ssa after push_gimplify_context.

	* gimple.c (gimple_build_call_valist): New function.
	* gimple.h (gimple_build_call_valist): New prototype.
	* tree-ssa-propagate.c (finish_update_gimple_call): New function.
	(update_gimple_call): Likewise.
	(update_call_from_tree): Use finish_update_gimple_call.
	* tree-ssa-propagate.h (update_gimple_call): New prototype.

From-SVN: r179204
2011-09-26 18:19:55 +02:00
Richard Guenther f8a7df4594 re PR tree-optimization/50472 (Volatile qualification in data is not enough to avoid optimization over pointer to data)
2011-09-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50472
	* gimple-fold.c (fold_const_aggregate_ref_1): Do not fold
	volatile references.

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

From-SVN: r179196
2011-09-26 12:58:35 +00:00
Jan Hubicka 5548ca3540 re PR lto/50430 (Constructors of static external vars are throwed away leading to missed optimizations (and ipa-cp ICE).)
PR lto/50430
	* gimple-fold.c (gimple_get_virt_method_for_binfo): Do not ICE on
	error_mark_node in the DECL_INITIAL of vtable.

From-SVN: r178908
2011-09-16 14:40:06 +00:00
Richard Guenther 59401b92b3 gimple.h (fold_stmt_inplace): Adjust to take a gimple_stmt_iterator instead of a statement.
2011-09-09  Richard Guenther  <rguenther@suse.de>

	* gimple.h (fold_stmt_inplace): Adjust to take a gimple_stmt_iterator
	instead of a statement.
	* gimple-fold.c (fold_stmt_inplace): Likewise.
	* sese.c (graphite_copy_stmts_from_block): Adjust.
	* tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_into_comparison): Use
	fold_stmt.
	(forward_propagate_addr_into_variable_array_index): Likewise.
	(forward_propagate_addr_expr_1): adjust.
	(associate_plusminus): Likewise.
	(ssa_forward_propagate_and_combine): Likewise.
	* tree-ssa-mathopts.c (replace_reciprocal): Adjust.
	(execute_cse_reciprocals): Likewise.
	* tree-ssa.c (insert_debug_temp_for_var_def): Adjust.

From-SVN: r178726
2011-09-09 11:52:51 +00:00
Martin Jambor 81fa35bd59 cgraph.h (cgraph_indirect_call_info): Removed field thunk_delta.
2011-09-02  Martin Jambor  <mjambor@suse.cz>

	* cgraph.h (cgraph_indirect_call_info): Removed field thunk_delta.
	* gimple-fold.c (gimple_get_virt_method_for_binfo): Rewritten to use
	BINFO_VTABLE.  Parameter delta removed, all callers updated.
	* tree.c (free_lang_data_in_binfo): Clear BINFO_VIRTUALs instead
	BINFO_VTABLE.
	* cgraph.c (cgraph_make_edge_direct): Removed parameter delta, updated
	all calls.
	* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Removed
	handling of thunk_delta.
	* ipa-cp.c (get_indirect_edge_target): Removed parameter delta.
	(devirtualization_time_bonus): Do not handle thunk deltas.
	(ipcp_discover_new_direct_edges): Likewise.
	* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
	(try_make_edge_direct_simple_call): Likewise.
	(try_make_edge_direct_virtual_call): Likewise.
	* lto-cgraph.c (output_cgraph_opt_summary_p): Likewise.  Mark
	parameter set as unused.
	(output_edge_opt_summary): Likewise.  Mark both parameters as unused.
	* lto-cgraph.c (output_cgraph_opt_summary_p): Likewise.  Mark
	parameter set as unused.
	(output_edge_opt_summary): Likewise.  Mark both parameters as unused.
	(input_edge_opt_summary): Likewise.
	* lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): Do not stream
	BINFO_VIRTUALS at all.
	* lto-streamer-in.c (lto_input_ts_binfo_tree_pointers): Likewise.

	* testsuite/g++.dg/ipa/devirt-3.C: Added a distraction method.
	* testsuite/g++.dg/ipa/ivinline-7.C: Added a test for direct call
	discovery, xfailed test for inlining.
	* testsuite/g++.dg/ipa/ivinline-9.C: Likewise.

From-SVN: r178472
2011-09-02 15:26:30 +02:00