* 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
+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>
* config/darwin-protos.h: Add include quard.
call call_dest
At this time the function just creates the direct call,
- the referencd representing the if conditional and attaches
- them all to the orginal indirect call statement.
+ the reference representing the if conditional and attaches
+ them all to the original indirect call statement.
Return direct edge created. */
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.
It is up to caller to redirect the call as appropriate. */
if (nothrow && !TREE_NOTHROW (node->decl))
{
/* 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 ())
{
TREE_NOTHROW (node->decl) = true;
If SET_CONST if false, clear the flag.
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.
Return true if any change was done. */
if (will_inline && address_taken)
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
or its aliases. */
if (!can_remove_if_no_direct_calls_and_refs_p ())
version_info_node = NULL;
}
-/* A wroker for call_for_symbol_and_aliases. */
+/* A worker for call_for_symbol_and_aliases. */
bool
cgraph_node::call_for_symbol_and_aliases_1 (bool (*callback) (cgraph_node *,
if (flag_incremental_link == INCREMENTAL_LINK_LTO)
return true;
- /* We may be smarter here and avoid stremaing in indirect calls we can't
- track, but that would require arranging stremaing the indirect call
+ /* We may be smarter here and avoid streaming in indirect calls we can't
+ track, but that would require arranging streaming the indirect call
summary first. */
if (!callee)
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))
return true;
program. */
AVAIL_AVAILABLE,
/* Function body/variable initializer is known and all it's uses are
- explicitly visible within current unit (ie it's address is never taken and
- it is not exported to other units). Currently used only for functions. */
+ explicitly visible within current unit (i.e. it's address is never taken
+ and it is not exported to other units). Currently used only for
+ functions. */
AVAIL_LOCAL
};
/* External declarations are ignored by partitioning algorithms and they are
added into the boundary later via compute_ltrans_boundary. */
SYMBOL_EXTERNAL,
- /* Partitioned symbols are pur into one of partitions. */
+ /* Partitioned symbols are put into one of partitions. */
SYMBOL_PARTITION,
/* Duplicated symbols (such as comdat or constant pool references) are
copied into every node needing them via add_symbol_to_partition. */
void DEBUG_FUNCTION verify (void);
/* 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). */
ipa_ref *create_reference (symtab_node *referred_node,
enum ipa_ref_use use_type);
/* 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). */
ipa_ref *create_reference (symtab_node *referred_node,
enum ipa_ref_use use_type, gimple *stmt);
Assume that symbol is used (so there is no need to take into account
garbage collecting linkers)
- This can happen for comdats, commons and weaks when they are previaled
+ This can happen for comdats, commons and weaks when they are prevailed
by other definition at static linking time. */
inline bool
can_be_discarded_p (void)
If MEMORY_ACCESSED is true, assume that both memory pointer to THIS
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. */
int equal_address_to (symtab_node *s2, bool memory_accessed = false);
set via finalize_function or finalize_decl */
unsigned definition : 1;
/* True when symbol is an alias.
- Set by ssemble_alias. */
+ Set by assemble_alias. */
unsigned alias : 1;
/* When true the alias is translated into its target symbol either by GCC
or assembler (it also may just be a duplicate declaration of the same
by varasm.c. For those DECL_ASSEMBLER_NAME have
IDENTIFIER_TRANSPARENT_ALIAS set and thus also their assembler
name must be unique.
- Weakrefs belong to this cateogry when we target assembler without
+ Weakrefs belong to this category when we target assembler without
.weakref directive.
- weakrefs that are renamed by assembler via .weakref directive.
In this case the alias may or may not be definition (depending if
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
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.
If the new node is being inlined into another one, NEW_INLINED_TO should be
/* Likewise indicate that a node is having address taken. */
void mark_address_taken (void);
- /* Set fialization priority to PRIORITY. */
+ /* Set finalization priority to PRIORITY. */
void set_fini_priority (priority_type priority);
/* Return the finalization priority. */
If SET_CONST if false, clear the flag.
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.
Return true if any change was done. */
ipa_polymorphic_call_context (cgraph_edge *e);
/* Build polymorphic call context for IP invariant CST.
If specified, OTR_TYPE specify the type of polymorphic call
- that takes CST+OFFSET as a prameter. */
+ that takes CST+OFFSET as a parameter. */
ipa_polymorphic_call_context (tree cst, tree otr_type = NULL,
HOST_WIDE_INT offset = 0);
/* Build context for pointer REF contained in FNDECL at statement STMT.
/* Make context non-speculative. */
void clear_speculation ();
- /* Produce context specifying all derrived types of OTR_TYPE. If OTR_TYPE is
+ /* Produce context specifying all derived types of OTR_TYPE. If OTR_TYPE is
NULL, the context is set to dummy "I know nothing" setting. */
void clear_outer_type (tree otr_type = NULL);
/* Use when we cannot track dynamic type change. This speculatively assume
type change is not happening. */
void possible_dynamic_type_change (bool, tree otr_type = NULL);
- /* Assume that both THIS and a given context is valid and strenghten THIS
- if possible. Return true if any strenghtening was made.
+ /* Assume that both THIS and a given context is valid and strengthen THIS
+ if possible. Return true if any strengthening was made.
If actual type the context is being used in is known, OTR_TYPE should be
set accordingly. This improves quality of combined result. */
bool combine_with (ipa_polymorphic_call_context, tree otr_type = NULL);
int param_index;
/* ECF flags determined from the caller. */
int ecf_flags;
- /* Profile_id of common target obtrained from profile. */
+ /* Profile_id of common target obtained from profile. */
int common_target_id;
/* Probability that call will land in function with COMMON_TARGET_ID. */
int common_target_probability;
void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect,
ipa_ref *&reference);
- /* 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.
It is up to caller to redirect the call as appropriate. */
cgraph_edge *resolve_speculation (tree callee_decl = NULL);
to a same call statement:
1) a direct call (to expected_fn)
2) an indirect call (to call_target)
- 3) a IPA_REF_ADDR refrence to expected_fn.
+ 3) a IPA_REF_ADDR reference to expected_fn.
Optimizers may later redirect direct call to clone, so 1) and 3)
- do not need to necesarily agree with destination. */
+ do not need to necessarily agree with destination. */
unsigned int speculative : 1;
/* Set to true when caller is a constructor or destructor of polymorphic
type. */
sections can be resolved. */
void finalize_named_section_flags (void);
- /* Call calback on varpool symbol and aliases associated to varpool symbol.
+ /* Call callback on varpool symbol and aliases associated to varpool symbol.
When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
skipped. */
bool call_for_symbol_and_aliases (bool (*callback) (varpool_node *, void *),
ENUM_BITFIELD(tls_model) tls_model : 3;
/* Set if the variable is known to be used by single function only.
- This is computed by ipa_signle_use pass and used by late optimizations
+ This is computed by ipa_single_use pass and used by late optimizations
in places where optimization would be valid for local static variable
if we did not do any inter-procedural code movement. */
unsigned used_by_single_function : 1;
return p && p->type == SYMTAB_FUNCTION;
}
-/* Report whether or not THIS symtab node is a vriable, aka varpool_node. */
+/* Report whether or not THIS symtab node is a variable, aka varpool_node. */
template <>
template <>
/* 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
- in order to do the fixups, but ipa-ref is not PCH safe. Consequentely we
- first produce aliases without links, but once C++ FE is sure he won't sream
- PCH we build the links via this function. */
+ 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 it won't
+ stream PCH we build the links via this function. */
void process_same_body_aliases (void);
/* Perform simple optimizations based on callgraph. */
/* Arrange node to be first in its entry of assembler_name_hash. */
void symtab_prevail_in_asm_name_hash (symtab_node *node);
- /* Initalize asm name hash unless. */
+ /* Initialize asm name hash unless. */
void symtab_initialize_asm_name_hash (void);
/* Set the DECL_ASSEMBLER_NAME and update symtab hashtables. */
bool cpp_implicit_aliases_done;
- /* Hash table used to hold sectoons. */
+ /* Hash table used to hold sections. */
hash_table<section_name_hasher> *GTY(()) section_hash;
/* Hash table used to convert assembler names into nodes. */
/* List of hooks triggered when an edge is removed. */
cgraph_edge_hook_list * GTY((skip)) m_first_edge_removal_hook;
- /* List of hooks triggem_red when a cgraph node is removed. */
+ /* List of hooks trigger_red when a cgraph node is removed. */
cgraph_node_hook_list * GTY((skip)) m_first_cgraph_removal_hook;
/* List of hooks triggered when an edge is duplicated. */
cgraph_2edge_hook_list * GTY((skip)) m_first_edge_duplicated_hook;
}
/* Return true if DECL should have entry in symbol table if used.
- Those are functions and static & external veriables*/
+ Those are functions and static & external variables. */
static inline bool
decl_in_symtab_p (const_tree decl)
return dyn_cast <varpool_node *> (this)->get_availability (ref);
}
-/* Call calback on symtab node and aliases associated to this node.
+/* Call callback on symtab node and aliases associated to this node.
When INCLUDE_OVERWRITABLE is false, overwritable symbols are skipped. */
inline bool
return false;
}
-/* Call calback on varpool symbol and aliases associated to varpool symbol.
+/* Call callback on varpool symbol and aliases associated to varpool symbol.
When INCLUDE_OVERWRITABLE is false, overwritable symbols are
skipped. */
return false;
}
-/* Return true if refernece may be used in address compare. */
+/* Return true if reference may be used in address compare. */
inline bool
ipa_ref::address_matters_p ()
speculative_maybe_derived_type = false;
}
-/* Produce context specifying all derrived types of OTR_TYPE. If OTR_TYPE is
+/* Produce context specifying all derived types of OTR_TYPE. If OTR_TYPE is
NULL, the context is set to dummy "I know nothing" setting. */
inline void
along with GCC; see the file COPYING3. If not see
<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,
such as replacement of parameters.
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
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.
If the new node is being inlined into another one, NEW_INLINED_TO should be
{
/* Redirect calls to the old version node to point to its new
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
|| !fndecl_built_in_p (e->callee->decl, BUILT_IN_UNREACHABLE))
e->redirect_callee_duplicating_thunks (new_node);
a) early optimizations. These are local passes executed in
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
propagation across the callgraph is done i.e. to discover
functions without side effects and simple inlining is performed.
b) early small interprocedural passes.
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.
c) IP analysis stage. All interprocedural passes do their
IP propagation. This is done based on the earlier analysis
without having function bodies at hand.
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)
2) Virtual clone materialization
(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
manipulating their bodies by creating virtual clones in
the callgraph. At this time the virtual clones are
{
bool summaried_computed = ipa_fn_summaries != NULL;
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.
Just throw away whatever it did. */
if (!summaried_computed)
/* 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
- in order to do the fixups, but ipa-ref is not PCH safe. Consequentely we
- first produce aliases without links, but once C++ FE is sure he won't sream
+ 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 stream
PCH we build the links via this function. */
void
node->no_reorder = true;
if (TREE_THIS_VOLATILE (decl) || DECL_PRESERVE_P (decl)
/* 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)
&& !DECL_ARTIFICIAL (node->decl)))
node->force_output = true;
/* EDGE is an polymorphic call. Mark all possible targets as reachable
and if there is only one target, perform trivial devirtualization.
REACHABLE_CALL_TARGETS collects target lists we already walked to
- avoid udplicate work. */
+ avoid duplicate work. */
static void
walk_polymorphic_call_targets (hash_set<void *> *reachable_call_targets,
|| opt_for_fn (edge->callee->decl, optimize)
/* Weakrefs needs to be preserved. */
|| edge->callee->alias
- /* always_inline functions are inlined aven at -O0. */
+ /* always_inline functions are inlined even at -O0. */
|| lookup_attribute
("always_inline",
DECL_ATTRIBUTES (edge->callee->decl))
{
next = node->next;
/* 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
during its construction. */
if (TREE_CODE (node->decl) == VAR_DECL
greturn *ret;
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. */
if (in_lto_p && !force_gimple_thunk)
get_untransformed_body ();
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. */
if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl))
&& (!is_gimple_reg_type (TREE_TYPE (resdecl))
if (cfun)
pop_cfun ();
- /* It would make a lot more sense to output thunks before function body to get more
- forward and lest backwarding jumps. This however would need solving problem
- with comdats. See PR48668. Also aliases must come after function itself to
- make one pass assemblers, like one on AIX, happy. See PR 50689.
- FIXME: Perhaps thunks should be move before function IFF they are not in comdat
- groups. */
+ /* It would make a lot more sense to output thunks before function body to
+ get more forward and fewer backward jumps. This however would need
+ solving problem with comdats. See PR48668. Also aliases must come after
+ function itself to make one pass assemblers, like one on AIX, happy.
+ See PR 50689.
+ FIXME: Perhaps thunks should be move before function IFF they are not in
+ comdat groups. */
assemble_thunks_and_aliases ();
release_body ();
/* Eliminate all call edges. This is important so the GIMPLE_CALL no longer
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. */
static int
/* When weakref support is missing, we automatically translate all
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.
Set up this mapping before we output any assembler but once we are sure
that all symbol renaming is done.
- FIXME: All this uglyness can go away if we just do renaming at gimple
- level by physically rewritting the IL. At the moment we can only redirect
+ FIXME: All this ugliness can go away if we just do renaming at gimple
+ level by physically rewriting the IL. At the moment we can only redirect
calls, so we need infrastructure for renaming references as well. */
#ifndef ASM_OUTPUT_WEAKREF
symtab_node *node;
{
/* Type that a potential replacement should have. This field only has
meaning in the summary building and transformation phases, when it is
- reconstructoed from the body. Must not be touched in IPA analysys
+ reconstructed from the body. Must not be touched in IPA analysis
stage. */
tree type;
unsigned reverse : 1;
};
-/* This structure has the same purpose as the one above and additoonally it
+/* This structure has the same purpose as the one above and additionally it
contains some fields that are only necessary in the summary generation
phase. */
/* Type that a potential replacement should have. This field only has
meaning in the summary building and transformation phases, when it is
- reconstructoed from the body. Must not be touched in IPA analysys
+ reconstructed from the body. Must not be touched in IPA analysis
stage. */
tree type;
- /* Alias refrerence type to be used in MEM_REFs when adjusting caller
+ /* Alias reference type to be used in MEM_REFs when adjusting caller
arguments. */
tree alias_ptr_type;
/* Number of accesses in the access tree rooted in field accesses. */
unsigned access_count;
- /* If the below is non-zero, this is the nuber of uses as actual arguents. */
+ /* If the below is non-zero, this is the number of uses as actual arguments. */
int call_uses;
/* Number of times this parameter has been directly passed to. */
unsigned ptr_pt_count;
bool locally_unused;
/* An aggregate that is a candidate for breaking up or a pointer passing data
by reference that is a candidate for being converted to a set of
- parameters passing thosa data by value. */
+ parameters passing those data by value. */
bool split_candidate;
/* Is this a parameter passing stuff by reference? */
bool by_ref;
int deref_index;
};
-/* Properly deallocate accesses of DESC. TODO: Since this data strucutre is
+/* Properly deallocate accesses of DESC. TODO: Since this data structure is
not in GC memory, this is not necessary and we can consider removing the
function. */
}
/* Class used to convey information about functions from the
- intra-procedurwl analysis stage to inter-procedural one. */
+ intra-procedural analysis stage to inter-procedural one. */
class GTY((for_user)) isra_func_summary
{
~isra_func_summary ();
- /* Mark the function as not a candidate for any IPA-SRA transofrmation.
+ /* Mark the function as not a candidate for any IPA-SRA transformation.
Return true if it was a candidate until now. */
bool zap ();
unsigned m_queued : 1;
};
-/* Claen up and deallocate isra_func_summary points to. TODO: Since this data
- strucutre is not in GC memory, this is not necessary and we can consider
+/* Clean up and deallocate isra_func_summary points to. TODO: Since this data
+ structure is not in GC memory, this is not necessary and we can consider
removing the destructor. */
isra_func_summary::~isra_func_summary ()
}
-/* Mark the function as not a candidate for any IPA-SRA transofrmation. Return
+/* Mark the function as not a candidate for any IPA-SRA transformation. Return
true if it was a candidate until now. */
bool
If aggregate_pass_through or pointer_pass_through below are true, it must
contain exactly one element which is passed through from a formal
parameter if the given number. Otherwise, the array contains indices of
- collee's formal parameters which are used to calculate value of this
+ callee's formal parameters which are used to calculate value of this
actual argument. */
unsigned char inputs[IPA_SRA_MAX_PARAM_FLOW_LEN];
unsigned safe_to_import_accesses : 1;
};
-/* Strucutre used to convey information about calls from the intra-procedurwl
+/* Structure used to convey information about calls from the intra-procedural
analysis stage to inter-procedural one. */
class isra_call_summary
void dump (FILE *f);
/* Information about what formal parameters of the caller are used to compute
- indivisual actual arguments of this call. */
+ individual actual arguments of this call. */
auto_vec <isra_param_flow> m_arg_flow;
/* Set to true if the call statement does not have a LHS. */
}
}
-/* Duplicate edge summare when an edge is cloned. */
+/* Duplicate edge summary when an edge is cloned. */
void
ipa_sra_call_summaries::duplicate (cgraph_edge *, cgraph_edge *,
hash_map<tree, gensum_param_desc *> *decl2desc;
-/* Countdown of allowe Alias analysis steps during summary building. */
+/* Countdown of allowed Alias analysis steps during summary building. */
int aa_walking_limit;
dump_gensum_access (f, acc, 2);
}
-/* Dump all parameter descriptors in IFS, assuming it describes FNDECl, to
+/* Dump all parameter descriptors in IFS, assuming it describes FNDECL, to
F. */
static void
}
}
-/* Dump all parameter descriptors in IFS, assuming it describes FNDECl, to
+/* Dump all parameter descriptors in IFS, assuming it describes FNDECL, to
F. */
static void
/* Return an access describing memory access to the variable described by DESC
at OFFSET with SIZE in context CTX, starting at pointer to the linked list
- at a certaint tree level FIRST. Attempt to create it and put into the
+ at a certain tree level FIRST. Attempt to create it and put into the
appropriate place in the access tree if does not exist, but fail and return
NULL if there are already too many accesses, if it would create a partially
- overlapping access or if an access would end up withiin a pre-existing
+ overlapping access or if an access would end up within a pre-existing
non-call access. */
static gensum_param_access *
at OFFSET with SIZE in context CTX, mark it as used in context CTX. Attempt
to create if it does not exist, but fail and return NULL if there are
already too many accesses, if it would create a partially overlapping access
- or if an access woule end up in a non-call access. */
+ or if an access would end up in a non-call access. */
static gensum_param_access *
get_access (gensum_param_desc *desc, HOST_WIDE_INT offset, HOST_WIDE_INT size,
}
/* Verify that parameter access tree starting with ACCESS is in good shape.
- PARENT_OFFSET and PARENT_SIZE are the ciorresponding fields of parent of
+ PARENT_OFFSET and PARENT_SIZE are the corresponding fields of parent of
ACCESS or zero if there is none. */
static bool
}
/* When scanning an expression which is a call argument, this structure
- specifies the call and the position of the agrument. */
+ specifies the call and the position of the argument. */
struct scan_call_info
{
/* Analyze expression EXPR from GIMPLE for accesses to parameters. CTX
specifies whether EXPR is used in a load, store or as an argument call. BB
must be the basic block in which expr resides. If CTX specifies call
- arguemnt context, CALL_INFO must describe tha call and argument position,
+ argument context, CALL_INFO must describe that call and argument position,
otherwise it is ignored. */
static void
}
else
/* Pointer parameters with direct uses should have been ruled out by
- analyzing SSA default def when looking at the paremeters. */
+ analyzing SSA default def when looking at the parameters. */
gcc_assert (!desc->by_ref);
gensum_param_access *access = get_access (desc, offset, size, ctx);
{
/* We need the same aggregate type on all accesses to be able to
distinguish transformation spots from pass-through arguments in
- the transofrmation phase. */
- disqualify_split_candidate (desc, "We do not support aggegate "
+ the transformation phase. */
+ disqualify_split_candidate (desc, "We do not support aggregate "
"type punning.");
return;
}
offset in this function at IPA level.
TODO: Measure the overhead and the effect of just being pessimistic.
- Maybe this is ony -O3 material?
+ Maybe this is only -O3 material?
*/
bool pdoms_calculated = false;
if (check_pass_throughs)
/* TODO: Add early exit if we disqualified everything. This also requires
that we either relax the restriction that
- ipa_param_adjustments.m_always_copy_start mut be the number of PARM_DECLs
+ ipa_param_adjustments.m_always_copy_start must be the number of PARM_DECLs
or store the number of parameters to IPA-SRA function summary and use that
when just removing params. */
}
/* Return true if there are any overlaps among certain accesses of DESC. If
- non-NULL, set *CERTAIN_ACCESS_PRESENT_P upon encountering a certain accesss
+ non-NULL, set *CERTAIN_ACCESS_PRESENT_P upon encountering a certain access
too. DESC is assumed to be a split candidate that is not locally
unused. */
return;
}
-/* Write intraproceural analysis information about E and all of its outgoing
+/* Write intraprocedural analysis information about E and all of its outgoing
edges into a stream for LTO WPA. */
static void
streamer_write_bitpack (&bp);
}
-/* Write intraproceural analysis information about NODE and all of its outgoing
+/* Write intraprocedural analysis information about NODE and all of its outgoing
edges into a stream for LTO WPA. */
static void
isra_write_edge_summary (ob, e);
}
-/* Write intraproceural analysis information into a stream for LTO WPA. */
+/* Write intraprocedural analysis information into a stream for LTO WPA. */
static void
ipa_sra_write_summary (void)
destroy_output_block (ob);
}
-/* Read intraproceural analysis information about E and all of its outgoing
+/* Read intraprocedural analysis information about E and all of its outgoing
edges into a stream for LTO WPA. */
static void
csum->m_bit_aligned_arg = bp_unpack_value (&bp, 1);
}
-/* Read intraproceural analysis information about NODE and all of its outgoing
+/* Read intraprocedural analysis information about NODE and all of its outgoing
edges into a stream for LTO WPA. */
static void
lto_data_in_delete (data_in);
}
-/* Read intraproceural analysis information into a stream for LTO WPA. */
+/* Read intraprocedural analysis information into a stream for LTO WPA. */
static void
ipa_sra_read_summary (void)
TODO: We could only prevent splitting the problematic parameters if
anybody thinks it is worth it. */
if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "A call of %s has bit-alinged aggregate argument,"
+ fprintf (dump_file, "A call of %s has bit-aligned aggregate argument,"
" disabling parameter splitting.\n", node->dump_name ());
isra_func_summary *ifs = func_sums->get (node);
/* Propagate parameter splitting information through call graph edge CS.
Return true if any changes that might need to be propagated within SCCs have
been made. The function also clears the aggregate_pass_through and
- pointer_pass_through in call summarries which do not need to be processed
+ pointer_pass_through in call summaries which do not need to be processed
again if this CS is revisited when iterating while changes are propagated
within an SCC. */
}
-/* Do finall processing of results of IPA propagation regarding NODE, clone it
+/* Do final processing of results of IPA propagation regarding NODE, clone it
if appropriate. */
static void
insert_to_assembler_name_hash (node, false);
}
-/* Initalize asm name hash unless. */
+/* Initialize asm name hash unless. */
void
symbol_table::symtab_initialize_asm_name_hash (void)
}
/* 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. */
ipa_ref *
/* 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). */
ipa_ref *
}
/* 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
with callgraph edges associated with them. */
availability prevails the availability of its target (i.e. static alias of
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
inherits the visibility of its target.
Weakref is a different animal (and noweak definition is weak).
h->init = priority;
}
-/* Set fialization priority to PRIORITY. */
+/* Set finalization priority to PRIORITY. */
void
cgraph_node::set_fini_priority (priority_type priority)
symtab_node::get_partitioning_class (void)
{
/* Inline clones are always duplicated.
- This include external delcarations. */
+ This include external declarations. */
cgraph_node *cnode = dyn_cast <cgraph_node *> (this);
if (DECL_ABSTRACT_P (decl))
If MEMORY_ACCESSED is true, assume that both memory pointer to THIS
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. */
int
symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed)
code and are used only within speculation. In this case we may make
symbol equivalent to its alias even if interposition may break this
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)
binds_local1 = true;
if (DECL_VIRTUAL_P (s2->decl) && avail2 >= AVAIL_AVAILABLE)
/* TODO: Alias oracle basically assume that addresses of global variables
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
the moment return false only when we are called from the alias oracle. */
}
/* 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
- bring unnecesary object files into the final link.
+ down the references to libraries bit more because linker will otherwise
+ bring unnecessary object files into the final link.
FIXME: The following checks can easily be confused i.e. by self recursive
function or self-referring variable. */
tree adj = fold_build2_loc (loc, MINUS_EXPR,
TREE_TYPE (lhs), lhs, old);
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. */
wide_int min = wi::to_wide (old);
wide_int max
strinfo *chainsi;
/* 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
stpcpy and subtracting dst from the return value. */
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.
Otherwise go on to see if it should be diagnosed for possible
truncation. */
}
/* 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). */
stridx_strlenloc *pss = strlen_to_stridx->get (len);
if (!pss || pss->first <= 0)
/* Handle a call to memset.
After a call to calloc, memset(,0,) is unnecessary.
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
handle_builtin_memset (gimple_stmt_iterator *gsi, bool *zero_write)
statement and return to signal the caller that it shouldn't
invalidate anything.
- This is benefical for cases like:
+ This is beneficial for cases like:
char p[20];
void foo (char *q)
&& debug_info_level == DINFO_LEVEL_NONE
/* When doing declaration merging we have duplicate
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. */
&& symtab->state != LTO_STREAMING)
DECL_INITIAL (decl) = error_mark_node;
overridden at link or run time.
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:
static const int dummy = 0;
extern const int foo __attribute__((__weak__, __alias__("dummy")));
return error_mark_node;
/* 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))
{
gcc_assert (!TREE_PUBLIC (decl));
bool
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. */
if (alias)
return false;
alias_node = varpool_node::create_alias (alias, decl);
alias_node->cpp_implicit_alias = true;
- /* Extra name alias mechanizm creates aliases really late
- via DECL_ASSEMBLER_NAME mechanizm.
+ /* Extra name alias mechanism creates aliases really late
+ via DECL_ASSEMBLER_NAME mechanism.
This is unfortunate because they are not going through the
standard channels. Ensure they get output. */
if (symtab->cpp_implicit_aliases_done)