@@ -13,7 +13,7 @@ function, or a whole new instruction.
13
13
14
14
When you come to this realization, stop and think. Do you really need to extend
15
15
LLVM? Is it a new fundamental capability that LLVM does not support at its
16
- current incarnation or can it be synthesized from already pre- existing LLVM
16
+ current incarnation or can it be synthesized from existing LLVM
17
17
elements? If you are not sure, ask on the `LLVM forums
18
18
<https://discourse.llvm.org> `_. The reason is that
19
19
extending LLVM will get involved as you need to update all the different passes
@@ -27,7 +27,7 @@ method of choice for LLVM extension.
27
27
28
28
Before you invest a significant amount of effort into a non-trivial extension,
29
29
**ask on the list ** if what you are looking to do can be done with
30
- already- existing infrastructure, or if maybe someone else is already working on
30
+ existing infrastructure, or if maybe someone else is already working on
31
31
it. You will save yourself a lot of time and effort by doing so.
32
32
33
33
.. _intrinsic function :
@@ -57,12 +57,12 @@ function and then be turned into an instruction if warranted.
57
57
58
58
#. ``llvm/lib/Analysis/ConstantFolding.cpp ``:
59
59
60
- If it is possible to constant fold your intrinsic, add support to it in the
60
+ If it is possible to constant fold your intrinsic, add support for it in the
61
61
``canConstantFoldCallTo `` and ``ConstantFoldCall `` functions.
62
62
63
63
#. ``llvm/test/* ``:
64
64
65
- Add test cases for your test cases to the test suite
65
+ Add test cases for your intrinsic to the test suite
66
66
67
67
Once the intrinsic has been added to the system, you must add code generator
68
68
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
72
72
73
73
This is usually a matter of adding a pattern to the .td file that matches the
74
74
intrinsic, though it may obviously require adding the instructions you want to
75
- generate as well. There are lots of examples in the PowerPC and X86 backend
75
+ generate as well. There are lots of examples in the PowerPC and X86 backends
76
76
to follow.
77
77
78
78
Adding a new SelectionDAG node
@@ -194,7 +194,7 @@ Adding a new instruction
194
194
195
195
#. ``llvm/lib/AsmParser/LLLexer.cpp ``:
196
196
197
- add a new token to parse your instruction from assembly text file
197
+ add a new token to parse your instruction from an assembly text file
198
198
199
199
#. ``llvm/lib/AsmParser/LLParser.cpp ``:
200
200
@@ -207,7 +207,7 @@ Adding a new instruction
207
207
208
208
#. ``llvm/lib/Bitcode/Writer/BitcodeWriter.cpp ``:
209
209
210
- add a case for your instruction and how it will be parsed from bitcode
210
+ add a case for your instruction and how it will be written to bitcode
211
211
212
212
#. ``llvm/lib/IR/Instruction.cpp ``:
213
213
@@ -236,7 +236,7 @@ Adding a new type
236
236
.. warning ::
237
237
238
238
Adding new types changes the bitcode format, and will break compatibility with
239
- currently- existing LLVM installations. Only add new types if it is absolutely
239
+ existing LLVM installations. Only add new types if it is absolutely
240
240
necessary.
241
241
242
242
Adding a fundamental type
@@ -284,17 +284,17 @@ Adding a derived type
284
284
285
285
#. ``llvm/include/llvm/IR/DerivedTypes.h ``:
286
286
287
- add new class to represent new class in the hierarchy; add forward
287
+ add a new class to represent the new class in the hierarchy; add forward
288
288
declaration to the TypeMap value type
289
289
290
290
#. ``llvm/lib/IR/Type.cpp `` and ``llvm/lib/CodeGen/ValueTypes.cpp ``:
291
291
292
- add support for derived type, notably `enum TypeID ` and `is `, `get ` methods.
292
+ add support for derived type, notably `` enum TypeID `` and `` is `` , `` get ` ` methods.
293
293
294
294
#. ``llvm/include/llvm-c/Core.h `` and ``llvm/lib/IR/Core.cpp ``:
295
295
296
296
add enum ``LLVMTypeKind `` and modify
297
- `LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) ` for the new type
297
+ `` LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) ` ` for the new type
298
298
299
299
#. ``llvm/lib/AsmParser/LLLexer.cpp ``:
300
300
0 commit comments