aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/ExtendingLLVM.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/ExtendingLLVM.rst')
-rw-r--r--llvm/docs/ExtendingLLVM.rst22
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/docs/ExtendingLLVM.rst b/llvm/docs/ExtendingLLVM.rst
index 50f0af3..019fdf5 100644
--- a/llvm/docs/ExtendingLLVM.rst
+++ b/llvm/docs/ExtendingLLVM.rst
@@ -13,7 +13,7 @@ function, or a whole new instruction.
When you come to this realization, stop and think. Do you really need to extend
LLVM? Is it a new fundamental capability that LLVM does not support at its
-current incarnation or can it be synthesized from already pre-existing LLVM
+current incarnation or can it be synthesized from existing LLVM
elements? If you are not sure, ask on the `LLVM forums
<https://discourse.llvm.org>`_. The reason is that
extending LLVM will get involved as you need to update all the different passes
@@ -27,7 +27,7 @@ method of choice for LLVM extension.
Before you invest a significant amount of effort into a non-trivial extension,
**ask on the list** if what you are looking to do can be done with
-already-existing infrastructure, or if maybe someone else is already working on
+existing infrastructure, or if maybe someone else is already working on
it. You will save yourself a lot of time and effort by doing so.
.. _intrinsic function:
@@ -57,12 +57,12 @@ function and then be turned into an instruction if warranted.
#. ``llvm/lib/Analysis/ConstantFolding.cpp``:
- If it is possible to constant fold your intrinsic, add support to it in the
+ If it is possible to constant fold your intrinsic, add support for it in the
``canConstantFoldCallTo`` and ``ConstantFoldCall`` functions.
#. ``llvm/test/*``:
- Add test cases for your test cases to the test suite
+ Add test cases for your intrinsic to the test suite
Once the intrinsic has been added to the system, you must add code generator
support for it. Generally you must do the following steps:
@@ -72,7 +72,7 @@ Add support to the .td file for the target(s) of your choice in
This is usually a matter of adding a pattern to the .td file that matches the
intrinsic, though it may obviously require adding the instructions you want to
- generate as well. There are lots of examples in the PowerPC and X86 backend
+ generate as well. There are lots of examples in the PowerPC and X86 backends
to follow.
Adding a new SelectionDAG node
@@ -194,7 +194,7 @@ Adding a new instruction
#. ``llvm/lib/AsmParser/LLLexer.cpp``:
- add a new token to parse your instruction from assembly text file
+ add a new token to parse your instruction from an assembly text file
#. ``llvm/lib/AsmParser/LLParser.cpp``:
@@ -207,7 +207,7 @@ Adding a new instruction
#. ``llvm/lib/Bitcode/Writer/BitcodeWriter.cpp``:
- add a case for your instruction and how it will be parsed from bitcode
+ add a case for your instruction and how it will be written to bitcode
#. ``llvm/lib/IR/Instruction.cpp``:
@@ -236,7 +236,7 @@ Adding a new type
.. warning::
Adding new types changes the bitcode format, and will break compatibility with
- currently-existing LLVM installations. Only add new types if it is absolutely
+ existing LLVM installations. Only add new types if it is absolutely
necessary.
Adding a fundamental type
@@ -284,17 +284,17 @@ Adding a derived type
#. ``llvm/include/llvm/IR/DerivedTypes.h``:
- add new class to represent new class in the hierarchy; add forward
+ add a new class to represent the new class in the hierarchy; add forward
declaration to the TypeMap value type
#. ``llvm/lib/IR/Type.cpp`` and ``llvm/lib/CodeGen/ValueTypes.cpp``:
- add support for derived type, notably `enum TypeID` and `is`, `get` methods.
+ add support for derived type, notably ``enum TypeID`` and ``is``, ``get`` methods.
#. ``llvm/include/llvm-c/Core.h`` and ``llvm/lib/IR/Core.cpp``:
add enum ``LLVMTypeKind`` and modify
- `LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty)` for the new type
+ ``LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty)`` for the new type
#. ``llvm/lib/AsmParser/LLLexer.cpp``: