[polly] Fixed a number of typos. NFC

I went over the output of the following mess of a command:

`(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less)`

and proceeded to spend a few days looking at it to find probable typos
and fixed a few hundred of them in all of the llvm project (note, the
ones I found are not anywhere near all of them, but it seems like a
good start).

Reviewed By: inclyc

Differential Revision: https://reviews.llvm.org/D131167

GitOrigin-RevId: ea540bc21078ffc28435ad5802d2e821036744bd
diff --git a/docs/HowToManuallyUseTheIndividualPiecesOfPolly.rst b/docs/HowToManuallyUseTheIndividualPiecesOfPolly.rst
index b32baf0..0d231b9 100644
--- a/docs/HowToManuallyUseTheIndividualPiecesOfPolly.rst
+++ b/docs/HowToManuallyUseTheIndividualPiecesOfPolly.rst
@@ -29,7 +29,7 @@
 
         Polly is only able to work with code that matches a canonical form.
         To translate the LLVM-IR into this form we use a set of
-        canonicalication passes. They are scheduled by using
+        canonicalization passes. They are scheduled by using
         '-polly-canonicalize'.
 
         .. code-block:: console
diff --git a/include/polly/Support/VirtualInstruction.h b/include/polly/Support/VirtualInstruction.h
index a6d0100..69fa32c 100644
--- a/include/polly/Support/VirtualInstruction.h
+++ b/include/polly/Support/VirtualInstruction.h
@@ -94,7 +94,7 @@
   /// @param U       The llvm::Use the get information for.
   /// @param LI      The LoopInfo analysis. Needed to determine whether the
   ///                value is synthesizable.
-  /// @param Virtual Whether to ignore existing MemoryAcccess.
+  /// @param Virtual Whether to ignore existing MemoryAccess.
   ///
   /// @return The VirtualUse representing the same use as @p U.
   static VirtualUse create(Scop *S, const Use &U, LoopInfo *LI, bool Virtual);
diff --git a/lib/CodeGen/ManagedMemoryRewrite.cpp b/lib/CodeGen/ManagedMemoryRewrite.cpp
index e074917..9b8e773 100644
--- a/lib/CodeGen/ManagedMemoryRewrite.cpp
+++ b/lib/CodeGen/ManagedMemoryRewrite.cpp
@@ -163,7 +163,7 @@
 // in an expression.
 // We need this auxiliary function, because if we have a
 // `Constant` that is a user of `V`, we need to recurse into the
-// `Constant`s uses to gather the root instruciton.
+// `Constant`s uses to gather the root instruction.
 static void getInstructionUsersOfValue(Value *V,
                                        SmallVector<Instruction *, 4> &Owners) {
   if (auto *I = dyn_cast<Instruction>(V)) {
diff --git a/lib/Transform/ManualOptimizer.cpp b/lib/Transform/ManualOptimizer.cpp
index cf1aa6c..382bcd6 100644
--- a/lib/Transform/ManualOptimizer.cpp
+++ b/lib/Transform/ManualOptimizer.cpp
@@ -189,7 +189,7 @@
     }
 
     // If illegal, revert and remove the transformation to not risk re-trying
-    // indefintely.
+    // indefinitely.
     MDNode *NewLoopMD =
         makePostTransformationMetadata(Ctx, LoopMD, {TransPrefix}, {});
     BandAttr *Attr = getBandAttr(OrigBand);
diff --git a/lib/Transform/ScheduleTreeTransform.cpp b/lib/Transform/ScheduleTreeTransform.cpp
index 198de6f..e42b3d1 100644
--- a/lib/Transform/ScheduleTreeTransform.cpp
+++ b/lib/Transform/ScheduleTreeTransform.cpp
@@ -573,7 +573,7 @@
 
     // Do not merge permutable band to avoid loosing the permutability property.
     // Cannot collapse even two permutable loops, they might be permutable
-    // individually, but not necassarily accross.
+    // individually, but not necassarily across.
     if (unsignedFromIslSize(Band.n_member()) > 1u && Band.permutable())
       return getBase().visitBand(Band);
 
diff --git a/test/CodeGen/non-affine-update.ll b/test/CodeGen/non-affine-update.ll
index ff1d630..d742d31 100644
--- a/test/CodeGen/non-affine-update.ll
+++ b/test/CodeGen/non-affine-update.ll
@@ -10,7 +10,7 @@
 ;      }
 ;    }
 
-; Verify that all changed memory access functions are corectly code generated.
+; Verify that all changed memory access functions are correctly code generated.
 ; At some point this did not work due to memory access identifiers not being
 ; unique within non-affine scop statements.
 
diff --git a/test/ForwardOpTree/changed-kind.ll b/test/ForwardOpTree/changed-kind.ll
index 824026c..785dcf4 100644
--- a/test/ForwardOpTree/changed-kind.ll
+++ b/test/ForwardOpTree/changed-kind.ll
@@ -4,7 +4,7 @@
 ; Thus, in order to save a scalar dependency, forward-optree replaces
 ; the use of %0 in Stmt_lor_end93 by a load from @c by changing the
 ; access find from a scalar access to a array accesses.
-; llvm.org/PR48034 decribes a crash caused by the mid-processing change.
+; llvm.org/PR48034 describes a crash caused by the mid-processing change.
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
diff --git a/test/ScopDetect/non-affine-loop.ll b/test/ScopDetect/non-affine-loop.ll
index 00247ce..7445cf7 100644
--- a/test/ScopDetect/non-affine-loop.ll
+++ b/test/ScopDetect/non-affine-loop.ll
@@ -6,7 +6,7 @@
 ;
 ; This function/region does contain a loop, however it is non-affine, hence the access
 ; A[i] is also. Furthermore, it is the only loop, thus when we over approximate
