https://gcc.gnu.org/g:c4a1e16d31a24b2b6a6a5a7557b5148dc56c0215
commit r17-1019-gc4a1e16d31a24b2b6a6a5a7557b5148dc56c0215 Author: Dhruv Chawla <[email protected]> Date: Wed May 13 16:07:46 2026 +0000 lto: Fix typos in various files Signed-off-by: Dhruv Chawla <[email protected]> gcc/ChangeLog: * lto-cgraph.cc (get_alias_symbol): Fix typos. (input_node): Likewise. (input_varpool_node): Likewise. * lto-ltrans-cache.cc: Likewise. * lto-streamer-in.cc (lto_location_cache::revert_location_cache): Likewise. (lto_location_cache::input_location_and_block): Likewise. (lto_location_cache::input_location): Likewise. (lto_input_location): Likewise. * lto-streamer-out.cc (lto_variably_modified_type_p): Likewise. (lto_is_streamable): Likewise. (DFS::DFS): Likewise. (cmp_symbol_files): Likewise. (lto_output): Likewise. * lto-streamer.h (enum LTO_tags): Likewise. * lto-wrapper.cc (merge_flto_options): Likewise. (run_gcc): Likewise. gcc/lto/ChangeLog: * Make-lang.in: Fix typos. * lto-common.cc (read_cgraph_and_symbols): Likewise. * lto-lang.cc (lto_post_options): Likewise. * lto-partition.cc (add_symbol_to_partition_1): Likewise. (partition_over_target_split): Likewise. (lto_balanced_map): Likewise. (rename_statics): Likewise. * lto-symtab.cc (lto_cgraph_replace_node): Likewise. (lto_varpool_replace_node): Likewise. (lto_symtab_merge_symbols): Likewise. * lto.cc (stream_out_partitions): Likewise. (do_whole_program_analysis): Likewise. Diff: --- gcc/lto-cgraph.cc | 6 +++--- gcc/lto-ltrans-cache.cc | 2 +- gcc/lto-streamer-in.cc | 8 ++++---- gcc/lto-streamer-out.cc | 10 +++++----- gcc/lto-streamer.h | 6 +++--- gcc/lto-wrapper.cc | 4 ++-- gcc/lto/Make-lang.in | 2 +- gcc/lto/lto-common.cc | 8 ++++---- gcc/lto/lto-lang.cc | 4 ++-- gcc/lto/lto-partition.cc | 10 +++++----- gcc/lto/lto-symtab.cc | 8 ++++---- gcc/lto/lto.cc | 4 ++-- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc index 635ed1af76b3..9a71110d5c25 100644 --- a/gcc/lto-cgraph.cc +++ b/gcc/lto-cgraph.cc @@ -1318,7 +1318,7 @@ get_alias_symbol (tree decl) } /* Read a node from input_block IB. TAG is the node's tag just read. - Return the node read or overwriten. */ + Return the node read or overwritten. */ static struct cgraph_node * input_node (struct lto_file_decl_data *file_data, @@ -1433,7 +1433,7 @@ input_node (struct lto_file_decl_data *file_data, } /* Read a node from input_block IB. TAG is the node's tag just read. - Return the node read or overwriten. */ + Return the node read or overwritten. */ static varpool_node * input_varpool_node (struct lto_file_decl_data *file_data, @@ -1513,7 +1513,7 @@ input_varpool_node (struct lto_file_decl_data *file_data, } /* Read a node from input_block IB. TAG is the node's tag just read. - Return the node read or overwriten. */ + Return the node read or overwritten. */ static void input_ref (class lto_input_block *ib, diff --git a/gcc/lto-ltrans-cache.cc b/gcc/lto-ltrans-cache.cc index e64b7bad65c1..dc62a52a1a18 100644 --- a/gcc/lto-ltrans-cache.cc +++ b/gcc/lto-ltrans-cache.cc @@ -138,7 +138,7 @@ fail_mmap: return ret; } -/* Contructor of cache item. */ +/* Constructor of cache item. */ ltrans_file_cache::item::item (std::string input, std::string output, checksum_t input_checksum, uint32_t last_used): diff --git a/gcc/lto-streamer-in.cc b/gcc/lto-streamer-in.cc index 9659d4aa532e..ee2fa2affbc1 100644 --- a/gcc/lto-streamer-in.cc +++ b/gcc/lto-streamer-in.cc @@ -508,7 +508,7 @@ lto_location_cache::revert_location_cache () /* Read a location bitpack from bit pack BP and either update *LOC directly or add it to the location cache. If IB is non-NULL, stream in a block afterwards. - It is neccesary to call apply_location_cache to get *LOC updated. */ + It is necessary to call apply_location_cache to get *LOC updated. */ void lto_location_cache::input_location_and_block (location_t *loc, @@ -611,7 +611,7 @@ lto_location_cache::input_location_and_block (location_t *loc, /* Read a location bitpack from bit pack BP and either update *LOC directly or add it to the location cache. - It is neccesary to call apply_location_cache to get *LOC updated. */ + It is necessary to call apply_location_cache to get *LOC updated. */ void lto_location_cache::input_location (location_t *loc, struct bitpack_d *bp, @@ -622,7 +622,7 @@ lto_location_cache::input_location (location_t *loc, struct bitpack_d *bp, /* Read a location bitpack from input block IB and either update *LOC directly or add it to the location cache. - It is neccesary to call apply_location_cache to get *LOC updated. */ + It is necessary to call apply_location_cache to get *LOC updated. */ void lto_input_location (location_t *loc, struct bitpack_d *bp, @@ -634,7 +634,7 @@ lto_input_location (location_t *loc, struct bitpack_d *bp, /* Read a reference to a tree node from DATA_IN using input block IB. TAG is the expected node that should be found in IB, if TAG belongs to one of the indexable trees, expect to read a reference index to - be looked up in one of the symbol tables, otherwise read the pysical + be looked up in one of the symbol tables, otherwise read the physical representation of the tree using stream_read_tree. FN is the function scope for the read tree. */ diff --git a/gcc/lto-streamer-out.cc b/gcc/lto-streamer-out.cc index 5338a952cb0b..f2feefc1532b 100644 --- a/gcc/lto-streamer-out.cc +++ b/gcc/lto-streamer-out.cc @@ -140,7 +140,7 @@ lto_variably_modified_type_p (tree type) /* Return true if tree node T is written to various tables. For these - nodes, we sometimes want to write their phyiscal representation + nodes, we sometimes want to write their physical representation (via lto_output_tree), and sometimes we need to emit an index reference into a table (via lto_output_tree_ref). */ @@ -391,7 +391,7 @@ lto_is_streamable (tree expr) /* Very rough estimate of streaming size of the initializer. If we ignored presence of strings, we could simply just count number of non-indexable tree nodes and number of references to indexable nodes. Strings however - may be very large and we do not want to dump them int othe global stream. + may be very large and we do not want to dump them into the global stream. Count the size of initializer until the size in DATA is positive. */ @@ -789,7 +789,7 @@ DFS::DFS (struct output_block *ob, tree expr, bool ref_p, bool this_ref_p, /* As a special case do not stream TRANSLATION_UNIT_DECL as shared tree. We can not mark it local because references to it does not - make other trees local (all global decls reffer to it via + make other trees local (all global decls refer to it via CONTEXT). */ if (size == 1 && TREE_CODE (sccstack[first].t) == TRANSLATION_UNIT_DECL) @@ -2759,7 +2759,7 @@ cmp_symbol_files (const void *pn1, const void *pn2, void *id_map_) if (n1->lto_file_data && n1->lto_file_data->id != n2->lto_file_data->id) return *id_map->get (n1->lto_file_data) - *id_map->get (n2->lto_file_data); - /* And finaly order by the definition order. */ + /* And finally order by the definition order. */ return n1->order - n2->order; } @@ -2895,7 +2895,7 @@ lto_output (void) && (gimple_has_body_p (cnode->decl) || (!flag_wpa && flag_incremental_link != INCREMENTAL_LINK_LTO) - /* Thunks have no body but they may be synthetized + /* Thunks have no body but they may be synthesized at WPA time. */ || DECL_ARGUMENTS (cnode->decl))) output_function (cnode, output_order); diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index f8aa8465b7c7..8ed3b419ad58 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -160,7 +160,7 @@ enum LTO_tags /* Tags of trees are encoded as LTO_first_tree_tag + TREE_CODE. */ LTO_first_tree_tag, - /* Tags of gimple typles are encoded as + /* Tags of gimple tuples are encoded as LTO_first_gimple_tag + gimple_code. */ LTO_first_gimple_tag = LTO_first_tree_tag + MAX_TREE_CODES, @@ -268,9 +268,9 @@ public: /* Apply all changes in location cache. Add locations into linemap and patch trees. */ bool apply_location_cache (); - /* Tree merging did not suceed; mark all changes in the cache as accepted. */ + /* Tree merging did not succeed; mark all changes in the cache as accepted. */ void accept_location_cache (); - /* Tree merging did suceed; throw away recent changes. */ + /* Tree merging did succeed; throw away recent changes. */ void revert_location_cache (); void input_location (location_t *loc, struct bitpack_d *bp, class data_in *data_in); diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index a8abbf22c6bc..9610fa5b7a82 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -257,7 +257,7 @@ merge_flto_options (vec<cl_decoded_option> &decoded_options, } /* Try to merge and complain about options FDECODED_OPTIONS when applied - ontop of DECODED_OPTIONS. */ + on top of DECODED_OPTIONS. */ static void merge_and_complain (vec<cl_decoded_option> &decoded_options, @@ -1535,7 +1535,7 @@ run_gcc (unsigned argc, char *argv[]) close (fd); } - /* Initalize the common arguments for the driver. */ + /* Initialize the common arguments for the driver. */ obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, collect_gcc); obstack_ptr_grow (&argv_obstack, "-xlto"); diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in index a54bdf63c641..2090d3365afb 100644 --- a/gcc/lto/Make-lang.in +++ b/gcc/lto/Make-lang.in @@ -23,7 +23,7 @@ LTO_EXE = lto1$(exeext) LTO_DUMP_EXE = lto-dump$(exeext) LTO_DUMP_INSTALL_NAME := $(shell echo lto-dump|sed '$(program_transform_name)') -# The LTO-specific object files inclued in $(LTO_EXE). +# The LTO-specific object files included in $(LTO_EXE). LTO_OBJS = lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o lto/lto-common.o lto_OBJS = $(LTO_OBJS) lto_FDAS = lto1.fda diff --git a/gcc/lto/lto-common.cc b/gcc/lto/lto-common.cc index cc513b84ef1a..16301516bd8a 100644 --- a/gcc/lto/lto-common.cc +++ b/gcc/lto/lto-common.cc @@ -1819,7 +1819,7 @@ unify_scc (class data_in *data_in, unsigned from, typedef int_hash<unsigned, 0, UINT_MAX> code_id_hash; /* Do registering necessary once new tree fully streamed in (including all - trees it reffers to). */ + trees it refers to). */ static void process_new_tree (tree t, hash_map <code_id_hash, unsigned> *hm, @@ -2549,7 +2549,7 @@ static lto_file *current_lto_file; } \ } while (0) -/* Ensure that TT isn't a replacable var of function decl. */ +/* Ensure that TT isn't a replaceable var of function decl. */ #define LTO_NO_PREVAIL(tt) \ gcc_checking_assert (!(tt) || !VAR_OR_FUNCTION_DECL_P (tt)) @@ -2870,7 +2870,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) canonical_type_hash_cache = NULL; /* At this stage we know that majority of GGC memory is reachable. - Growing the limits prevents unnecesary invocation of GGC. */ + Growing the limits prevents unnecessary invocation of GGC. */ ggc_grow (); report_heap_memory_use (); @@ -2953,7 +2953,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) /* During WPA we want to prevent ggc collecting by default. Grow limits until after the IPA summaries are streamed in. Basically all IPA memory - is explcitly managed by ggc_free and ggc collect is not useful. + is explicitly managed by ggc_free and ggc collect is not useful. Exception are the merged declarations. */ ggc_grow (); report_heap_memory_use (); diff --git a/gcc/lto/lto-lang.cc b/gcc/lto/lto-lang.cc index 92ddaf0f7cb7..82d0c523dcb1 100644 --- a/gcc/lto/lto-lang.cc +++ b/gcc/lto/lto-lang.cc @@ -932,7 +932,7 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) break; case LTO_LINKER_OUTPUT_DYN: /* .so: PID library */ - /* On some targets, like i386 it makes sense to build PIC library wihout + /* On some targets, like i386 it makes sense to build PIC library without -fpic for performance reasons. So no need to adjust flags. */ break; @@ -959,7 +959,7 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) if (flag_excess_precision == EXCESS_PRECISION_DEFAULT) flag_excess_precision = EXCESS_PRECISION_FAST; - /* When partitioning, we can tear appart STRING_CSTs uses from the same + /* When partitioning, we can tear apart STRING_CSTs uses from the same TU into multiple partitions. Without constant merging the constants might not be equal at runtime. See PR50199. */ if (!flag_merge_constants) diff --git a/gcc/lto/lto-partition.cc b/gcc/lto/lto-partition.cc index 4812142c48d7..076cb002a11f 100644 --- a/gcc/lto/lto-partition.cc +++ b/gcc/lto/lto-partition.cc @@ -238,7 +238,7 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node *node) } } - /* Ensure that SAME_COMDAT_GROUP lists all allways added in a group. */ + /* Ensure that SAME_COMDAT_GROUP lists all always added in a group. */ if (node->same_comdat_group) for (node1 = node->same_comdat_group; node1 != node; node1 = node1->same_comdat_group) @@ -836,7 +836,7 @@ partition_over_target_split (partition_set& p) if (small.sym_groups.size ()) { /* Handles special case where n_partitions might be smaller than - all.size (). Which can happen as result of interger division or with + all.size (). Which can happen as result of integer division or with 0 sized partition_sets. Then also prevents too small symbol group. This should also be a special case; more common one, but with no correctness problems. */ @@ -1236,7 +1236,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) /* Streaming works best when the source units do not cross partition boundaries much. This is because importing function from a source unit tends to import a lot of global trees defined there. We should - get better about minimizing the function bounday, but until that + get better about minimizing the function boundary, but until that things works smoother if we order in source order. */ order.qsort (tp_first_run_node_cmp); noreorder.qsort (node_cmp); @@ -1543,7 +1543,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size) next_nodes.truncate (0); - /* Varables that are not reachable from the code go into last partition. */ + /* Variables that are not reachable from the code go into last partition. */ FOR_EACH_VARIABLE (vnode) if (vnode->get_partitioning_class () == SYMBOL_PARTITION && !symbol_partitioned_p (vnode)) @@ -1956,7 +1956,7 @@ rename_statics (lto_symtab_encoder_t encoder, symtab_node *node) || lto_symtab_encoder_lookup (encoder, s) != LCC_NOT_FOUND)) break; - /* OK, no confict, so we have nothing to do. */ + /* OK, no conflict, so we have nothing to do. */ if (!s) return; diff --git a/gcc/lto/lto-symtab.cc b/gcc/lto/lto-symtab.cc index c24cc01dda2a..61b32dbc4015 100644 --- a/gcc/lto/lto-symtab.cc +++ b/gcc/lto/lto-symtab.cc @@ -99,7 +99,7 @@ lto_cgraph_replace_node (struct cgraph_node *node, e->call_stmt_cannot_inline_p = 1; } } - /* Redirect incomming references. */ + /* Redirect incoming references. */ prevailing_node->clone_referring (node); lto_free_function_in_decl_state_for_node (node); @@ -200,7 +200,7 @@ lto_varpool_replace_node (varpool_node *vnode, -fno-strict-aliasing which may be tough of as a feature rather than bug as it allows to implement dodgy tricks in the language runtimes. - Naturally this code can be strenghtened significantly if we could track + Naturally this code can be strengthened significantly if we could track down the language of origin. */ static int @@ -987,7 +987,7 @@ lto_symtab_merge_symbols (void) /* Do the actual merging. At this point we invalidate hash translating decls into symtab nodes - because after removing one of duplicate decls the hash is not correcly + because after removing one of duplicate decls the hash is not correctly updated to the other duplicate. */ FOR_EACH_SYMBOL (node) if (lto_symtab_symbol_p (node) @@ -1089,7 +1089,7 @@ lto_symtab_merge_symbols (void) devirtualization. For this reason it is important to merge even virtual tables that have no associated symbol table entries. Without doing so we lose optimization - oppurtunities by losing track of the vtable constructor. + opportunities by losing track of the vtable constructor. FIXME: we probably ought to introduce explicit symbol table entries for those before streaming. */ diff --git a/gcc/lto/lto.cc b/gcc/lto/lto.cc index 9589c6ca5ab3..46f3799c4a04 100644 --- a/gcc/lto/lto.cc +++ b/gcc/lto/lto.cc @@ -265,7 +265,7 @@ stream_out_partitions (char *temp_filename, int blen, int min, int max, wait_for_child (); else { - /* There are no free tokens, lets do the job outselves. */ + /* There are no free tokens, lets do the job ourselves. */ stream_out_partitions_1 (temp_filename, blen, min, max); return; } @@ -589,7 +589,7 @@ do_whole_program_analysis (void) /* Collect a last time - in lto_wpa_write_files we may end up forking with the idea that this doesn't increase memory usage. So we - absoultely do not want to collect after that. */ + absolutely do not want to collect after that. */ ggc_collect (); timevar_start (TV_PHASE_STREAM_OUT);
