Commit 6fd3636
authored
[r2r] Fix rule for skipping compilation of methods with CompExactlyDependsOn (#125372)
If a method has `CompExactlyDependsOn` attribute, it means the
correctness of its code depends on matching support for the instruction
set between r2r compilation time and run time jit compilation.
For the example of ShuffleNativeModified:
```
[CompExactlyDependsOn(typeof(Ssse3))]
internal static Vector128<byte> ShuffleNativeModified(Vector128<byte> vector, Vector128<byte> indices)
{
if (Ssse3.IsSupported)
return Ssse3.Shuffle(vector, indices);
return Vector128.Shuffle(vector, indices);
}
```
Ssse3 is an intel specific instruction set that is never used on arm64.
The check in code was returning an ILLEGAL instruction set. This case
was treated as `continue` instead of setting `doBypass` to false.
Because of this, this method was skipped from r2r compilation. We now
treat the ILLEGAL case as known compile time support, so we don't skip
the method from r2r compilation. The fix avoids interpreting this method
on ios-arm64, making JSON serialization/deserialization 2x faster.1 parent fc52927 commit 6fd3636
File tree
5 files changed
+44
-16
lines changed- src
- coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface
- libraries/System.Private.CoreLib/src
- System
- Runtime/CompilerServices
- SearchValues
- Text
5 files changed
+44
-16
lines changedLines changed: 23 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| 597 | + | |
597 | 598 | | |
598 | 599 | | |
599 | 600 | | |
| |||
627 | 628 | | |
628 | 629 | | |
629 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
630 | 635 | | |
631 | 636 | | |
632 | 637 | | |
633 | 638 | | |
634 | 639 | | |
635 | | - | |
636 | | - | |
637 | | - | |
| 640 | + | |
638 | 641 | | |
639 | 642 | | |
640 | 643 | | |
641 | 644 | | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 645 | + | |
| 646 | + | |
652 | 647 | | |
653 | | - | |
654 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
655 | 657 | | |
656 | 658 | | |
657 | 659 | | |
658 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
659 | 666 | | |
660 | 667 | | |
661 | 668 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
849 | 849 | | |
850 | 850 | | |
851 | 851 | | |
| 852 | + | |
852 | 853 | | |
853 | 854 | | |
854 | 855 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
| 1635 | + | |
1635 | 1636 | | |
1636 | 1637 | | |
1637 | 1638 | | |
| |||
0 commit comments