aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03Update copyright years.Jakub Jelinek1-1/+1
2023-07-10GCSE: Export 'insert_insn_end_basic_block' as global functionJu-Zhe Zhong1-0/+1
Since VSETVL PASS in RISC-V port is using common part of 'insert_insn_end_basic_block (struct gcse_expr *expr, basic_block bb)' and we will also this helper function in riscv.cc for the following patches. So extract the common part codes of 'insert_insn_end_basic_block (struct gcse_expr *expr, basic_block bb)', the new function of the common part is also call 'insert_insn_end_basic_block (rtx_insn *pat, basic_block bb)' but with different arguments. And call 'insert_insn_end_basic_block (rtx_insn *pat, basic_block bb)' in 'insert_insn_end_basic_block (struct gcse_expr *expr, basic_block bb)' and VSETVL PASS in RISC-V port. Remove redundant codes of VSETVL PASS in RISC-V port. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (add_label_notes): Remove it. (insert_insn_end_basic_block): Ditto. (pass_vsetvl::commit_vsetvls): Adapt for new helper function. * gcse.cc (insert_insn_end_basic_block): Export as global function. * gcse.h (insert_insn_end_basic_block): Ditto.
2023-01-02Update copyright years.Jakub Jelinek1-1/+1
2022-01-19Update per-file selftest and finalization hooks for .c to .cc renamingDavid Malcolm1-1/+1
This is mostly a mechanical change, apart from: - fix the name of attribute_c_tests to match its filename (attribs.cc) - fix the name of opt_proposer_c to match its filename (opt-suggestions.cc) - delete a bogus "modref_c_tests" decl from ipa-modref-tree.h that's been present since the initial commit of that file (d119f34c952f8718fdbabc63e2f369a16e92fa07) gcc/ChangeLog: * attribs.cc (attribute_c_tests): Rename to... (attribs_cc_tests): ...this. * bitmap.cc (bitmap_c_tests): Rename to... (bitmap_cc_tests): ...this. * cgraph.cc (cgraph_c_finalize): Rename to... (cgraph_cc_finalize): ...this. (cgraph_c_tests): Rename to... (cgraph_cc_tests): ...this. * cgraph.h (cgraph_c_finalize): Rename to... (cgraph_cc_finalize): ...this. (cgraphunit_c_finalize): Rename to... (cgraphunit_cc_finalize): ...this. * cgraphunit.cc (cgraphunit_c_finalize): Rename to... (cgraphunit_cc_finalize): ...this. * convert.cc (convert_c_tests): Rename to... (convert_cc_tests): ...this. * dbgcnt.cc (dbgcnt_c_tests): Rename to... (dbgcnt_cc_tests): ...this. * diagnostic-show-locus.cc (diagnostic_show_locus_c_tests): Rename to... (diagnostic_show_locus_cc_tests): ...this. * diagnostic.cc (diagnostic_c_tests): Rename to... (diagnostic_cc_tests): ...this. * dumpfile.cc (dumpfile_c_tests): Rename to... (dumpfile_cc_tests): ...this. * dwarf2out.cc (dwarf2out_c_finalize): Rename to... (dwarf2out_cc_finalize): ...this. * dwarf2out.h (dwarf2out_c_finalize): Rename to... (dwarf2out_cc_finalize): ...this. * edit-context.cc (edit_context_c_tests): Rename to... (edit_context_cc_tests): ...this. * et-forest.cc (et_forest_c_tests): Rename to... (et_forest_cc_tests): ...this. * fibonacci_heap.cc (fibonacci_heap_c_tests): Rename to... (fibonacci_heap_cc_tests): ...this. * fold-const.cc (fold_const_c_tests): Rename to... (fold_const_cc_tests): ...this. * function-tests.cc (function_tests_c_tests): Rename to... (function_tests_cc_tests): ...this. * gcse.cc (gcse_c_finalize): Rename to... (gcse_cc_finalize): ...this. * gcse.h (gcse_c_finalize): Rename to... (gcse_cc_finalize): ...this. * ggc-tests.cc (ggc_tests_c_tests): Rename to... (ggc_tests_cc_tests): ...this. * gimple-ssa-store-merging.cc (store_merging_c_tests): Rename to... (store_merging_cc_tests): ...this. * gimple.cc (gimple_c_tests): Rename to... (gimple_cc_tests): ...this. * hash-map-tests.cc (hash_map_tests_c_tests): Rename to... (hash_map_tests_cc_tests): ...this. * hash-set-tests.cc (hash_set_tests_c_tests): Rename to... (hash_set_tests_cc_tests): ...this. * input.cc (input_c_tests): Rename to... (input_cc_tests): ...this. * ipa-cp.cc (ipa_cp_c_finalize): Rename to... (ipa_cp_cc_finalize): ...this. * ipa-fnsummary.cc (ipa_fnsummary_c_finalize): Rename to... (ipa_fnsummary_cc_finalize): ...this. * ipa-fnsummary.h (ipa_fnsummary_c_finalize): Rename to... (ipa_fnsummary_cc_finalize): ...this. * ipa-modref-tree.cc (ipa_modref_tree_c_tests): Rename to... (ipa_modref_tree_cc_tests): ...this. * ipa-modref-tree.h (modref_c_tests): Delete bogus decl. * ipa-modref.cc (ipa_modref_c_finalize): Rename to... (ipa_modref_cc_finalize): ...this. * ipa-modref.h (ipa_modref_c_finalize): Rename to... (ipa_modref_cc_finalize): ...this. * ipa-prop.h (ipa_cp_c_finalize): Rename to... (ipa_cp_cc_finalize): ...this. * ipa-reference.cc (ipa_reference_c_finalize): Rename to... (ipa_reference_cc_finalize): ...this. * ipa-reference.h (ipa_reference_c_finalize): Rename to... (ipa_reference_cc_finalize): ...this. * ira-costs.cc (ira_costs_c_finalize): Rename to... (ira_costs_cc_finalize): ...this. * ira.h (ira_costs_c_finalize): Rename to... (ira_costs_cc_finalize): ...this. * opt-suggestions.cc (opt_proposer_c_tests): Rename to... (opt_suggestions_cc_tests): ...this. * opts.cc (opts_c_tests): Rename to... (opts_cc_tests): ...this. * predict.cc (predict_c_tests): Rename to... (predict_cc_tests): ...this. * pretty-print.cc (pretty_print_c_tests): Rename to... (pretty_print_cc_tests): ...this. * read-rtl-function.cc (read_rtl_function_c_tests): Rename to... (read_rtl_function_cc_tests): ...this. * rtl-tests.cc (rtl_tests_c_tests): Rename to... (rtl_tests_cc_tests): ...this. * sbitmap.cc (sbitmap_c_tests): Rename to... (sbitmap_cc_tests): ...this. * selftest-run-tests.cc (selftest::run_tests): Update calls for _c_ to _cc_ function renamings; fix names of attribs and opt-suggestions tests. * selftest.cc (selftest_c_tests): Rename to... (selftest_cc_tests): ...this. * selftest.h (attribute_c_tests): Rename to... (attribs_cc_tests): ...this. (bitmap_c_tests): Rename to... (bitmap_cc_tests): ...this. (cgraph_c_tests): Rename to... (cgraph_cc_tests): ...this. (convert_c_tests): Rename to... (convert_cc_tests): ...this. (diagnostic_c_tests): Rename to... (diagnostic_cc_tests): ...this. (diagnostic_show_locus_c_tests): Rename to... (diagnostic_show_locus_cc_tests): ...this. (dumpfile_c_tests): Rename to... (dumpfile_cc_tests): ...this. (edit_context_c_tests): Rename to... (edit_context_cc_tests): ...this. (et_forest_c_tests): Rename to... (et_forest_cc_tests): ...this. (fibonacci_heap_c_tests): Rename to... (fibonacci_heap_cc_tests): ...this. (fold_const_c_tests): Rename to... (fold_const_cc_tests): ...this. (function_tests_c_tests): Rename to... (function_tests_cc_tests): ...this. (ggc_tests_c_tests): Rename to... (ggc_tests_cc_tests): ...this. (gimple_c_tests): Rename to... (gimple_cc_tests): ...this. (hash_map_tests_c_tests): Rename to... (hash_map_tests_cc_tests): ...this. (hash_set_tests_c_tests): Rename to... (hash_set_tests_cc_tests): ...this. (input_c_tests): Rename to... (input_cc_tests): ...this. (opts_c_tests): Rename to... (opts_cc_tests): ...this. (predict_c_tests): Rename to... (predict_cc_tests): ...this. (pretty_print_c_tests): Rename to... (pretty_print_cc_tests): ...this. (read_rtl_function_c_tests): Rename to... (read_rtl_function_cc_tests): ...this. (rtl_tests_c_tests): Rename to... (rtl_tests_cc_tests): ...this. (sbitmap_c_tests): Rename to... (sbitmap_cc_tests): ...this. (selftest_c_tests): Rename to... (selftest_cc_tests): ...this. (simplify_rtx_c_tests): Rename to... (simplify_rtx_cc_tests): ...this. (spellcheck_c_tests): Rename to... (spellcheck_cc_tests): ...this. (spellcheck_tree_c_tests): Rename to... (spellcheck_tree_cc_tests): ...this. (sreal_c_tests): Rename to... (sreal_cc_tests): ...this. (store_merging_c_tests): Rename to... (store_merging_cc_tests): ...this. (tree_c_tests): Rename to... (tree_cc_tests): ...this. (tree_cfg_c_tests): Rename to... (tree_cfg_cc_tests): ...this. (typed_splay_tree_c_tests): Rename to... (typed_splay_tree_cc_tests): ...this. (vec_c_tests): Rename to... (vec_cc_tests): ...this. (vec_perm_indices_c_tests): Rename to... (vec_perm_indices_cc_tests): ..this. (opt_proposer_c_tests): Rename to... (opt_suggestions_cc_tests): ...this. (dbgcnt_c_tests): Rename to... (dbgcnt_cc_tests): ...this. (ipa_modref_tree_c_tests): Rename to... (ipa_modref_tree_cc_tests): ...this. * simplify-rtx.cc (simplify_rtx_c_tests): Rename to... (simplify_rtx_cc_tests): ...this. * spellcheck-tree.cc (spellcheck_tree_c_tests): Rename to... (spellcheck_tree_cc_tests): ...this. * spellcheck.cc (spellcheck_c_tests): Rename to... (spellcheck_cc_tests): ...this. * sreal.cc (sreal_c_tests): Rename to... (sreal_cc_tests): ...this. * toplev.cc (toplev::finalize): Update calls for _c_ to _cc_ function renamings. * tree-cfg.cc (tree_cfg_c_tests): Rename to... (tree_cfg_cc_tests): ...this. * tree.cc (tree_c_tests): Rename to... (tree_cc_tests): ...this. * typed-splay-tree.cc (typed_splay_tree_c_tests): Rename to... (typed_splay_tree_cc_tests): ...this. * vec-perm-indices.cc (vec_perm_indices_c_tests): Rename to... (vec_perm_indices_cc_tests): ...this. * vec.cc (vec_c_tests): Rename to... (vec_cc_tests): ...this. gcc/c-family/ChangeLog: * c-common.cc (c_common_c_tests): Rename to... (c_common_cc_tests): ...this. (c_family_tests): Update calls for .c to .cc renaming. * c-common.h (c_format_c_tests): Rename to... (c_format_cc_tests): ...this. (c_indentation_c_tests): Rename to... (c_indentation_cc_tests): ...this. (c_pretty_print_c_tests): Rename to... (c_pretty_print_cc_tests): ...this. * c-format.cc (c_format_c_tests): Rename to... (c_format_cc_tests): ...this. * c-indentation.cc (c_indentation_c_tests): Rename to... (c_indentation_cc_tests): ...this. * c-pretty-print.cc (c_pretty_print_c_tests): Rename to... (c_pretty_print_cc_tests): ...this. gcc/cp/ChangeLog: * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc renaming. * cp-tree.h (cp_pt_c_tests): Rename to... (cp_pt_cc_tests): ...this. (cp_tree_c_tests): Rename to... (cp_tree_cc_tests): ...this. * pt.cc (cp_pt_c_tests): Rename to... (cp_pt_cc_tests): ...this. * tree.cc (cp_tree_c_tests): Rename to... (cp_tree_cc_tests): ...this. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-11-12[PATCH] Make disabled-optimization warning more informative; increase ↵Brad Lucier1-0/+1
default max-gcse-memory * gcc/cprop.c (is_too_expensive): Remove. (gcse.h): Include. (one_cprop_pass): Call gcse_or_cprop_is_too_expensive, not is_too_expensive. * gcc/gcse.h (gcse_or_cprop_is_too_expensive): Declare. * gcc/gcse.c (is_too_expensive): Rename to ... (gcse_or_cprop_is_too_expensive): ... this. Expand warning to add required size of max-gcse-memory. (one_pre_gcse_pass): Use it. (one_code_hoisting_pass): Use it. * gcc/params.def (max-gcse-memory): Increase from 50MB to 128MB. From-SVN: r230276
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-10-21State cleanups from jit branchDavid Malcolm1-0/+2
gcc/ChangeLog: * cgraph.c (cgraph_c_finalize): New function. * cgraph.h (cgraph_c_finalize): New prototype. (cgraphunit_c_finalize): New prototype. * cgraphunit.c (first_analyzed): Move from analyze_functions to file-scope. (first_analyzed_var): Likewise. (analyze_functions): Move static variables into file-scope. (cgraphunit_c_finalize): New function. * diagnostic.c (diagnostic_finish): Free the memory for context->classify_diagnostic and context->printer, running the destructor for the latter. (bt_stop): Use toplev::main. * dwarf2out.c (dwarf2out_finalize): New function. * dwarf2out.h (dwarf2out_c_finalize): New prototype. * gcse.c (gcse_c_finalize): New function. * gcse.h (gcse_c_finalize): New prototype. * ggc-page.c (init_ggc): Make idempotent. * input.c (input_location): Initialize to UNKNOWN_LOCATION. * ipa-cp.c (ipa_cp_c_finalize): New function. * ipa-prop.h (ipa_cp_c_finalize): New prototype. * ipa-pure-const.c (function_insertion_hook_holder): Move to be a field of class pass_ipa_pure_const. (node_duplication_hook_holder): Likewise. (node_removal_hook_holder): Likewise. (register_hooks): Convert to method... (pass_ipa_pure_const::register_hooks): ...here, converting static variable init_p into... (pass_ipa_pure_const::init_p): ...new field. (pure_const_generate_summary): Update invocation of register_hooks to invoke as a method of current_pass. (pure_const_read_summary): Likewise. (propagate): Convert to... (pass_ipa_pure_const::execute): ...method. * ipa-reference.c (ipa_init): Move static bool init_p from here to... (ipa_init_p): New file-scope variable, so that it can be reset when repeatedly invoking the compiler within one process by... (ipa_reference_c_finalize): New function. * ipa-reference.h (ipa_reference_c_finalize): New. * main.c (main): Replace invocation of toplev_main with construction of a toplev instance, and call its "main" method. * params.c (global_init_params): Add an assert that params_finished is false. (params_c_finalize): New. * params.h (params_c_finalize): New. * passes.c (execute_ipa_summary_passes): Set "current_pass" before invoking generate_summary, for the benefit of pass_ipa_pure_const. (ipa_write_summaries_2): Assign "pass" to "current_pass" global before calling write_summary hook. (ipa_write_optimization_summaries_1): Likewise when calling write_optimization_summary hook. (ipa_read_summaries_1): Likewise for read_summary hook. (ipa_read_optimization_summaries_1): Likewise for read_optimization_summary hook. (execute_ipa_stmt_fixups): Likewise. * stringpool.c (init_stringpool): Clean up if we're called more than once. * timevar.c (timevar_init): Ignore repeated calls. * toplev.c: Include "dwarf2out.h", "ipa-reference.h", "gcse.h", "ipa-prop.h". (general_init): Reset "input_location" to UNKNOWN_LOCATION. (initialize_rtl): Move static local "initialized_once" into file scope, and rename to... (rtl_initialized): New variable. (do_compile): Move timevar initialization from here to toplev::start_timevars. (toplev::toplev, toplev::~toplev, toplev::start_timevars, toplev::finalize): New functions. (toplev_main): Rename to... (toplev::main): ...this. * toplev.h (class toplev): New class. From-SVN: r216522
2014-09-09bb-reorder.h (default_target_bb_reorder): Remove redundant GTY.Richard Sandiford1-1/+1
gcc/ * bb-reorder.h (default_target_bb_reorder): Remove redundant GTY. * builtins.h (default_target_builtins): Likewise. * gcse.h (default_target_gcse): Likewise. * target-globals.h (target_globals): Add a destructor. Convert void-pointer fields back to their real type and change from GTY((atomic)) to GTY((skip)). (restore_target_globals): Remove casts accordingly. * target-globals.c (save_target_globals): Use XCNEW rather than ggc_internal_cleared_alloc to allocate non-GC structures. Use ggc_cleared_alloc to allocate the target_globals structure itself. (target_globals::~target_globals): Define. From-SVN: r215063
2014-01-02Update copyright years in gcc/Richard Sandiford1-1/+1
From-SVN: r206289
2013-01-10Update copyright years in gcc/Richard Sandiford1-2/+1
From-SVN: r195098
2010-07-12Makefile.in (gcse.o, [...]): Depend on gcse.h..Richard Sandiford1-0/+43
gcc/ * Makefile.in (gcse.o, target-globals.o): Depend on gcse.h.. * gcse.h: New file. * gcse.c: Include gcse.h. (default_target_gcse): New variable. (this_target_gcse): New conditional variable. (can_copy): Redefine as a macro. (can_copy_init_p): New macro. (can_copy_p): Remove can_copy_init_p. * target-globals.h (this_target_gcse): Declare. (target_globals): Add a gcse field. (restore_target_globals): Copy the gcse field to this_target_gcse. * target-globals.c: Include gcse.h. (default_target_globals): Initialize the gcse field. (save_target_globals): Likewise. From-SVN: r162108