Commit dfea3d6f by Jakub Jelinek Committed by Jakub Jelinek

symtab.c: Fix comment typos.

	* symtab.c: Fix comment typos.
	* cgraphunit.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphclones.c: Likewise.
	* cgraph.c: Likewise.
	* varpool.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* ipa-sra.c: Likewise.
	(scan_expr_access, check_all_callers_for_issues): Fix typo
	in a dump message.

From-SVN: r277995
parent a63d6356
2019-11-09 Jakub Jelinek <jakub@redhat.com>
* symtab.c: Fix comment typos.
* cgraphunit.c: Likewise.
* cgraph.h: Likewise.
* cgraphclones.c: Likewise.
* cgraph.c: Likewise.
* varpool.c: Likewise.
* tree-ssa-strlen.c: Likewise.
* ipa-sra.c: Likewise.
(scan_expr_access, check_all_callers_for_issues): Fix typo
in a dump message.
2019-11-08 Iain Sandoe <iain@sandoe.co.uk> 2019-11-08 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin-protos.h: Add include quard. * config/darwin-protos.h: Add include quard.
...@@ -1048,8 +1048,8 @@ cgraph_edge::remove (void) ...@@ -1048,8 +1048,8 @@ cgraph_edge::remove (void)
call call_dest call call_dest
At this time the function just creates the direct call, At this time the function just creates the direct call,
the referencd representing the if conditional and attaches the reference representing the if conditional and attaches
them all to the orginal indirect call statement. them all to the original indirect call statement.
Return direct edge created. */ Return direct edge created. */
...@@ -1143,7 +1143,7 @@ cgraph_edge::speculative_call_info (cgraph_edge *&direct, ...@@ -1143,7 +1143,7 @@ cgraph_edge::speculative_call_info (cgraph_edge *&direct,
gcc_assert (e && e2 && ref); gcc_assert (e && e2 && ref);
} }
/* Speculative call edge turned out to be direct call to CALLE_DECL. /* Speculative call edge turned out to be direct call to CALLEE_DECL.
Remove the speculative call sequence and return edge representing the call. Remove the speculative call sequence and return edge representing the call.
It is up to caller to redirect the call as appropriate. */ It is up to caller to redirect the call as appropriate. */
...@@ -2337,7 +2337,7 @@ set_nothrow_flag_1 (cgraph_node *node, bool nothrow, bool non_call, ...@@ -2337,7 +2337,7 @@ set_nothrow_flag_1 (cgraph_node *node, bool nothrow, bool non_call,
if (nothrow && !TREE_NOTHROW (node->decl)) if (nothrow && !TREE_NOTHROW (node->decl))
{ {
/* With non-call exceptions we can't say for sure if other function body /* With non-call exceptions we can't say for sure if other function body
was not possibly optimized to stil throw. */ was not possibly optimized to still throw. */
if (!non_call || node->binds_to_current_def_p ()) if (!non_call || node->binds_to_current_def_p ())
{ {
TREE_NOTHROW (node->decl) = true; TREE_NOTHROW (node->decl) = true;
...@@ -2545,7 +2545,7 @@ set_const_flag_1 (cgraph_node *node, bool set_const, bool looping, ...@@ -2545,7 +2545,7 @@ set_const_flag_1 (cgraph_node *node, bool set_const, bool looping,
If SET_CONST if false, clear the flag. If SET_CONST if false, clear the flag.
When setting the flag be careful about possible interposition and When setting the flag be careful about possible interposition and
do not set the flag for functions that can be interposet and set pure do not set the flag for functions that can be interposed and set pure
flag for functions that can bind to other definition. flag for functions that can bind to other definition.
Return true if any change was done. */ Return true if any change was done. */
...@@ -2739,7 +2739,7 @@ cgraph_node::can_remove_if_no_direct_calls_p (bool will_inline) ...@@ -2739,7 +2739,7 @@ cgraph_node::can_remove_if_no_direct_calls_p (bool will_inline)
if (will_inline && address_taken) if (will_inline && address_taken)
return false; return false;
/* Otheriwse check if we can remove the symbol itself and then verify /* Otherwise check if we can remove the symbol itself and then verify
that only uses of the comdat groups are direct call to THIS that only uses of the comdat groups are direct call to THIS
or its aliases. */ or its aliases. */
if (!can_remove_if_no_direct_calls_and_refs_p ()) if (!can_remove_if_no_direct_calls_and_refs_p ())
...@@ -3615,7 +3615,7 @@ cgraph_c_finalize (void) ...@@ -3615,7 +3615,7 @@ cgraph_c_finalize (void)
version_info_node = NULL; version_info_node = NULL;
} }
/* A wroker for call_for_symbol_and_aliases. */ /* A worker for call_for_symbol_and_aliases. */
bool bool
cgraph_node::call_for_symbol_and_aliases_1 (bool (*callback) (cgraph_node *, cgraph_node::call_for_symbol_and_aliases_1 (bool (*callback) (cgraph_node *,
...@@ -3670,13 +3670,14 @@ cgraph_edge::possibly_call_in_translation_unit_p (void) ...@@ -3670,13 +3670,14 @@ cgraph_edge::possibly_call_in_translation_unit_p (void)
if (flag_incremental_link == INCREMENTAL_LINK_LTO) if (flag_incremental_link == INCREMENTAL_LINK_LTO)
return true; return true;
/* We may be smarter here and avoid stremaing in indirect calls we can't /* We may be smarter here and avoid streaming in indirect calls we can't
track, but that would require arranging stremaing the indirect call track, but that would require arranging streaming the indirect call
summary first. */ summary first. */
if (!callee) if (!callee)
return true; return true;
/* If calle is local to the original translation unit, it will be defined. */ /* If callee is local to the original translation unit, it will be
defined. */
if (!TREE_PUBLIC (callee->decl) && !DECL_EXTERNAL (callee->decl)) if (!TREE_PUBLIC (callee->decl) && !DECL_EXTERNAL (callee->decl))
return true; return true;
......
...@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License ...@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* This module provide facilities for clonning functions. I.e. creating /* This module provide facilities for cloning functions. I.e. creating
new functions based on existing functions with simple modifications, new functions based on existing functions with simple modifications,
such as replacement of parameters. such as replacement of parameters.
...@@ -304,7 +304,7 @@ dump_callgraph_transformation (const cgraph_node *original, ...@@ -304,7 +304,7 @@ dump_callgraph_transformation (const cgraph_node *original,
When UPDATE_ORIGINAL is true, the counts are subtracted from the original When UPDATE_ORIGINAL is true, the counts are subtracted from the original
function's profile to reflect the fact that part of execution is handled function's profile to reflect the fact that part of execution is handled
by node. by node.
When CALL_DUPLICATOIN_HOOK is true, the ipa passes are acknowledged about When CALL_DUPLICATION_HOOK is true, the ipa passes are acknowledged about
the new clone. Otherwise the caller is responsible for doing so later. the new clone. Otherwise the caller is responsible for doing so later.
If the new node is being inlined into another one, NEW_INLINED_TO should be If the new node is being inlined into another one, NEW_INLINED_TO should be
...@@ -381,7 +381,7 @@ cgraph_node::create_clone (tree new_decl, profile_count prof_count, ...@@ -381,7 +381,7 @@ cgraph_node::create_clone (tree new_decl, profile_count prof_count,
{ {
/* Redirect calls to the old version node to point to its new /* Redirect calls to the old version node to point to its new
version. The only exception is when the edge was proved to version. The only exception is when the edge was proved to
be unreachable during the clonning procedure. */ be unreachable during the cloning procedure. */
if (!e->callee if (!e->callee
|| !fndecl_built_in_p (e->callee->decl, BUILT_IN_UNREACHABLE)) || !fndecl_built_in_p (e->callee->decl, BUILT_IN_UNREACHABLE))
e->redirect_callee_duplicating_thunks (new_node); e->redirect_callee_duplicating_thunks (new_node);
......
...@@ -75,7 +75,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -75,7 +75,7 @@ along with GCC; see the file COPYING3. If not see
a) early optimizations. These are local passes executed in a) early optimizations. These are local passes executed in
the topological order on the callgraph. the topological order on the callgraph.
The purpose of early optimiations is to optimize away simple The purpose of early optimizations is to optimize away simple
things that may otherwise confuse IP analysis. Very simple things that may otherwise confuse IP analysis. Very simple
propagation across the callgraph is done i.e. to discover propagation across the callgraph is done i.e. to discover
functions without side effects and simple inlining is performed. functions without side effects and simple inlining is performed.
...@@ -83,7 +83,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -83,7 +83,7 @@ along with GCC; see the file COPYING3. If not see
b) early small interprocedural passes. b) early small interprocedural passes.
Those are interprocedural passes executed only at compilation Those are interprocedural passes executed only at compilation
time. These include, for example, transational memory lowering, time. These include, for example, transactional memory lowering,
unreachable code removal and other simple transformations. unreachable code removal and other simple transformations.
c) IP analysis stage. All interprocedural passes do their c) IP analysis stage. All interprocedural passes do their
...@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see
IP propagation. This is done based on the earlier analysis IP propagation. This is done based on the earlier analysis
without having function bodies at hand. without having function bodies at hand.
f) Ltrans streaming. When doing WHOPR LTO, the program f) Ltrans streaming. When doing WHOPR LTO, the program
is partitioned and streamed into multple object files. is partitioned and streamed into multiple object files.
Compile time and/or parallel linktime stage (ltrans) Compile time and/or parallel linktime stage (ltrans)
...@@ -118,7 +118,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -118,7 +118,7 @@ along with GCC; see the file COPYING3. If not see
2) Virtual clone materialization 2) Virtual clone materialization
(cgraph_materialize_clone) (cgraph_materialize_clone)
IP passes can produce copies of existing functoins (such IP passes can produce copies of existing functions (such
as versioned clones or inline clones) without actually as versioned clones or inline clones) without actually
manipulating their bodies by creating virtual clones in manipulating their bodies by creating virtual clones in
the callgraph. At this time the virtual clones are the callgraph. At this time the virtual clones are
...@@ -336,7 +336,7 @@ symbol_table::process_new_functions (void) ...@@ -336,7 +336,7 @@ symbol_table::process_new_functions (void)
{ {
bool summaried_computed = ipa_fn_summaries != NULL; bool summaried_computed = ipa_fn_summaries != NULL;
g->get_passes ()->execute_early_local_passes (); g->get_passes ()->execute_early_local_passes ();
/* Early passes compure inline parameters to do inlining /* Early passes compute inline parameters to do inlining
and splitting. This is redundant for functions added late. and splitting. This is redundant for functions added late.
Just throw away whatever it did. */ Just throw away whatever it did. */
if (!summaried_computed) if (!summaried_computed)
...@@ -694,8 +694,8 @@ cgraph_node::analyze (void) ...@@ -694,8 +694,8 @@ cgraph_node::analyze (void)
/* C++ frontend produce same body aliases all over the place, even before PCH /* C++ frontend produce same body aliases all over the place, even before PCH
gets streamed out. It relies on us linking the aliases with their function gets streamed out. It relies on us linking the aliases with their function
in order to do the fixups, but ipa-ref is not PCH safe. Consequentely we in order to do the fixups, but ipa-ref is not PCH safe. Consequently we
first produce aliases without links, but once C++ FE is sure he won't sream first produce aliases without links, but once C++ FE is sure he won't stream
PCH we build the links via this function. */ PCH we build the links via this function. */
void void
...@@ -854,7 +854,7 @@ varpool_node::finalize_decl (tree decl) ...@@ -854,7 +854,7 @@ varpool_node::finalize_decl (tree decl)
node->no_reorder = true; node->no_reorder = true;
if (TREE_THIS_VOLATILE (decl) || DECL_PRESERVE_P (decl) if (TREE_THIS_VOLATILE (decl) || DECL_PRESERVE_P (decl)
/* Traditionally we do not eliminate static variables when not /* Traditionally we do not eliminate static variables when not
optimizing and when not doing toplevel reoder. */ optimizing and when not doing toplevel reorder. */
|| (node->no_reorder && !DECL_COMDAT (node->decl) || (node->no_reorder && !DECL_COMDAT (node->decl)
&& !DECL_ARTIFICIAL (node->decl))) && !DECL_ARTIFICIAL (node->decl)))
node->force_output = true; node->force_output = true;
...@@ -875,7 +875,7 @@ varpool_node::finalize_decl (tree decl) ...@@ -875,7 +875,7 @@ varpool_node::finalize_decl (tree decl)
/* EDGE is an polymorphic call. Mark all possible targets as reachable /* EDGE is an polymorphic call. Mark all possible targets as reachable
and if there is only one target, perform trivial devirtualization. and if there is only one target, perform trivial devirtualization.
REACHABLE_CALL_TARGETS collects target lists we already walked to REACHABLE_CALL_TARGETS collects target lists we already walked to
avoid udplicate work. */ avoid duplicate work. */
static void static void
walk_polymorphic_call_targets (hash_set<void *> *reachable_call_targets, walk_polymorphic_call_targets (hash_set<void *> *reachable_call_targets,
...@@ -1135,7 +1135,7 @@ analyze_functions (bool first_time) ...@@ -1135,7 +1135,7 @@ analyze_functions (bool first_time)
|| opt_for_fn (edge->callee->decl, optimize) || opt_for_fn (edge->callee->decl, optimize)
/* Weakrefs needs to be preserved. */ /* Weakrefs needs to be preserved. */
|| edge->callee->alias || edge->callee->alias
/* always_inline functions are inlined aven at -O0. */ /* always_inline functions are inlined even at -O0. */
|| lookup_attribute || lookup_attribute
("always_inline", ("always_inline",
DECL_ATTRIBUTES (edge->callee->decl)) DECL_ATTRIBUTES (edge->callee->decl))
...@@ -1229,7 +1229,7 @@ analyze_functions (bool first_time) ...@@ -1229,7 +1229,7 @@ analyze_functions (bool first_time)
{ {
next = node->next; next = node->next;
/* For symbols declared locally we clear TREE_READONLY when emitting /* For symbols declared locally we clear TREE_READONLY when emitting
the construtor (if one is needed). For external declarations we can the constructor (if one is needed). For external declarations we can
not safely assume that the type is readonly because we may be called not safely assume that the type is readonly because we may be called
during its construction. */ during its construction. */
if (TREE_CODE (node->decl) == VAR_DECL if (TREE_CODE (node->decl) == VAR_DECL
...@@ -1862,7 +1862,7 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) ...@@ -1862,7 +1862,7 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
greturn *ret; greturn *ret;
bool alias_is_noreturn = TREE_THIS_VOLATILE (alias); bool alias_is_noreturn = TREE_THIS_VOLATILE (alias);
/* We may be called from expand_thunk that releses body except for /* We may be called from expand_thunk that releases body except for
DECL_ARGUMENTS. In this case force_gimple_thunk is true. */ DECL_ARGUMENTS. In this case force_gimple_thunk is true. */
if (in_lto_p && !force_gimple_thunk) if (in_lto_p && !force_gimple_thunk)
get_untransformed_body (); get_untransformed_body ();
...@@ -1995,7 +1995,7 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) ...@@ -1995,7 +1995,7 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
gimple_call_set_chain (call, decl); gimple_call_set_chain (call, decl);
} }
/* Return slot optimization is always possible and in fact requred to /* Return slot optimization is always possible and in fact required to
return values with DECL_BY_REFERENCE. */ return values with DECL_BY_REFERENCE. */
if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl)) if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl))
&& (!is_gimple_reg_type (TREE_TYPE (resdecl)) && (!is_gimple_reg_type (TREE_TYPE (resdecl))
...@@ -2252,12 +2252,13 @@ cgraph_node::expand (void) ...@@ -2252,12 +2252,13 @@ cgraph_node::expand (void)
if (cfun) if (cfun)
pop_cfun (); pop_cfun ();
/* It would make a lot more sense to output thunks before function body to get more /* It would make a lot more sense to output thunks before function body to
forward and lest backwarding jumps. This however would need solving problem get more forward and fewer backward jumps. This however would need
with comdats. See PR48668. Also aliases must come after function itself to solving problem with comdats. See PR48668. Also aliases must come after
make one pass assemblers, like one on AIX, happy. See PR 50689. function itself to make one pass assemblers, like one on AIX, happy.
FIXME: Perhaps thunks should be move before function IFF they are not in comdat See PR 50689.
groups. */ FIXME: Perhaps thunks should be move before function IFF they are not in
comdat groups. */
assemble_thunks_and_aliases (); assemble_thunks_and_aliases ();
release_body (); release_body ();
/* Eliminate all call edges. This is important so the GIMPLE_CALL no longer /* Eliminate all call edges. This is important so the GIMPLE_CALL no longer
...@@ -2266,7 +2267,7 @@ cgraph_node::expand (void) ...@@ -2266,7 +2267,7 @@ cgraph_node::expand (void)
remove_all_references (); remove_all_references ();
} }
/* Node comparer that is responsible for the order that corresponds /* Node comparator that is responsible for the order that corresponds
to time when a function was launched for the first time. */ to time when a function was launched for the first time. */
static int static int
...@@ -2650,14 +2651,14 @@ symbol_table::compile (void) ...@@ -2650,14 +2651,14 @@ symbol_table::compile (void)
/* When weakref support is missing, we automatically translate all /* When weakref support is missing, we automatically translate all
references to NODE to references to its ultimate alias target. references to NODE to references to its ultimate alias target.
The renaming mechanizm uses flag IDENTIFIER_TRANSPARENT_ALIAS and The renaming mechanism uses flag IDENTIFIER_TRANSPARENT_ALIAS and
TREE_CHAIN. TREE_CHAIN.
Set up this mapping before we output any assembler but once we are sure Set up this mapping before we output any assembler but once we are sure
that all symbol renaming is done. that all symbol renaming is done.
FIXME: All this uglyness can go away if we just do renaming at gimple FIXME: All this ugliness can go away if we just do renaming at gimple
level by physically rewritting the IL. At the moment we can only redirect level by physically rewriting the IL. At the moment we can only redirect
calls, so we need infrastructure for renaming references as well. */ calls, so we need infrastructure for renaming references as well. */
#ifndef ASM_OUTPUT_WEAKREF #ifndef ASM_OUTPUT_WEAKREF
symtab_node *node; symtab_node *node;
......
...@@ -253,7 +253,7 @@ symbol_table::symtab_prevail_in_asm_name_hash (symtab_node *node) ...@@ -253,7 +253,7 @@ symbol_table::symtab_prevail_in_asm_name_hash (symtab_node *node)
insert_to_assembler_name_hash (node, false); insert_to_assembler_name_hash (node, false);
} }
/* Initalize asm name hash unless. */ /* Initialize asm name hash unless. */
void void
symbol_table::symtab_initialize_asm_name_hash (void) symbol_table::symtab_initialize_asm_name_hash (void)
...@@ -551,7 +551,7 @@ symtab_node::dump_asm_name () const ...@@ -551,7 +551,7 @@ symtab_node::dump_asm_name () const
} }
/* Return ipa reference from this symtab_node to /* Return ipa reference from this symtab_node to
REFERED_NODE or REFERED_VARPOOL_NODE. USE_TYPE specify type REFERRED_NODE or REFERRED_VARPOOL_NODE. USE_TYPE specify type
of the use. */ of the use. */
ipa_ref * ipa_ref *
...@@ -563,7 +563,7 @@ symtab_node::create_reference (symtab_node *referred_node, ...@@ -563,7 +563,7 @@ symtab_node::create_reference (symtab_node *referred_node,
/* Return ipa reference from this symtab_node to /* Return ipa reference from this symtab_node to
REFERED_NODE or REFERED_VARPOOL_NODE. USE_TYPE specify type REFERRED_NODE or REFERRED_VARPOOL_NODE. USE_TYPE specify type
of the use and STMT the statement (if it exists). */ of the use and STMT the statement (if it exists). */
ipa_ref * ipa_ref *
...@@ -732,7 +732,7 @@ symtab_node::remove_stmt_references (gimple *stmt) ...@@ -732,7 +732,7 @@ symtab_node::remove_stmt_references (gimple *stmt)
} }
/* Remove all stmt references in non-speculative references. /* Remove all stmt references in non-speculative references.
Those are not maintained during inlining & clonning. Those are not maintained during inlining & cloning.
The exception are speculative references that are updated along The exception are speculative references that are updated along
with callgraph edges associated with them. */ with callgraph edges associated with them. */
...@@ -1453,7 +1453,7 @@ symtab_node::ultimate_alias_target_1 (enum availability *availability, ...@@ -1453,7 +1453,7 @@ symtab_node::ultimate_alias_target_1 (enum availability *availability,
availability prevails the availability of its target (i.e. static alias of availability prevails the availability of its target (i.e. static alias of
weak definition is available. weak definition is available.
Transaparent alias is just alternative anme of a given symbol used within Transparent alias is just alternative name of a given symbol used within
one compilation unit and is translated prior hitting the object file. It one compilation unit and is translated prior hitting the object file. It
inherits the visibility of its target. inherits the visibility of its target.
Weakref is a different animal (and noweak definition is weak). Weakref is a different animal (and noweak definition is weak).
...@@ -1670,7 +1670,7 @@ symtab_node::set_init_priority (priority_type priority) ...@@ -1670,7 +1670,7 @@ symtab_node::set_init_priority (priority_type priority)
h->init = priority; h->init = priority;
} }
/* Set fialization priority to PRIORITY. */ /* Set finalization priority to PRIORITY. */
void void
cgraph_node::set_fini_priority (priority_type priority) cgraph_node::set_fini_priority (priority_type priority)
...@@ -1915,7 +1915,7 @@ enum symbol_partitioning_class ...@@ -1915,7 +1915,7 @@ enum symbol_partitioning_class
symtab_node::get_partitioning_class (void) symtab_node::get_partitioning_class (void)
{ {
/* Inline clones are always duplicated. /* Inline clones are always duplicated.
This include external delcarations. */ This include external declarations. */
cgraph_node *cnode = dyn_cast <cgraph_node *> (this); cgraph_node *cnode = dyn_cast <cgraph_node *> (this);
if (DECL_ABSTRACT_P (decl)) if (DECL_ABSTRACT_P (decl))
...@@ -2040,7 +2040,7 @@ symtab_node::nonzero_address () ...@@ -2040,7 +2040,7 @@ symtab_node::nonzero_address ()
If MEMORY_ACCESSED is true, assume that both memory pointer to THIS If MEMORY_ACCESSED is true, assume that both memory pointer to THIS
and S2 is going to be accessed. This eliminates the situations when and S2 is going to be accessed. This eliminates the situations when
either THIS or S2 is NULL and is seful for comparing bases when deciding either THIS or S2 is NULL and is useful for comparing bases when deciding
about memory aliasing. */ about memory aliasing. */
int int
symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed) symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed)
...@@ -2074,7 +2074,7 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed) ...@@ -2074,7 +2074,7 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed)
code and are used only within speculation. In this case we may make code and are used only within speculation. In this case we may make
symbol equivalent to its alias even if interposition may break this symbol equivalent to its alias even if interposition may break this
rule. Doing so will allow us to turn speculative inlining into rule. Doing so will allow us to turn speculative inlining into
non-speculative more agressively. */ non-speculative more aggressively. */
if (DECL_VIRTUAL_P (this->decl) && avail1 >= AVAIL_AVAILABLE) if (DECL_VIRTUAL_P (this->decl) && avail1 >= AVAIL_AVAILABLE)
binds_local1 = true; binds_local1 = true;
if (DECL_VIRTUAL_P (s2->decl) && avail2 >= AVAIL_AVAILABLE) if (DECL_VIRTUAL_P (s2->decl) && avail2 >= AVAIL_AVAILABLE)
...@@ -2130,7 +2130,7 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed) ...@@ -2130,7 +2130,7 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed)
/* TODO: Alias oracle basically assume that addresses of global variables /* TODO: Alias oracle basically assume that addresses of global variables
are different unless they are declared as alias of one to another while are different unless they are declared as alias of one to another while
the code folding comparsions doesn't. the code folding comparisons doesn't.
We probably should be consistent and use this fact here, too, but for We probably should be consistent and use this fact here, too, but for
the moment return false only when we are called from the alias oracle. */ the moment return false only when we are called from the alias oracle. */
...@@ -2389,8 +2389,8 @@ symtab_node::output_to_lto_symbol_table_p (void) ...@@ -2389,8 +2389,8 @@ symtab_node::output_to_lto_symbol_table_p (void)
} }
/* We have real symbol that should be in symbol table. However try to trim /* We have real symbol that should be in symbol table. However try to trim
down the refernces to libraries bit more because linker will otherwise down the references to libraries bit more because linker will otherwise
bring unnecesary object files into the final link. bring unnecessary object files into the final link.
FIXME: The following checks can easily be confused i.e. by self recursive FIXME: The following checks can easily be confused i.e. by self recursive
function or self-referring variable. */ function or self-referring variable. */
......
...@@ -1882,7 +1882,7 @@ handle_builtin_strlen (gimple_stmt_iterator *gsi) ...@@ -1882,7 +1882,7 @@ handle_builtin_strlen (gimple_stmt_iterator *gsi)
tree adj = fold_build2_loc (loc, MINUS_EXPR, tree adj = fold_build2_loc (loc, MINUS_EXPR,
TREE_TYPE (lhs), lhs, old); TREE_TYPE (lhs), lhs, old);
adjust_related_strinfos (loc, si, adj); adjust_related_strinfos (loc, si, adj);
/* Use the constant minimim length as the lower bound /* Use the constant minimum length as the lower bound
of the non-constant length. */ of the non-constant length. */
wide_int min = wi::to_wide (old); wide_int min = wi::to_wide (old);
wide_int max wide_int max
...@@ -2145,7 +2145,7 @@ handle_builtin_strcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi) ...@@ -2145,7 +2145,7 @@ handle_builtin_strcpy (enum built_in_function bcode, gimple_stmt_iterator *gsi)
strinfo *chainsi; strinfo *chainsi;
/* If string length of src is unknown, use delayed length /* If string length of src is unknown, use delayed length
computation. If string lenth of dst will be needed, it computation. If string length of dst will be needed, it
can be computed by transforming this strcpy call into can be computed by transforming this strcpy call into
stpcpy and subtracting dst from the return value. */ stpcpy and subtracting dst from the return value. */
...@@ -2665,7 +2665,7 @@ maybe_diag_stxncpy_trunc (gimple_stmt_iterator gsi, tree src, tree cnt) ...@@ -2665,7 +2665,7 @@ maybe_diag_stxncpy_trunc (gimple_stmt_iterator gsi, tree src, tree cnt)
if (tree dstsize = compute_objsize (dst, 1)) if (tree dstsize = compute_objsize (dst, 1))
{ {
/* The source length is uknown. Try to determine the destination /* The source length is unknown. Try to determine the destination
size and see if it matches the specified bound. If not, bail. size and see if it matches the specified bound. If not, bail.
Otherwise go on to see if it should be diagnosed for possible Otherwise go on to see if it should be diagnosed for possible
truncation. */ truncation. */
...@@ -2764,7 +2764,7 @@ handle_builtin_stxncpy (built_in_function, gimple_stmt_iterator *gsi) ...@@ -2764,7 +2764,7 @@ handle_builtin_stxncpy (built_in_function, gimple_stmt_iterator *gsi)
} }
/* If the length argument was computed from strlen(S) for some string /* If the length argument was computed from strlen(S) for some string
S retrieve the strinfo index for the string (PSS->FIRST) alonng with S retrieve the strinfo index for the string (PSS->FIRST) along with
the location of the strlen() call (PSS->SECOND). */ the location of the strlen() call (PSS->SECOND). */
stridx_strlenloc *pss = strlen_to_stridx->get (len); stridx_strlenloc *pss = strlen_to_stridx->get (len);
if (!pss || pss->first <= 0) if (!pss || pss->first <= 0)
...@@ -3267,7 +3267,7 @@ handle_builtin_malloc (enum built_in_function bcode, gimple_stmt_iterator *gsi) ...@@ -3267,7 +3267,7 @@ handle_builtin_malloc (enum built_in_function bcode, gimple_stmt_iterator *gsi)
/* Handle a call to memset. /* Handle a call to memset.
After a call to calloc, memset(,0,) is unnecessary. After a call to calloc, memset(,0,) is unnecessary.
memset(malloc(n),0,n) is calloc(n,1). memset(malloc(n),0,n) is calloc(n,1).
return true when the call is transfomred, false otherwise. */ return true when the call is transformed, false otherwise. */
static bool static bool
handle_builtin_memset (gimple_stmt_iterator *gsi, bool *zero_write) handle_builtin_memset (gimple_stmt_iterator *gsi, bool *zero_write)
...@@ -4463,7 +4463,7 @@ handle_store (gimple_stmt_iterator *gsi, bool *zero_write, const vr_values *rval ...@@ -4463,7 +4463,7 @@ handle_store (gimple_stmt_iterator *gsi, bool *zero_write, const vr_values *rval
statement and return to signal the caller that it shouldn't statement and return to signal the caller that it shouldn't
invalidate anything. invalidate anything.
This is benefical for cases like: This is beneficial for cases like:
char p[20]; char p[20];
void foo (char *q) void foo (char *q)
......
...@@ -204,7 +204,7 @@ varpool_node::remove_initializer (void) ...@@ -204,7 +204,7 @@ varpool_node::remove_initializer (void)
&& debug_info_level == DINFO_LEVEL_NONE && debug_info_level == DINFO_LEVEL_NONE
/* When doing declaration merging we have duplicate /* When doing declaration merging we have duplicate
entries for given decl. Do not attempt to remove entries for given decl. Do not attempt to remove
the boides, or we will end up remiving the bodies, or we will end up removing
wrong one. */ wrong one. */
&& symtab->state != LTO_STREAMING) && symtab->state != LTO_STREAMING)
DECL_INITIAL (decl) = error_mark_node; DECL_INITIAL (decl) = error_mark_node;
...@@ -365,7 +365,7 @@ varpool_node::ctor_useable_for_folding_p (void) ...@@ -365,7 +365,7 @@ varpool_node::ctor_useable_for_folding_p (void)
overridden at link or run time. overridden at link or run time.
It is actually requirement for C++ compiler to optimize const variables It is actually requirement for C++ compiler to optimize const variables
consistently. As a GNU extension, do not enfore this rule for user defined consistently. As a GNU extension, do not enforce this rule for user defined
weak variables, so we support interposition on: weak variables, so we support interposition on:
static const int dummy = 0; static const int dummy = 0;
extern const int foo __attribute__((__weak__, __alias__("dummy"))); extern const int foo __attribute__((__weak__, __alias__("dummy")));
...@@ -409,7 +409,7 @@ ctor_for_folding (tree decl) ...@@ -409,7 +409,7 @@ ctor_for_folding (tree decl)
return error_mark_node; return error_mark_node;
/* Do not care about automatic variables. Those are never initialized /* Do not care about automatic variables. Those are never initialized
anyway, because gimplifier exapnds the code. */ anyway, because gimplifier expands the code. */
if (!TREE_STATIC (decl) && !DECL_EXTERNAL (decl)) if (!TREE_STATIC (decl) && !DECL_EXTERNAL (decl))
{ {
gcc_assert (!TREE_PUBLIC (decl)); gcc_assert (!TREE_PUBLIC (decl));
...@@ -552,7 +552,7 @@ varpool_node::assemble_aliases (void) ...@@ -552,7 +552,7 @@ varpool_node::assemble_aliases (void)
bool bool
varpool_node::assemble_decl (void) varpool_node::assemble_decl (void)
{ {
/* Aliases are outout when their target is produced or by /* Aliases are output when their target is produced or by
output_weakrefs. */ output_weakrefs. */
if (alias) if (alias)
return false; return false;
...@@ -790,8 +790,8 @@ varpool_node::create_extra_name_alias (tree alias, tree decl) ...@@ -790,8 +790,8 @@ varpool_node::create_extra_name_alias (tree alias, tree decl)
alias_node = varpool_node::create_alias (alias, decl); alias_node = varpool_node::create_alias (alias, decl);
alias_node->cpp_implicit_alias = true; alias_node->cpp_implicit_alias = true;
/* Extra name alias mechanizm creates aliases really late /* Extra name alias mechanism creates aliases really late
via DECL_ASSEMBLER_NAME mechanizm. via DECL_ASSEMBLER_NAME mechanism.
This is unfortunate because they are not going through the This is unfortunate because they are not going through the
standard channels. Ensure they get output. */ standard channels. Ensure they get output. */
if (symtab->cpp_implicit_aliases_done) if (symtab->cpp_implicit_aliases_done)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment