From: Dhruv Chawla <[email protected]>

Signed-off-by: Dhruv Chawla <[email protected]>

gcc/ChangeLog:

        * gimple-array-bounds.cc (trailing_array): Fix typos.
        * gimple-crc-optimization.cc (crc_optimization::set_defs): Likewise.
        * gimple-fold.cc (get_range_strlen): Likewise.
        (can_refer_decl_in_current_unit_p): Likewise.
        (gimple_fold_builtin_bcopy): Likewise.
        (get_range_strlen_tree): Likewise.
        (gimple_fold_builtin_stpcpy): Likewise.
        (fold_stmt_1): Likewise.
        (fold_truth_andor_for_ifcombine): Likewise.
        (gimple_fold_stmt_to_constant): Likewise.
        (fold_const_aggregate_ref): Likewise.
        (gimple_get_virt_method_for_vtable): Likewise.
        (rewrite_to_defined_unconditional): Likewise.
        (gimple_build): Likewise.
        (gimple_convert): Likewise.
        * gimple-harden-control-flow.cc 
(pass_harden_control_flow_redundancy::execute): Likewise.
        * gimple-loop-interchange.cc (loop_cand::can_interchange_p): Likewise.
        (loop_cand::analyze_lcssa_phis): Likewise.
        (should_interchange_loops): Likewise.
        * gimple-loop-jam.cc (tree_loop_unroll_and_jam): Likewise.
        * gimple-low.cc (find_assumption_locals_r): Likewise.
        * gimple-match-exports.cc (try_conditional_simplification): Likewise.
        * gimple-predicate-analysis.cc 
(find_matching_predicate_in_rest_chains): Likewise.
        (uninit_analysis::func_t::phi_arg_set): Likewise.
        (predicate::dump): Likewise.
        * gimple-predicate-analysis.h (class uninit_analysis): Likewise.
        * gimple-range-cache.cc (sbr_vector::bb_range_p): Likewise.
        (block_range_cache::set_bb_range): Likewise.
        * gimple-range-gori.cc (gori_compute::compute_operand_range): Likewise.
        (gori_stmt_info::gori_stmt_info): Likewise.
        (gori_calc_operands): Likewise.
        (gori_on_edge): Likewise.
        (gori_name_helper): Likewise.
        * gimple-range-infer.h: Likewise.
        * gimple-range-phi.cc (phi_group::phi_group): Likewise.
        (phi_group::calculate_using_modifier): Likewise.
        (phi_analyzer::operator[]): Likewise.
        * gimple-range-phi.h: Likewise.
        * gimple-range.cc (dom_ranger::range_of_stmt): Likewise.
        * gimple-ssa-isolate-paths.cc (is_addr_local): Likewise.
        (warn_return_addr_local): Likewise.
        * gimple-ssa-pta-constraints.cc (get_constraint_for_ssa_var): Likewise.
        (find_func_clobbers): Likewise.
        (create_variable_info_for): Likewise.
        (associate_varinfo_to_alias): Likewise.
        * gimple-ssa-sccopy.cc: Likewise.
        * gimple-ssa-split-paths.cc (count_stmts_in_block): Likewise.
        (poor_ifcvt_pred): Likewise.
        (is_feasible_trace): Likewise.
        * gimple-ssa-sprintf.cc (get_int_range): Likewise.
        (handle_printf_call): Likewise.
        * gimple-ssa-store-merging.cc (get_location_for_stmts): Likewise.
        * gimple-ssa-strength-reduction.cc: Likewise.
        * gimple-ssa-warn-access.cc (call_arg): Likewise.
        * gimple-ssa-warn-restrict.cc (builtin_memref::offset_out_of_bounds): 
Likewise.
        (builtin_access::overlap_size): Likewise.
        (maybe_diag_access_bounds): Likewise.
        * gimple.def (GIMPLE_PHI): Likewise.
        * gimple.h (gimple_goto_dest): Likewise.
---
 gcc/gimple-array-bounds.cc           |  2 +-
 gcc/gimple-crc-optimization.cc       |  2 +-
 gcc/gimple-fold.cc                   | 34 ++++++++++++++--------------
 gcc/gimple-harden-control-flow.cc    |  2 +-
 gcc/gimple-loop-interchange.cc       |  8 +++----
 gcc/gimple-loop-jam.cc               |  2 +-
 gcc/gimple-low.cc                    |  2 +-
 gcc/gimple-match-exports.cc          |  2 +-
 gcc/gimple-predicate-analysis.cc     |  8 +++----
 gcc/gimple-predicate-analysis.h      |  2 +-
 gcc/gimple-range-cache.cc            |  4 ++--
 gcc/gimple-range-gori.cc             | 12 +++++-----
 gcc/gimple-range-infer.h             |  6 ++---
 gcc/gimple-range-phi.cc              |  6 ++---
 gcc/gimple-range-phi.h               |  8 +++----
 gcc/gimple-range.cc                  |  2 +-
 gcc/gimple-ssa-isolate-paths.cc      |  4 ++--
 gcc/gimple-ssa-pta-constraints.cc    |  8 +++----
 gcc/gimple-ssa-sccopy.cc             |  4 ++--
 gcc/gimple-ssa-split-paths.cc        |  8 +++----
 gcc/gimple-ssa-sprintf.cc            |  4 ++--
 gcc/gimple-ssa-store-merging.cc      |  4 ++--
 gcc/gimple-ssa-strength-reduction.cc |  2 +-
 gcc/gimple-ssa-warn-access.cc        |  2 +-
 gcc/gimple-ssa-warn-restrict.cc      |  6 ++---
 gcc/gimple.def                       |  2 +-
 gcc/gimple.h                         |  2 +-
 27 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/gcc/gimple-array-bounds.cc b/gcc/gimple-array-bounds.cc
