diff mbox series

ranger: Ranger meets aspell

Message ID ZBxU3ojbATAS1RNX@tucnak
State New
Headers show
Series ranger: Ranger meets aspell | expand

Commit Message

Jakub Jelinek March 23, 2023, 1:32 p.m. UTC
Hi!

I've noticed a comment typo in tree-vrp.cc and decided to quickly
skim aspell -c on the ranger sources (with quick I on everything that
looked ok or roughly ok).
But not being a native English speaker, I could get stuff wrong.
The most questionable seems 3 occurrences of involutary/involutory,
I've used involuntary, but am not sure if that's what you meant.

Could you please quickly skim it if I'm not making things worse?
Ok for trunk?

2023-03-23  Jakub Jelinek  <jakub@redhat.com>

	* value-range.cc (irange::irange_union, irange::intersect): Fix
	comment spelling bugs.
	* gimple-range-trace.cc (range_tracer::do_header): Likewise.
	* gimple-range-trace.h: Likewise.
	* gimple-range-edge.cc: Likewise.
	(gimple_outgoing_range_stmt_p,
	gimple_outgoing_range::switch_edge_range,
	gimple_outgoing_range::edge_range_p): Likewise.
	* gimple-range.cc (gimple_ranger::prefill_stmt_dependencies,
	gimple_ranger::fold_stmt, gimple_ranger::register_transitive_infer,
	assume_query::assume_query, assume_query::calculate_phi): Likewise.
	* gimple-range-edge.h: Likewise.
	* value-range.h (Value_Range::set, Value_Range::lower_bound,
	Value_Range::upper_bound, frange::set_undefined): Likewise.
	* gimple-range-gori.h (range_def_chain::depend, gori_map::m_outgoing,
	gori_compute): Likewise.
	* gimple-range-fold.h (fold_using_range): Likewise.
	* gimple-range-path.cc (path_range_query::compute_ranges_in_phis):
	Likewise.
	* gimple-range-gori.cc (range_def_chain::in_chain_p,
	range_def_chain::dump, gori_map::calculate_gori,
	gori_compute::compute_operand_range_switch,
	gori_compute::logical_combine, gori_compute::refine_using_relation,
	gori_compute::compute_operand1_range, gori_compute::may_recompute_p):
	Likewise.
	* gimple-range.h: Likewise.
	(enable_ranger): Likewise.
	* range-op.h (empty_range_varying): Likewise.
	* value-query.h (value_query): Likewise.
	* gimple-range-cache.cc (block_range_cache::set_bb_range,
	block_range_cache::dump, ssa_global_cache::clear_global_range,
	temporal_cache::temporal_value, temporal_cache::current_p,
	ranger_cache::range_of_def, ranger_cache::propagate_updated_value,
	ranger_cache::range_from_dom, ranger_cache::register_inferred_value):
	Likewise.
	* gimple-range-fold.cc (fur_edge::get_phi_operand,
	fur_stmt::get_operand, gimple_range_adjustment,
	fold_using_range::range_of_phi,
	fold_using_range::relation_fold_and_or): Likewise.
	* value-range-storage.h (irange_storage_slot::MAX_INTS): Likewise.
	* value-query.cc (range_query::value_of_expr,
	range_query::value_on_edge, range_query::query_relation): Likewise.
	* tree-vrp.cc (remove_unreachable::remove_and_update_globals,
	intersect_range_with_nonzero_bits): Likewise.
	* gimple-range-infer.cc (gimple_infer_range::check_assume_func,
	exit_range): Likewise.
	* value-relation.h: Likewise.
	(equiv_oracle, relation_trio::relation_trio, value_relation,
	value_relation::value_relation, pe_min): Likewise.
	* range-op-float.cc (range_operator_float::rv_fold,
	frange_arithmetic, foperator_unordered_equal::op1_range,
	foperator_div::rv_fold): Likewise.
	* gimple-range-op.cc (cfn_clz::fold_range): Likewise.
	* value-relation.cc (equiv_oracle::query_relation,
	equiv_oracle::register_equiv, equiv_oracle::add_equiv_to_block,
	value_relation::apply_transitive, relation_chain_head::find_relation,
	dom_oracle::query_relation, dom_oracle::find_relation_block,
	dom_oracle::find_relation_dom, path_oracle::register_equiv): Likewise.
	* range-op.cc (range_operator::wi_fold_in_parts_equiv,
	create_possibly_reversed_range, adjust_op1_for_overflow,
	operator_mult::wi_fold, operator_exact_divide::op1_range,
	operator_cast::lhs_op1_relation, operator_cast::fold_pair,
	operator_cast::fold_range, operator_logical_not::op1_range,
	operator_bitwise_not::op1_range, operator_abs::wi_fold,
	operator_negate::op1_range, range_op_cast_tests,
	range_op_lshift_tests): Likewise.


	Jakub

Comments

Aldy Hernandez March 23, 2023, 2:05 p.m. UTC | #1
On 3/23/23 14:32, Jakub Jelinek wrote:
> Hi!
> 
> I've noticed a comment typo in tree-vrp.cc and decided to quickly
> skim aspell -c on the ranger sources (with quick I on everything that
> looked ok or roughly ok).
> But not being a native English speaker, I could get stuff wrong.
> The most questionable seems 3 occurrences of involutary/involutory,
> I've used involuntary, but am not sure if that's what you meant.

An involutary function is a function who is its own inverse, so AFAIK 
"involutary" is correct.  That being said, it's not a common word, and I 
must admit I had to look it up when I wrote the comment...mostly to 
sound smart ;-), so feel free to use another word to avoid confusion.

> 
> Could you please quickly skim it if I'm not making things worse?
> Ok for trunk?

Otherwise, looks good.  Thanks for doing this.

Aldy
Jakub Jelinek March 23, 2023, 2:20 p.m. UTC | #2
On Thu, Mar 23, 2023 at 03:05:45PM +0100, Aldy Hernandez wrote:
> 
> 
> On 3/23/23 14:32, Jakub Jelinek wrote:
> > Hi!
> > 
> > I've noticed a comment typo in tree-vrp.cc and decided to quickly
> > skim aspell -c on the ranger sources (with quick I on everything that
> > looked ok or roughly ok).
> > But not being a native English speaker, I could get stuff wrong.
> > The most questionable seems 3 occurrences of involutary/involutory,
> > I've used involuntary, but am not sure if that's what you meant.
> 
> An involutary function is a function who is its own inverse, so AFAIK
> "involutary" is correct.  That being said, it's not a common word, and I

Isn't that involutory?
https://en.wiktionary.org/wiki/involutory
Though, seems searching for it reveals both spellings and it isn't clear
what is the difference.  I'll keep them as is then.

	Jakub
