call. For every function we collect two trees, one for loads and other
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
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.
- 2) Ref: this level represent ref alias set and links to acesses unless
- all_refs flag is et.
+ 2) Ref: this level represent ref alias set and links to accesses unless
+ all_refs flag is set.
Again ref is an template to allow LTO streaming.
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
poly_int64 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;
/* Index of parameter which specifies the base of access. -1 if base is not
{
/* Index of parameter we translate to.
-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. */
int parm_index;
bool parm_offset_known;
/* If we failed to insert ref, just see if there is a cleanup possible. */
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)
{
collapse ();
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 ()
{
described in ipa-modref-tree.h.
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
propagates across the callgraph and is able to handle recursion and works on
whole program during link-time analysis.
static GTY(()) fast_function_summary <modref_summary *, va_gc>
*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). */
static GTY(()) fast_function_summary <modref_summary *, va_gc>
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
{
analyze_stmt (modref_summary *summary, modref_summary_lto *summary_lto,
gimple *stmt, bool ipa, vec <gimple *> *recursive_calls)
{
- /* In general we can not ignore clobbers because they are barries for code
- motion, however after inlining it is safe to do becuase local optimization
+ /* In general we can not ignore clobbers because they are barriers for code
+ motion, however after inlining it is safe to do because local optimization
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))
return true;
summary = optimization_summaries->get_create (cgraph_node::get (f->decl));
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
{
if (nolto)
modref_summary *src_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. */
if (this == optimization_summaries)
{
modref_summary_lto *src_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. */
gcc_checking_assert (!((modref_summaries_lto *)summaries_lto)->propagated);
dst_data->stores = modref_records_lto::create_ggc
& (ECF_CONST | ECF_NOVOPS));
}
-/* Compute parm_map for CALLE_EDGE. */
+/* Compute parm_map for CALLEE_EDGE. */
static bool
compute_parm_map (cgraph_edge *callee_edge, vec<modref_parm_map> *parm_map)