Skip to content

Commit 4fdf9ff

Browse files
authored
Markdown: Close anchor tags correctly (dotnet#38619)
1 parent 7c44d99 commit 4fdf9ff

File tree

6 files changed

+217
-217
lines changed

6 files changed

+217
-217
lines changed

docs/coding-guidelines/clr-code-guide.md

Lines changed: 74 additions & 74 deletions
Large diffs are not rendered by default.

docs/coding-guidelines/clr-jit-coding-conventions.md

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

docs/design/coreclr/botr/corelib.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ FCalls require a lot of boilerplate code, too much to describe here. Refer to [f
175175
176176
[fcall]: https://github.com/dotnet/runtime/blob/master/src/coreclr/src/vm/fcall.h
177177
178-
### <a name="gcholes" /> GC holes, FCall, and QCall
178+
### <a name="gcholes"></a> GC holes, FCall, and QCall
179179
180180
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.
181181
@@ -248,7 +248,7 @@ FCIMPL1(Object*, AppDomainNative::IsStringInterned, StringObject* pStringUNSAFE)
248248
FCIMPLEND
249249
```
250250
251-
## <a name="register" /> Registering your QCall or FCall method
251+
## <a name="register"></a> Registering your QCall or FCall method
252252
253253
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.
254254

docs/design/coreclr/jit/first-class-structs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ These work items are organized in priority order. Each work item should be able
195195
proceed independently, though the aggregate effect of multiple work items may be greater
196196
than the individual work items alone.
197197

198-
### <a name="defer-abi-specific-transformations-to-lowering"/>Defer ABI-specific transformations to Lowering
198+
### <a name="defer-abi-specific-transformations-to-lowering"></a>Defer ABI-specific transformations to Lowering
199199

200200
This includes all copies and IR transformations that are only required to pass or return the arguments
201201
as required by the ABI.
@@ -273,7 +273,7 @@ This would be enabled first by [Defer ABI-specific transformations to Lowering](
273273
* Related: #6839, #9477, #16887
274274
* Also, #11888, which suggests adding a struct promotion stress mode.
275275

276-
### <a name="Block-Assignments"/>Improve and Simplify Block and Block Assignment Morphing
276+
### <a name="Block-Assignments"></a>Improve and Simplify Block and Block Assignment Morphing
277277

278278
* `fgMorphOneAsgBlockOp` should probably be eliminated, and its functionality either moved to
279279
`Lowering` or simply subsumed by the combination of the addition of fixed-size struct types and

docs/design/coreclr/jit/lsra-detail.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ critical edges. This also captured in the `LsraBlockInfo` and is used by the res
386386

387387
### Building Intervals and RefPositions
388388

389-
`Interval`s are built for lclVars up-front. These are maintained in an array,
389+
`Interval`s are built for lclVars up-front. These are maintained in an array,
390390
`localVarIntervals` which is indexed by the `lvVarIndex` (not the `varNum`, since
391391
we never allocate registers for non-tracked lclVars). Other intervals (for tree temps and
392392
internal registers) are constructed as the relevant node is encountered.
@@ -402,7 +402,7 @@ node, which builds `RefPositions` according to the liveness model described abov
402402

403403
- Then we create `RefPosition`s for each use in the instruction.
404404

405-
- A use of a register candidate lclVar becomes a `RefTypeUse` `RefPosition` on the
405+
- A use of a register candidate lclVar becomes a `RefTypeUse` `RefPosition` on the
406406
`Interval` associated with the lclVar.
407407

408408
- For tree-temp operands (including non-register-candidate lclVars), we may have one
@@ -451,7 +451,7 @@ node, which builds `RefPositions` according to the liveness model described abov
451451

452452
During this phase, preferences are set:
453453

454-
- Cross-interval preferences are expressed via the `relatedInterval` field of `Interval`
454+
- Cross-interval preferences are expressed via the `relatedInterval` field of `Interval`
455455

456456
- When a use is encountered, it is preferenced to the target `Interval` for the
457457
node, if that is deemed to be profitable. During register selection, it tries to
@@ -469,7 +469,7 @@ During this phase, preferences are set:
469469

470470
- Issue [#22374](https://github.com/dotnet/coreclr/issues/22374) also has a pointer
471471
to some methods that could benefit from improved preferencing.
472-
472+
473473
- Register preferences are set:
474474

475475
- When the use or definition of a value must use a fixed register, due to instruction
@@ -540,10 +540,10 @@ LinearScanAllocation(List<RefPosition> refPositions)
540540
`Interval` to which it is preferenced, if any
541541

542542
- Whether it is in the register preference set for the
543-
`Interval`
543+
`Interval`
544544

545545
- Whether it is not only available but currently unassigned
546-
(i.e. this register is NOT currently assigned to an `Interval`
546+
(i.e. this register is NOT currently assigned to an `Interval`
547547
which is not currently live, but which previously occupied
548548
that register).
549549

@@ -756,7 +756,7 @@ enregisterable variable or temporary or physical register. It contains
756756
- `RefTypeZeroInit` is an `Interval` `RefPosition` that represents the
757757
position at entry at which a variable will be initialized to
758758
zero.
759-
759+
760760
- `RefTypeUpperVectorSave` is a `RefPosition` for an upper vector `Interval`
761761
that is inserted prior to a call that will kill the upper vector if
762762
it is currently occupying a register. The `Interval` is then marked with
@@ -928,7 +928,7 @@ The potential enhancements to the JIT, some of which are referenced in this docu
928928

929929
## Code Quality Enhancements
930930

931-
### <a name="combine"/>Merge Allocation of Free and Busy Registers
931+
### <a name="combine"></a>Merge Allocation of Free and Busy Registers
932932

933933
This is captured as [\#15408](https://github.com/dotnet/coreclr/issues/15408)
934934
Consider merging allocating free & busy regs.
@@ -1012,8 +1012,8 @@ One strategy would be to do something along the lines of (appropriate hand-wavin
10121012
the predecessor `varToRegMap`, iterate over the most frequently lclVars in the union of the
10131013
live-in, uses and defs, and displace any `Intervals` that are occupying registers that
10141014
would be more profitably used by the high-frequencly lclVars, weighing spill costs.
1015-
1016-
### <a name="avoid-split"/>Avoid Splitting Loop Backedges
1015+
1016+
### <a name="avoid-split"></a>Avoid Splitting Loop Backedges
10171017

10181018
This is captured as Issue [\#16857](https://github.com/dotnet/coreclr/issues/16857).
10191019

@@ -1050,7 +1050,7 @@ investigating whether it would be worthwhile and cheaper to simply track this in
10501050
### Support Reg-Optional Defs
10511051

10521052
Issues [\#7752](https://github.com/dotnet/coreclr/issues/7752) and
1053-
[\#7753](https://github.com/dotnet/coreclr/issues/7753) track the
1053+
[\#7753](https://github.com/dotnet/coreclr/issues/7753) track the
10541054
proposal to support "folding" of operations using a tree temp when
10551055
the defining operation supports read-modify-write (RMW) to memory.
10561056
This involves supporting the possibility
@@ -1059,14 +1059,14 @@ never occupy a register.
10591059

10601060
### Don't Pre-determine Reg-Optional Operand
10611061

1062-
Issue [\#6361](https://github.com/dotnet/coreclr/issues/6361)
1062+
Issue [\#6361](https://github.com/dotnet/coreclr/issues/6361)
10631063
tracks the problem that `Lowering` currently has
10641064
to select a single operand to be reg-optional, even if either
10651065
operand could be. This requires some additional state because
10661066
LSRA can't easily navigate from one use to the other to
10671067
communicate whether the first operand has been assigned a
10681068
register.
1069-
1069+
10701070
### Leveraging SSA form
10711071

10721072
This has not yet been opened as a github issue.
@@ -1129,30 +1129,30 @@ performance. This would also improve JIT throughput only for optimized code.
11291129
References
11301130
----------
11311131

1132-
1. <a name="[1]"/> Boissinot, B. et
1132+
1. <a name="[1]"></a> Boissinot, B. et
11331133
al "Fast liveness checking for ssa-form programs," CGO 2008, pp.
11341134
35-44.
11351135
http://portal.acm.org/citation.cfm?id=1356058.1356064&coll=ACM&dl=ACM&CFID=105967773&CFTOKEN=80545349
11361136

1137-
2. <a name="[2]"/> Boissinot, B. et al, "Revisiting
1137+
2. <a name="[2]"></a> Boissinot, B. et al, "Revisiting
11381138
Out-of-SSA Translation for Correctness, Code Quality and
11391139
Efficiency," CGO 2009, pp. 114-125.
11401140
<http://portal.acm.org/citation.cfm?id=1545006.1545063&coll=ACM&dl=ACM&CFID=105967773&CFTOKEN=80545349>
11411141

11421142

1143-
3. <a name="[3]"/>Wimmer, C. and Mössenböck, D. "Optimized
1143+
3. <a name="[3]"></a>Wimmer, C. and Mössenböck, D. "Optimized
11441144
Interval Splitting in a Linear Scan Register Allocator," ACM VEE
11451145
2005, pp. 132-141.
11461146
<http://portal.acm.org/citation.cfm?id=1064998&dl=ACM&coll=ACM&CFID=105967773&CFTOKEN=80545349>
11471147

1148-
4. <a name="[4]"/> Wimmer, C. and Franz, M. "Linear Scan
1148+
4. <a name="[4]"></a> Wimmer, C. and Franz, M. "Linear Scan
11491149
Register Allocation on SSA Form," ACM CGO 2010, pp. 170-179.
11501150
<http://portal.acm.org/citation.cfm?id=1772979&dl=ACM&coll=ACM&CFID=105967773&CFTOKEN=80545349>
11511151

1152-
5. <a name="[5]"/> Traub, O. et al "Quality and Speed in Linear-scan Register
1152+
5. <a name="[5]"></a> Traub, O. et al "Quality and Speed in Linear-scan Register
11531153
Allocation," SIGPLAN '98, pp. 142-151.
11541154
<http://portal.acm.org/citation.cfm?id=277650.277714&coll=ACM&dl=ACM&CFID=105967773&CFTOKEN=80545349>
11551155

1156-
6. <a name="[6]"/> Olesen, J. "Greedy Register Allocation in LLVM 3.0," LLVM Project Blog, Sept. 2011.
1156+
6. <a name="[6]"></a> Olesen, J. "Greedy Register Allocation in LLVM 3.0," LLVM Project Blog, Sept. 2011.
11571157
<http://blog.llvm.org/2011/09/greedy-register-allocation-in-llvm-30.html>
11581158
(Last retrieved Feb. 2012)

docs/design/coreclr/jit/ryujit-overview.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ The top-level function of interest is `Compiler::compCompile`. It invokes the fo
224224
| [Register allocation](#reg-alloc) | Registers are assigned (`gtRegNum` and/or `gtRsvdRegs`), and the number of spill temps calculated. |
225225
| [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. |
226226

227-
## <a name="pre-import"/>Pre-import
227+
## <a name="pre-import"></a>Pre-import
228228

229229
Prior to reading in the IL for the method, the JIT initializes the local variable table, and scans the IL to find
230230
branch targets and form BasicBlocks.
231231

232-
## <a name="importation">Importation
232+
## <a name="importation"></a>Importation
233233

234234
Importation is the phase that creates the IR for the method, reading in one IL instruction at a time, and building up
235235
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.
245245

246246
The `fgMorph` phase includes a number of transformations:
247247

248-
### <a name="inlining"/>Inlining
248+
### <a name="inlining"></a>Inlining
249249

250250
The `fgInline` phase determines whether each call site is a candidate for inlining. The initial determination is made
251251
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).
256256
inlinee compiler's trees are incorporated into the inliner compiler (the "parent"), with arguments and return values
257257
appropriately transformed.
258258

259-
### <a name="struct-promotion"/>Struct Promotion
259+
### <a name="struct-promotion"></a>Struct Promotion
260260

261261
Struct promotion (`fgPromoteStructs()`) analyzes the local variables and temps, and determines if their fields are
262262
candidates for tracking (and possibly enregistering) separately. It first determines whether it is possible to
@@ -269,26 +269,26 @@ individually referenced.
269269
When a lclVar is promoted, there are now N+1 lclVars for the struct, where N is the number of fields. The original
270270
struct lclVar is not considered to be tracked, but its fields may be.
271271

272-
### <a name="mark-addr-exposed"/>Mark Address-Exposed Locals
272+
### <a name="mark-addr-exposed"></a>Mark Address-Exposed Locals
273273

274274
This phase traverses the expression trees, propagating the context (e.g. taking the address, indirecting) to
275275
determine which lclVars have their address taken, and which therefore will not be register candidates. If a struct
276276
lclVar has been promoted, and is then found to be address-taken, it will be considered "dependently promoted", which
277277
is an odd way of saying that the fields will still be separately tracked, but they will not be register candidates.
278278

279-
### <a name="morph-blocks"/>Morph Blocks
279+
### <a name="morph-blocks"></a>Morph Blocks
280280

281281
What is often thought of as "morph" involves localized transformations to the trees. In addition to performing simple
282282
optimizing transformations, it performs some normalization that is required, such as converting field and array
283283
accesses into pointer arithmetic. It can (and must) be called by subsequent phases on newly added or modified trees.
284284
During the main Morph phase, the boolean `fgGlobalMorph` is set on the `Compiler` argument, which governs which
285285
transformations are permissible.
286286

287-
### <a name="eliminate-qmarks"/>Eliminate Qmarks
287+
### <a name="eliminate-qmarks"></a>Eliminate Qmarks
288288

289289
This expands most `GT_QMARK`/`GT_COLON` trees into blocks, except for the case that is instantiating a condition.
290290

291-
## <a name="flowgraph-analysis"/>Flowgraph Analysis
291+
## <a name="flowgraph-analysis"></a>Flowgraph Analysis
292292

293293
At this point, a number of analyses and transformations are done on the flowgraph:
294294

@@ -298,7 +298,7 @@ At this point, a number of analyses and transformations are done on the flowgrap
298298
* Identifying and normalizing loops (transforming while loops to "do while")
299299
* Cloning and unrolling of loops
300300

301-
## <a name="normalize-ir"/>Normalize IR for Optimization
301+
## <a name="normalize-ir"></a>Normalize IR for Optimization
302302

303303
At this point, a number of properties are computed on the IR, and must remain valid for the remaining phases. We will
304304
call this "normalization"
@@ -310,12 +310,12 @@ counts are needed.
310310
* `optOptimizeBools` – this optimizes Boolean expressions, and may change the flowgraph (why is it not done prior to reachability and dominators?)
311311
* Link the trees in evaluation order (setting `gtNext` and `gtPrev` fields): and `fgFindOperOrder()` and `fgSetBlockOrder()`.
312312

313-
## <a name="ssa-vn"/>SSA and Value Numbering Optimizations
313+
## <a name="ssa-vn"></a>SSA and Value Numbering Optimizations
314314

315315
The next set of optimizations are built on top of SSA and value numbering. First, the SSA representation is built
316316
(during which dataflow analysis, aka liveness, is computed on the lclVars), then value numbering is done using SSA.
317317

318-
### <a name="licm"/>Loop Invariant Code Hoisting
318+
### <a name="licm"></a>Loop Invariant Code Hoisting
319319

320320
This phase traverses all the loop nests, in outer-to-inner order (thus hoisting expressions outside the largest loop
321321
in which they are invariant). It traverses all of the statements in the blocks in the loop that are always executed.
@@ -326,7 +326,7 @@ If the statement is:
326326
* Does not raise an exception OR occurs in the loop prior to any side-effects
327327
* Has a valid value number, and it is a lclVar defined outside the loop, or its children (the value numbers from which it was computed) are invariant.
328328

329-
### <a name="copy-propagation"/>Copy Propagation
329+
### <a name="copy-propagation"></a>Copy Propagation
330330

331331
This phase walks each block in the graph (in dominator-first order, maintaining context between dominator and child)
332332
keeping track of every live definition. When it encounters a variable that shares the VN with a live definition, it
@@ -335,20 +335,20 @@ is replaced with the variable in the live definition.
335335
The JIT currently requires that the IR be maintained in conventional SSA form, as there is no "out of SSA"
336336
translation (see the comments on `optVnCopyProp()` for more information).
337337

338-
### <a name="cse"/>Common Subexpression Elimination (CSE)
338+
### <a name="cse"></a>Common Subexpression Elimination (CSE)
339339

340340
Utilizes value numbers to identify redundant computations, which are then evaluated to a new temp lclVar, and then
341341
reused.
342342

343-
### <a name="assertion-propagation"/>Assertion Propagation
343+
### <a name="assertion-propagation"></a>Assertion Propagation
344344

345345
Utilizes value numbers to propagate and transform based on properties such as non-nullness.
346346

347-
### <a name="range-analysis"/>Range analysis
347+
### <a name="range-analysis"></a>Range analysis
348348

349349
Optimize array index range checks based on value numbers and assertions.
350350

351-
## <a name="rationalization"/>Rationalization
351+
## <a name="rationalization"></a>Rationalization
352352

353353
As the JIT has evolved, changes have been made to improve the ability to reason over the tree in both "tree order"
354354
and "linear order". These changes have been termed the "rationalization" of the IR. In the spirit of reuse and
@@ -473,7 +473,7 @@ t0 = LCL_VAR byref V03 arg3 u:1 (last use) $c0
473473
RETURN void $200
474474
```
475475

476-
## <a name="lowering"/>Lowering
476+
## <a name="lowering"></a>Lowering
477477

478478
Lowering is responsible for transforming the IR in such a way that the control flow, and any register requirements,
479479
are fully exposed.
@@ -529,7 +529,7 @@ In such cases, it must ensure that they themselves are properly lowered. This in
529529

530530
After all nodes are lowered, liveness is run in preparation for register allocation.
531531

532-
## <a name="reg-alloc"/>Register allocation
532+
## <a name="reg-alloc"></a>Register allocation
533533

534534
The RyuJIT register allocator uses a Linear Scan algorithm, with an approach similar to [[2]](#[2]). In discussion it
535535
is referred to as either `LinearScan` (the name of the implementing class), or LSRA (Linear Scan Register
@@ -622,7 +622,7 @@ Post-conditions:
622622
* `lvSpilled` flag is set if it is ever spilled
623623
* 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)`.
624624

625-
## <a name="code-generation"/>Code Generation
625+
## <a name="code-generation"></a>Code Generation
626626

627627
The process of code generation is relatively straightforward, as Lowering has done some of the work already. Code
628628
generation proceeds roughly as follows:
@@ -858,8 +858,8 @@ a 'T'.
858858

859859
## References
860860

861-
<a name="[1]"/>
861+
<a name="[1]"></a>
862862
[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.
863863

864-
<a name="[2]"/>
864+
<a name="[2]"></a>
865865
[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

Comments
 (0)