@@ -50,7 +50,7 @@ test LLVM have been ported to a plethora of platforms.
50
50
What API do I use to store a value to one of the virtual registers in LLVM IR's SSA representation?
51
51
---------------------------------------------------------------------------------------------------
52
52
53
- In short: you can't. It's actually kind of a silly question once you grok
53
+ In short: you can't. It's actually kind of a silly question once you understand
54
54
what's going on. Basically, in code like:
55
55
56
56
.. code-block :: llvm
@@ -80,7 +80,7 @@ What source languages are supported?
80
80
81
81
LLVM currently has full support for C and C++ source languages through
82
82
`Clang <https://clang.llvm.org/ >`_. Many other language frontends have
83
- been written using LLVM, and an incomplete list is available at
83
+ been written using LLVM; an incomplete list is available at
84
84
`projects with LLVM <https://llvm.org/ProjectsWithLLVM/ >`_.
85
85
86
86
@@ -91,12 +91,12 @@ LLVM intermediate representation (IR) format. Assuming you want to write your
91
91
language's compiler in the language itself (rather than C++), there are 3
92
92
major ways to tackle generating LLVM IR from a front-end:
93
93
94
- 1. **Call into the LLVM libraries code using your language's FFI (foreign
94
+ 1. **Call into the LLVM libraries using your language's FFI (foreign
95
95
function interface). **
96
96
97
97
* *for: * best tracks changes to the LLVM IR, .ll syntax, and .bc format
98
98
99
- * *for: * enables running LLVM optimization passes without a emit/parse
99
+ * *for: * enables running LLVM optimization passes without an emit/parse
100
100
overhead
101
101
102
102
* *for: * adapts well to a JIT context
@@ -128,10 +128,10 @@ most common hurdle with calling C from managed code is interfacing with the
128
128
garbage collector. The C interface was designed to require very little memory
129
129
management, and so is straightforward in this regard.
130
130
131
- What support is there for a higher level source language constructs for building a compiler?
131
+ What support is there for a higher- level source language constructs for building a compiler?
132
132
--------------------------------------------------------------------------------------------
133
133
Currently, there isn't much. LLVM supports an intermediate representation
134
- which is useful for code representation but will not support the high level
134
+ which is useful for code representation but will not support the high- level
135
135
(abstract syntax tree) representation needed by most compilers. There are no
136
136
facilities for lexical nor semantic analysis.
137
137
@@ -215,7 +215,7 @@ for it.
215
215
216
216
Why does instcombine + simplifycfg turn a call to a function with a mismatched calling convention into "unreachable"? Why not make the verifier reject it?
217
217
----------------------------------------------------------------------------------------------------------------------------------------------------------
218
- This is a common problem run into by authors of front-ends that are using
218
+ This is a common problem encountered by authors of front-ends that are using
219
219
custom calling conventions: you need to make sure to set the right calling
220
220
convention on both the function and on each call to the function. For
221
221
example, this code:
@@ -274,7 +274,7 @@ Here's an example:
274
274
}
275
275
276
276
In this example, "test" always passes ``@foo ``/``false `` into ``bar ``, which
277
- ensures that it is dynamically called with the right calling conv (thus, the
277
+ ensures that it is dynamically called with the right calling convention (thus, the
278
278
code is perfectly well defined). If you run this through the inliner, you
279
279
get this (the explicit "or" is there so that the inliner doesn't dead code
280
280
eliminate a bunch of stuff):
0 commit comments