index 70360c69a83..4038b4030c4 100644
--- a/gcc/gimple-array-bounds.cc
+++ b/gcc/gimple-array-bounds.cc
@@ -167,7 +167,7 @@ trailing_array (tree arg, tree *pref)
 
 /* Acquire the upper bound and upper bound plus one for the array
    reference REF and record them into UP_BOUND and UP_BOUND_P1.
-   Set *DECL to the decl or expresssion REF refers to.  */
+   Set *DECL to the decl or expression REF refers to.  */
 
 static void
 get_up_bounds_for_array_ref (tree ref, tree *decl,
diff --git a/gcc/gimple-crc-optimization.cc b/gcc/gimple-crc-optimization.cc
index e69bc2935eb..81ea0a38119 100644
--- a/gcc/gimple-crc-optimization.cc
+++ b/gcc/gimple-crc-optimization.cc
@@ -665,7 +665,7 @@ crc_optimization::set_defs (tree name, auto_vec<gimple *> 
&use_defs,
       return true;
     }
 
-  /* Return false for other than assigment and phi statement.  */
+  /* Return false for other than assignment and phi statement.  */
   return false;
 }
 
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index 65239044255..72c9428899f 100644
--- a/gcc/gimple-fold.cc
+++ b/gcc/gimple-fold.cc
@@ -101,7 +101,7 @@ get_range_strlen (tree, bitmap, strlen_range_kind, 
c_strlen_data *, unsigned);
        in other units.  Those methods have both STATIC and EXTERNAL
        set.
      2) In WHOPR mode devirtualization might lead to reference
-       to method that was partitioned elsehwere.
+       to method that was partitioned elsewhere.
        In this case we have static VAR_DECL or FUNCTION_DECL
        that has no corresponding callgraph/varpool node
        declaring the body.
@@ -155,7 +155,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
          && (vnode = varpool_node::get (from_decl)) != NULL
          && vnode->in_other_partition))
     return true;
