You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### <a name="gcholes" /> GC holes, FCall, and QCall
178
+
### <a name="gcholes"></a> GC holes, FCall, and QCall
179
179
180
180
A more complete discussion on GC holes can be found in the [CLR Code Guide](../../../coding-guidelines/clr-code-guide.md). Look for ["Is your code GC-safe?"](../../../coding-guidelines/clr-code-guide.md#2.1). This tailored discussion motivates some of the reasons why FCall and QCall have some of their strange conventions.
## <a name="register" /> Registering your QCall or FCall method
251
+
## <a name="register"></a> Registering your QCall or FCall method
252
252
253
253
The CLR must know the name of your QCall and FCall methods, both in terms of the managed class and method names, as well as which native methods to call. That is done in [ecalllist.h][ecalllist], with two arrays. The first array maps namespace and class names to an array of function elements. That array of function elements then maps individual method names and signatures to function pointers.
Copy file name to clipboardExpand all lines: docs/design/coreclr/jit/ryujit-overview.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,12 +224,12 @@ The top-level function of interest is `Compiler::compCompile`. It invokes the fo
224
224
|[Register allocation](#reg-alloc)| Registers are assigned (`gtRegNum` and/or `gtRsvdRegs`), and the number of spill temps calculated. |
225
225
|[Code Generation](#code-generation)| Determines frame layout. Generates code for each `BasicBlock`. Generates prolog & epilog code for the method. Emit EH, GC and Debug info. |
226
226
227
-
## <aname="pre-import"/>Pre-import
227
+
## <aname="pre-import"></a>Pre-import
228
228
229
229
Prior to reading in the IL for the method, the JIT initializes the local variable table, and scans the IL to find
230
230
branch targets and form BasicBlocks.
231
231
232
-
## <aname="importation">Importation
232
+
## <aname="importation"></a>Importation
233
233
234
234
Importation is the phase that creates the IR for the method, reading in one IL instruction at a time, and building up
235
235
the statements. During this process, it may need to generate IR with multiple, nested expressions. This is the
@@ -245,7 +245,7 @@ and flagged. They are further validated, and possibly unmarked, during morphing.
245
245
246
246
The `fgMorph` phase includes a number of transformations:
247
247
248
-
### <aname="inlining"/>Inlining
248
+
### <aname="inlining"></a>Inlining
249
249
250
250
The `fgInline` phase determines whether each call site is a candidate for inlining. The initial determination is made
251
251
via a state machine that runs over the candidate method's IL. It estimates the native code size corresponding to the
@@ -256,7 +256,7 @@ encountered that indicate that it may be unprofitable (or otherwise incorrect).
256
256
inlinee compiler's trees are incorporated into the inliner compiler (the "parent"), with arguments and return values
Lowering is responsible for transforming the IR in such a way that the control flow, and any register requirements,
479
479
are fully exposed.
@@ -529,7 +529,7 @@ In such cases, it must ensure that they themselves are properly lowered. This in
529
529
530
530
After all nodes are lowered, liveness is run in preparation for register allocation.
531
531
532
-
## <aname="reg-alloc"/>Register allocation
532
+
## <aname="reg-alloc"></a>Register allocation
533
533
534
534
The RyuJIT register allocator uses a Linear Scan algorithm, with an approach similar to [[2]](#[2]). In discussion it
535
535
is referred to as either `LinearScan` (the name of the implementing class), or LSRA (Linear Scan Register
@@ -622,7 +622,7 @@ Post-conditions:
622
622
*`lvSpilled` flag is set if it is ever spilled
623
623
* The maximum number of simultaneously-live spill locations of each type (used for spilling expression trees) has been communicated via calls to `compiler->tmpPreAllocateTemps(type)`.
624
624
625
-
## <aname="code-generation"/>Code Generation
625
+
## <aname="code-generation"></a>Code Generation
626
626
627
627
The process of code generation is relatively straightforward, as Lowering has done some of the work already. Code
628
628
generation proceeds roughly as follows:
@@ -858,8 +858,8 @@ a 'T'.
858
858
859
859
## References
860
860
861
-
<aname="[1]"/>
861
+
<aname="[1]"></a>
862
862
[1] P. Briggs, K. D. Cooper, T. J. Harvey, and L. T. Simpson, "Practical improvements to the construction and destruction of static single assignment form," Software --- Practice and Experience, vol. 28, no. 8, pp. 859---881, Jul. 1998.
863
863
864
-
<aname="[2]"/>
864
+
<aname="[2]"></a>
865
865
[2] Wimmer, C. and Mössenböck, D. "Optimized Interval Splitting in a Linear Scan Register Allocator," ACM VEE 2005, pp. 132-141. [http://portal.acm.org/citation.cfm?id=1064998&dl=ACM&coll=ACM&CFID=105967773&CFTOKEN=80545349](http://portal.acm.org/citation.cfm?id=1064998&dl=ACM&coll=ACM&CFID=105967773&CFTOKEN=80545349)
0 commit comments