-; non-affine loops __and__ accesses __and__ allow regins without a (affine) loop we will
+; non-affine loops __and__ accesses __and__ allow regions without a (affine) loop we will
 ; detect it, otherwise we won't.
 ;
 ;    void f(int *A) {
diff --git a/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll b/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll
index 0189d98..b3f152d 100644
--- a/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll
+++ b/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll
@@ -12,7 +12,7 @@
 ; The loads are currently just adds %7 to the list of required invariant loads
 ; and only -polly-scops checks whether it is actionally possible the be load
 ; hoisted. The SCoP is still rejected by -polly-detect because it may alias
-; with %A and is not considered to be eligble for runtime alias checking.
+; with %A and is not considered to be eligible for runtime alias checking.
 
 ; CHECK: remark: ReportVariantBasePtr01.c:6:8: The following errors keep this region from being a Scop.
 ; CHECK: remark: ReportVariantBasePtr01.c:7:5: Accesses to the arrays "A", " <unknown> " may access the same memory.
diff --git a/test/ScopInfo/aliasing_conditional_alias_groups_2.ll b/test/ScopInfo/aliasing_conditional_alias_groups_2.ll
index da65e6c..6ca40b2 100644
--- a/test/ScopInfo/aliasing_conditional_alias_groups_2.ll
+++ b/test/ScopInfo/aliasing_conditional_alias_groups_2.ll
@@ -1,6 +1,6 @@
 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
 ;
-; Check that we create two alias groups since the mininmal/maximal accesses
+; Check that we create two alias groups since the minimal/maximal accesses
 ; depend on %b.
 ;
 ; CHECK: Alias Groups (2):
diff --git a/test/ScopInfo/aliasing_many_parameters_not_all_involved.ll b/test/ScopInfo/aliasing_many_parameters_not_all_involved.ll
index 6a30a8f..2fad0cd 100644
--- a/test/ScopInfo/aliasing_many_parameters_not_all_involved.ll
+++ b/test/ScopInfo/aliasing_many_parameters_not_all_involved.ll
@@ -1,7 +1,7 @@
 ; RUN: opt %loadPolly -polly-analysis-computeout=0 -polly-print-scops -polly-rtc-max-parameters=8 -disable-output < %s | FileCheck %s --check-prefix=MAX8
 ; RUN: opt %loadPolly -polly-analysis-computeout=0 -polly-print-scops -polly-rtc-max-parameters=7 -disable-output < %s | FileCheck %s --check-prefix=MAX7
 ;
-; Check that we allow this SCoP even though it has 10 parameters involved in posisbly aliasing accesses.
+; Check that we allow this SCoP even though it has 10 parameters involved in possibly aliasing accesses.
 ; However, only 7 are involved in accesses through B, 8 through C and none in accesses through A.
 ;
 ; MAX8-LABEL:  Function: jd
diff --git a/test/ScopInfo/extract_constant_factor_introduces_new_parameter.ll b/test/ScopInfo/extract_constant_factor_introduces_new_parameter.ll
index 5325ce2..16dd05d 100644
--- a/test/ScopInfo/extract_constant_factor_introduces_new_parameter.ll
+++ b/test/ScopInfo/extract_constant_factor_introduces_new_parameter.ll
@@ -14,7 +14,7 @@
 ;
 ; which introduced a new parameter (-1 + %b) * %a which was not registered
 ; correctly and consequently caused a crash due to an expression not being
-; regiustered as a parameter.
+; registered as a parameter.
 
 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
 
diff --git a/test/ScopInfo/invalid_add_rec_after_invariant_load_remapping.ll b/test/ScopInfo/invalid_add_rec_after_invariant_load_remapping.ll
index 11f236e..3c3566b 100644
--- a/test/ScopInfo/invalid_add_rec_after_invariant_load_remapping.ll
+++ b/test/ScopInfo/invalid_add_rec_after_invariant_load_remapping.ll
@@ -1,6 +1,6 @@
 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s
 ;
-; This crased at some point as we place %1 and %4 in the same equivalence class
+; This crashed at some point as we place %1 and %4 in the same equivalence class
 ; for invariant loads and when we remap SCEVs to use %4 instead of %1 AddRec SCEVs
 ; for the for.body.10 loop caused a crash as their operands were not invariant
 ; in the loop. While we know they are, ScalarEvolution does not. However, we can simply
diff --git a/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_3.ll b/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_3.ll
index 00fa86f..c031032 100644
--- a/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_3.ll
+++ b/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_3.ll
@@ -4,7 +4,7 @@
 
 ; Verify that we canonicalize accesses even tough one of the accesses (even
 ; the canonical base) has a partial execution context. This is correct as
-; the combined execution context still coveres both accesses.
+; the combined execution context still covers both accesses.
 
 ; CHECK:      Invariant Accesses: {
 ; CHECK-NEXT:         ReadAccess :=	[Reduction Type: NONE] [Scalar: 0]
diff --git a/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_4.ll b/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_4.ll
index dcb46d4..0a45499 100644
--- a/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_4.ll
+++ b/test/ScopInfo/invariant_load_canonicalize_array_baseptrs_4.ll
@@ -3,7 +3,7 @@
 ; RUN:  | FileCheck %s
 
 ; Verify that a delinearized and a not delinearized access are not
-; canonizalized.
+; canonicalized.
 
 ; CHECK:      Stmt_body1
 ; CHECK-NEXT:   Domain :=
diff --git a/test/ScopInfo/multidim_fold_constant_dim_zero.ll b/test/ScopInfo/multidim_fold_constant_dim_zero.ll
index 7d75b9b..57275e4 100644
--- a/test/ScopInfo/multidim_fold_constant_dim_zero.ll
+++ b/test/ScopInfo/multidim_fold_constant_dim_zero.ll
@@ -5,7 +5,7 @@
 ; This test case at some point crashed Polly due to a 'division by zero'
 ; when trying to fold the constant dimension into outer dimension.
 ; We verify that this scop is detected without crash. We also test the
-; output to undertand that the scop has been analyzed, but has also been
+; output to understand that the scop has been analyzed, but has also been
 ; invalidated due to the zero size dimension.
 
 ; CHECK: Assumed Context:
diff --git a/test/ScopInfo/multidim_many_references.ll b/test/ScopInfo/multidim_many_references.ll
index ff5eaa2..4fa59e6 100644
--- a/test/ScopInfo/multidim_many_references.ll
+++ b/test/ScopInfo/multidim_many_references.ll
@@ -26,7 +26,7 @@
 ; m->rows, m->cols and m->deps happen before the scop.
 
 ; This test case verifies that the construction of the assumed context finishes
-; successfully. Depending on how constraineds are accummulated in the assumed
+; successfully. Depending on how constrained are accumulated in the assumed
 ; context, this test case can take even for a smaller number of arrays over a
 ; minute to complete. With the unrolling choosen in this test, an inefficient
 ; formulation of the assumption tracking cause LLVM to crash due to excessive
diff --git a/test/ScopInfo/ranged_parameter.ll b/test/ScopInfo/ranged_parameter.ll
index 89ac093..4dcfe3e 100644
--- a/test/ScopInfo/ranged_parameter.ll
+++ b/test/ScopInfo/ranged_parameter.ll
@@ -1,6 +1,6 @@
 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
 ;
-; Check that the contstraints on the paramater derived from the
+; Check that the constraints on the parameter derived from the
 ; range metadata (see bottom of the file) are present:
 ;
 ; CHECK: Context:
diff --git a/test/ScopInfo/redundant_parameter_constraint.ll b/test/ScopInfo/redundant_parameter_constraint.ll
index db68220..015b84f 100644
--- a/test/ScopInfo/redundant_parameter_constraint.ll
+++ b/test/ScopInfo/redundant_parameter_constraint.ll
@@ -1,6 +1,6 @@
 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
 ;
-; The constraint that r2 has to be bigger than r1 is implicitly containted in
+; The constraint that r2 has to be bigger than r1 is implicitly contained in
 ; the domain, hence we do not want to see it explicitly.
 ;
 ; CHECK-NOT:  r2 >= 1 + r1
diff --git a/test/ScopInfo/scalar_to_array.ll b/test/ScopInfo/scalar_to_array.ll
index 0a443ce..cb2b7e9 100644
--- a/test/ScopInfo/scalar_to_array.ll
+++ b/test/ScopInfo/scalar_to_array.ll
@@ -6,7 +6,7 @@
 
 @A = common global [1024 x float] zeroinitializer, align 8
 
-; Terminating loops without side-effects will be optimzied away, hence
+; Terminating loops without side-effects will be optimized away, hence
 ; detecting a scop would be pointless.
 ; CHECK-NOT: Function: empty
 ; Function Attrs: nounwind
diff --git a/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll b/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll
index 8982450..a284e75 100644
--- a/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll
+++ b/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll
@@ -4,7 +4,7 @@
 ; %tmp4, it is an "external use".
 ;
 ; A common mistake is to assume that %tmp5 is used by %tmp4 in bb3, when
-; practially it's the incoming block %bb9 which is the user.
+; practically it's the incoming block %bb9 which is the user.
 ;
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
diff --git a/tools/GPURuntime/GPUJIT.h b/tools/GPURuntime/GPUJIT.h
index 768e097..61591f0 100644
--- a/tools/GPURuntime/GPUJIT.h
+++ b/tools/GPURuntime/GPUJIT.h
@@ -16,7 +16,7 @@
 #include "stddef.h"
 
 /*
- * The following demostrates how we can use the GPURuntime library to
+ * The following demonstrates how we can use the GPURuntime library to
  * execute a GPU kernel.
  *
  * char KernelString[] = "\n\
diff --git a/www/documentation/gpgpucodegen.html b/www/documentation/gpgpucodegen.html
index 1cc4e12..94038cf 100644
--- a/www/documentation/gpgpucodegen.html
+++ b/www/documentation/gpgpucodegen.html
@@ -195,7 +195,7 @@
 </tr>
 <tr>
 <th align="left">llvm.codegen Intrinsic Implementation</th>
-<td align="center" class='inprogress'>Codeing Finished, To Be Reviewed</td>
+<td align="center" class='inprogress'>Coding Finished, To Be Reviewed</td>
 <td></td>
 </tr>
 <tr>
diff --git a/www/index.html b/www/index.html
index ab1f0c9..6c58300 100644
--- a/www/index.html
+++ b/www/index.html
@@ -110,7 +110,7 @@
       mappings are lowered to efficient C/LLVM code.
       <li><b>User-defined constraint sets for run-time checks</b> We discuss how
       arbitrary sets of constraints can be used to automatically create run-time
-      checks that ensure a set of constrainst actually hold. This feature is
+      checks that ensure a set of constraints actually hold. This feature is
       very useful to verify at run-time various assumptions that have been taken
       program optimization.
     </ul>
@@ -142,7 +142,7 @@
   The support for ScopLib as an exchange format has been removed as recent
   versions of clan, candl and pluto all support the OpenScop exchange format.
 
-  The support of the external optmizer PoCC has been dropped in favor of the
+  The support of the external optimizer PoCC has been dropped in favor of the
   isl optimizer (default) and the still available pluto support.
   </td>
   </tr>
@@ -154,7 +154,7 @@
   and David Peixotto's (both Qualcomm) recent <a
   href="https://repo.or.cz/w/isl.git/commit/60703e3ee89b9d5d4d1afb6a3f611292c0884574">commit</a>
   to isl, isl's latest development version can be built with imath instead of
-  GMP. With both CLooG and gmp having become optional, the last obilgatory
+  GMP. With both CLooG and gmp having become optional, the last obligatory
   dependency to GPL licensed software has been removed. Now Polly only depends
   on isl (and the included imath), which are both MIT licensed.
   </td>
@@ -377,7 +377,7 @@
 
   <tr><td><b><br>2010</b></td></tr>
   <tr>
-  <td><p> Dezember </p></td>
+  <td><p> December </p></td>
   <td><p>Basic vectorization support </p></td>
   </tr>
 
diff --git a/www/performance.html b/www/performance.html
index 3ef9271..cfedc5b 100644
--- a/www/performance.html
+++ b/www/performance.html
@@ -24,7 +24,7 @@
 
 <p>The results shown were created fully automatically without manual
 interaction. We did not yet spend any time to tune the results. Hence
-further improvments may be achieved by tuning the code generated by Polly, the
+further improvements may be achieved by tuning the code generated by Polly, the
 heuristics used by Pluto or by investigating if more code could be optimized.
 As Pluto was never used at such a low level, its heuristics are probably
 far from perfect. Another area where we expect larger performance improvements
@@ -35,10 +35,10 @@
 
 <p>The polybench test suite contains computation kernels from linear algebra
 routines, stencil computations, image processing and data mining. Polly
-recognices the majority of them and is able to show good speedup. However,
+recognizes the majority of them and is able to show good speedup. However,
 to show similar speedup on larger examples like the SPEC CPU benchmarks Polly
 still misses support for integer casts, variable-sized multi-dimensional arrays
-and probably several other construts. This support is necessary as such
+and probably several other constructs. This support is necessary as such
 constructs appear in larger programs, but not in our limited test suite.
 
 <h2> Sequential runs</h2>
diff --git a/www/projects.html b/www/projects.html
index 1ebccf3..710b4e1 100644
--- a/www/projects.html
+++ b/www/projects.html
@@ -26,7 +26,7 @@
   LLVM Polly keeps here a list of open projects which each of themselves would
   be a great contribution to Polly. All of these projects are meant to be self
   contained and should take a newcomer around 3-4 months of work. The projects
-  we propose are all suiteable as <a
+  we propose are all suitable as <a
   href="https://developers.google.com/open-source/gsoc/">Google Summer of
   Code</a> projects. In case you are interested in a Google Summer of code
   project make sure to reach out via the Polly <a
diff --git a/www/todo.html b/www/todo.html
index d39e27c..4ada733 100644
--- a/www/todo.html
+++ b/www/todo.html
@@ -106,7 +106,7 @@
 </td></tr>
 <tr>
 <th align="left">
-Pointer Comparisions
+Pointer Comparisons
 </th><td align="center" class='done'> Done
 </td><td> Johannes
 </td></tr>
@@ -447,7 +447,7 @@
 February 2012)</h3>
 <p>
 
-First optimizations to show the usefullness of Polly and enhance the user
+First optimizations to show the usefulness of Polly and enhance the user
 experience. We also try to increase the amount of code we can optimize.
 </p>
 <table class="wikitable" cellpadding="2">