From 6e624833cbe0a7479564fbe3294e10c9d4746a2e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 30 Sep 2025 16:11:56 +0200 Subject: [PATCH] Fix various comment typos The following patch fixes various comment typos. 2025-09-30 Jakub Jelinek gcc/ * auto-profile.h (maybe_hot_afdo_count_p): Fix comment typos, possiby -> possibly and ture -> true. * gimplify.cc (build_asan_poison_call_expr): Change "of a for" to "memory of the" in a comment. * ipa-devirt.cc (add_type_duplicate): Fix comment typo, mangles -> mangled. * auto-profile.cc: Fix comment typo, -fauto-profile-inlinig -> -fauto-profile-inlining. (maybe_hot_afdo_count_p): Fix comment typos, possiby -> possibly and ture -> true. (function_instance::removed_icall_target): Fix comment typo, Reutrn -> Return. (function_instance::in_worklist_): Fix comment typo, Ture -> True. (function_instance::offline): Fix comment typo, tolevel -> toplevel. (function_instance::match): Fix comment typo, craeate_gcov -> create_gcov. (autofdo_source_profile::offline_external_functions): Fix comment typos, tolevel -> toplevel and porfile -> profile. (autofdo_source_profile::get_function_instance_by_inline_stack): Fix comment typo, chekcing -> checking. (struct scale): Fix comment typo, scalle -> scale. * gimple.h (currently_expanding_gimple_stmt): Fix comment typo, comminucating -> communicating. * tree.h (canonical_type_used_p): Fix comment typo, ture -> true. * tree-ssa-alias.cc (types_equal_for_same_type_for_tbaa_p): Likewise. * ipa-profile.cc (contains_hot_call_p): Likewise. * cfgexpand.cc (add_scope_conflicts_2): Fix comment typos, Querry -> Query, referendd -> referenced and Querrying -> Querying. * ipa-param-manipulation.cc (currently_expanding_gimple_stmt): Fix comment typo, comminucating -> communicating. * ipa-prop.cc (ipa_cst_ref_desc::refcount): Fix comment typo, if -> is. * tree-if-conv.cc (version_loop_for_if_conversion): Fix comment typos, porfile -> profile and confistency -> consistency. * fold-const.cc: Change size_int_wide in comment to size_int as size_int_wide doesn't exit for 21 years. gcc/testsuite/ * gcc.dg/vect/tsvc/vect-tsvc-s1244.c (s1244): Fix comment typo, ture -> true. * gcc.dg/vect/tsvc/vect-tsvc-s2244.c (s2244): Likewise. --- gcc/auto-profile.cc | 20 +++++++++---------- gcc/auto-profile.h | 2 +- gcc/cfgexpand.cc | 6 +++--- gcc/fold-const.cc | 2 +- gcc/gimple.h | 2 +- gcc/gimplify.cc | 3 ++- gcc/ipa-devirt.cc | 2 +- gcc/ipa-param-manipulation.cc | 2 +- gcc/ipa-profile.cc | 2 +- gcc/ipa-prop.cc | 2 +- .../gcc.dg/vect/tsvc/vect-tsvc-s1244.c | 2 +- .../gcc.dg/vect/tsvc/vect-tsvc-s2244.c | 2 +- gcc/tree-if-conv.cc | 2 +- gcc/tree-ssa-alias.cc | 4 ++-- gcc/tree.h | 2 +- 15 files changed, 28 insertions(+), 27 deletions(-) diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 0b0ab4a99f56..8c8d9bed8c51 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -100,7 +100,7 @@ along with GCC; see the file COPYING3. If not see significantly form one inline instance to another and from the offline version. - This is controlled by -fauto-profile-inlinig and is independent + This is controlled by -fauto-profile-inlining and is independent of -fearly-inlining. Phase 4: In AFDO pass. @@ -128,7 +128,7 @@ along with GCC; see the file COPYING3. If not see considered cols. */ gcov_type afdo_hot_bb_threshod = -1; -/* Return ture if COUNT is possiby hot. */ +/* Return true if COUNT is possibly hot. */ bool maybe_hot_afdo_count_p (profile_count count) { @@ -372,7 +372,7 @@ public: removed_icall_target_ = true; } - /* Reutrn true if function is removed from indir target list. */ + /* Return true if function is removed from indir target list. */ bool removed_icall_target () { @@ -506,7 +506,7 @@ private: to it. */ bool realized_; - /* Ture if function is in worklist for merging/offlining. */ + /* True if function is in worklist for merging/offlining. */ bool in_worklist_; /* Pointer to outer function instance or NULL if this @@ -1090,7 +1090,7 @@ function_instance::merge (function_instance *other, } /* Make inline function FN offline. - If tolevel function of same name already exists, then merge profiles. + If toplevel function of same name already exists, then merge profiles. Otherwise turn FN toplevel. Return true if new toplevel function was introduced. If new toplevel functions are created and NEW_FUNCTIONS != NULL, @@ -1641,7 +1641,7 @@ function_instance::match (cgraph_node *node, unsigned int start_location = get_combined_location (DECL_STRUCT_FUNCTION (node->decl)->function_start_locus, node->decl); /* When outputting code to builtins location we use line number 0. - craeate_gcov is stupid and hapilly computes offsets across files. + create_gcov is stupid and happily computes offsets across files. Silently ignore it. */ unsigned int zero_location = ((unsigned)(1-DECL_SOURCE_LINE (node->decl))) << 16; @@ -2093,11 +2093,11 @@ autofdo_source_profile::offline_external_functions () seen.add (iter.first); } - /* Now process all tolevel (offline) function instances. + /* Now process all toplevel (offline) function instances. If instance has no definition in this translation unit, first offline all inlined functions which are defined here - (so we do not lose porfile due to cross-module inlining + (so we do not lose profile due to cross-module inlining done by link-time optimizers). If instance has a definition, look into all inlined functions @@ -2697,7 +2697,7 @@ autofdo_source_profile::get_function_instance_by_inline_stack ( if (s == NULL) { /* afdo inliner extends the stack by last entry with unknown - location while chekcing if function was inlined during train run. + location while checking if function was inlined during train run. We do not want to print diagnostics about every function which is not inlined. */ if (s && dump_enabled_p () && stack[i].location != UNKNOWN_LOCATION) @@ -3441,7 +3441,7 @@ cmp (const void *a, const void *b) return 0; } -/* To scalle a connected component of graph we collect desired scales of +/* To scale a connected component of graph we collect desired scales of basic blocks on the boundary and then compute a robust average. */ struct scale diff --git a/gcc/auto-profile.h b/gcc/auto-profile.h index 639e263ef7a9..3cce5f2152ca 100644 --- a/gcc/auto-profile.h +++ b/gcc/auto-profile.h @@ -39,7 +39,7 @@ extern void remove_afdo_speculative_target (cgraph_edge *); considered cols. */ extern gcov_type afdo_hot_bb_threshold; -/* Return ture if COUNT is possiby hot. */ +/* Return true if COUNT is possibly hot. */ extern bool maybe_hot_afdo_count_p (profile_count count); #endif /* AUTO_PROFILE_H */ diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index 8950294abb60..5c3ba50862e9 100644 --- a/gcc/cfgexpand.cc +++ b/gcc/cfgexpand.cc @@ -90,7 +90,7 @@ along with GCC; see the file COPYING3. If not see struct ssaexpand SA; /* This variable holds the currently expanded gimple statement for purposes - of comminucating the profile info to the builtin expanders. */ + of communicating the profile info to the builtin expanders. */ gimple *currently_expanding_gimple_stmt; static rtx expand_debug_expr (tree); @@ -834,8 +834,8 @@ add_scope_conflicts_2 (vars_ssa_cache &cache, tree name, { gcc_assert (TREE_CODE (name) == SSA_NAME); - /* Querry the cache for the mapping of addresses that are referendd by - ssa name NAME. Querrying it will fill in it. */ + /* Query the cache for the mapping of addresses that are referenced by + ssa name NAME. Querying it will fill in it. */ bitmap_iterator bi; unsigned i; const_bitmap bmap = cache (name); diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index fe7a5fee5e25..e8cfee81553e 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see @@ This would also make life easier when this technology is used @@ for cross-compilers. */ -/* The entry points in this file are fold, size_int_wide and size_binop. +/* The entry points in this file are fold, size_int and size_binop. fold takes a tree as argument and returns a simplified tree. diff --git a/gcc/gimple.h b/gcc/gimple.h index da32651ea017..0356bc52a5ba 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1545,7 +1545,7 @@ extern size_t const gimple_ops_offset_[]; extern enum gimple_statement_structure_enum const gss_for_code_[]; /* This variable holds the currently expanded gimple statement for purposes - of comminucating the profile info to the builtin expanders. */ + of communicating the profile info to the builtin expanders. */ extern gimple *currently_expanding_gimple_stmt; size_t gimple_size (enum gimple_code code, unsigned num_ops = 0); diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 900968356651..9c5aa0638b73 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -1280,7 +1280,8 @@ build_stack_save_restore (gcall **save, gcall **restore) 1, tmp_var); } -/* Generate IFN_ASAN_MARK call that poisons shadow of a for DECL variable. */ +/* Generate IFN_ASAN_MARK call that poisons shadow memory of the DECL + variable. */ static tree build_asan_poison_call_expr (tree decl) diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc index 9953833e9247..c10d67f1e674 100644 --- a/gcc/ipa-devirt.cc +++ b/gcc/ipa-devirt.cc @@ -1801,7 +1801,7 @@ add_type_duplicate (odr_type val, tree type) before we can pass them to odr_types_equivalent_p (PR lto/83121). */ if (lto_location_cache::current_cache) lto_location_cache::current_cache->apply_location_cache (); - /* As a special case we stream mangles names of integer types so we can see + /* As a special case we stream mangled names of integer types so we can see if they are believed to be same even though they have different representation. Avoid bogus warning on mismatches in these. */ if (TREE_CODE (type) != INTEGER_TYPE diff --git a/gcc/ipa-param-manipulation.cc b/gcc/ipa-param-manipulation.cc index 9b74fe24cc4d..487886719039 100644 --- a/gcc/ipa-param-manipulation.cc +++ b/gcc/ipa-param-manipulation.cc @@ -1672,7 +1672,7 @@ ipa_param_body_adjustments in ADJUSTMENTS. FNDECL designates the new function clone which is being modified. OLD_FNDECL is the function of which FNDECL is a clone (and which at the time of invocation still share DECL_ARGUMENTS). ID is the - copy_body_data structure driving the wholy body copying process. VARS is a + copy_body_data structure driving the whole body copying process. VARS is a pointer to the head of the list of new local variables, TREE_MAP is the map that drives tree substitution in the cloning process. */ diff --git a/gcc/ipa-profile.cc b/gcc/ipa-profile.cc index 4d0a8c98fbdf..e4c0ff5fe310 100644 --- a/gcc/ipa-profile.cc +++ b/gcc/ipa-profile.cc @@ -625,7 +625,7 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, void *data) return edge != NULL; } -/* Return ture if NODE contains hot calls. */ +/* Return true if NODE contains hot calls. */ bool contains_hot_call_p (struct cgraph_node *node) diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index 84d4fb5db674..bf52ffe17381 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -130,7 +130,7 @@ struct ipa_cst_ref_desc /* Linked list of duplicates created when call graph edges are cloned. */ struct ipa_cst_ref_desc *next_duplicate; /* Number of references in IPA structures, IPA_UNDESCRIBED_USE if the value - if out of control. */ + is out of control. */ int refcount; }; diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c index 94a30412df81..3b76bb347828 100644 --- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c +++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s1244.c @@ -9,7 +9,7 @@ real_t s1244(struct args_t * func_args) { // node splitting -// cycle with ture and anti dependency +// cycle with true and anti dependency initialise_arrays(__func__); diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c index 9b0ca7447dd3..277ebb83c60b 100644 --- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c +++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s2244.c @@ -9,7 +9,7 @@ real_t s2244(struct args_t * func_args) { // node splitting -// cycle with ture and anti dependency +// cycle with true and anti dependency initialise_arrays(__func__); diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc index e96c89ea7918..0bb3de9b1376 100644 --- a/gcc/tree-if-conv.cc +++ b/gcc/tree-if-conv.cc @@ -3444,7 +3444,7 @@ version_loop_for_if_conversion (class loop *loop, vec *preds) } initialize_original_copy_tables (); - /* At this point we invalidate porfile confistency until IFN_LOOP_VECTORIZED + /* At this point we invalidate profile consistency until IFN_LOOP_VECTORIZED is re-merged in the vectorizer. */ new_loop = loop_version (loop, cond, &cond_bb, profile_probability::always (), diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc index 9b028e040460..76aac6f1c032 100644 --- a/gcc/tree-ssa-alias.cc +++ b/gcc/tree-ssa-alias.cc @@ -4167,7 +4167,7 @@ attr_fnspec::verify () } } -/* Return ture if TYPE1 and TYPE2 will always give the same answer +/* Return true if TYPE1 and TYPE2 will always give the same answer when compared with other types using same_type_for_tbaa. */ static bool @@ -4191,7 +4191,7 @@ types_equal_for_same_type_for_tbaa_p (tree type1, tree type2, return TYPE_CANONICAL (type1) == TYPE_CANONICAL (type2); } -/* Return ture if TYPE1 and TYPE2 will always give the same answer +/* Return true if TYPE1 and TYPE2 will always give the same answer when compared with other types using same_type_for_tbaa. */ bool diff --git a/gcc/tree.h b/gcc/tree.h index b1d143416666..4c8ad9842ff0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5960,7 +5960,7 @@ tree_code_for_canonical_type_merging (enum tree_code code) return code; } -/* Return ture if get_alias_set care about TYPE_CANONICAL of given type. +/* Return true if get_alias_set care about TYPE_CANONICAL of given type. We don't define the types for pointers, arrays and vectors. The reason is that pointers are handled specially: ptr_type_node accesses conflict with accesses to all other pointers. This is done by alias.cc. -- 2.47.3