ipa-modref: Fix comment typos
2020-11-06 Jakub Jelinek <jakub@redhat.com> * ipa-modref-tree.h: Fix comment typos. * ipa-modref.c: Likewise.
This commit is contained in:
parent
b92e4be3a6
commit
8a2fd716c9
|
@ -23,17 +23,17 @@ along with GCC; see the file COPYING3. If not see
|
||||||
call. For every function we collect two trees, one for loads and other
|
call. For every function we collect two trees, one for loads and other
|
||||||
for stores. Tree consist of following levels:
|
for stores. Tree consist of following levels:
|
||||||
|
|
||||||
1) Base: this level represent base alias set of the acecess and refers
|
1) Base: this level represent base alias set of the access and refers
|
||||||
to sons (ref nodes). Flag all_refs means that all possible references
|
to sons (ref nodes). Flag all_refs means that all possible references
|
||||||
are aliasing.
|
are aliasing.
|
||||||
|
|
||||||
Because for LTO streaming we need to stream types rahter than alias sets
|
Because for LTO streaming we need to stream types rather than alias sets
|
||||||
modref_base_node is implemented as a template.
|
modref_base_node is implemented as a template.
|
||||||
2) Ref: this level represent ref alias set and links to acesses unless
|
2) Ref: this level represent ref alias set and links to accesses unless
|
||||||
all_refs flag is et.
|
all_refs flag is set.
|
||||||
Again ref is an template to allow LTO streaming.
|
Again ref is an template to allow LTO streaming.
|
||||||
3) Access: this level represent info about individual accesses. Presently
|
3) Access: this level represent info about individual accesses. Presently
|
||||||
we record whether access is trhough a dereference of a function parameter
|
we record whether access is through a dereference of a function parameter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GCC_MODREF_TREE_H
|
#ifndef GCC_MODREF_TREE_H
|
||||||
|
@ -50,7 +50,7 @@ struct GTY(()) modref_access_node
|
||||||
poly_int64 size;
|
poly_int64 size;
|
||||||
poly_int64 max_size;
|
poly_int64 max_size;
|
||||||
|
|
||||||
/* Offset from parmeter pointer to the base of the access (in bytes). */
|
/* Offset from parameter pointer to the base of the access (in bytes). */
|
||||||
poly_int64 parm_offset;
|
poly_int64 parm_offset;
|
||||||
|
|
||||||
/* Index of parameter which specifies the base of access. -1 if base is not
|
/* Index of parameter which specifies the base of access. -1 if base is not
|
||||||
|
@ -240,7 +240,7 @@ struct modref_parm_map
|
||||||
{
|
{
|
||||||
/* Index of parameter we translate to.
|
/* Index of parameter we translate to.
|
||||||
-1 indicates that parameter is unknown
|
-1 indicates that parameter is unknown
|
||||||
-2 indicates that parmaeter points to local memory and access can be
|
-2 indicates that parameter points to local memory and access can be
|
||||||
discarded. */
|
discarded. */
|
||||||
int parm_index;
|
int parm_index;
|
||||||
bool parm_offset_known;
|
bool parm_offset_known;
|
||||||
|
@ -333,7 +333,7 @@ struct GTY((user)) modref_tree
|
||||||
/* If we failed to insert ref, just see if there is a cleanup possible. */
|
/* If we failed to insert ref, just see if there is a cleanup possible. */
|
||||||
if (!ref_node)
|
if (!ref_node)
|
||||||
{
|
{
|
||||||
/* No useful ref information and no useful base; collapse everyting. */
|
/* No useful ref information and no useful base; collapse everything. */
|
||||||
if (!base && base_node->every_ref)
|
if (!base && base_node->every_ref)
|
||||||
{
|
{
|
||||||
collapse ();
|
collapse ();
|
||||||
|
@ -367,7 +367,7 @@ struct GTY((user)) modref_tree
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove tree branches that are not useful (i.e. they will allways pass). */
|
/* Remove tree branches that are not useful (i.e. they will always pass). */
|
||||||
|
|
||||||
void cleanup ()
|
void cleanup ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
|
||||||
described in ipa-modref-tree.h.
|
described in ipa-modref-tree.h.
|
||||||
|
|
||||||
This file contains a tree pass and an IPA pass. Both performs the same
|
This file contains a tree pass and an IPA pass. Both performs the same
|
||||||
analys however tree pass is executed during early and late optimization
|
analysis however tree pass is executed during early and late optimization
|
||||||
passes to propagate info downwards in the compilation order. IPA pass
|
passes to propagate info downwards in the compilation order. IPA pass
|
||||||
propagates across the callgraph and is able to handle recursion and works on
|
propagates across the callgraph and is able to handle recursion and works on
|
||||||
whole program during link-time analysis.
|
whole program during link-time analysis.
|
||||||
|
@ -152,7 +152,7 @@ public:
|
||||||
static GTY(()) fast_function_summary <modref_summary *, va_gc>
|
static GTY(()) fast_function_summary <modref_summary *, va_gc>
|
||||||
*summaries;
|
*summaries;
|
||||||
|
|
||||||
/* Global variable holding all modref optimizaiton summaries
|
/* Global variable holding all modref optimization summaries
|
||||||
(from IPA propagation time or used by local optimization pass). */
|
(from IPA propagation time or used by local optimization pass). */
|
||||||
|
|
||||||
static GTY(()) fast_function_summary <modref_summary *, va_gc>
|
static GTY(()) fast_function_summary <modref_summary *, va_gc>
|
||||||
|
@ -924,7 +924,7 @@ analyze_call (modref_summary *cur_summary, modref_summary_lto *cur_summary_lto,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support analyzis in non-lto and lto mode in parallel. */
|
/* Support analysis in non-lto and lto mode in parallel. */
|
||||||
|
|
||||||
struct summary_ptrs
|
struct summary_ptrs
|
||||||
{
|
{
|
||||||
|
@ -995,10 +995,10 @@ static bool
|
||||||
analyze_stmt (modref_summary *summary, modref_summary_lto *summary_lto,
|
analyze_stmt (modref_summary *summary, modref_summary_lto *summary_lto,
|
||||||
gimple *stmt, bool ipa, vec <gimple *> *recursive_calls)
|
gimple *stmt, bool ipa, vec <gimple *> *recursive_calls)
|
||||||
{
|
{
|
||||||
/* In general we can not ignore clobbers because they are barries for code
|
/* In general we can not ignore clobbers because they are barriers for code
|
||||||
motion, however after inlining it is safe to do becuase local optimization
|
motion, however after inlining it is safe to do because local optimization
|
||||||
passes do not consider clobbers from other functions.
|
passes do not consider clobbers from other functions.
|
||||||
Similar logic is in ipa-pure-consts. */
|
Similar logic is in ipa-pure-const.c. */
|
||||||
if ((ipa || cfun->after_inlining) && gimple_clobber_p (stmt))
|
if ((ipa || cfun->after_inlining) && gimple_clobber_p (stmt))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -1121,7 +1121,7 @@ analyze_function (function *f, bool ipa)
|
||||||
summary = optimization_summaries->get_create (cgraph_node::get (f->decl));
|
summary = optimization_summaries->get_create (cgraph_node::get (f->decl));
|
||||||
gcc_checking_assert (nolto && !lto);
|
gcc_checking_assert (nolto && !lto);
|
||||||
}
|
}
|
||||||
/* In IPA mode we analyze every function precisely once. Asser that. */
|
/* In IPA mode we analyze every function precisely once. Assert that. */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (nolto)
|
if (nolto)
|
||||||
|
@ -1309,7 +1309,7 @@ modref_summaries::duplicate (cgraph_node *, cgraph_node *dst,
|
||||||
modref_summary *src_data,
|
modref_summary *src_data,
|
||||||
modref_summary *dst_data)
|
modref_summary *dst_data)
|
||||||
{
|
{
|
||||||
/* Do not duplicte optimization summaries; we do not handle parameter
|
/* Do not duplicate optimization summaries; we do not handle parameter
|
||||||
transforms on them. */
|
transforms on them. */
|
||||||
if (this == optimization_summaries)
|
if (this == optimization_summaries)
|
||||||
{
|
{
|
||||||
|
@ -1336,7 +1336,7 @@ modref_summaries_lto::duplicate (cgraph_node *, cgraph_node *,
|
||||||
modref_summary_lto *src_data,
|
modref_summary_lto *src_data,
|
||||||
modref_summary_lto *dst_data)
|
modref_summary_lto *dst_data)
|
||||||
{
|
{
|
||||||
/* Be sure that no furhter cloning happens after ipa-modref. If it does
|
/* Be sure that no further cloning happens after ipa-modref. If it does
|
||||||
we will need to update signatures for possible param changes. */
|
we will need to update signatures for possible param changes. */
|
||||||
gcc_checking_assert (!((modref_summaries_lto *)summaries_lto)->propagated);
|
gcc_checking_assert (!((modref_summaries_lto *)summaries_lto)->propagated);
|
||||||
dst_data->stores = modref_records_lto::create_ggc
|
dst_data->stores = modref_records_lto::create_ggc
|
||||||
|
@ -1934,7 +1934,7 @@ ignore_edge (struct cgraph_edge *e)
|
||||||
& (ECF_CONST | ECF_NOVOPS));
|
& (ECF_CONST | ECF_NOVOPS));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compute parm_map for CALLE_EDGE. */
|
/* Compute parm_map for CALLEE_EDGE. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
compute_parm_map (cgraph_edge *callee_edge, vec<modref_parm_map> *parm_map)
|
compute_parm_map (cgraph_edge *callee_edge, vec<modref_parm_map> *parm_map)
|
||||||
|
|
Loading…
Reference in New Issue