Skip to content

Commit 60de14e

Browse files
authored
Added links to CoreCLR issues, small formatting fix
1 parent 878cd5d commit 60de14e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Documentation/design-docs/first-class-structs.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct foo { public byte b1, b2, b3, b4; }
3131
static foo getfoo() { return new foo(); }
3232
```
3333

34-
* \#1133 JIT: Excessive copies when inlining
34+
* [\#1133 JIT: Excessive copies when inlining](https://github.com/dotnet/coreclr/issues/1133)
3535
* The scenario given in this issue involves a struct that is larger than 8 bytes, so
3636
it is not impacted by the fixed-size types. However, by enabling assertion propagation
3737
for struct types (which, in turn is made easier by using normal assignments), the
@@ -40,31 +40,31 @@ static foo getfoo() { return new foo(); }
4040
and it may be worth considering (in future) whether we can avoiding adding them
4141
in the first place.
4242

43-
* \#1161 RyuJIT properly optimizes structs with a single field if the field type is int but not if it is double
43+
* [\#1161 RyuJIT properly optimizes structs with a single field if the field type is int but not if it is double](https://github.com/dotnet/coreclr/issues/1161)
4444
* This issue arises because we never promote a struct with a single double field, due to
4545
the fact that such a struct may be passed or returned in a general purpose register.
4646
This issue could be addressed independently, but should "fall out" of improved heuristics
4747
for when to promote and enregister structs.
4848

49-
* \#1636 Add optimization to avoid copying a struct if passed by reference and there are no
50-
writes to and no reads after passed to a callee.
49+
* [\#1636 Add optimization to avoid copying a struct if passed by reference and there are no
50+
writes to and no reads after passed to a callee](https://github.com/dotnet/coreclr/issues/1636).
5151
* This issue is nearly the same as the above, except that in this case the desire is to
5252
eliminate unneeded copies locally (i.e. not just due to inlining), in the case where
5353
the struct may or may not be passed or returned directly.
5454
* Unfortunately, there is not currently a scenario or test case for this issue.
5555

56-
* \#3144 Avoid marking tmp as DoNotEnregister in tmp=GT_CALL() where call returns a
57-
enregisterable struct in two return registers
56+
* [\#3144 Avoid marking tmp as DoNotEnregister in tmp=GT_CALL() where call returns a
57+
enregisterable struct in two return registers](https://github.com/dotnet/coreclr/issues/3144)
5858
* This issue could be addressed without First Class Structs. However,
5959
it will be easier with struct assignments that are normalized as regular assignments, and
6060
should be done along with the streamlining of the handling of ABI-specific struct passing
6161
and return values.
6262

63-
* \#3539 RyuJIT: Poor code quality for tight generic loop with many inlineable calls
63+
* [\#3539 RyuJIT: Poor code quality for tight generic loop with many inlineable calls](https://github.com/dotnet/coreclr/issues/3539)
6464
(factor x8 slower than non-generic few calls loop).
6565
* I am still investigating this issue.
6666

67-
* \#5556 RuyJIT: structs in parameters and enregistering
67+
* [\#5556 RuyJIT: structs in parameters and enregistering](https://github.com/dotnet/coreclr/issues/5556)
6868
* This also requires further investigation, but requires us to "Add support in prolog to extract fields, and
6969
remove the restriction of not promoting incoming reg structs that have more than one field" - see [Dependent Work Items](https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/first-class-structs.md#dependent-work-items)
7070

@@ -641,6 +641,7 @@ be handled in a more general fashion in `fgMorphCopyBlock()`?
641641
The latter seems desirable for its general applicability.
642642

643643
One way to handle this might be:
644+
644645
1. Whenever you have a case of mismatched structs (call args, call node, or return node),
645646
create a promoted temp of the "fake struct type", e.g. for arm you would introduce three
646647
new temps for the struct, and for each of its TYP_LONG promoted fields.

0 commit comments

Comments
 (0)