Aldy Hernandez March 23, 2023, 2:59 p.m. UTC | #3
On 3/23/23 15:20, Jakub Jelinek wrote:
> On Thu, Mar 23, 2023 at 03:05:45PM +0100, Aldy Hernandez wrote:
>>
>>
>> On 3/23/23 14:32, Jakub Jelinek wrote:
>>> Hi!
>>>
>>> I've noticed a comment typo in tree-vrp.cc and decided to quickly
>>> skim aspell -c on the ranger sources (with quick I on everything that
>>> looked ok or roughly ok).
>>> But not being a native English speaker, I could get stuff wrong.
>>> The most questionable seems 3 occurrences of involutary/involutory,
>>> I've used involuntary, but am not sure if that's what you meant.
>>
>> An involutary function is a function who is its own inverse, so AFAIK
>> "involutary" is correct.  That being said, it's not a common word, and I
> 
> Isn't that involutory?
> https://en.wiktionary.org/wiki/involutory

Ooops, yeah.

> Though, seems searching for it reveals both spellings and it isn't clear
> what is the difference.  I'll keep them as is then.

Whatever works.  Obviously I don't know how to spell it either :).

Aldy
diff mbox series

Patch

--- gcc/value-range.cc.jj	2023-03-22 10:42:17.863403734 +0100
+++ gcc/value-range.cc	2023-03-23 13:39:17.242244618 +0100
@@ -2441,7 +2441,7 @@  irange::irange_union (const irange &r)
   // of each range is <= the beginning of the next range.  There may
   // be overlapping ranges at this point.  I.e. this would be valid
   // [-20, 10], [-10, 0], [0, 20], [40, 90] as it satisfies this
-  // contraint : -20 < -10 < 0 < 40.  When the range is rebuilt into r,
+  // constraint : -20 < -10 < 0 < 40.  When the range is rebuilt into r,
   // the merge is performed.
   //
   // [Xi,Yi]..[Xn,Yn]  U  [Xj,Yj]..[Xm,Ym]   -->  [Xk,Yk]..[Xp,Yp]
