1. 03 Jan, 2018 1 commit
  2. 24 Apr, 2017 1 commit
    • re PR bootstrap/79814 (pass-instances.def:36:14: error:… · 3c5b0ca4
      re PR bootstrap/79814 (pass-instances.def:36:14: error: ‘*<unknown>.gcc::pass_manager::pass_warn_unused_result_1’ is used uninitialized in this function)
      
      2017-04-24  Richard Biener  <rguenther@suse.de>
      
      	PR bootstrap/79814
      	* pass_manager.h (pass_manager::operator new): Remove.
      	(pass_manager::operator delete): Likewise.
      	* passes.c (pass_manager::operator new): Remove.
      	(pass_manager::operator delete): Likewise.
      	(pass_manager::pass_manager): Zero individual pass members.
      
      From-SVN: r247089
      Richard Biener committed
  3. 24 Jan, 2017 1 commit
    • Add "__RTL" to cc1 · c2e84327
      gcc/c-family/ChangeLog:
      	* c-common.c (c_common_reswords): Add "__RTL".
      	* c-common.h (enum rid): Add RID_RTL.
      
      gcc/c/ChangeLog:
      	* c-parser.c: Include "read-rtl-function.h" and
      	"run-rtl-passes.h".
      	(c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
      	grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
      	production.  Update for renaming of field "gimple_pass" to
      	"gimple_or_rtl_pass".  If __RTL was seen, call
      	c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
      	to an auto_timevar, to cope with early exit.
      	(c_parser_declspecs): Update RID_GIMPLE handling for renaming of
      	field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
      	c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
      	Handle RID_RTL.
      	(c_parser_parse_rtl_body): New function.
      	* c-tree.h (enum c_declspec_word): Add cdw_rtl.
      	(struct c_declspecs): Rename field "gimple_pass" to
      	"gimple_or_rtl_pass".  Add field "rtl_p".
      	* gimple-parser.c (c_parser_gimple_pass_list): Rename to...
      	(c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
      	* gimple-parser.h (c_parser_gimple_pass_list): Rename to...
      	(c_parser_gimple_or_rtl_pass_list): ...this.
      
      gcc/ChangeLog:
      	* cfg.c (original_copy_tables_initialized_p): New function.
      	* cfg.h (original_copy_tables_initialized_p): New decl.
      	* cfgrtl.c (relink_block_chain): Guard the call to
      	free_original_copy_tables with a call to
      	original_copy_tables_initialized_p.
      	* cgraph.h (symtab_node::native_rtl_p): New decl.
      	* cgraphunit.c (symtab_node::native_rtl_p): New function.
      	(symtab_node::needed_p): Don't assert for early assembly output
      	for __RTL functions.
      	(cgraph_node::finalize_function): Set "force_output" for __RTL
      	functions.
      	(cgraph_node::analyze): Bail out early for __RTL functions.
      	(analyze_functions): Update assertion to support __RTL functions.
      	(cgraph_node::expand): Bail out early for __RTL functions.
      	* final.c (rest_of_clean_state): Don't call delete_tree_ssa for
      	__RTL functions.
      	* function.h (struct function): Update comment for field
      	"pass_startwith".
      	* gimple-expr.c: Include "tree-pass.h".
      	(gimple_has_body_p): Return false for __RTL functions.
      	* Makefile.in (OBJS): Add run-rtl-passes.o.
      	* pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
      	accessor.
      	(gcc::pass_manager::get_clean_slate): New accessor.
      	* passes.c: Include "insn-addr.h".
      	(should_skip_pass_p): Add logging.  Update logic for running
      	"expand" to be compatible with both __GIMPLE and __RTL.  Guard
      	property-provider override so it is only done for gimple passes.
      	Don't skip dfinit.
      	(skip_pass): New function.
      	(execute_one_pass): Call skip_pass when skipping passes.
      	* read-md.c (md_reader::read_char): Support filtering
      	the input to a subset of line numbers.
      	(md_reader::md_reader): Initialize fields
      	m_first_line and m_last_line.
      	(md_reader::read_file_fragment): New function.
      	* read-md.h (md_reader::read_file_fragment): New decl.
      	(md_reader::m_first_line): New field.
      	(md_reader::m_last_line): New field.
      	* read-rtl-function.c (function_reader::create_function): Only
      	create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
      	curr_properties.  Set DECL_INITIAL to a dummy block.
      	(read_rtl_function_body_from_file_range): New function.
      	* read-rtl-function.h (read_rtl_function_body_from_file_range):
      	New decl.
      	* run-rtl-passes.c: New file.
      	* run-rtl-passes.h: New file.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/rtl/aarch64/asr_div1.c: New test case.
      	* gcc.dg/rtl/aarch64/pr71779.c: New test case.
      	* gcc.dg/rtl/rtl.exp: New file.
      	* gcc.dg/rtl/test.c: New file.
      	* gcc.dg/rtl/truncated-rtl-file.c: New test case.
      	* gcc.dg/rtl/unknown-rtx-code.c: New test case.
      	* gcc.dg/rtl/x86_64/dfinit.c: New test case.
      	* gcc.dg/rtl/x86_64/different-structs.c: New test case.
      	* gcc.dg/rtl/x86_64/final.c: New test case.
      	* gcc.dg/rtl/x86_64/into-cfglayout.c: New test case.
      	* gcc.dg/rtl/x86_64/ira.c: New test case.
      	* gcc.dg/rtl/x86_64/pro_and_epilogue.c: New test case.
      	* gcc.dg/rtl/x86_64/test-multiple-fns.c: New test case.
      	* gcc.dg/rtl/x86_64/test-return-const.c.after-expand.c: New test case.
      	* gcc.dg/rtl/x86_64/test-return-const.c.before-fwprop.c: New test case.
      	* gcc.dg/rtl/x86_64/test-rtl.c: New test case.
      	* gcc.dg/rtl/x86_64/test_1.h: New file.
      	* gcc.dg/rtl/x86_64/times-two.c.after-expand.c: New test case.
      	* gcc.dg/rtl/x86_64/times-two.c.before-df.c: New test case.
      	* gcc.dg/rtl/x86_64/times-two.h: New file.
      	* gcc.dg/rtl/x86_64/vregs.c: New test case.
      
      From-SVN: r244878
      David Malcolm committed
  4. 01 Jan, 2017 1 commit
  5. 06 May, 2016 1 commit
    • Move name_to_pass_map into class pass_manager · 58d4c836
      gcc/ChangeLog:
      	* pass_manager.h (pass_manager::register_pass_name): New method.
      	(pass_manager::get_pass_by_name): New method.
      	(pass_manager::create_pass_tab): New method.
      	(pass_manager::m_name_to_pass_map): New field.
      	* passes.c (name_to_pass_map): Delete global in favor of field
      	"m_name_to_pass_map" of pass_manager.
      	(register_pass_name): Rename from a function to...
      	(pass_manager::register_pass_name): ...this method, updating
      	for renaming of global "name_to_pass_map" to field
      	"m_name_to_pass_map".
      	(create_pass_tab): Rename from a function to...
      	(pass_manager::create_pass_tab): ...this method, updating
      	for renaming of global "name_to_pass_map" to field.
      	(get_pass_by_name): Rename from a function to...
      	(pass_manager::get_pass_by_name): ...this method.
      	(enable_disable_pass): Convert use of get_pass_by_name to
      	a method call, locating the pass_manager singleton.
      
      From-SVN: r235977
      David Malcolm committed
  6. 17 Apr, 2016 1 commit
    • Add pass parameter to TERMINATE_PASS_LIST · 17e7ab87
      2016-04-17  Tom de Vries  <tom@codesourcery.com>
      
      	PR other/68875
      	* pass_manager.h (TERMINATE_PASS_LIST): Add pass argument.
      	* passes.c (pass_manager::pass_manager): Declare and init p_start in
      	INSERT_PASSES_AFTER.  Add pass parameter to TERMINATE_PASS_LIST, and
      	check if it's equal to p_start.
      	* passes.def: Add arguments to TERMINATE_PASS_LISTs.
      
      From-SVN: r235071
      Tom de Vries committed
  7. 04 Jan, 2016 1 commit
  8. 16 Nov, 2015 1 commit
    • Remove first_pass_instance from pass_vrp · b0c77505
      2015-11-16  Tom de Vries  <tom@codesourcery.com>
      
      	* gdbhooks.py (class PassNames): Handle extra arg NEXT_PASS argument.
      	* gen-pass-instances.awk (handle_line): Same.
      	* pass_manager.h (class pass_manager): Define and undefine
      	NEXT_PASS_WITH_ARG.
      	* passes.c (opt_pass::set_pass_param): New function.
      	(pass_manager::pass_manager): Define and undefine NEXT_PASS_WITH_ARG.
      	* passes.def: Add extra arg to NEXT_PASS (pass_vrp).
      	* tree-pass.h (gimple_opt::set_pass_param): Declare.
      	* tree-vrp.c (vrp_finalize, execute_vrp): Add and handle
      	warn_array_bounds_p parameter.
      	(pass_vrp::pass_vrp): Initialize warn_array_bounds_p.
      	(pass_vrp::set_pass_param): New function.
      	(pass_vrp::execute): Add warn_array_bounds_p arg to execute_vrp call.
      	(pass_vrp::warn_array_bounds_p): New private member.
      
      From-SVN: r230415
      Tom de Vries committed
  9. 05 Jan, 2015 1 commit
  10. 19 Nov, 2014 2 commits
    • PR jit/63854: Add all_late_ipa_passes to GCC_PASS_LISTS · 1f1e44ed
      gcc/ChangeLog:
      	PR jit/63854
      	* pass_manager.h (GCC_PASS_LISTS): Add all_late_ipa_passes.
      
      From-SVN: r217807
      David Malcolm committed
    • PR jit/63854: Fix memory leaks within context/pass_manager/dump_manager · 10fdd6e9
      gcc/ChangeLog:
      	PR jit/63854
      	* config/alpha/alpha.c (alpha_option_override): Remove static from
      	"handle_trap_shadows_info" and "align_insns_info".
      	* config/i386/i386.c (ix86_option_override): Likewise for
      	"insert_vzeroupper_info".
      	* config/rl78/rl78.c (rl78_asm_file_start): Likewise for
      	"rl78_devirt_info" and "rl78_move_elim_info".
      	* config/rs6000/rs6000.c (rs6000_option_override): Likewise for
      	"analyze_swaps_info".
      	* context.c (gcc::context::~context): New.
      	* context.h (gcc::context::~context): New.
      	* dumpfile.c (dump_files): Add "false" initializers for new field
      	"owns_strings".
      	(gcc::dump_manager::~dump_manager): New.
      	(gcc::dump_manager::dump_register): Add param "take_ownership".
      	* dumpfile.h (struct dump_file_info): Add field "owns_strings".
      	(gcc::dump_manager::~dump_manager): New.
      	(gcc::dump_manager::dump_register): Add param "take_ownership".
      	* pass_manager.h (gcc::pass_manager::operator delete): New.
      	(gcc::pass_manager::~pass_manager): New.
      	* passes.c (pass_manager::register_one_dump_file): Pass "true" to
      	new "owns_strings" argument to dump_register.
      	(pass_manager::operator delete): New.
      	(delete_pass_tree): New function.
      	(pass_manager::~pass_manager): New.
      	* statistics.c (statistics_early_init): Pass "false" to
      	new "owns_strings" argument to dump_register.
      	* toplev.c (toplev::finalize): Clean up the context and thus the
      	things it owns.
      
      From-SVN: r217793
      David Malcolm committed
  11. 17 Apr, 2014 2 commits
  12. 02 Jan, 2014 1 commit
  13. 06 Dec, 2013 1 commit
  14. 18 Nov, 2013 1 commit
    • Remove all_lto_gen_passes, replace with plain function calls · 38f4f02f
      	* cgraphunit.c (ipa_passes): Don't execute all_lto_gen_passes.
      	* lto-streamer-out.c (lto_output, produce_asm_for_decls): No longer
      	static.
      	(pass_data_ipa_lto_gimple_out, pass_ipa_lto_gimple_out,
      	make_pass_ipa_lto_gimple_out, pass_data_ipa_lto_finish_out,
      	pass_ipa_lto_finish_out, make_pass_ipa_lto_finish_out): Remove.
      	* lto-streamer.h (lto_output, produce_asm_for_decls): Declare.
      	* pass-manager.h (GCC_PASS_LISTS, class pass_manager):
      	Remove all_lto_gen_passes.
      	* passes.c (pass_manager::dump_passes): Remove its use.
      	(pass_manager::register_pass): Likewise.
      	(ipa_read_summaries, ipa_read_optimization_summaries): Likewise.
      	(pass_manager::pass_manager): Don't initialize or use it.
      	(write_lto): New static function.
      	(ipa_write_summaries_1, ipa_write_optimization_summaries): Use it
      	instead of using all_lto_gen_passes.
      	* passes.def (all_lto_gen_passes, pass_ipa_lto_gimple_out,
      	pass_ipa_lto_finish_out): Delete.
      	* tree-pass.h (make_pass_ipa_lto_gimple_out,
      	make_pass_ipa_lto_finish_out): Don't declare.
      
      From-SVN: r204984
      Bernd Schmidt committed
  15. 30 Sep, 2013 1 commit
    • basic-block.h (edge_list): Prefix member names with "m_". · 65d3284b
      gcc/
      	* basic-block.h (edge_list): Prefix member names with "m_".
      	* context.h (context): Likewise.
      	* domwalk.h (dom_walker): Likewise.
      	* gengtype-state.c (s_expr_writer, state_writer): Likewise.
      	* graphite-sese-to-poly.c (sese_dom_walker): Likewise.
      	* hash-table.h (hash_table): Likewise.
      	* machmode.h (bit_field_mode_iterator): Likewise.
      	* pass_manager.h (pass_list): Likewise.
      	* tree-into-ssa.c (mark_def_dom_walker): Likewise.
      	* tree-pass.h (pass_data): Likewise.
      	* tree-ssa-dom.c (dom_opt_dom_walker): Likewise.
      	* tree-ssa-phiopt.c (nontrapping_dom_walker): Likewise,
      	* tree-ssa-uncprop.c (uncprop_dom_walker): Likewise.
      	* asan.c (pass_data_asan): Update accordingly.
      	* cfganal.c (control_dependences::find_control_dependence): Likewise.
      	(control_dependences::control_dependences): Likewise.
      	(control_dependences::~control_dependences): Likewise.
      	(control_dependences::~control_dependences): Likewise.
      	(control_dependences::get_edges_dependent_on): Likewise.
      	* cgraphbuild.c (pass_data_rebuild_cgraph_edges::clone): Likewise.
      	(pass_data_remove_cgraph_callee_edges::clone): Likewise.
      	* context.c (gcc::context::context): Likewise.
      	* cprop.c (pass_rtl_cprop::clone): Likewise.
      	* domwalk.c (dom_walker::walk): Likewise.
      	* ipa-inline-analysis.c (pass_inline_parameters::clone): Likewise.
      	* ipa-pure-const.c (pass_local_pure_const::clone): Likewise.
      	* mode-switching.c (pass_mode_switching::clone): Likewise.
      	* passes.c (opt_pass::opt_pass): Likewise.
      	(pass_manager::pass_manager): Likewise.
      	* predict.c (pass_strip_predict_hints::clone): Likewise.
      	* recog.c (pass_data pass_data_peephole2::clone): Likewise.
      	(pass_split_all_insns::clone): Likewise.
      	* stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
      	Likewise.
      	(bit_field_mode_iterator::next_mode): Likewise.
      	(bit_field_mode_iterator::prefer_smaller_modes): Likewise.
      	* tree-cfg.c (pass_split_crit_edges::clone): Likewise.
      	* tree-cfgcleanup.c (pass_merge_phi::clone): Likewise.
      	* tree-complex.c (pass_lower_complex::clone): Likewise.
      	* tree-eh.c (pass_cleanup_eh::clone): Likewise.
      	* tree-object-size.c (pass_object_sizes::clone): Likewise.
      	* tree-optimize.c (pass_fixup_cfg::clone): Likewise.
      	* tree-ssa-ccp.c (pass_data_ccp::clone): Likewise.
      	(pass_fold_builtins::clone): Likewise.
      	* tree-ssa-copy.c (pass_data_copy_prop::clone): Likewise.
      	* tree-ssa-copyrename.c (pass_rename_ssa_copies::clone): Likewise.
      	* tree-ssa-dce.c (pass_dce::clone, pass_dce_loop::clone): Likewise.
      	(pass_cd_dce::clone): Likewise.
      	* tree-ssa-dom.c (pass_dominator::clone): Likewise.
      	(pass_phi_only_cprop::clone): Likewise.
      	* tree-ssa-dse.c (pass_dse::clone): Likewise.
      	* tree-ssa-forwprop.c (pass_forwprop::clone): Likewise.
      	* tree-ssa-loop.c (pass_lim::clone): Likewise.
      	* tree-ssa-phiopt.c (pass_phiopt::clone): Likewise.
      	* tree-ssa-pre.c (pass_fre::clone): Likewise.
      	* tree-ssa-reassoc.c (pass_reassoc::clone): Likewise.
      	* tree-ssa-uninit.c (pass_late_warn_uninitialized::clone): Likewise.
      	* tree-tailcall.c (pass_tail_recursion::clone): Likewise.
      	* tree-vect-generic.c (pass_lower_vector_ssa::clone): Likewise.
      	* tree-vrp.c (pass_vrp::clone): Likewise.
      	* tsan.c (pass_tsan::clone): Likewise.
      
      From-SVN: r203046
      Richard Sandiford committed
  16. 28 Sep, 2013 1 commit
    • alloc-pool.c, [...]: Add missing whitespace before "(". · c3284718
      gcc/
      	* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
      	bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
      	cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
      	cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
      	combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
      	cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
      	df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
      	dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
      	errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
      	fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
      	gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
      	genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
      	genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
      	genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
      	gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
      	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
      	gimple.h, godump.c, graphite-clast-to-gimple.c,
      	graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
      	graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
      	hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
      	ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
      	ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
      	ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
      	loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
      	lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
      	mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
      	pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
      	predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
      	profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
      	regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
      	reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
      	sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
      	statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
      	system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
      	tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
      	tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
      	tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
      	tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
      	tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
      	tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
      	tree-scalar-evolution.c, tree-sra.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-live.c, tree-ssa-loop-ch.c,
      	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
      	tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
      	tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
      	tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
      	tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
      	tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
      	tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
      	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
      	tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
      	tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
      	varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
      	whitespace before "(".
      
      From-SVN: r203004
      Richard Sandiford committed
  17. 29 Aug, 2013 1 commit
    • dumpfile.c (dump_loc): Output column number. · 103ff0d6
      2013-08-29  Teresa Johnson  <tejohnson@google.com>
      
      	* dumpfile.c (dump_loc): Output column number.
      	* dumpfile.h (OPTGROUP_OTHER): Add and enable under OPTGROUP_ALL.
      	* doc/invoke.texi: Document optall -fopt-info flag.
      	* profile.c (read_profile_edge_counts): Use new dump framework.
      	(compute_branch_probabilities): Ditto.
      	* passes.c (pass_manager::register_one_dump_file): Use OPTGROUP_OTHER
      	when pass not in any opt group.
      	* pass_manager.h (pass_manager::get_pass_profile): New method.
      	* value-prof.c (check_counter): Use new dump framework.
      	(check_ic_target): Ditto.
      	* coverage.c (get_coverage_counts): Ditto.
      	(coverage_init): Setup new dump framework.
      
      	* testsuite/gcc.dg/pr40209.c: Use -fopt-info.
      	* testsuite/gcc.dg/pr26570.c: Ditto.
      	* testsuite/gcc.dg/pr32773.c: Ditto.
      	* testsuite/g++.dg/tree-ssa/dom-invalid.C: Ditto.
      	* testsuite/gcc.dg/inline-dump.c: New test.
      
      From-SVN: r202077
      Teresa Johnson committed
  18. 20 Aug, 2013 2 commits
    • Revert my last two changes, r201865 and r201864 · 6cd4d135
      2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	Revert my last two changes, r201865 and r201864:
      
      	Revert r201865:
      	2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	Make opt_pass and gcc::pass_manager be GC-managed, so that pass
      	instances can own GC refs.
      
      	* Makefile.in (GTFILES): Add pass_manager.h and tree-pass.h.
      	* context.c (gcc::context::gt_ggc_mx): Traverse passes_.
      	(gcc::context::gt_pch_nx): Likewise.
      	(gcc::context::gt_pch_nx):  Likewise.
      	* ggc.h (gt_ggc_mx <T>): New.
      	(gt_pch_nx_with_op <T>): New.
      	(gt_pch_nx <T>): New.
      	* passes.c (opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	(pass_manager::operator new): Use
      	ggc_internal_cleared_alloc_stat rather than xcalloc.
      	* pass_manager.h (class pass_manager): Add GTY((user)) marking.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	* tree-pass.h (class opt_pass): Add GTY((user)) marking.
      	(opt_pass::operator new): New.
      	(opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      
      	Revert r201864:
      	2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	* Makefile.in (GTFILES): Add context.h.
      	* context.c (gcc::context::operator new): New.
      	(gcc::context::gt_ggc_mx): New.
      	(gcc::context::gt_pch_nx): New.
      	(gcc::context::gt_pch_nx): New.
      	* context.h (gcc::context): Add GTY((user)) marking.
      	(gcc::context::operator new): New.
      	(gcc::context::gt_ggc_mx): New.
      	(gcc::context::gt_pch_nx): New.
      	(gcc::context::gt_pch_nx): New.
      	(g): Add GTY marking.
      	(gt_ggc_mx (gcc::context *)): New.
      	(gt_pch_nx (gcc::context *)): New.
      	(gt_pch_nx (gcc::context *ctxt, gt_pointer_operator op,
      	void *cookie)): New.
      	* gengtype.c (open_base_files) <ifiles>: Add context.h.
      
      From-SVN: r201887
      David Malcolm committed
    • Make opt_pass and gcc::pass_manager be GC-managed · e42c64cb
      2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	Make opt_pass and gcc::pass_manager be GC-managed, so that pass
      	instances can own GC refs.
      
      	* Makefile.in (GTFILES): Add pass_manager.h and tree-pass.h.
      	* context.c (gcc::context::gt_ggc_mx): Traverse passes_.
      	(gcc::context::gt_pch_nx): Likewise.
      	(gcc::context::gt_pch_nx):  Likewise.
      	* ggc.h (gt_ggc_mx <T>): New.
      	(gt_pch_nx_with_op <T>): New.
      	(gt_pch_nx <T>): New.
      	* passes.c (opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	(pass_manager::operator new): Use
      	ggc_internal_cleared_alloc_stat rather than xcalloc.
      	* pass_manager.h (class pass_manager): Add GTY((user)) marking.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	* tree-pass.h (class opt_pass): Add GTY((user)) marking.
      	(opt_pass::operator new): New.
      	(opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      
      From-SVN: r201865
      David Malcolm committed
  19. 07 Aug, 2013 1 commit
    • coretypes.h (rtl_opt_pass): Add. · 05555c4a
      2013-08-07  David Malcolm  <dmalcolm@redhat.com>
      
      	* coretypes.h (rtl_opt_pass): Add.
      	(gcc::context): Add.
      	* config/epiphany/epiphany.c (pass_mode_switch_use): New.
      	(epiphany_init): Port to new C++ pass API.
      	(epiphany_optimize_mode_switching): Likewise.
      	* pass_manager.h (pass_manager::get_pass_split_all_insns): New.
      	(pass_manager::get_pass_mode_switching): New.
      	(pass_manager::get_pass_peephole2): New.
      	* mode-switching.c (pass_mode_switching): Add clone method.
      	* recog.c (pass_peephole2): Add clone method.
      	(pass_split_all_insns): Add clone method.
      
      From-SVN: r201549
      David Malcolm committed
  20. 05 Aug, 2013 2 commits
    • Zero-initialize pass_manager · 6a389ed5
      gcc/
      
      	* passes.c (pass_manager::operator new): New.
      
      From-SVN: r201506
      David Malcolm committed
    • Handwritten part of conversion of passes to C++ classes · f7695dbf
      gcc/
      	* Makefile.in (PASS_MANAGER_H): Add dep on pass-instances.def.
      	(toplev.o): Add dep on PASS_MANAGER_H.
      	* cgraphunit.c (cgraph_process_new_functions): Rework invocation
      	of early local pases to reflect this moving from a global to a
      	member of gcc::pass_manager.
      	(cgraph_add_new_function): Likewise.
      	* lto-cgraph.c (lto_output_node): Update for conversion of
      	struct ipa_opt_pass_d to a C++ subclass of opt_pass.
      	* passes.c (opt_pass::clone): New.
      	(opt_pass::gate): New.
      	(opt_pass::execute): New.
      	(opt_pass::opt_pass): New.
      	(pass_manager::execute_early_local_passes): New.
      	(pass_manager::execute_pass_mode_switching): new.
      	(finish_optimization_passes): Convert to...
      	(pass_manager::finish_optimization_passes): ...this.
      	(finish_optimization_passes): Update for conversion of passes to
      	C++ classes.
      	(register_dump_files_1): Use has_gate since we cannot portably
      	check a vtable entry against NULL.
      	(dump_one_pass): Likewise.
      	(ipa_write_summaries_2): Likewise.
      	(ipa_write_optimization_summaries_1): Likewise.
      	(ipa_read_summaries_1): Likewise.
      	(ipa_read_optimization_summaries_1): Likewise.
      	(execute_ipa_stmt_fixups): Likewise.
      	(pass_manager::pass_manager): Rewrite pass-creation, invoking
      	pass-creation functions rather than wiring up globals, and
      	storing the results in fields of pass_manager generated using
      	pass-instances.def.
      	(pass_manager::dump_profile_report): Update for conversion of
      	passes to C++ classes.
      	(pass_manager::execute_ipa_summary_passes): Likewise.
      	(execute_one_ipa_transform_pass): Likewise.
      	(execute_one_pass): Use has_gate and has_execute since we cannot
      	portably check a vtable entry against NULL.
      	* pass_manager.h (pass_manager::finish_optimization_passes): New.
      	(pass_manager): Use pass-instances.def to add fields for the
      	various pass instances.
      	* toplev.c (finalize): Update for move of
      	finish_optimization_passes to a method of gcc::pass_manager.
      	* toplev.h (finish_optimization_passes): Move to method of class
      	pass_manager.
      	* tree-pass.h (struct pass_data): New.
      	(opt_pass): Convert to C++ class, make it a subclass of
      	pass_data.
      	(opt_pass::gate): Convert to virtual function.
      	(opt_pass::~opt_pass): New.
      	(opt_pass::clone): New.
      	(opt_pass::execute): Convert to virtual function.
      	(opt_pass::opt_pass): New.
      	(opt_pass::ctxt_): new.
      	(gimple_opt_pass): Convert to subclass of opt_pass.
      	(gimple_opt_pass::gimple_opt_pass): New.
      	(rtl_opt_pass): Convert to subclass of opt_pass.
      	(rtl_opt_pass::rtl_opt_pass): New.
      	(ipa_opt_pass_d): Convert to subclass of opt_pass.
      	(ipa_opt_pass_d::ipa_opt_pass_d): New.
      	(simple_ipa_opt_pass): Convert to subclass of opt_pass.
      	(simple_ipa_opt_pass::simple_ipa_opt_pass): New.
      	* config/i386/i386.c (rest_of_handle_insert_vzeroupper): Rework
      	invocation of pass_mode_switching to reflect this moving from a
      	global to a member of gcc::pass_manager.
      	(ix86_option_override): Rework how pass_insert_vzeroupper is
      	added to the pass_manager to reflect autogenerated changes.
      	* config/i386/t-i386 (i386.o) Add deps on CONTEXT_H and
      	PASS_MANAGER_H.
      
      gcc/testsuite/
      	* g++.dg/plugin/dumb_plugin.c (plugin_init): Rework how the pass
      	is created and added to the pass_manager to reflect
      	autogenerated changes.
      	* g++.dg/plugin/selfassign.c (plugin_init): Likewise.
      	* gcc.dg/plugin/one_time_plugin.c (plugin_init): Likewise.
      	* gcc.dg/plugin/selfassign.c (plugin_init): Likewise.
      
      From-SVN: r201505
      David Malcolm committed
  21. 30 Jul, 2013 1 commit
    • Introduce beginnings of a pass_manager class. · 315f8c0e
      This patch introduces a gcc::pass_manager class and moves various non-GTY
      globals relating to pass management into it.  The gcc::context gains its
      first field: a pointer to the gcc::pass_manager instance.
      
      gcc/
      	* Makefile.in (PASS_MANAGER_H): New.
      	(lto-cgraph.o): Depend on CONTEXT_H and PASS_MANAGER_H.
      	(passes.o): Likewise.
      	(statistics.o): Likewise.
      	(cgraphunit.o): Likewise.
      	(context.o): Depend on PASS_MANAGER_H.
      
      	* pass_manager.h: New.
      
      	* cgraphunit.c (cgraph_add_new_function): Update for moves
      	of globals to fields of pass_manager.
      	(analyze_function): Likewise.
      	(expand_function): Likewise.
      	(ipa_passes): Likewise.
      	(compile): Likewise.
      
      	* context.c (context::context): New.
      	* context.h  (context::context): New.
      	(context::get_passes): New.
      	(context::passes_): New.
      
      	* lto-cgraph.c (input_node): Update for moves of globals to
      	fields of pass_manager.
      
      	* passes.c (all_passes): Remove, in favor of a field of the
      	same name within the new class pass_manager.
      	(all_small_ipa_passes): Likewise.
      	(all_lowering_passes): Likewise.
      	(all_regular_ipa_passes): Likewise.
      	(all_late_ipa_passes): Likewise.
      	(all_lto_gen_passes): Likewise.
      	(passes_by_id): Likewise.
      	(passes_by_id_size): Likewise.
      	(gcc_pass_lists): Remove, in favor of "pass_lists" field within
      	the new class pass_manager.
      	(set_pass_for_id): Convert to...
      	(pass_manager::set_pass_for_id): ...method.
      	(get_pass_for_id): Convert to...
      	(pass_manager::get_pass_for_id): ...method.
      	(register_one_dump_file): Move body of implementation into...
      	(pass_manager::register_one_dump_file): ...here.
      	(register_dump_files_1): Convert to...
      	(pass_manager::register_dump_files_1): ...method.
      	(register_dump_files): Convert to...
      	(pass_manager::register_dump_files): ...method.
      	(create_pass_tab): Update for moves of globals to fields of
      	pass_manager.
      	(dump_passes): Move body of implementation into...
      	(pass_manager::dump_passes): ...here.
      	(register_pass): Move body of implementation into...
      	(pass_manager::register_pass): ...here.
      	(init_optimization_passes): Convert into...
      	(pass_manager::pass_manager): ...constructor for new
      	pass_manager class, and initialize the pass_lists array.
      	(check_profile_consistency): Update for moves of globals to
      	fields of pass_manager.
      	(dump_profile_report): Move body of implementation into...
      	(pass_manager::dump_profile_report): ...here.
      	(ipa_write_summaries_1): Update for moves of pass lists from
      	being globals to fields of pass_manager.
      	(ipa_write_optimization_summaries): Likewise.
      	(ipa_read_summaries):  Likewise.
      	(ipa_read_optimization_summaries): Likewise.
      	(execute_all_ipa_stmt_fixups): Likewise.
      
      	* statistics.c (statistics_fini): Update for moves of globals to
      	fields of pass_manager.
      
      	* toplev.c (general_init): Replace call to
      	init_optimization_passes with construction of the pass_manager
      	instance.
      
      	* tree-pass.h (all_passes): Remove, in favor of a field of the
      	same name within the new class pass_manager.
      	(all_small_ipa_passes): Likewise.
      	(all_lowering_passes): Likewise.
      	(all_regular_ipa_passes): Likewise.
      	(all_lto_gen_passes): Likewise.
      	(all_late_ipa_passes): Likewise.
      	(passes_by_id): Likewise.
      	(passes_by_id_size): Likewise.
      	(gcc_pass_lists): Remove, in favor of "pass_lists" field within
      	the new class pass_manager.
      	(get_pass_for_id): Remove.
      
      gcc/lto/
      
      	* Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
      	PASS_MANAGER_H.
      
      	* lto.c (do_whole_program_analysis): Update for move of
      	all_regular_ipa_passes from a global to a field of class
      	pass_manager.
      
      From-SVN: r201351
      David Malcolm committed