From bd1cd0d0e0fecc6ac8632c266591767392480746 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 23 Apr 2021 19:59:00 +0000 Subject: Remove CC0 This removes CC0 and all directly related infrastructure. CC_STATUS, CC_STATUS_MDEP, CC_STATUS_MDEP_INIT, and NOTICE_UPDATE_CC are deleted and poisoned. CC0 is only deleted (some targets use that name for something else). HAVE_cc0 is automatically generated, and we no longer will do that after this patch. CC_STATUS_INIT is suggested in final.c to also be useful for ports that are not CC0, and at least arm seems to use it for something. So I am leaving that alone, but most targets that have it could remove it. 2021-05-04 Segher Boessenkool * caller-save.c: Remove CC0. * cfgcleanup.c: Remove CC0. * cfgrtl.c: Remove CC0. * combine.c: Remove CC0. * compare-elim.c: Remove CC0. * conditions.h: Remove CC0. * config/h8300/h8300.h: Remove CC0. * config/h8300/h8300-protos.h: Remove CC0. * config/h8300/peepholes.md: Remove CC0. * config/i386/x86-tune-sched.c: Remove CC0. * config/m68k/m68k.c: Remove CC0. * config/rl78/rl78.c: Remove CC0. * config/sparc/sparc.c: Remove CC0. * config/xtensa/xtensa.c: Remove CC0. (gen_conditional_move): Use pc_rtx instead of cc0_rtx in a piece of RTL where that is used as a placeholder only. * cprop.c: Remove CC0. * cse.c: Remove CC0. * cselib.c: Remove CC0. * df-problems.c: Remove CC0. * df-scan.c: Remove CC0. * doc/md.texi: Remove CC0. Adjust an example. * doc/rtl.texi: Remove CC0. Adjust an example. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Remove CC0. * emit-rtl.c: Remove CC0. * final.c: Remove CC0. * fwprop.c: Remove CC0. * gcse-common.c: Remove CC0. * gcse.c: Remove CC0. * genattrtab.c: Remove CC0. * genconfig.c: Remove CC0. * genemit.c: Remove CC0. * genextract.c: Remove CC0. * gengenrtl.c: Remove CC0. * genrecog.c: Remove CC0. * haifa-sched.c: Remove CC0. * ifcvt.c: Remove CC0. * ira-costs.c: Remove CC0. * ira.c: Remove CC0. * jump.c: Remove CC0. * loop-invariant.c: Remove CC0. * lra-constraints.c: Remove CC0. * lra-eliminations.c: Remove CC0. * optabs.c: Remove CC0. * postreload-gcse.c: Remove CC0. * postreload.c: Remove CC0. * print-rtl.c: Remove CC0. * read-rtl-function.c: Remove CC0. * reg-notes.def: Remove CC0. * reg-stack.c: Remove CC0. * reginfo.c: Remove CC0. * regrename.c: Remove CC0. * reload.c: Remove CC0. * reload1.c: Remove CC0. * reorg.c: Remove CC0. * resource.c: Remove CC0. * rtl.c: Remove CC0. * rtl.def: Remove CC0. * rtl.h: Remove CC0. * rtlanal.c: Remove CC0. * sched-deps.c: Remove CC0. * sched-rgn.c: Remove CC0. * shrink-wrap.c: Remove CC0. * simplify-rtx.c: Remove CC0. * system.h: Remove CC0. Poison NOTICE_UPDATE_CC, CC_STATUS_MDEP_INIT, CC_STATUS_MDEP, and CC_STATUS. * target.def: Remove CC0. * valtrack.c: Remove CC0. * var-tracking.c: Remove CC0. --- gcc/read-rtl-function.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/read-rtl-function.c') diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c index 2a1fb4b..a10d57f 100644 --- a/gcc/read-rtl-function.c +++ b/gcc/read-rtl-function.c @@ -1491,7 +1491,6 @@ function_reader::consolidate_singletons (rtx x) case PC: return pc_rtx; case RETURN: return ret_rtx; case SIMPLE_RETURN: return simple_return_rtx; - case CC0: return cc0_rtx; case REG: return consolidate_reg (x); -- cgit v1.1 From 6ba3079dce89d9b63bf5dbd5e320ea2bf96f196b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 17 Mar 2021 16:36:44 +0100 Subject: Come up with startswith function. gcc/ada/ChangeLog: * gcc-interface/utils.c (def_builtin_1): Use startswith function instead of strncmp. gcc/analyzer/ChangeLog: * sm-file.cc (is_file_using_fn_p): Use startswith function instead of strncmp. gcc/ChangeLog: * builtins.c (is_builtin_name): Use startswith function instead of strncmp. * collect2.c (main): Likewise. (has_lto_section): Likewise. (scan_libraries): Likewise. * coverage.c (coverage_checksum_string): Likewise. (coverage_init): Likewise. * dwarf2out.c (is_cxx): Likewise. (gen_compile_unit_die): Likewise. * gcc-ar.c (main): Likewise. * gcc.c (init_spec): Likewise. (read_specs): Likewise. (execute): Likewise. (check_live_switch): Likewise. * genattrtab.c (write_attr_case): Likewise. (IS_ATTR_GROUP): Likewise. * gencfn-macros.c (main): Likewise. * gengtype.c (type_for_name): Likewise. (gen_rtx_next): Likewise. (get_file_langdir): Likewise. (write_local): Likewise. * genmatch.c (get_operator): Likewise. (get_operand_type): Likewise. (expr::gen_transform): Likewise. * genoutput.c (validate_optab_operands): Likewise. * incpath.c (add_sysroot_to_chain): Likewise. * langhooks.c (lang_GNU_C): Likewise. (lang_GNU_CXX): Likewise. (lang_GNU_Fortran): Likewise. (lang_GNU_OBJC): Likewise. * lto-wrapper.c (run_gcc): Likewise. * omp-general.c (omp_max_simt_vf): Likewise. * omp-low.c (omp_runtime_api_call): Likewise. * opts-common.c (parse_options_from_collect_gcc_options): Likewise. * read-rtl-function.c (function_reader::read_rtx_operand_r): Likewise. * real.c (real_from_string): Likewise. * selftest.c (assert_str_startswith): Likewise. * timevar.c (timer::validate_phases): Likewise. * tree.c (get_file_function_name): Likewise. * ubsan.c (ubsan_use_new_style_p): Likewise. * varasm.c (default_function_rodata_section): Likewise. (incorporeal_function_p): Likewise. (default_section_type_flags): Likewise. * system.h (startswith): Define startswith. gcc/c-family/ChangeLog: * c-ada-spec.c (print_destructor): Use startswith function instead of strncmp. (dump_ada_declaration): Likewise. * c-common.c (disable_builtin_function): Likewise. (def_builtin_1): Likewise. * c-format.c (check_tokens): Likewise. (check_plain): Likewise. (convert_format_name_to_system_name): Likewise. gcc/c/ChangeLog: * c-aux-info.c (affix_data_type): Use startswith function instead of strncmp. * c-typeck.c (build_function_call_vec): Likewise. * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise. gcc/cp/ChangeLog: * decl.c (duplicate_decls): Use startswith function instead of strncmp. (cxx_builtin_function): Likewise. (omp_declare_variant_finalize_one): Likewise. (grokfndecl): Likewise. * error.c (dump_decl_name): Likewise. * mangle.c (find_decomp_unqualified_name): Likewise. (write_guarded_var_name): Likewise. (decl_tls_wrapper_p): Likewise. * parser.c (cp_parser_simple_type_specifier): Likewise. (cp_parser_tx_qualifier_opt): Likewise. * pt.c (template_parm_object_p): Likewise. (dguide_name_p): Likewise. gcc/d/ChangeLog: * d-builtins.cc (do_build_builtin_fn): Use startswith function instead of strncmp. * dmd/dinterpret.c (evaluateIfBuiltin): Likewise. * dmd/dmangle.c: Likewise. * dmd/hdrgen.c: Likewise. * dmd/identifier.c (Identifier::toHChars2): Likewise. gcc/fortran/ChangeLog: * decl.c (variable_decl): Use startswith function instead of strncmp. (gfc_match_end): Likewise. * gfortran.h (gfc_str_startswith): Likewise. * module.c (load_omp_udrs): Likewise. (read_module): Likewise. * options.c (gfc_handle_runtime_check_option): Likewise. * primary.c (match_arg_list_function): Likewise. * trans-decl.c (gfc_get_symbol_decl): Likewise. * trans-expr.c (gfc_conv_procedure_call): Likewise. * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Likewise. gcc/go/ChangeLog: * gofrontend/runtime.cc (Runtime::name_to_code): Use startswith function instead of strncmp. gcc/objc/ChangeLog: * objc-act.c (objc_string_ref_type_p): Use startswith function instead of strncmp. * objc-encoding.c (encode_type): Likewise. * objc-next-runtime-abi-02.c (has_load_impl): Likewise. --- gcc/read-rtl-function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/read-rtl-function.c') diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c index a10d57f..ca580d3 100644 --- a/gcc/read-rtl-function.c +++ b/gcc/read-rtl-function.c @@ -1082,7 +1082,7 @@ function_reader::read_rtx_operand_r (rtx x) "orig:%i", ORIGINAL_REGNO (rtx). Consume it, we don't set ORIGINAL_REGNO, since we can get that from the 2nd copy later. */ - if (strncmp (desc, "orig:", 5) == 0) + if (startswith (desc, "orig:")) { expect_original_regno = true; desc_start += 5; -- cgit v1.1 From 0edf2e81bb02cba43b649b3f6e7258b68a779ac0 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 17 Aug 2021 10:47:02 +0200 Subject: Turn global 'ggc_force_collect' variable into 'force_collect' parameter to 'ggc_collect' This simplifies the interface and gets us rid of a global variable. No change in behavior. Clean-up for 2004-09-02 CVS commit (Subversion r86974, Git commit 0772402279c0161fe41784911b52c77e12803c42) "Better memory statistics, take 2". gcc/ * ggc.h (ggc_collect): Add 'force_collect' parameter. * ggc-page.c (ggc_collect): Use that one instead of global 'ggc_force_collect'. Adjust all users. * doc/gty.texi (Invoking the garbage collector): Update. * ggc-internal.h (ggc_force_collect): Remove. * ggc-common.c (ggc_force_collect): Likewise. * selftest.h (forcibly_ggc_collect): Remove. * ggc-tests.c (selftest::forcibly_ggc_collect): Likewise. * read-rtl-function.c (test_loading_labels): Adjust. * selftest-run-tests.c (run_tests): Likewise. --- gcc/read-rtl-function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/read-rtl-function.c') diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c index ca580d3..0badfb9 100644 --- a/gcc/read-rtl-function.c +++ b/gcc/read-rtl-function.c @@ -1861,7 +1861,7 @@ test_loading_labels () /* Ensure that label names read from a dump are GC-managed and are found through the insn. */ - forcibly_ggc_collect (); + ggc_collect (true); ASSERT_TRUE (ggc_marked_p (insn_200)); ASSERT_TRUE (ggc_marked_p (LABEL_NAME (insn_200))); } -- cgit v1.1 From 602fca427df6c5f7452677cfcdd16a5b9a3ca86a Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 17 Aug 2021 21:15:46 +0200 Subject: Turn 'bool force_collect' parameter to 'ggc_collect' into an 'enum ggc_collect mode' ... to make the meaning more explicit to the reader of the code. Follow-up to recent commit 0edf2e81bb02cba43b649b3f6e7258b68a779ac0 "Turn global 'ggc_force_collect' variable into 'force_collect' parameter to 'ggc_collect'". gcc/ * ggc.h (enum ggc_collect): New. (ggc_collect): Use it. * ggc-page.c: Adjust. * ggc-common.c: Likewise. * ggc-tests.c: Likewise. * read-rtl-function.c: Likewise. * selftest-run-tests.c: Likewise. * doc/gty.texi (Invoking the garbage collector): Likewise. Suggested-by: David Malcolm --- gcc/read-rtl-function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/read-rtl-function.c') diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c index 0badfb9..941d1e1 100644 --- a/gcc/read-rtl-function.c +++ b/gcc/read-rtl-function.c @@ -1861,7 +1861,7 @@ test_loading_labels () /* Ensure that label names read from a dump are GC-managed and are found through the insn. */ - ggc_collect (true); + ggc_collect (GGC_COLLECT_FORCE); ASSERT_TRUE (ggc_marked_p (insn_200)); ASSERT_TRUE (ggc_marked_p (LABEL_NAME (insn_200))); } -- cgit v1.1