@@ -2710,7 +2710,7 @@  irange::intersect (const wide_int& lb, c
   gcc_checking_assert (TYPE_PRECISION (range_type) == wi::get_precision (lb));
   gcc_checking_assert (TYPE_PRECISION (range_type) == wi::get_precision (ub));
 
-  // If this range is fuly contained, then intersection will do nothing.
+  // If this range is fully contained, then intersection will do nothing.
   if (wi::ge_p (lower_bound (), lb, sign)
       && wi::le_p (upper_bound (), ub, sign))
     return false;
--- gcc/gimple-range-trace.cc.jj	2023-01-02 09:32:47.363924375 +0100
+++ gcc/gimple-range-trace.cc	2023-03-23 13:54:01.404502097 +0100
@@ -73,7 +73,7 @@  range_tracer::print_prefix (unsigned idx
 
 }
 // If dumping, return the next call index and print the prefix for the next
-// output line.  If not, retrurn 0.
+// output line.  If not, return 0.
 // Counter is static to monotonically increase across the compilation unit.
 
 unsigned
--- gcc/gimple-range-trace.h.jj	2023-01-02 09:32:50.863873806 +0100
+++ gcc/gimple-range-trace.h	2023-03-23 13:54:19.058248042 +0100
@@ -1,4 +1,4 @@ 
-/* Header file for the GIMPLE range tracing/debugging facilties.
+/* Header file for the GIMPLE range tracing/debugging facilities.
    Copyright (C) 2021-2023 Free Software Foundation, Inc.
    Contributed by Andrew MacLeod <amacleod@redhat.com>
    and Aldy Hernandez <aldyh@redhat.com>.
--- gcc/gimple-range-edge.cc.jj	2023-01-02 09:32:52.730846831 +0100
+++ gcc/gimple-range-edge.cc	2023-03-23 13:46:35.406927918 +0100
@@ -1,4 +1,4 @@ 
-/* Gimple range edge functionaluity.
+/* Gimple range edge functionality.
    Copyright (C) 2020-2023 Free Software Foundation, Inc.
    Contributed by Andrew MacLeod <amacleod@redhat.com>
    and Aldy Hernandez <aldyh@redhat.com>.
@@ -33,7 +33,7 @@  along with GCC; see the file COPYING3.
 #include "gimple-range.h"
 #include "value-range-storage.h"
 
-// If there is a range control statment at the end of block BB, return it.
+// If there is a range control statement at the end of block BB, return it.
 // Otherwise return NULL.
 
 gimple *
@@ -90,7 +90,7 @@  gimple_outgoing_range::switch_edge_range
   // ADA currently has cases where the index is 64 bits and the case
   // arguments are 32 bit, causing a trap when we create a case_range.
   // Until this is resolved (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87798)
-  // punt on switches where the labels dont match the argument.
+  // punt on switches where the labels don't match the argument.
   if (gimple_switch_num_labels (sw) > 1 && 
       TYPE_PRECISION (TREE_TYPE (CASE_LOW (gimple_switch_label (sw, 1)))) !=
       TYPE_PRECISION (TREE_TYPE (gimple_switch_index (sw))))
@@ -177,7 +177,7 @@  gimple_outgoing_range::calc_switch_range
 
 
 // Calculate the range forced on on edge E by control flow, return it
-// in R.  Return the statment which defines the range, otherwise
+// in R.  Return the statement which defines the range, otherwise
 // return NULL
 
 gimple *
--- gcc/gimple-range.cc.jj	2023-01-02 09:32:22.155288606 +0100
+++ gcc/gimple-range.cc	2023-03-23 13:56:03.314747693 +0100
@@ -349,7 +349,7 @@  gimple_ranger::prefill_name (vrange &r,
     m_stmt_list.safe_push (name);
 }
 
-// This routine will seed the global cache with most of the depnedencies of
+// This routine will seed the global cache with most of the dependencies of
 // NAME.  This prevents excessive call depth through the normal API.
 
 void
@@ -448,7 +448,7 @@  gimple_ranger::prefill_stmt_dependencies
 
 
 // This routine will invoke the gimple fold_stmt routine, providing context to
-// range_of_expr calls via an private interal API.
+// range_of_expr calls via an private internal API.
 
 bool
 gimple_ranger::fold_stmt (gimple_stmt_iterator *gsi, tree (*valueize) (tree))
@@ -505,7 +505,7 @@  gimple_ranger::register_transitive_infer
     {
       gimple *s = gsi_stmt (si);
       tree lhs = gimple_get_lhs (s);
-      // If the LHS alreayd has an inferred effect, leave it be.
+      // If the LHS already has an inferred effect, leave it be.
       if (!gimple_range_ssa_p (lhs) || infer.has_range_p (lhs, bb))
 	continue;
       // Pick up global value.
@@ -756,7 +756,7 @@  assume_query::range_of_expr (vrange &r,
 }
 
 // If the current function returns an integral value, and has a single return
-// statement, it will calculate any SSA_NAMES is can determine ranges forr
+// statement, it will calculate any SSA_NAMES it can determine ranges for
 // assuming the function returns 1.
 
 assume_query::assume_query ()
@@ -813,7 +813,7 @@  assume_query::calculate_op (tree op, gim
 
 // Evaluate PHI statement, using the provided LHS range.
 // Check each constant argument predecessor if it can be taken
-// provide LHS to any symbolic argmeuents, and process their def statements.
+// provide LHS to any symbolic arguments, and process their def statements.
 
 void
 assume_query::calculate_phi (gphi *phi, vrange &lhs_range, fur_source &src)
--- gcc/gimple-range-edge.h.jj	2023-01-02 09:32:39.129043358 +0100
+++ gcc/gimple-range-edge.h	2023-03-23 13:47:00.264569568 +0100
@@ -27,7 +27,7 @@  along with GCC; see the file COPYING3.
 // For a COND_EXPR, the TRUE edge will return [1,1] and the false edge a [0,0].
 //
 // For SWITCH_EXPR, it is awkward to calculate ranges.  When a request
-// is made, the entire switch is evalauted and the results cached. 
+// is made, the entire switch is evaluated and the results cached. 
 // Any future requests to that switch will use the cached value, providing
 // dramatic decrease in computation time.
 //
--- gcc/value-range.h.jj	2023-03-22 10:42:17.864403720 +0100
+++ gcc/value-range.h	2023-03-23 13:40:03.770573852 +0100
@@ -514,7 +514,7 @@  public:
   void dump (FILE *) const;
   static bool supports_type_p (const_tree type);
 
-  // Convenience methods for vrange compatability.
+  // Convenience methods for vrange compatibility.
   void set (tree min, tree max, value_range_kind kind = VR_RANGE)
     { return m_vrange->set (min, max, kind); }
   tree type () { return m_vrange->type (); }
@@ -528,8 +528,8 @@  public:
   bool singleton_p (tree *result = NULL) const
     { return m_vrange->singleton_p (result); }
   bool zero_p () const { return m_vrange->zero_p (); }
-  wide_int lower_bound () const; // For irange/prange compatability.
-  wide_int upper_bound () const; // For irange/prange compatability.
+  wide_int lower_bound () const; // For irange/prange comparability.
+  wide_int upper_bound () const; // For irange/prange comparability.
   void accept (const vrange_visitor &v) const { m_vrange->accept (v); }
 private:
   void init (tree type);
@@ -1184,7 +1184,7 @@  frange::set_undefined ()
   m_type = NULL;
   m_pos_nan = false;
   m_neg_nan = false;
-  // m_min and m_min are unitialized as they are REAL_VALUE_TYPE ??.
+  // m_min and m_min are uninitialized as they are REAL_VALUE_TYPE ??.
   if (flag_checking)
     verify_range ();
 }
--- gcc/gimple-range-gori.h.jj	2023-01-02 09:32:21.775294097 +0100
+++ gcc/gimple-range-gori.h	2023-03-23 13:51:18.028853568 +0100
@@ -57,7 +57,7 @@  private:
 };
 
 // Return the first direct dependency for NAME, if there is one.
-// Direct dependencies are those which occur on the defintion statement.
+// Direct dependencies are those which occur on the definition statement.
 // Only the first 2 such names are cached.
 
 inline tree
@@ -99,7 +99,7 @@  public:
   void dump (FILE *f);
   void dump (FILE *f, basic_block bb, bool verbose = true);
 private:
-  vec<bitmap> m_outgoing;	// BB: Outgoing ranges calculatable on edges
+  vec<bitmap> m_outgoing;	// BB: Outgoing ranges calculable on edges
   vec<bitmap> m_incoming;	// BB: Incoming ranges which can affect exports.
   bitmap m_maybe_variant;	// Names which might have outgoing ranges.
   void maybe_add_gori (tree name, basic_block bb);
@@ -139,7 +139,7 @@  private:
 // A default value of VARYING provides the raw static info for the edge.
 //
 // If there is any known range for b_4 coming into this block, it can refine
-// the results.  This allows for cascading results to be propogated.
+// the results.  This allows for cascading results to be propagated.
 // if b_4 is [100, 200] on entry to the block, feeds into the calculation
 // of a_2 = [92, 192], and finally on the true edge the range would be 
 // an empty range [] because it is not possible for the true edge to be taken.
--- gcc/gimple-range-fold.h.jj	2023-02-17 12:45:07.762642852 +0100
+++ gcc/gimple-range-fold.h	2023-03-23 13:48:59.338852958 +0100
@@ -149,7 +149,7 @@  protected:
   relation_oracle *m_oracle;
 };
 
-// This class uses ranges to fold a gimple statement producinf a range for
+// This class uses ranges to fold a gimple statement producing a range for
 // the LHS.  The source of all operands is supplied via the fur_source class
 // which provides a range_query as well as a source location and any other
 // required information.
--- gcc/gimple-range-path.cc.jj	2023-01-02 09:32:52.092856049 +0100
+++ gcc/gimple-range-path.cc	2023-03-23 13:53:19.984098180 +0100
@@ -351,7 +351,7 @@  path_range_query::compute_ranges_in_phis
   auto_bitmap phi_set;
 
   // PHIs must be resolved simultaneously on entry to the block
-  // because any dependencies must be satistifed with values on entry.
+  // because any dependencies must be satisfied with values on entry.
   // Thus, we calculate all PHIs first, and then update the cache at
   // the end.
 
--- gcc/gimple-range-gori.cc.jj	2023-03-22 10:42:17.692406183 +0100
+++ gcc/gimple-range-gori.cc	2023-03-23 13:50:49.413266102 +0100
@@ -118,7 +118,7 @@  range_def_chain::in_chain_p (tree name,
   gcc_checking_assert (gimple_range_ssa_p (def));
   gcc_checking_assert (gimple_range_ssa_p (name));
 
-  // Get the defintion chain for DEF.
+  // Get the definition chain for DEF.
   bitmap chain = get_def_chain (def);
 
   if (chain == NULL)
@@ -341,7 +341,7 @@  range_def_chain::dump (FILE *f, basic_bl
 
    GORI stands for "Generates Outgoing Range Information."
 
-   It utilizes the range_def_chain class to contruct def_chains.
+   It utilizes the range_def_chain class to construct def_chains.
    Information for a basic block is calculated once and stored.  It is
    only calculated the first time a query is made.  If no queries are
    made, there is little overhead.
@@ -469,7 +469,7 @@  gori_map::calculate_gori (basic_block bb
   if (single_succ_p (bb))
     return;
 
-  // If this block's last statement may generate range informaiton, go
+  // If this block's last statement may generate range information, go
   // calculate it.
   gimple *stmt = gimple_outgoing_range_stmt_p (bb);
   if (!stmt)
@@ -588,7 +588,7 @@  gori_compute::compute_operand_range_swit
       return true;
     }
 
-  // If op1 is in the defintion chain, pass lhs back.
+  // If op1 is in the definition chain, pass lhs back.
   if (gimple_range_ssa_p (op1) && in_chain_p (name, op1))
     return compute_operand_range (r, SSA_NAME_DEF_STMT (op1), lhs, name, src);
 
@@ -878,14 +878,14 @@  gori_compute::logical_combine (vrange &r
 	    r.union_ (ft);
 	  }
         break;
-      //  A logical OR combines ranges from 2 boolean conditons.
+      //  A logical OR combines ranges from 2 boolean conditions.
       // 	c_2 = b_1 || b_2
       case TRUTH_OR_EXPR:
       case BIT_IOR_EXPR:
         if (lhs.zero_p ())
 	  {
 	    // An OR operation will only take the FALSE path if both
-	    // operands are false simlulateously, which means they should
+	    // operands are false simultaneously, which means they should
 	    // be intersected.  !(x || y) == !x && !y
 	    r = op1_false;
 	    r.intersect (op2_false);
@@ -976,7 +976,7 @@  gori_compute::compute_logical_operands (
 // This routine will try to refine the ranges of OP1 and OP2 given a relation
 // K between them.  In order to perform this refinement, one of the operands
 // must be in the definition chain of the other.  The use is refined using
-// op1/op2_range on the statement, and the defintion is then recalculated
+// op1/op2_range on the statement, and the definition is then recalculated
 // using the relation.
 
 bool
@@ -1109,7 +1109,7 @@  gori_compute::compute_operand1_range (vr
   // Fetch the known range for op1 in this block.
   src.get_operand (op1_range, op1);
 
-  // Now range-op calcuate and put that result in r.
+  // Now range-op calculate and put that result in r.
   if (op2)
     {
       src.get_operand (op2_range, op2);
@@ -1122,7 +1122,7 @@  gori_compute::compute_operand1_range (vr
     }
   else
     {
-      // We pass op1_range to the unary operation.  Nomally it's a
+      // We pass op1_range to the unary operation.  Normally it's a
       // hidden range_for_type parameter, but sometimes having the
       // actual range can result in better information.
       if (!handler.calc_op1 (tmp, lhs, op1_range, trio))
@@ -1284,7 +1284,7 @@  gori_compute::compute_operand1_and_opera
 }
 
 // Return TRUE if NAME can be recomputed on any edge exiting BB.  If any
-// direct dependant is exported, it may also change the computed value of NAME.
+// direct dependent is exported, it may also change the computed value of NAME.
 
 bool
 gori_compute::may_recompute_p (tree name, basic_block bb)
@@ -1292,7 +1292,7 @@  gori_compute::may_recompute_p (tree name
   tree dep1 = depend1 (name);
   tree dep2 = depend2 (name);
 
-  // If the first dependency is not set, there is no recompuation.
+  // If the first dependency is not set, there is no recomputation.
   if (!dep1)
     return false;
 
@@ -1309,7 +1309,7 @@  gori_compute::may_recompute_p (tree name
   return (is_export_p (dep1)) || (dep2 && is_export_p (dep2));
 }
 
-// Return TRUE if NAME can be recomputed on edge E.  If any direct dependant
+// Return TRUE if NAME can be recomputed on edge E.  If any direct dependent
 // is exported on edge E, it may change the computed value of NAME.
 
 bool
--- gcc/gimple-range.h.jj	2023-01-02 09:32:44.492965857 +0100
+++ gcc/gimple-range.h	2023-03-23 13:57:00.387926355 +0100
@@ -35,7 +35,7 @@  along with GCC; see the file COPYING3.
 //
 // This base class provides all the API entry points, but only provides
 // functionality at the statement level.  Ie, it can calculate ranges on
-// statements, but does no additonal lookup.
+// statements, but does no additional lookup.
 //
 // All the range_of_* methods will return a range if the types is
 // supported by the range engine.  It may be the full range for the
@@ -76,7 +76,7 @@  protected:
 
 /* Create a new ranger instance and associate it with a function.
    Each call must be paired with a call to disable_ranger to release
-   resources.  If USE_IMM_USES is true, pre-calculate sideffects like
+   resources.  If USE_IMM_USES is true, pre-calculate side effects like
    non-null uses as required using the immediate use chains.  */
 extern gimple_ranger *enable_ranger (struct function *m,
 				     bool use_imm_uses = true);
--- gcc/range-op.h.jj	2023-03-12 22:36:06.328178472 +0100
+++ gcc/range-op.h	2023-03-23 13:34:28.524406846 +0100
@@ -235,7 +235,7 @@  enum bool_range_state { BRS_FALSE, BRS_T
 bool_range_state get_bool_state (vrange &r, const vrange &lhs, tree val_type);
 
 // If the range of either op1 or op2 is undefined, set the result to
-// varying and return TRUE.  If the caller truely cares about a result,
+// varying and return TRUE.  If the caller truly cares about a result,
 // they should pass in a varying if it has an undefined that it wants
 // treated as a varying.
 
--- gcc/value-query.h.jj	2023-02-18 12:38:31.072021201 +0100
+++ gcc/value-query.h	2023-03-23 13:36:17.064842104 +0100
@@ -25,7 +25,7 @@  along with GCC; see the file COPYING3.
 #include "value-relation.h"
 
 // The value_query class is used by optimization passes that require
-// valueizing SSA names in terms of a tree value, but have no neeed
+// valueizing SSA names in terms of a tree value, but have no need
 // for ranges.
 //
 // value_of_expr must be provided.  The default for value_on_edge and
--- gcc/gimple-range-cache.cc.jj	2023-02-10 19:04:58.279014847 +0100
+++ gcc/gimple-range-cache.cc	2023-03-23 13:45:52.513546281 +0100
@@ -357,7 +357,7 @@  block_range_cache::set_bb_range (tree na
 	}
       else
 	{
-	  // Otherwise use the default vector implemntation.
+	  // Otherwise use the default 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);
@@ -423,7 +423,7 @@  block_range_cache::dump (FILE *f)
     }
 }
 
-// Print all known ranges on entry to blobk BB to file F.
+// Print all known ranges on entry to block BB to file F.
 
 void
 block_range_cache::dump (FILE *f, basic_block bb, bool print_varying)
@@ -525,7 +525,7 @@  ssa_global_cache::set_global_range (tree
   return m != NULL;
 }
 
-// Set the range for NAME to R in the glonbal cache.
+// Set the range for NAME to R in the global cache.
 
 void
 ssa_global_cache::clear_global_range (tree name)
@@ -618,7 +618,7 @@  temporal_cache::~temporal_cache ()
   m_timestamp.release ();
 }
 