-  /* We are folding reference from external vtable.  The vtable may reffer
+  /* We are folding reference from external vtable.  The vtable may refer
      to a symbol keyed to other compilation unit.  The other compilation
      unit may be in separate DSO and the symbol may be hidden.  */
   if (DECL_VISIBILITY_SPECIFIED (decl)
@@ -165,7 +165,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
     return false;
   /* When function is public, we always can introduce new reference.
      Exception are the COMDAT functions where introducing a direct
-     reference imply need to include function body in the curren tunit.  */
+     reference imply need to include function body in the current unit.  */
   if (TREE_PUBLIC (decl) && !DECL_COMDAT (decl))
     return true;
   /* We have COMDAT.  We are going to check if we still have definition
@@ -1399,7 +1399,7 @@ gimple_fold_builtin_bcopy (gimple_stmt_iterator *gsi)
     return false;
 
   /* bcopy has been removed from POSIX in Issue 7 but Issue 6 specifies
-     it's quivalent to memmove (not memcpy).  Transform bcopy (src, dest,
+     it's equivalent to memmove (not memcpy).  Transform bcopy (src, dest,
      len) into memmove (dest, src, len).  */
 
   gimple *stmt = gsi_stmt (*gsi);
@@ -1848,7 +1848,7 @@ get_range_strlen_tree (tree arg, bitmap visited, 
strlen_range_kind rkind,
 }
 
 /* For an ARG referencing one or more strings, try to obtain the range
-   of their lengths, or the size of the largest array ARG referes to if
+   of their lengths, or the size of the largest array ARG refers to if
    the range of lengths cannot be determined, and store all in *PDATA.
    For an integer ARG (when RKIND == SRK_INT_VALUE), try to determine
    the maximum constant value.
@@ -1860,7 +1860,7 @@ get_range_strlen_tree (tree arg, bitmap visited, 
strlen_range_kind rkind,
    strlen_range_kind).
    Set PDATA->DECL if ARG refers to an unterminated constant array.
    On input, set ELTSIZE to 1 for normal single byte character strings,
-   and either 2 or 4 for wide characer strings (the size of wchar_t).
+   and either 2 or 4 for wide character strings (the size of wchar_t).
    Return true if *PDATA was successfully populated and false otherwise.  */
 
 static bool
@@ -3288,7 +3288,7 @@ gimple_fold_builtin_stpcpy (gimple_stmt_iterator *gsi)
 
   /* Set to non-null if ARG refers to an unterminated array.  */
   c_strlen_data data = { };
-  /* The size of the unterminated array if SRC referes to one.  */
+  /* The size of the unterminated array if SRC refers to one.  */
   tree size;
   /* True if the size is exact/constant, false if it's the lower bound
      of a range.  */
@@ -6930,7 +6930,7 @@ fold_stmt_1 (gimple_stmt_iterator *gsi, bool inplace, 
tree (*valueize) (tree),
                if (is_logical_not == false)
                  gimple_assign_set_rhs_with_ops (gsi, TREE_CODE (op1), op1);
                /* Only for one-bit precision typed X the transformation
-                  !X -> ~X is valied.  */
+                  !X -> ~X is valid.  */
                else if (TYPE_PRECISION (type) == 1)
                  gimple_assign_set_rhs_with_ops (gsi, BIT_NOT_EXPR, op1);
                /* Otherwise we use !X -> X ^ 1.  */
@@ -8472,7 +8472,7 @@ fold_truth_andor_for_ifcombine (enum tree_code code, tree 
truth_type,
   /* If the mask encompassed extensions of the sign bit before
      clipping, try to include the sign bit in the test.  If we're not
      comparing with zero, don't even try to deal with it (for now?).
-     If we've already commited to a sign test, the extended (before
+     If we've already committed to a sign test, the extended (before
      clipping) mask could already be messing with it.  */
   if (ll_signbit)
     {
@@ -9847,7 +9847,7 @@ gimple_fold_stmt_to_constant (gimple *stmt, tree 
(*valueize) (tree))
    their constant initializers.  */
 
 /* See if we can find constructor defining value of BASE.
-   When we know the consructor with constant offset (such as
+   When we know the constructor with constant offset (such as
    base is array[40] and we do know constructor of array), then
    BIT_OFFSET is adjusted accordingly.
 
@@ -10523,7 +10523,7 @@ fold_const_aggregate_ref (tree t)
 /* Lookup virtual method with index TOKEN in a virtual table V
    at OFFSET.
    Set CAN_REFER if non-NULL to false if method
-   is not referable or if the virtual table is ill-formed (such as rewriten
+   is not referable or if the virtual table is ill-formed (such as rewritten
    by non-C++ produced symbol). Otherwise just return NULL in that calse.  */
 
 tree
@@ -10552,7 +10552,7 @@ gimple_get_virt_method_for_vtable (HOST_WIDE_INT token,
   init = ctor_for_folding (v);
 
   /* The virtual tables should always be born with constructors
-     and we always should assume that they are avaialble for
+     and we always should assume that they are available for
      folding.  At the moment we do not stream them in all cases,
      but it should never happen that ctor seem unreachable.  */
   gcc_assert (init);
@@ -10584,7 +10584,7 @@ gimple_get_virt_method_for_vtable (HOST_WIDE_INT token,
   gcc_checking_assert (offset % (elt_size * BITS_PER_UNIT) == 0);
 
   /* This code makes an assumption that there are no
-     indexed fileds produced by C++ FE, so we can directly index the array.  */
+     indexed fields produced by C++ FE, so we can directly index the array.  */
   if (access_index < CONSTRUCTOR_NELTS (init))
     {
       fn = CONSTRUCTOR_ELT (init, access_index)->value;
@@ -10634,7 +10634,7 @@ gimple_get_virt_method_for_vtable (HOST_WIDE_INT token,
    KNOWN_BINFO carries the binfo describing the true type of
    OBJ_TYPE_REF_OBJECT(REF).
    Set CAN_REFER if non-NULL to false if method
-   is not referable or if the virtual table is ill-formed (such as rewriten
+   is not referable or if the virtual table is ill-formed (such as rewritten
    by non-C++ produced symbol). Otherwise just return NULL in that calse.  */
 
 tree
@@ -10867,7 +10867,7 @@ rewrite_to_defined_unconditional (gimple_stmt_iterator 
*gsi, gimple *stmt,
   gcc_assert (gimple_needing_rewrite_undefined (stmt));
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
-      fprintf (dump_file, "rewriting stmt for being uncondtional defined");
+      fprintf (dump_file, "rewriting stmt for being unconditional defined");
       print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
     }
   gimple_seq stmts = NULL;
@@ -11311,7 +11311,7 @@ gimple_build (gimple_stmt_iterator *gsi,
 }
 
 /* Build the conversion (TYPE) OP with a result of type TYPE
-   with location LOC if such conversion is neccesary in GIMPLE,
+   with location LOC if such conversion is necessary in GIMPLE,
    simplifying it first.
    Returns the built expression inserting any new statements
    at GSI honoring BEFORE and UPDATE.  */
@@ -11328,7 +11328,7 @@ gimple_convert (gimple_stmt_iterator *gsi,
 
 /* Build the conversion (ptrofftype) OP with a result of a type
    compatible with ptrofftype with location LOC if such conversion
-   is neccesary in GIMPLE, simplifying it first.
+   is necessary in GIMPLE, simplifying it first.
    Returns the built expression value inserting any new statements
    at GSI honoring BEFORE and UPDATE.  */
 
diff --git a/gcc/gimple-harden-control-flow.cc 
b/gcc/gimple-harden-control-flow.cc
index 39863af3e14..356bb4b799e 100644
--- a/gcc/gimple-harden-control-flow.cc
+++ b/gcc/gimple-harden-control-flow.cc
@@ -1527,7 +1527,7 @@ pass_harden_control_flow_redundancy::execute (function 
*fun)
   FOR_EACH_VEC_ELT (chk_edges, i, e)
     if (!bitmap_set_bit (combined_blocks, (*e)->src->index))
       /* There may be multiple chk_edges with the same src block;
-        guard againt overlaps with chkcall_blocks only.  */
+        guard against overlaps with chkcall_blocks only.  */
       gcc_assert (!bitmap_bit_p (chkcall_blocks, (*e)->src->index));
 
   /* Visit blocks in index order, because building rtcfg depends on
diff --git a/gcc/gimple-loop-interchange.cc b/gcc/gimple-loop-interchange.cc
index 8afb43c2505..7f8ca2f9d57 100644
--- a/gcc/gimple-loop-interchange.cc
+++ b/gcc/gimple-loop-interchange.cc
@@ -394,7 +394,7 @@ loop_cand::can_interchange_p (loop_cand *iloop)
 
      for (int i = 0; i < N; i++)
        {
-        // producer.  Note sum can be intitialized to a constant.
+        // producer.  Note sum can be initialized to a constant.
         int sum = a[i];
         for (int j = 0; j < N; j++)
           {
@@ -783,7 +783,7 @@ loop_cand::analyze_lcssa_phis (void)
 }
 
 /* CONSUMER is a stmt in BB storing reduction result into memory object.
-   When the reduction is intialized from constant value, we need to add
+   When the reduction is initialized from constant value, we need to add
    a stmt loading from the memory object to target basic block in inner
    loop during undoing the reduction.  Problem is that memory reference
    may use ssa variables not dominating the target basic block.  This
@@ -1556,9 +1556,9 @@ should_interchange_loops (unsigned i_idx, unsigned o_idx,
       fprintf (dump_file, "All consecutive stride: before(%s), after(%s)\n",
               all_seq_dr_before_p ? "true" : "false",
               all_seq_dr_after_p ? "true" : "false");
-      fprintf (dump_file, "OK to interchage with variable strides: %d\n",
+      fprintf (dump_file, "OK to interchange with variable strides: %d\n",
               num_resolved_ok_drs);
-      fprintf (dump_file, "Not OK to interchage with variable strides: %d\n",
+      fprintf (dump_file, "Not OK to interchange with variable strides: %d\n",
               num_resolved_not_ok_drs);
       fprintf (dump_file, "Variable strides we cannot decide: %d\n",
               num_unresolved_drs);
diff --git a/gcc/gimple-loop-jam.cc b/gcc/gimple-loop-jam.cc
index ae3655200a4..2c4162d17a2 100644
--- a/gcc/gimple-loop-jam.cc
+++ b/gcc/gimple-loop-jam.cc
@@ -552,7 +552,7 @@ tree_loop_unroll_and_jam (void)
        {
          struct data_reference *dra, *drb;
 
-         /* If the refs are independend there's nothing to do.  */
+         /* If the refs are independent there's nothing to do.  */
          if (DDR_ARE_DEPENDENT (ddr) == chrec_known)
            continue;
 
diff --git a/gcc/gimple-low.cc b/gcc/gimple-low.cc
index d8e14a597b4..5915d7234e0 100644
--- a/gcc/gimple-low.cc
+++ b/gcc/gimple-low.cc
@@ -402,7 +402,7 @@ find_assumption_locals_r (gimple_stmt_iterator *gsi_p, bool 
*,
   return NULL_TREE;
 }
 
-/* Create a new PARM_DECL that is indentical in all respect to DECL except that
+/* Create a new PARM_DECL that is identical in all respect to DECL except that
    DECL can be either a VAR_DECL, a PARM_DECL or RESULT_DECL.  The original
    DECL must come from ID->src_fn and the copy will be part of ID->dst_fn.  */
 
diff --git a/gcc/gimple-match-exports.cc b/gcc/gimple-match-exports.cc
index 5fd1baba7a4..3da95589d68 100644
--- a/gcc/gimple-match-exports.cc
+++ b/gcc/gimple-match-exports.cc
@@ -415,7 +415,7 @@ try_conditional_simplification (internal_fn ifn, 
gimple_match_op *res_op,
 
   unsigned int num_ops = res_op->num_ops;
   /* num_cond_ops = 2 for COND_ADD (MASK and ELSE)
-     wheras num_cond_ops = 4 for COND_LEN_ADD (MASK, ELSE, LEN and BIAS).  */
+     whereas num_cond_ops = 4 for COND_LEN_ADD (MASK, ELSE, LEN and BIAS).  */
   unsigned int num_cond_ops = len_index < 0 ? 2 : 4;
   tree else_value
     = len_index < 0 ? res_op->ops[num_ops - 1] : res_op->ops[num_ops - 3];
diff --git a/gcc/gimple-predicate-analysis.cc b/gcc/gimple-predicate-analysis.cc
index 3df0c11070a..44ce0765b2d 100644
--- a/gcc/gimple-predicate-analysis.cc
+++ b/gcc/gimple-predicate-analysis.cc
@@ -209,7 +209,7 @@ static bool
 find_matching_predicate_in_rest_chains (const pred_info &pred,
                                        const pred_chain_union &preds)
 {
-  /* Trival case.  */
+  /* Trivial case.  */
   if (preds.length () == 1)
     return true;
 
@@ -243,7 +243,7 @@ find_matching_predicate_in_rest_chains (const pred_info 
&pred,
    is no predicate of the "FLAG_VAR CMP CONST" form, try to find one
    of that's the form "FLAG_VAR CMP FLAG_VAR" with value range info.
    PHI is the phi node whose incoming (interesting) paths need to be
-   examined.  On success, return the comparison code, set defintion
+   examined.  On success, return the comparison code, set definition
    gimple of FLAG_DEF and BOUNDARY_CST.  Otherwise return ERROR_MARK.
    I is the running iterator so the function can be called repeatedly
    to gather all candidates.  */
@@ -550,7 +550,7 @@ uninit_analysis::func_t::phi_arg_set (gphi *phi)
 }
 
 /* Determine if the predicate set of the use does not overlap with that
-   of the interesting paths.  The most common senario of guarded use is
+   of the interesting paths.  The most common scenario of guarded use is
    in Example 1:
      Example 1:
           if (some_cond)
@@ -1980,7 +1980,7 @@ predicate::dump (FILE *f, gimple *stmt, const char *msg) 
const
 }
 
 /* Initialize USE_PREDS with the predicates of the control dependence chains
-   between the basic block DEF_BB that defines a variable of interst and
+   between the basic block DEF_BB that defines a variable of interest and
    USE_BB that uses the variable, respectively.  */
 
 bool
diff --git a/gcc/gimple-predicate-analysis.h b/gcc/gimple-predicate-analysis.h
index 218b34ffdda..e2d2fd25d15 100644
--- a/gcc/gimple-predicate-analysis.h
+++ b/gcc/gimple-predicate-analysis.h
@@ -125,7 +125,7 @@ class uninit_analysis
 
     /* Return a bitset of PHI arguments of interest.  By default returns
        bitset with a bit set for each argument.  Should be called in
-       the overriden function first and, if nonzero, the result then
+       the overridden function first and, if nonzero, the result then
        refined as appropriate.  */
     virtual phi_arg_set_t phi_arg_set (gphi *);
 
diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc
index f3aa256acb0..f348f391b5f 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -185,7 +185,7 @@ sbr_vector::bb_range_p (const_basic_block bb)
   return false;
 }
 
-// Like an sbr_vector, except it uses a bitmap to manage whetehr  vale is set
+// Like an sbr_vector, except it uses a bitmap to manage whether  vale is set
 // or not rather than cleared memory.
 
 class sbr_lazy_vector : public sbr_vector
@@ -404,7 +404,7 @@ block_range_cache::set_bb_range (tree name, 
const_basic_block bb,
        }
       else if (last_basic_block_for_fn (cfun) < param_vrp_vector_threshold)
        {
-         // For small CFGs use the basic vector implemntation.
+         // For small CFGs use the basic vector implementation.
          void *r = m_range_allocator->alloc (sizeof (sbr_vector));
          m_ssa_ranges[v] = new (r) sbr_vector (TREE_TYPE (name),
                                                m_range_allocator);
diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc
index 939798c9d71..1b75ca185e2 100644
--- a/gcc/gimple-range-gori.cc
+++ b/gcc/gimple-range-gori.cc
@@ -657,7 +657,7 @@ gori_compute::compute_operand_range (vrange &r, gimple 
*stmt,
   tree op1 = gimple_range_ssa_p (handler.operand1 ());
   tree op2 = gimple_range_ssa_p (handler.operand2 ());
 
-  // If there is a relation betwen op1 and op2, use it instead as it is
+  // If there is a relation between op1 and op2, use it instead as it is
   // likely to be more applicable.
   if (op1 && op2)
     {
@@ -1596,7 +1596,7 @@ gori_stmt_info::gori_stmt_info (vrange &lhs, gimple 
*stmt, range_query *q)
       src.get_operand (op1_range, op1);
     }
 
-  // And satisfy the second operand for single op satements.
+  // And satisfy the second operand for single op statements.
   if (op2)
     {
       op2_range.set_range_class (TREE_TYPE (op2));
@@ -1632,7 +1632,7 @@ gori_calc_operands (vrange &lhs, gimple *stmt, ssa_cache 
&r, range_query *q)
        {
          r.set_range (si.ssa1, si.op1_range);
          gimple *src = SSA_NAME_DEF_STMT (si.ssa1);
-         // If defintion is in the same basic lock, evaluate it.
+         // If definition is in the same basic block, evaluate it.
          if (src && gimple_bb (src) == gimple_bb (stmt))
            gori_calc_operands (si.op1_range, src, r, q);
        }
@@ -1654,7 +1654,7 @@ gori_calc_operands (vrange &lhs, gimple *stmt, ssa_cache 
&r, range_query *q)
 }
 
 // Use ssa_cache R as a repository for all outgoing ranges on edge E that
-// can be calculated.  Use Q to establish starting edge ranges anbd to resolve
+// can be calculated.  Use Q to establish starting edge ranges and to resolve
 // operand values.  If Q is NULL use the current range
 // query available to the system.
 
@@ -1676,7 +1676,7 @@ gori_on_edge (ssa_cache &r, edge e, range_query *q)
 
 // Helper for GORI_NAME_ON_EDGE which uses query Q to determine if STMT
 // provides a range for NAME, and returns it in R if so. If it does not,
-// continue processing feeding statments until we run out of statements
+// continue processing feeding statements until we run out of statements
 // or fine a range for NAME.
 
 bool
@@ -1701,7 +1701,7 @@ gori_name_helper (vrange &r, tree name, vrange &lhs, 
gimple *stmt,
       if (si.calc_op1 (tmp, lhs, si.op2_range))
        si.op1_range.intersect (tmp);
       gimple *src = SSA_NAME_DEF_STMT (si.ssa1);
-      // If defintion is in the same basic lock, evaluate it.
+      // If definition is in the same basic block, evaluate it.
       if (src && gimple_bb (src) == gimple_bb (stmt))
        if (gori_name_helper (r, name, si.op1_range, src, q))
          return true;
diff --git a/gcc/gimple-range-infer.h b/gcc/gimple-range-infer.h
index bb38685e076..e2adeec8edf 100644
--- a/gcc/gimple-range-infer.h
+++ b/gcc/gimple-range-infer.h
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3.  If not see
 //      read-only query and prevents any additional lookup.
 //   USE_RANGEOPS is a boolean flag which defaults to false.  if TRUE,
 //      range-ops is invoked to see if any additional side effects are seen
-//      based on the stmt.  ie .x = y * 2 will reigster a side effect for Y
+//      based on the stmt.  ie .x = y * 2 will register a side effect for Y
 //      which is [-INF/2 , +INF/2].  It is not on by default because it
 //      is a relatively expensive operation to do on every statement, and
 //      ranger will already incorporate that range for Y via GORI most of the
@@ -78,7 +78,7 @@ private:
   friend class non_null_wrapper;
 };
 
-// This is the basic infer oracle API.  Default functionaility does nothing.
+// This is the basic infer oracle API.  Default functionality does nothing.
 
 class infer_range_oracle
 {
@@ -101,7 +101,7 @@ public:
 // will want to use. Ranger invokes it with the cache's internal query which
 // can provide better ranges during a DOM walk.
 //
-// add_ranges is used to add inferred range IR assocaited with stmt S.
+// add_ranges is used to add inferred range IR associated with stmt S.
 // has_range_p is used to check if NAME has an inferred range in block BB.
 // maybe_adjust_range will adjust the range R to incorporate any inferred
 //   range NAME may have in block BB.  If there are on inferred ranges in
diff --git a/gcc/gimple-range-phi.cc b/gcc/gimple-range-phi.cc
index 66f9cb674d0..07a0d9aa843 100644
--- a/gcc/gimple-range-phi.cc
+++ b/gcc/gimple-range-phi.cc
@@ -64,7 +64,7 @@ phi_group::phi_group (const phi_group &g)
 phi_group::phi_group (bitmap bm, irange &init_range, gimple *mod,
                      range_query *q)
 {
-  // we dont expect a modifer and no inital value, so trap to have a look.
+  // we dont expect a modifier and no initial value, so trap to have a look.
   // perhaps they are dead cycles and we can just used UNDEFINED.
   gcc_checking_assert (!init_range.undefined_p ());
   gcc_checking_assert (!init_range.varying_p ());
@@ -132,7 +132,7 @@ phi_group::calculate_using_modifier (range_query *q)
     return true;
 
   // Examine modifier and run iteration evaluations  to see if it convergences.
-  // The constructor initilaized m_vr to the initial value already.
+  // The constructor initialized m_vr to the initial value already.
   int_range_max nv;
   int_range_max iter_value = m_vr;
   int_range_max iter_reach;
@@ -352,7 +352,7 @@ phi_analyzer::operator[] (tree name)
 }
 
 // Process phi node PHI to see if it is part of a group.  Use QUERY
-// to deteremine ranges.
+// to determine ranges.
 
 void
 phi_analyzer::process_phi (gphi *phi, range_query &query)
diff --git a/gcc/gimple-range-phi.h b/gcc/gimple-range-phi.h
index ad6fa845fe5..90d33573676 100644
--- a/gcc/gimple-range-phi.h
+++ b/gcc/gimple-range-phi.h
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see
 // -------------------------------------------------------------------------
 
 // A PHI_GROUP consists of a set of SSA_NAMES which are all PHI_DEFS, and
-// their arguemnts contain nothing but other PHI defintions, with at most
+// their arguments contain nothing but other PHI definitions, with at most
 // 2 exceptions:
 //  1 - An initial value.  This is either a constant, or another non-phi name
 //      with a single incoming edge to the cycle group
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 //  to determine the other bound.
 //  All members of the PHI cycle will be given the same range.
 //
-// For example, given the follwoing sequences:
+// For example, given the following sequences:
 // qa_20 = qa_10 + 1;
 // qa_9 = PHI <qa_10(3), qa_20(4)>
 // qa_10 = PHI <0(2), qa_9(5)>
@@ -68,8 +68,8 @@ protected:
   friend class phi_analyzer;
 };
 
-// The phi anlyzer will return the group that name belongs to.
-// If inforamtion is not known about a name yet, analysis is conducted by
+// The phi analyzer will return the group that name belongs to.
+// If information is not known about a name yet, analysis is conducted by
 // looking at the arguments to PHIS and following them to their defs to
 // determine whether the conditions are met to form a new group.
 
diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc
index a65d626b43c..bc3eaf9efda 100644
--- a/gcc/gimple-range.cc
+++ b/gcc/gimple-range.cc
@@ -893,7 +893,7 @@ dom_ranger::range_of_stmt (vrange &r, gimple *s, tree name)
 // Preprocess block BB.  If there is a single predecessor, start with any
 // contextual ranges on the incoming edge, otherwise the initial list
 // of ranges i empty for this block.  Then Merge in any contextual ranges
-// from the dominator block.  Tihs will become the contextual ranges
+// from the dominator block.  This will become the contextual ranges
 // that apply to this block.
 
 void
diff --git a/gcc/gimple-ssa-isolate-paths.cc b/gcc/gimple-ssa-isolate-paths.cc
index 4c5b70d108a..9d359ef84e6 100644
--- a/gcc/gimple-ssa-isolate-paths.cc
+++ b/gcc/gimple-ssa-isolate-paths.cc
@@ -595,7 +595,7 @@ is_addr_local (gimple *return_stmt, tree exp, locmap_t 
*plocmap,
    and argument ARG and PHI edge E in basic block BB.  Add an entry for
    each use to LOCMAP, setting its NARGS member to the NARGS argument
    (the number of PHI operands) plus the number of arguments in binary
-   expressions refereced by ARG.  Call isolate_path for each returned
+   expressions referenced by ARG.  Call isolate_path for each returned
    address and set *ISOLATED to true if called.
    Return either DUPLICATE or the most recent result of isolate_path.  */
 
@@ -859,7 +859,7 @@ warn_return_addr_local (basic_block bb, greturn 
*return_stmt)
 
   /* Bail if the statement isn't certain to return the address
      of a local (e.g., if it involves a conditional expression
-     that wasn't trasnformed into a PHI or if it involves
+     that wasn't transformed into a PHI or if it involves
      a MAX_EXPR or MIN_EXPR only one of whose operands is a local
      (even though such an expression isn't valid in C or has
      defined semantics in C++).  */
diff --git a/gcc/gimple-ssa-pta-constraints.cc 
b/gcc/gimple-ssa-pta-constraints.cc
index 900d256cb4e..bb59e533312 100644
--- a/gcc/gimple-ssa-pta-constraints.cc
+++ b/gcc/gimple-ssa-pta-constraints.cc
@@ -287,7 +287,7 @@ get_constraint_for_ssa_var (tree t, vec<ce_s> *results, 
bool address_p)
   cexpr.offset = 0;
 
   /* If we are not taking the address of the constraint expr, add all
-     sub-fiels of the variable as well.  */
+     sub-fields of the variable as well.  */
   if (!address_p
       && !vi->is_full_var)
     {
@@ -2500,7 +2500,7 @@ find_func_clobbers (struct function *fn, gimple *origt)
        }
     }
 
-  /* Account for uses in assigments and returns.  */
+  /* Account for uses in assignments and returns.  */
   if (gimple_assign_single_p (t)
       || (gimple_code (t) == GIMPLE_RETURN
          && gimple_return_retval (as_a <greturn *> (t)) != NULL_TREE))
@@ -3487,7 +3487,7 @@ static unsigned int
 create_variable_info_for (tree decl, const char *name, bool add_id)
 {
   /* First see if we are dealing with an ifunc resolver call and
-     assiociate that with a call to the resolver function result.  */
+     associate that with a call to the resolver function result.  */
   cgraph_node *node;
   if (in_ipa_mode
       && TREE_CODE (decl) == FUNCTION_DECL
@@ -3856,7 +3856,7 @@ associate_varinfo_to_alias (struct cgraph_node *node, 
void *data)
   return false;
 }
 
-/* Compute whether node is refered to non-locally.  Worker for
+/* Compute whether node is referred to non-locally.  Worker for
    cgraph_for_symbol_thunks_and_aliases.  */
 static bool
 refered_from_nonlocal_fn (struct cgraph_node *node, void *data)
diff --git a/gcc/gimple-ssa-sccopy.cc b/gcc/gimple-ssa-sccopy.cc
index 301fa5dae18..0badfb11b93 100644
--- a/gcc/gimple-ssa-sccopy.cc
+++ b/gcc/gimple-ssa-sccopy.cc
@@ -70,11 +70,11 @@ along with GCC; see the file COPYING3.  If not see
    and replace references to the statement with the value -- we propagate the
    copy.
 
-   _3 = _2; // Replace all occurences of _3 by _2
+   _3 = _2; // Replace all occurrences of _3 by _2
 
    _8 = PHI <_9, _10>;
    _9 = PHI <_8, _10>;
-   _10 = PHI <_8, _9, _1>; // Replace all occurences of _8, _9 and _10 by _1
+   _10 = PHI <_8, _9, _1>; // Replace all occurrences of _8, _9 and _10 by _1
 
    To find all three types of copy statements we use an algorithm based on
    strongly-connected components (SCCs) in dataflow graph.  The algorithm was
diff --git a/gcc/gimple-ssa-split-paths.cc b/gcc/gimple-ssa-split-paths.cc
index 2d9963b614a..171a581e8f8 100644
--- a/gcc/gimple-ssa-split-paths.cc
+++ b/gcc/gimple-ssa-split-paths.cc
@@ -130,7 +130,7 @@ count_stmts_in_block (basic_block bb)
 }
 
 /* Return TRUE if CODE represents a tree code that is not likely to
-   be easily if-convertable because it likely expands into multiple
+   be easily if-convertible because it likely expands into multiple
    insns, FALSE otherwise.  */
 static bool
 poor_ifcvt_candidate_code (enum tree_code code)
@@ -191,7 +191,7 @@ poor_ifcvt_pred (basic_block pred, basic_block bb)
      jump rather than CSE/DCE opportunities.  So favor duplicating
      small latches.  A latch with just a conditional branch is ideal.
 
-     CSE/DCE opportunties crop up when statements from the predecessors
+     CSE/DCE opportunities crop up when statements from the predecessors
      feed statements in the latch and allow statements in the latch to
      simplify.  */
 
@@ -213,7 +213,7 @@ is_feasible_trace (basic_block bb)
       if (dump_file && (dump_flags & TDF_DETAILS))
        fprintf (dump_file,
                 "Duplicating block %d would duplicate "
-                "too many statments: %d >= %d\n",
+                "too many statements: %d >= %d\n",
                 bb->index, num_stmts_in_join,
                 param_max_jump_thread_duplication_stmts);
       return false;
@@ -241,7 +241,7 @@ is_feasible_trace (basic_block bb)
          if (dump_file && (dump_flags & TDF_DETAILS))
            fprintf (dump_file,
                     "Block %d appears to be a join point for "
-                    "if-convertable bbs.\n",
+                    "if-convertible bbs.\n",
                     bb->index);
          return false;
        }
diff --git a/gcc/gimple-ssa-sprintf.cc b/gcc/gimple-ssa-sprintf.cc
index 684ffe83ff9..b4c1490ed88 100644
--- a/gcc/gimple-ssa-sprintf.cc
+++ b/gcc/gimple-ssa-sprintf.cc
@@ -1128,7 +1128,7 @@ get_int_range (tree arg, gimple *stmt,
            *pmin = *pmax = -*pmin;
          else
            {
-             /* Make sure signed overlow is avoided.  */
+             /* Make sure signed overflow is avoided.  */
              gcc_assert (*pmin != HOST_WIDE_INT_MIN);
 
              HOST_WIDE_INT tmp = -*pmin;
@@ -4401,7 +4401,7 @@ handle_printf_call (gimple_stmt_iterator *gsi, 
pointer_query &ptr_qry)
   /* Object size argument number (snprintf_chk and vsnprintf_chk).  */
   unsigned idx_objsize = UINT_MAX;
 
-  /* Destinaton argument number (valid for sprintf functions only).  */
+  /* Destination argument number (valid for sprintf functions only).  */
   unsigned idx_dstptr = 0;
 
   switch (info.fncode)
diff --git a/gcc/gimple-ssa-store-merging.cc b/gcc/gimple-ssa-store-merging.cc
index b7ebbb85ed2..96fd9fa73a3 100644
--- a/gcc/gimple-ssa-store-merging.cc
+++ b/gcc/gimple-ssa-store-merging.cc
@@ -22,7 +22,7 @@
    of constant values, values loaded from memory, bitwise operations on those,
    or bit-field values, to consecutive locations, into fewer wider stores.
 
-   For example, if we have a sequence peforming four byte stores to
+   For example, if we have a sequence performing four byte stores to
    consecutive memory locations:
    [p     ] := imm1;
    [p + 1B] := imm2;
@@ -3624,7 +3624,7 @@ get_location_for_stmts (vec<gimple *> &stmts)
   return UNKNOWN_LOCATION;
 }
 
-/* Used to decribe a store resulting from splitting a wide store in smaller
+/* Used to describe a store resulting from splitting a wide store in smaller
    regularly-sized stores in split_group.  */
 
 class split_store
diff --git a/gcc/gimple-ssa-strength-reduction.cc 
b/gcc/gimple-ssa-strength-reduction.cc
index ced2235498c..cac7a449d5a 100644
--- a/gcc/gimple-ssa-strength-reduction.cc
+++ b/gcc/gimple-ssa-strength-reduction.cc
@@ -453,7 +453,7 @@ static hash_map<tree, name_expansion *> *name_expansions;
 /* Pointer map embodying a mapping from bases to alternative bases.  */
 static hash_map<tree, tree> *alt_base_map;
 
-/* Given BASE, use the tree affine combiniation facilities to
+/* Given BASE, use the tree affine combination facilities to
    find the underlying tree expression for BASE, with any
    immediate offset excluded.
 
diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc
index 98de5df86b0..9dc48da0499 100644
--- a/gcc/gimple-ssa-warn-access.cc
+++ b/gcc/gimple-ssa-warn-access.cc
@@ -133,7 +133,7 @@ call_arg (tree expr, unsigned argno)
    with an argument that is a character array with no terminating
    NUL.  SIZE is the EXACT size of the array, and BNDRNG the number
    of characters in which the NUL is expected.  Either EXPR or FNAME
-   may be null but noth both.  SIZE may be null when BNDRNG is null.  */
+   may be null but not both.  SIZE may be null when BNDRNG is null.  */
 
 template <class GimpleOrTree>
 static void
diff --git a/gcc/gimple-ssa-warn-restrict.cc b/gcc/gimple-ssa-warn-restrict.cc
index a61093cda01..c0dccbcd9e4 100644
--- a/gcc/gimple-ssa-warn-restrict.cc
+++ b/gcc/gimple-ssa-warn-restrict.cc
@@ -696,7 +696,7 @@ builtin_memref::offset_out_of_bounds (int strict, 
offset_int ooboff[3]) const
 }
 
 /* Create an association between the memory references DST and SRC
-   for access by a call EXPR to a memory or string built-in funtion.  */
+   for access by a call EXPR to a memory or string built-in function.  */
 
 builtin_access::builtin_access (pointer_query &ptrqry, gimple *call,
                                builtin_memref &dst,
@@ -977,7 +977,7 @@ builtin_access::overlap_size (const offset_int a[2], const 
offset_int b[2],
   return q[1] - p[0];
 }
 
-/* Return true if the bounded mempry (memcpy amd similar) or string function
+/* Return true if the bounded memory (memcpy amd similar) or string function
    access (strncpy and similar) ACS overlaps.  */
 
 bool
@@ -1817,7 +1817,7 @@ maybe_diag_access_bounds (gimple *call, tree func, int 
strict,
   else if (oobref == ref.base)
     {
       /* True when the offset formed by an access to the reference
-        is out of bounds, rather than the initial offset wich is
+        is out of bounds, rather than the initial offset which is
         in bounds.  This implies access past the end.  */
       bool form = ooboff[0] != ref.offrange[0];
 
diff --git a/gcc/gimple.def b/gcc/gimple.def
index 0a098ada32e..04bd6c04f8d 100644
--- a/gcc/gimple.def
+++ b/gcc/gimple.def
@@ -192,7 +192,7 @@ DEFGSCODE(GIMPLE_PHI, "gimple_phi", GSS_PHI)
    EVAL is the sequence of statements to execute on entry to GIMPLE_TRY.
 
    CLEANUP is the sequence of statements to execute according to
-   TRY_KIND.  If TRY_KIND is GIMPLE_TRY_CATCH, CLEANUP is only exected
+   TRY_KIND.  If TRY_KIND is GIMPLE_TRY_CATCH, CLEANUP is only executed
    if an exception is thrown during execution of EVAL.  If TRY_KIND is
    GIMPLE_TRY_FINALLY, CLEANUP is always executed after executing EVAL
    (regardless of whether EVAL finished normally, or jumped out or an
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 83722100849..0b7589e656f 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -4009,7 +4009,7 @@ gimple_goto_dest (const gimple *gs)
 }
 
 
-/* Set DEST to be the destination of the unconditonal jump GS.  */
+/* Set DEST to be the destination of the unconditional jump GS.  */
 
 inline void
 gimple_goto_set_dest (ggoto *gs, tree dest)
-- 
2.43.0

Reply via email to