[llvm] 0adfeb1 - [llvm] Proofread GetElementPtr.rst (#160239)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 08:11:29 PDT 2025


Author: Kazu Hirata
Date: 2025-09-23T08:11:25-07:00
New Revision: 0adfeb1af3d2d04e996de0fb1fde5b1e32a37e89

URL: https://github.com/llvm/llvm-project/commit/0adfeb1af3d2d04e996de0fb1fde5b1e32a37e89
DIFF: https://github.com/llvm/llvm-project/commit/0adfeb1af3d2d04e996de0fb1fde5b1e32a37e89.diff

LOG: [llvm] Proofread GetElementPtr.rst (#160239)

Added: 
    

Modified: 
    llvm/docs/GetElementPtr.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/GetElementPtr.rst b/llvm/docs/GetElementPtr.rst
index 25a24c6403091..6831a8e6e81eb 100644
--- a/llvm/docs/GetElementPtr.rst
+++ b/llvm/docs/GetElementPtr.rst
@@ -10,8 +10,8 @@ Introduction
 
 This document seeks to dispel the mystery and confusion surrounding LLVM's
 `GetElementPtr <LangRef.html#getelementptr-instruction>`_ (GEP) instruction.
-Questions about the wily GEP instruction are probably the most frequently
-occurring questions once a developer gets down to coding with LLVM. Here we lay
+Questions about the wily GEP instruction are probably the most frequent
+questions once a developer gets down to coding with LLVM. Here we lay
 out the sources of confusion and show that the GEP instruction is really quite
 simple.
 
@@ -30,8 +30,8 @@ What is the first index of the GEP instruction?
 Quick answer: The index stepping through the second operand.
 
 The confusion with the first index usually arises from thinking about the
-GetElementPtr instruction as if it was a C index operator. They aren't the
-same. For example, when we write, in "C":
+GetElementPtr instruction as if it were a C index operator. They aren't the
+same. For example, when we write, in C:
 
 .. code-block:: c++
 
@@ -62,7 +62,7 @@ The answer is simply because memory does not have to be accessed to perform the
 computation. The second operand to the GEP instruction must be a value of a
 pointer type. The value of the pointer is provided directly to the GEP
 instruction as an operand without any need for accessing memory. It must,
-therefore be indexed and requires an index operand. Consider this example:
+therefore, be indexed and requires an index operand. Consider this example:
 
 .. code-block:: c++
 
@@ -285,7 +285,7 @@ I'm writing a backend for a target which needs custom lowering for GEP. How do I
 -----------------------------------------------------------------------------------------
 
 You don't. The integer computation implied by a GEP is target-independent.
-Typically what you'll need to do is make your backend pattern-match expressions
+Typically what you'll need to do is make your backend pattern-match expression
 trees involving ADD, MUL, etc., which are what GEP is lowered into. This has the
 advantage of letting your code work correctly in more cases.
 
@@ -377,7 +377,7 @@ the underlying object.
 
 Furthermore, loads and stores don't have to use the same types as the type of
 the underlying object. Types in this context serve only to specify memory size
-and alignment. Beyond that there are merely a hint to the optimizer indicating
+and alignment. Beyond that they are merely a hint to the optimizer indicating
 how the value will likely be used.
 
 Can I cast an object's address to integer and add it to null?
@@ -506,7 +506,7 @@ sufficient to preserve the pointer aliasing guarantees that GEP provides.
 Summary
 =======
 
-In summary, here's some things to always remember about the GetElementPtr
+In summary, here are some things to always remember about the GetElementPtr
 instruction:
 
 


        


More information about the llvm-commits mailing list