-// Return the timestamp value for SSA, or 0 if there isnt one.
+// Return the timestamp value for SSA, or 0 if there isn't one.
 
 inline unsigned
 temporal_cache::temporal_value (unsigned ssa) const
@@ -628,7 +628,7 @@  temporal_cache::temporal_value (unsigned
   return m_timestamp[ssa];
 }
 
-// Return TRUE if the timestampe for NAME is newer than any of its dependents.
+// Return TRUE if the timestamp for NAME is newer than any of its dependents.
 // Up to 2 dependencies can be checked.
 
 bool
@@ -885,7 +885,7 @@  ranger_cache::set_global_range (tree nam
 }
 
 //  Provide lookup for the gori-computes class to access the best known range
-//  of an ssa_name in any given basic block.  Note, this does no additonal
+//  of an ssa_name in any given basic block.  Note, this does no additional
 //  lookups, just accesses the data that is already known.
 
 // Get the range of NAME when the def occurs in block BB.  If BB is NULL
@@ -1138,7 +1138,7 @@  ranger_cache::propagate_cache (tree name
 
 // Check to see if an update to the value for NAME in BB has any effect
 // on values already in the on-entry cache for successor blocks.
-// If it does, update them.  Don't visit any blocks which dont have a cache
+// If it does, update them.  Don't visit any blocks which don't have a cache
 // entry.
 
 void
@@ -1462,9 +1462,9 @@  ranger_cache::range_from_dom (vrange &r,
 	  // incoming edges.  If the first incoming edge to this block does
 	  // generate a range, calculate the ranges if all incoming edges
 	  // are also dominated by the dominator.  (Avoids backedges which
-	  // will break the rule of moving only upward in the domniator tree).
+	  // will break the rule of moving only upward in the dominator tree).
 	  // If the first pred does not generate a range, then we will be
-	  // using the dominator range anyway, so thats all the check needed.
+	  // using the dominator range anyway, so that's all the check needed.
 	  if (EDGE_COUNT (prev_bb->preds) > 1
 	      && m_gori.has_edge_range_p (name, EDGE_PRED (prev_bb, 0)->src))
 	    {
@@ -1502,14 +1502,14 @@  ranger_cache::range_from_dom (vrange &r,
 	fprintf (dump_file, " at function top\n");
     }
 
-  // Now process any blocks wit incoming edges that nay have adjustemnts.
+  // Now process any blocks wit incoming edges that nay have adjustments.
   while (m_workback.length () > start_limit)
     {
       Value_Range er (TREE_TYPE (name));
       prev_bb = m_workback.pop ();
       if (!single_pred_p (prev_bb))
 	{
-	  // Non single pred means we need to cache a vsalue in the dominator
+	  // Non single pred means we need to cache a value in the dominator
 	  // so we can cheaply calculate incoming edges to this block, and
 	  // then store the resulting value.  If processing mode is not
 	  // RFD_FILL, then the cache cant be stored to, so don't try.
@@ -1564,7 +1564,7 @@  ranger_cache::register_inferred_value (c
   if (r.intersect (ir))
     {
       m_on_entry.set_bb_range (name, bb, r);
-      // If this range was invariant before, remove invariance.
+      // If this range was invariant before, remove invariant.
       if (!m_gori.has_edge_range_p (name))
 	m_gori.set_range_invariant (name, false);
     }
--- gcc/gimple-range-fold.cc.jj	2023-01-27 20:09:15.894974812 +0100
+++ gcc/gimple-range-fold.cc	2023-03-23 13:48:37.107173466 +0100
@@ -137,7 +137,7 @@  fur_edge::get_operand (vrange &r, tree e
 bool
 fur_edge::get_phi_operand (vrange &r, tree expr, edge e)
 {
-  // Edge to edge recalculations not supoprted yet, until we sort it out.
+  // Edge to edge recalculations not supported yet, until we sort it out.
   gcc_checking_assert (e == m_edge);
   return m_query->range_on_edge (r, e, expr);
 }
@@ -149,7 +149,7 @@  fur_stmt::fur_stmt (gimple *s, range_que
   m_stmt = s;
 }
 
-// Retreive range of EXPR as it occurs as a use on stmt M_STMT.
+// Retrieve range of EXPR as it occurs as a use on stmt M_STMT.
 
 bool
 fur_stmt::get_operand (vrange &r, tree expr)
@@ -438,7 +438,7 @@  adjust_realpart_expr (vrange &res, const
 }
 
 // This function looks for situations when walking the use/def chains
-// may provide additonal contextual range information not exposed on
+// may provide additional contextual range information not exposed on
 // this statement.
 
 static void
@@ -809,7 +809,7 @@  fold_using_range::range_of_phi (vrange &
 	  }
       }
 
-  // If SCEV is available, query if this PHI has any knonwn values.
+  // If SCEV is available, query if this PHI has any known values.
   if (scev_initialized_p ()
       && !POINTER_TYPE_P (TREE_TYPE (phi_def)))
     {
@@ -1064,7 +1064,7 @@  fold_using_range::relation_fold_and_or (
   if (is_and && relation_intersect (relation1, relation2) == VREL_UNDEFINED)
     lhs_range = int_range<2> (boolean_false_node, boolean_false_node);
   // x || y is true if the union of the true cases is NO-RELATION..
-  // ie, one or the other being true covers the full range of possibilties.
+  // ie, one or the other being true covers the full range of possibilities.
   else if (!is_and && relation_union (relation1, relation2) == VREL_VARYING)
     lhs_range = bool_one;
   else
--- gcc/value-range-storage.h.jj	2023-01-02 09:32:45.895945585 +0100
+++ gcc/value-range-storage.h	2023-03-23 13:37:45.313569887 +0100
@@ -83,7 +83,7 @@  private:
 
   // This is the maximum number of wide_int's allowed in the trailing
   // ints structure, without going over 16 bytes (128 bits) in the
-  // control word that preceeds the HOST_WIDE_INTs in
+  // control word that precedes the HOST_WIDE_INTs in
   // trailing_wide_ints::m_val[].
   static const unsigned MAX_INTS = 12;
 
--- gcc/value-query.cc.jj	2023-02-10 19:04:58.435012630 +0100
+++ gcc/value-query.cc	2023-03-23 13:35:43.134331251 +0100
@@ -87,7 +87,7 @@  range_query::value_of_expr (tree expr, g
 
   if (range_of_expr (r, expr, stmt))
     {
-      // A constant used in an unreachable block oftens returns as UNDEFINED.
+      // A constant used in an unreachable block often returns as UNDEFINED.
       // If the result is undefined, check the global value for a constant.
       if (r.undefined_p ())
 	range_of_expr (r, expr);
@@ -107,7 +107,7 @@  range_query::value_on_edge (edge e, tree
   Value_Range r (TREE_TYPE (expr));
   if (range_on_edge (r, e, expr))
     {
-      // A constant used in an unreachable block oftens returns as UNDEFINED.
+      // A constant used in an unreachable block often returns as UNDEFINED.
       // If the result is undefined, check the global value for a constant.
       if (r.undefined_p ())
 	range_of_expr (r, expr);
@@ -410,7 +410,7 @@  global_range_query::range_of_expr (vrang
 
 // Return any known relation between SSA1 and SSA2 before stmt S is executed.
 // If GET_RANGE is true, query the range of both operands first to ensure
-// the defintions have been processed and any relations have be created.
+// the definitions have been processed and any relations have be created.
 
 relation_kind
 range_query::query_relation (gimple *s, tree ssa1, tree ssa2, bool get_range)
@@ -431,7 +431,7 @@  range_query::query_relation (gimple *s,
 
 // Return any known relation between SSA1 and SSA2 on edge E.
 // If GET_RANGE is true, query the range of both operands first to ensure
-// the defintions have been processed and any relations have be created.
+// the definitions have been processed and any relations have be created.
 
 relation_kind
 range_query::query_relation (edge e, tree ssa1, tree ssa2, bool get_range)
--- gcc/tree-vrp.cc.jj	2023-02-04 11:35:25.805740319 +0100
+++ gcc/tree-vrp.cc	2023-03-23 13:22:36.805667186 +0100
@@ -156,7 +156,7 @@  remove_unreachable::remove_and_update_gl
 	  m_ranger.range_on_entry (ex, EXIT_BLOCK_PTR_FOR_FN (cfun), name);
 	  // If the range produced by this __builtin_unreachacble expression
 	  // is not fully reflected in the range at exit, then it does not
-	  // dominate the exit of the funciton.
+	  // dominate the exit of the function.
 	  if (ex.intersect (r))
 	    dominate_exit_p = false;
 	}
@@ -179,7 +179,7 @@  remove_unreachable::remove_and_update_gl
 
   if (bitmap_empty_p (all_exports))
     return false;
-  // Invoke DCE on all exported names to elimnate dead feeding defs
+  // Invoke DCE on all exported names to eliminate dead feeding defs.
   auto_bitmap dce;
   bitmap_copy (dce, all_exports);
   // Don't attempt to DCE parameters.
@@ -233,7 +233,7 @@  remove_unreachable::remove_and_update_gl
   return change;
 }
 
-/* VR_TYPE describes a range with mininum value *MIN and maximum
+/* VR_TYPE describes a range with minimum value *MIN and maximum
    value *MAX.  Restrict the range to the set of values that have
    no bits set outside NONZERO_BITS.  Update *MIN and *MAX and
    return the new range type.
--- gcc/gimple-range-infer.cc.jj	2023-02-10 19:04:58.279014847 +0100
+++ gcc/gimple-range-infer.cc	2023-03-23 13:51:45.571456872 +0100
@@ -70,7 +70,7 @@  gimple_infer_range::check_assume_func (g
   struct function *fun = DECL_STRUCT_FUNCTION (assume_id);
   if (!fun)
     return;
-  // Loop over arguments, matching them to the assume paramters.
+  // Loop over arguments, matching them to the assume parameters.
   for (arg = DECL_ARGUMENTS (assume_id), i = 1;
        arg && i < gimple_call_num_args (call);
        i++, arg = DECL_CHAIN (arg))
@@ -175,7 +175,7 @@  gimple_infer_range::gimple_infer_range (
 
 // -------------------------------------------------------------------------
 
-// This class is an element in the list of infered ranges.
+// This class is an element in the list of inferred ranges.
 
 class exit_range
 {
--- gcc/value-relation.h.jj	2023-03-22 10:42:17.864403720 +0100
+++ gcc/value-relation.h	2023-03-23 13:43:34.833531108 +0100
@@ -27,7 +27,7 @@  along with GCC; see the file COPYING3.
 //
 // The general range_query object provided in value-query.h provides
 // access to an oracle, if one is available, via the oracle() method.
-// Thre are also a couple of access routines provided, which even if there is
+// There are also a couple of access routines provided, which even if there is
 // no oracle, will return the default VREL_VARYING no relation.
 //
 // Typically, when a ranger object is active, there will be an oracle, and
@@ -36,7 +36,7 @@  along with GCC; see the file COPYING3.
 // is totally transparent to the client, and they are free to make queries.
 //
 // relation_kind is a new enum which represents the different relations,
-// often with a direct mapping to treee codes. ie VREL_EQ is equivalent to
+// often with a direct mapping to tree codes. ie VREL_EQ is equivalent to
 // EQ_EXPR.
 //
 // A query is made requesting the relation between SSA1 and SSA@ in a basic
@@ -48,10 +48,10 @@  along with GCC; see the file COPYING3.
 //
 // The oracle maintains VREL_EQ relations with equivalency sets, so if a
 // relation comes back VREL_EQ, it is also possible to query the set of
-// equivlaencies.  These are basically bitmaps over ssa_names.  An iterator is
+// equivalencies.  These are basically bitmaps over ssa_names.  An iterator is
 // provided later for this activity.
 //
-// Relations are maintained via the dominace trees and are optimized assuming
+// Relations are maintained via the dominance trees and are optimized assuming
 // they are registered in dominance order.   When a new relation is added, it
 // is intersected with whatever existing relation exists in the dominance tree
 // and registered at the specified block.
@@ -148,7 +148,7 @@  public:
 // The equivalency oracle maintains equivalencies using the dominator tree.
 // Equivalencies apply to an entire basic block.  Equivalencies on edges
 // can be represented only on edges whose destination is a single-pred block,
-// and the equivalence is simply applied to that succesor block.
+// and the equivalence is simply applied to that successor block.
 
 class equiv_oracle : public relation_oracle
 {
@@ -350,7 +350,7 @@  protected:
 
 // These 3 classes are shortcuts for when a caller has a single relation to
 // pass as a trio, it can simply construct the appropriate one.  The other
-// unspecified realtions will be VREL_VARYING.
+// unspecified relations will be VREL_VARYING.
 
 inline relation_trio::relation_trio ()
 {
@@ -411,7 +411,7 @@  relation_trio::swap_op1_op2 ()
 
 // -----------------------------------------------------------------------
 
-// The value-relation class is used to encapsulate the represention of an
+// The value-relation class is used to encapsulate the representation of an
 // individual relation between 2 ssa-names, and to facilitate operating on
 // the relation.
 
@@ -467,7 +467,7 @@  value_relation::value_relation ()
   name2 = NULL_TREE;
 }
 
-// Constructor for relation R between SSA version N1 nd N2.
+// Constructor for relation R between SSA version N1 and N2.
 
 inline
 value_relation::value_relation (relation_kind kind, tree n1, tree n2)
@@ -517,7 +517,7 @@  bits_to_pe (int bits)
   }
 }
 
-// Given partial equivalencies T1 and T2, return the snmallest kind.
+// Given partial equivalencies T1 and T2, return the smallest kind.
 
 inline relation_kind
 pe_min (relation_kind t1, relation_kind t2)
--- gcc/range-op-float.cc.jj	2023-03-10 12:40:19.673108938 +0100
+++ gcc/range-op-float.cc	2023-03-23 13:25:33.294122877 +0100
@@ -117,7 +117,7 @@  range_operator_float::fold_range (frange
 
 // For a given operation, fold two sets of ranges into [lb, ub].
 // MAYBE_NAN is set to TRUE if, in addition to any result in LB or
-// UB, the final range has the possiblity of a NAN.
+// UB, the final range has the possibility of a NAN.
 void
 range_operator_float::rv_fold (REAL_VALUE_TYPE &lb,
 			       REAL_VALUE_TYPE &ub,
@@ -299,9 +299,9 @@  frange_nextafter (enum machine_mode mode
 // -fexcess-precision=standard we perform most SF/DFmode arithmetic in
 // XFmode (long_double_type_node), so that case is OK.  But without
 // -mfpmath=sse, all the SF/DFmode computations are in XFmode
-// precision (64-bit mantissa) and only occassionally rounded to
+// precision (64-bit mantissa) and only occasionally rounded to
 // SF/DFmode (when storing into memory from the 387 stack).  Maybe
-// this is ok as well though it is just occassionally more precise. ??
+// this is ok as well though it is just occasionally more precise. ??
 
 static void
 frange_arithmetic (enum tree_code code, tree type,
@@ -2036,7 +2036,7 @@  foperator_unordered_equal::op1_range (fr
       r = op2;
       // Add both zeros if there's the possibility of zero equality.
       frange_add_zeros (r, type);
-      // Add the posibility of a NAN.
+      // Add the possibility of a NAN.
       r.update_nan ();
       break;
 
@@ -2047,7 +2047,7 @@  foperator_unordered_equal::op1_range (fr
 	r.set_undefined ();
       else
 	{
-	  // The false side indictates !NAN and not equal.  We can at least
+	  // The false side indicates !NAN and not equal.  We can at least
 	  // represent !NAN.
 	  r.set_varying (type);
 	  r.clear_nan ();
@@ -2674,7 +2674,7 @@  private:
     // result +0.0.  So, all we can say for that case is if the
     // signs of divisor and dividend are always the same we have
     // [+0.0, +INF], if they are always different we have
-    // [-INF, -0.0].  If they vary, VARING.
+    // [-INF, -0.0].  If they vary, VARYING.
     // If both may be +-INF, divisor could be INF and dividend FLT_MAX,
     // in which case result is going to INF or vice versa and
     // result +0.0.  So, all we can say for that case is if the
--- gcc/gimple-range-op.cc.jj	2023-03-21 11:04:19.277827937 +0100
+++ gcc/gimple-range-op.cc	2023-03-23 13:52:48.563550353 +0100
@@ -543,7 +543,7 @@  cfn_clz::fold_range (irange &r, tree typ
   // argument is 0, but that is undefined behavior.
   //
   // For __builtin_c[lt]z* consider argument of 0 always undefined
-  // behavior, for internal fns depending on C?Z_DEFINED_ALUE_AT_ZERO.
+  // behavior, for internal fns depending on C?Z_DEFINED_VALUE_AT_ZERO.
   if (lh.undefined_p ())
     return false;
   int prec = TYPE_PRECISION (lh.type ());
--- gcc/value-relation.cc.jj	2023-01-31 17:24:57.877769349 +0100
+++ gcc/value-relation.cc	2023-03-23 13:42:02.432863182 +0100
@@ -484,7 +484,7 @@  equiv_oracle::query_relation (basic_bloc
   return partial_equiv (ssa1, ssa2);
 }
 
-// Query if thre is a relation (equivalence) between 2 SSA_NAMEs.
+// Query if there is a relation (equivalence) between 2 SSA_NAMEs.
 
 relation_kind
 equiv_oracle::query_relation (basic_block bb ATTRIBUTE_UNUSED, const_bitmap e1,
@@ -531,7 +531,7 @@  equiv_oracle::find_equiv_dom (tree name,
   return NULL;
 }
 
-// Register equivalance between ssa_name V and set EQUIV in block BB,
+// Register equivalence between ssa_name V and set EQUIV in block BB,
 
 bitmap
 equiv_oracle::register_equiv (basic_block bb, unsigned v, equiv_chain *equiv)
@@ -614,7 +614,7 @@  equiv_oracle::register_initial_def (tree
 
 // Register an equivalence between SSA1 and SSA2 in block BB.
 // The equivalence oracle maintains a vector of equivalencies indexed by basic
-// block. When an equivalence bteween SSA1 and SSA2 is registered in block BB,
+// block. When an equivalence between SSA1 and SSA2 is registered in block BB,
 // a query is made as to what equivalences both names have already, and
 // any preexisting equivalences are merged to create a single equivalence
 // containing all the ssa_names in this basic block.
@@ -678,7 +678,7 @@  equiv_oracle::register_relation (basic_b
 }
 
 // Add an equivalency record in block BB containing bitmap EQUIV_SET.
-// Note the internal caller is responible for allocating EQUIV_SET properly.
+// Note the internal caller is responsible for allocating EQUIV_SET properly.
 
 void
 equiv_oracle::add_equiv_to_block (basic_block bb, bitmap equiv_set)
@@ -823,7 +823,7 @@  value_relation::apply_transitive (const
 {
   relation_kind k = VREL_VARYING;
 
-  // Idenity any common operand, and notrmalize the relations to
+  // Identify any common operand, and normalize the relations to
   // the form : A < B  B < C produces A < C
   if (rel.op1 () == name2)
     {
@@ -953,11 +953,11 @@  relation_chain_head::find_relation (cons
   if (!m_names)
     return VREL_VARYING;
 
-  // If both b1 and b2 aren't referenced in thie block, cant be a relation
+  // If both b1 and b2 aren't referenced in this block, cant be a relation
   if (!bitmap_intersect_p (m_names, b1) || !bitmap_intersect_p (m_names, b2))
     return VREL_VARYING;
 
-  // Search for the fiorst relation that contains BOTH an element from B1
+  // Search for the first relation that contains BOTH an element from B1
   // and B2, and return that relation.
   for (relation_chain *ptr = m_head; ptr ; ptr = ptr->m_next)
     {
@@ -1285,7 +1285,7 @@  dom_oracle::query_relation (basic_block
   if (bitmap_equal_p (b1, b2))
     return VREL_EQ;
 
-  // If either name does not occur in a relation anywhere, there isnt one.
+  // If either name does not occur in a relation anywhere, there isn't one.
   if (!bitmap_intersect_p (m_relation_set, b1)
       || !bitmap_intersect_p (m_relation_set, b2))
     return VREL_VARYING;
@@ -1315,7 +1315,7 @@  dom_oracle::find_relation_block (int bb,
   if (!bm)
     return VREL_VARYING;
 
-  // If both b1 and b2 aren't referenced in thie block, cant be a relation
+  // If both b1 and b2 aren't referenced in this block, cant be a relation
   if (!bitmap_bit_p (bm, v1) || !bitmap_bit_p (bm, v2))
     return VREL_VARYING;
 
@@ -1348,7 +1348,7 @@  relation_kind
 dom_oracle::find_relation_dom (basic_block bb, unsigned v1, unsigned v2) const
 {
   relation_kind r;
-  // IF either name does not occur in a relation anywhere, there isnt one.
+  // IF either name does not occur in a relation anywhere, there isn't one.
   if (!bitmap_bit_p (m_relation_set, v1) || !bitmap_bit_p (m_relation_set, v2))
     return VREL_VARYING;
 
@@ -1477,7 +1477,7 @@  path_oracle::equiv_set (tree ssa, basic_
   return tmp;
 }
 
-// Register an equivalence between SSA1 and SSA2 resolving unkowns from
+// Register an equivalence between SSA1 and SSA2 resolving unknowns from
 // block BB.
 
 void
--- gcc/range-op.cc.jj	2023-03-12 22:36:06.320178588 +0100
+++ gcc/range-op.cc	2023-03-23 13:34:08.040702152 +0100
@@ -165,7 +165,7 @@  range_operator::wi_fold (irange &r, tree
 // For x + y,  when x == y with a range of [0,4] instead of [0, 8] produce
 // [0,0][2, 2][4,4][6, 6][8, 8]
 // LIMIT is the maximum number of elements in range allowed before we
-// do not processs them individually.
+// do not process them individually.
 
 void
 range_operator::wi_fold_in_parts_equiv (irange &r, tree type,
@@ -226,7 +226,7 @@  range_operator::wi_fold_in_parts (irange
       wi_fold_in_parts (tmp, type, lh_lb, lh_ub, rh_ub, rh_ub);
       r.union_ (tmp);
     }
-  // Otherise check for 2, 3, or 4 values in the LH range and split them up.
+  // Otherwise check for 2, 3, or 4 values in the LH range and split them up.
   // The RH side has been checked, so no recursion needed.
   else if (lh_range > 0 && lh_range < 4)
     {
@@ -511,7 +511,7 @@  create_possibly_reversed_range (irange &
 				const wide_int &new_lb, const wide_int &new_ub)
 {
   signop s = TYPE_SIGN (type);
-  // If the bounds are swapped, treat the result as if an overflow occured.
+  // If the bounds are swapped, treat the result as if an overflow occurred.
   if (wi::gt_p (new_lb, new_ub, s))
     value_range_from_overflowed_bounds (r, type, new_lb, new_ub);
   else
@@ -1492,7 +1492,7 @@  plus_minus_ranges (irange &r_ov, irange
 // a_2 = b_3 + 1  with a_2 < b_3 can refine the range of b_3 to [INF, INF]
 // and that further refines a_2 to [0, 0].
 // R is the value of op1, OP2 is the offset being added/subtracted, REL is the
-// relation between LHS relatoin OP1  and ADD_P is true for PLUS, false for
+// relation between LHS relation OP1  and ADD_P is true for PLUS, false for
 // MINUS.    IF any adjustment can be made, R will reflect it.
 
 static void
@@ -2025,7 +2025,7 @@  operator_mult::wi_fold (irange &r, tree
   // This test requires 2*prec bits if both operands are signed and
   // 2*prec + 2 bits if either is not.  Therefore, extend the values
   // using the sign of the result to PREC2.  From here on out,
-  // everthing is just signed math no matter what the input types
+  // everything is just signed math no matter what the input types
   // were.
 
   signop sign = TYPE_SIGN (type);
@@ -2288,7 +2288,7 @@  operator_exact_divide::op1_range (irange
   // [2, 4] = op1 / [3,3]   since its exact divide, no need to worry about
   // remainders in the endpoints, so op1 = [2,4] * [3,3] = [6,12].
   // We wont bother trying to enumerate all the in between stuff :-P
-  // TRUE accuraacy is [6,6][9,9][12,12].  This is unlikely to matter most of
+  // TRUE accuracy is [6,6][9,9][12,12].  This is unlikely to matter most of
   // the time however.
   // If op2 is a multiple of 2, we would be able to set some non-zero bits.
   if (op2.singleton_p (&offset)
@@ -2709,7 +2709,7 @@  operator_cast::lhs_op1_relation (const i
   if (TYPE_SIGN (op1.type ()) == SIGNED && lhs_prec > op1_prec)
     {
       // If the result is sign extended, and the LHS is larger than op1,
-      // check if op1's range can be negative as the sign extention will
+      // check if op1's range can be negative as the sign extension will
       // cause the upper bits to be 1 instead of 0, invalidating the PE.
       int_range<3> negs = range_negatives (op1.type ());
       negs.intersect (op1);
@@ -2765,7 +2765,7 @@  operator_cast::fold_pair (irange &r, uns
   wide_int inner_ub = inner.upper_bound (index);
   if (truncating_cast_p (inner, outer))
     {
-      // We may be able to accomodate a truncating cast if the
+      // We may be able to accommodate a truncating cast if the
       // resulting range can be represented in the target type...
       if (wi::rshift (wi::sub (inner_ub, inner_lb),
 		      wi::uhwi (outer_prec, TYPE_PRECISION (inner.type ())),
@@ -2802,7 +2802,7 @@  operator_cast::fold_range (irange &r, tr
   // Avoid a temporary by folding the first pair directly into the result.
   fold_pair (r, 0, inner, outer);
 
-  // Then process any additonal pairs by unioning with their results.
+  // Then process any additional pairs by unioning with their results.
   for (unsigned x = 1; x < inner.num_pairs (); ++x)
     {
       int_range_max tmp;
@@ -3961,7 +3961,7 @@  operator_logical_not::op1_range (irange
 				 const irange &op2,
 				 relation_trio) const
 {
-  // Logical NOT is involutary...do it again.
+  // Logical NOT is involuntary...do it again.
   return fold_range (r, type, lhs, op2);
 }
 
@@ -4010,7 +4010,7 @@  operator_bitwise_not::op1_range (irange
   if (types_compatible_p (type, boolean_type_node))
     return op_logical_not.op1_range (r, type, lhs, op2);
 
-  // ~X is -1 - X and since bitwise NOT is involutary...do it again.
+  // ~X is -1 - X and since bitwise NOT is involuntary...do it again.
   return fold_range (r, type, lhs, op2);
 }
 
@@ -4159,7 +4159,7 @@  operator_abs::wi_fold (irange &r, tree t
   if (wi::eq_p (lh_lb, min_value))
     {
       // ABS ([-MIN, -MIN]) isn't representable, but we have traditionally
-      // returned [-MIN,-MIN] so this preserves that behaviour.  PR37078
+      // returned [-MIN,-MIN] so this preserves that behavior.  PR37078
       if (wi::eq_p (lh_ub, min_value))
 	{
 	  r = int_range<1> (type, min_value, min_value);
@@ -4312,7 +4312,7 @@  operator_negate::op1_range (irange &r, t
 			    const irange &op2,
 			    relation_trio) const
 {
-  // NEGATE is involutory.
+  // NEGATE is involuntary.
   return fold_range (r, type, lhs, op2);
 }
 
@@ -4978,7 +4978,7 @@  range_op_cast_tests ()
   range_cast (r0, unsigned_char_type_node);
   ASSERT_TRUE (r0 == rold);
 
-  // Test casting a wider signed [-MIN,MAX] to a nar`rower unsigned.
+  // Test casting a wider signed [-MIN,MAX] to a narrower unsigned.
   r0 = int_range<1> (TYPE_MIN_VALUE (long_long_integer_type_node),
 	       TYPE_MAX_VALUE (long_long_integer_type_node));
   range_cast (r0, short_unsigned_type_node);
@@ -5061,7 +5061,7 @@  range_op_lshift_tests ()
   // signed VARYING = op1 << 1 should be VARYING.
   if (TYPE_PRECISION (integer_type_node) > 31)
     {
-      // unsigned VARYING = op1 << 1  hould be VARYING.
+      // unsigned VARYING = op1 << 1 should be VARYING.
       int_range<2> lhs (integer_type_node);
       int_range<2> shift (INT (1), INT (1));
       int_range_max op1;
@@ -5075,7 +5075,7 @@  range_op_lshift_tests ()
       // Remove the [0,0] range.
       op1.intersect (zero);
       ASSERT_TRUE (op1.num_pairs () == 1);
-      //  op1 << 1   shuould be [0x8000,0x8000] << 1,
+      //  op1 << 1   should be [0x8000,0x8000] << 1,
       //  which should result in [0,0].
       int_range_max result;
       op_lshift.fold_range (result, unsigned_type_node, op1, shift);