anthonycanino [Mon, 10 Apr 2023 23:27:23 +0000 (16:27 -0700)]
Adding support for Vector512 `Equals`, `EqualsAny`, `op_Equality`, and `op_Inequality`. (#83470)
* Implement `Vector512.Equals` by way of special `AVX512` intrinsic.
* Add Vector512 `Equals`, `EqualsAll/op_Equality` `op_Inequality`.
* Fix `vpmovm2x` instructions for `MoveMaskToVectorSpecial`.
* Move `Vector512` Equals into `gtNewSimdCmpOpNode`.
* Adds `EqualsAny`.
* Fix `kortestq` and `kortestd` opcode gen (W bit).
* Fix merge and update instr flags.
* Addressing review comments.
* Removing unnecessary files.
* Addressing review comments.
* Fixing bug.
* Fixing k reg display on x86.
* Setting Resets_ZF to right value.
* Fixing extract.
---------
Co-authored-by: Deepak Rajendrakumaran <deepak.rajendrakumaran@intel.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Katelyn Gadd [Mon, 10 Apr 2023 23:02:55 +0000 (16:02 -0700)]
[jiterp] Move the backbranch flag to a local that is only flushed on abnormal trace exit (#84585)
Katelyn Gadd [Mon, 10 Apr 2023 23:02:38 +0000 (16:02 -0700)]
[jiterp] Move the backbranch flag to a local that is only flushed on abnormal trace exit (#84585)
Egor Bogatov [Mon, 10 Apr 2023 22:56:43 +0000 (00:56 +0200)]
Add SIMD to LowerCallMemcmp (#84530)
Andy Ayers [Mon, 10 Apr 2023 22:33:21 +0000 (15:33 -0700)]
Add SPMI benchmarks run collections for tiered and tiered pgo (#84483)
Add two new run configurations for SPMI benchmarks: tiered and tiered pgo.
So benchmark runs now have 3 separate collections.
The new ones are named "run_tiered" and "run_pgo", eg
```
benchmarks.run.windows.x64.checked.mch
benchmarks.run_tiered.windows.x64.checked.mch
benchmarks.run_pgo.windows.x64.checked.mch
```
Stephen Toub [Mon, 10 Apr 2023 20:15:35 +0000 (16:15 -0400)]
Implement IUtf8SpanFormattable on IPAddress and IPNetwork (#84487)
* Implement IUtf8SpanFormattable on IPAddress and IPNetwork
Implements IUtf8SpanFormattable explicitly on both IPAddress and IPNetwork. For IPNetwork, we just use Utf8.TryWrite just as the existing ISpanFormattable uses MemoryExtensions.TryWrite. For IPAddress, the existing formatting code is made to work generically for either byte or char.
In the process, I removed the unsafe pointer-based code from the formatting logic while also making it faster.
* Fix parameter names
Larry Ewing [Mon, 10 Apr 2023 19:46:49 +0000 (14:46 -0500)]
Disable TestCurrentValueDoesNotAllocateOnceValueIsCached on mono (#84571)
Bruce Forstall [Mon, 10 Apr 2023 17:02:03 +0000 (10:02 -0700)]
Update implementation of optUpdateLoopsBeforeRemoveBlock (#84511)
Use predecessor lists and the successor iterator.
Stephen Toub [Mon, 10 Apr 2023 16:31:44 +0000 (12:31 -0400)]
Improve regex compiler / source generator for sets (#84370)
* Fix downlevel builds with a project reference to regex generator
* Improve char class canonicalization for complete and almost empty sets
- Remove categories from a set whose ranges make it already complete (when there's no subtraction). We have code paths that explicitly recognize the Any char class, and these extra categories knock these sets off those fast paths.
- Remove categories from a set where a single char is missing from the ranges, by checking whether that char is contained in the categories. If the char is present, the set can be morphed into Any. If the char isn't present, the categories can be removed and the set becomes a standard NotOne form.
Both of these are unlikely to be written explicitly by a developer but result from analysis producing search sets, in particular when alternations or nullable loops are involved.
Also fixed textual description of sets that both contain the last character (\uFFFF) and have categories. We were sometimes skipping the first category in this case. This is only relevant to the source generator, as these descriptions are output in comments.
* Avoid using a IndexOf for the any set
We needn't search for anything, as everything matches.
* Improve regex source gen IndexOfAny naming for Unicode categories
When we're otherwise unable to come up with a good name for the custom IndexOfAny helper, if the set is just a handful of UnicodeCategory values, derive a name from those categories.
* Reduce RegexCompiler cost of using IndexOfAnyValues
With the source generator, each IndexOfAnyValues is stored in its own static readonly field. This makes it cheap to access and allows the JIT to devirtualize calls to it.
With RegexCompiler, we use a DynamicMethod and thus can't introduce new static fields, so instead we maintain an array of IndexOfAnyValues. That means that every time we need one, we're loading the object out of the array. This incurs both bounds checks and doesn't devirtualize.
This commit changes the implementation to avoid the bounds check and to also enable devirtualization.
Egor Bogatov [Mon, 10 Apr 2023 16:04:58 +0000 (18:04 +0200)]
Fix minor jitdisasm issue (#84548)
dotnet-maestro[bot] [Mon, 10 Apr 2023 15:50:03 +0000 (11:50 -0400)]
[main] Update dependencies from 10 repositories (#83624)
* Update dependencies from https://github.com/dotnet/llvm-project build
20230317.1
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23165.1 -> To Version 14.0.0-alpha.1.23167.1
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230317.4
optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.23166.4 -> To Version 1.0.0-prerelease.23167.4
* Update dependencies from https://github.com/dotnet/icu build
20230317.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 8.0.0-preview.3.23163.3 -> To Version 8.0.0-preview.3.23167.1
* Update dependencies from https://github.com/dotnet/emsdk build
20230317.2
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.3.23167.1 -> To Version 8.0.0-preview.3.23167.2
* Update dependencies from https://github.com/dotnet/runtime build
20230320.1
Microsoft.NET.ILLink.Tasks , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
From Version 8.0.0-preview.3.23162.2 -> To Version 8.0.0-preview.3.23170.1
* Update dependencies from https://github.com/dotnet/emsdk build
20230320.1
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.3.23167.1 -> To Version 8.0.0-preview.4.23170.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20230320.2
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23165.1 -> To Version 14.0.0-alpha.1.23170.2
* Update dependencies from https://github.com/dotnet/llvm-project build
20230320.3
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23165.1 -> To Version 14.0.0-alpha.1.23170.3
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230320.4
optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.23166.4 -> To Version 1.0.0-prerelease.23170.4
* Update dependencies from https://github.com/dotnet/icu build
20230320.4
Microsoft.NETCore.Runtime.ICU.Transport
From Version 8.0.0-preview.3.23163.3 -> To Version 8.0.0-preview.4.23170.4
* Update dependencies from https://github.com/dotnet/msquic build
20230320.1
System.Net.MsQuic.Transport
From Version 8.0.0-alpha.1.23166.1 -> To Version 8.0.0-alpha.1.23170.1
* Update dependencies from https://github.com/dotnet/cecil build
20230320.1
Microsoft.DotNet.Cecil
From Version 0.11.4-alpha.23163.1 -> To Version 0.11.4-alpha.23170.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20230321.1
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23165.1 -> To Version 14.0.0-alpha.1.23171.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20230321.2
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23165.1 -> To Version 14.0.0-alpha.1.23171.2
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230322.10
optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.23166.4 -> To Version 1.0.0-prerelease.23172.10
* Update dependencies from https://github.com/dotnet/emsdk build
20230322.1
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.4.23170.1 -> To Version 8.0.0-preview.4.23172.1
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230323.4
optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.23166.4 -> To Version 1.0.0-prerelease.23173.4
* Update dependencies from https://github.com/dotnet/xharness build
20230323.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.23163.1 -> To Version 1.0.0-prerelease.23173.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20230323.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
From Version 8.0.0-beta.23163.1 -> To Version 8.0.0-beta.23173.1
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230324.4
optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.23166.4 -> To Version 1.0.0-prerelease.23174.4
* Update dependencies from https://github.com/dotnet/msquic build
20230324.1
System.Net.MsQuic.Transport
From Version 8.0.0-alpha.1.23166.1 -> To Version 8.0.0-alpha.1.23174.1
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230325.4
optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.23166.4 -> To Version 1.0.0-prerelease.23175.4
* Update dependencies from https://github.com/dotnet/runtime build
20230327.1
Microsoft.NET.ILLink.Tasks , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
From Version 8.0.0-preview.3.23162.2 -> To Version 8.0.0-preview.4.23177.1
* Update dependencies from https://github.com/dotnet/emsdk build
20230327.1
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.4.23170.1 -> To Version 8.0.0-preview.4.23177.1
* Update dependencies from https://github.com/dotnet/xharness build
20230328.2
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.23163.1 -> To Version 1.0.0-prerelease.23178.2
* Update dependencies from https://github.com/dotnet/emsdk build
20230328.1
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.4.23170.1 -> To Version 8.0.0-preview.4.23178.1
* Update dependencies from https://github.com/dotnet/cecil build
20230328.1
Microsoft.DotNet.Cecil
From Version 0.11.4-alpha.23163.1 -> To Version 0.11.4-alpha.23178.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20230327.2
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23165.1 -> To Version 14.0.0-alpha.1.23177.2
* Update dependencies from https://github.com/dotnet/llvm-project build
20230329.1
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23165.1 -> To Version 14.0.0-alpha.1.23179.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20230329.4
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
From Version 8.0.0-beta.23163.1 -> To Version 8.0.0-beta.23179.4
* Update dependencies from https://github.com/dotnet/msquic build
20230329.1
System.Net.MsQuic.Transport
From Version 8.0.0-alpha.1.23166.1 -> To Version 8.0.0-alpha.1.23179.1
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20230329.3
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.1.0-alpha.0.23156.1 -> To Version 1.1.0-alpha.0.23179.3
* Rollback dotnet/msquic changes
* Update dependencies from https://github.com/dotnet/emsdk build
20230405.3
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.4.23170.1 -> To Version 8.0.0-preview.4.23205.3
* Update dependencies from https://github.com/dotnet/icu build
20230403.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 8.0.0-preview.3.23163.3 -> To Version 8.0.0-preview.4.23203.1
* Update dependencies from https://github.com/dotnet/msquic build
20230331.1
System.Net.MsQuic.Transport
From Version 8.0.0-alpha.1.23166.1 -> To Version 8.0.0-alpha.1.23181.1
* Revert "Update dependencies from https://github.com/dotnet/msquic build
20230331.1"
This reverts commit
11b80419169153fa820197f96443c22b6f2a5665.
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
SingleAccretion [Mon, 10 Apr 2023 14:54:36 +0000 (17:54 +0300)]
Delete `gtGetStructHandle` and friends (#84212)
* Delete gtGetStructHandle[IfPresent]
Replaced with GenTree::GetLayout.
* Delete the canonical handle logic
* Delete handle handling from fgMakeMultiUse
* Delete gtGetStructHandleForSIMD and friends
* Delete now-unused SIMD cache entries
* Fix SIMD
* Fix fgMakeMultiUse
* Delete the IsSimdAsHWIntrinsic logic
No longer needed.
* Fix formatting
Stephen Toub [Mon, 10 Apr 2023 13:33:42 +0000 (09:33 -0400)]
Implement IUtf8SpanFormattable on Version (#84556)
Tarek Mahmoud Sayed [Sun, 9 Apr 2023 23:04:55 +0000 (16:04 -0700)]
Apply the TimeProvider design feedback (#84501)
Andy Ayers [Sun, 9 Apr 2023 21:22:58 +0000 (14:22 -0700)]
JIT: scalable profile counter mode (#84427)
Add an config option to use a "scalable" profile helper for edge counters,
where we try and avoid contention by probablistic updates once the counter
value exceeds some threshold (currently 8192). Using the current xorshift
RNG this gives the counter a two-sigma accuracy of around +/- 2%.
The idea is loosely based on "Scalable Statistics Counters" by Dice, Lev,
and Moir (SPAA’13).
Also allow the scalable and interlocked profile modes to operate at the same
time, recording two sets of counts per probe, so we can verify that this new mode
is sufficiently accurate.
Sergey Anisimov [Sun, 9 Apr 2023 19:17:29 +0000 (05:17 +1000)]
fix Kernel32.GetSystemTimes usage on Windows (#84526)
Egor Bogatov [Sun, 9 Apr 2023 18:36:53 +0000 (20:36 +0200)]
Enable AVX-512 in Memmove unrolling (#84348)
Bruce Forstall [Sun, 9 Apr 2023 17:39:24 +0000 (10:39 -0700)]
Ensure loops respect dominators (#84458)
* Improve recognized loop invariants
When a loop has a single exit, the loop table stores a pointer to
the loop exit block. Ideally, we would have the property that the
loop entry block dominates the single exit block, and you could
thus walk up the IDom list from the exit the the entry block.
A peculiar loop structure on x86 only was preventing this: an "infinite"
loop with a "try/catch" where the only "exit" was from the "catch"
handler. For non-x86, the handler would have been moved out-of-line
as a funclet. But for x86, the handler is still in-line with the
loop blocks. This structure is peculiar because the catch handler
has no predecessors and doesn't participate "normally" in the dominator
tree.
Prevent handler blocks like this from being considered loop exits.
* Formatting
Layomi Akinrinade [Sun, 9 Apr 2023 17:34:15 +0000 (10:34 -0700)]
Simplify target to enable config binding src generator from NuGet package, ensure it runs for all TFMs, and rename enabling property (#84379)
* Simplify target to enable config binding src generator and rename sentinel property
* Further simplify target
* Address feedback
* Ensure generator removal target is for all TFMs
* Add logic to emit correct recommended minimum TFM
Stephen Toub [Sun, 9 Apr 2023 13:58:52 +0000 (09:58 -0400)]
Fix IUtf8SpanFormattable.TryFormat argument name (#84535)
The approved parameter name was `utf8Destination` rather than just `destination`.
Stephen Toub [Sun, 9 Apr 2023 11:24:15 +0000 (07:24 -0400)]
Implement IUtf8SpanFormattable on DateTime, DateTimeOffset, DateOnly, TimeOnly, TimeSpan, Char, Rune (#84469)
* Implement IUtf8SpanFormattable on DateTime, DateTimeOffset, DateOnly, TimeOnly, TimeSpan, Char, Rune
* Address PR feedback
Also dedup Utf8Formatter for TimeSpan with TimeSpan's new IUtf8SpanFormattable implementation and a little more cleanup.
And fix parameter name of TryFormat to match approved name.
Tanner Gooding [Sun, 9 Apr 2023 04:09:45 +0000 (21:09 -0700)]
Updating the JIT to support Narrow, WidenLower, and WidenUpper for Vector512 (#84498)
* Updating the JIT to support Narrow, WidenLower, and WidenUpper for Vector512
* Ensure tgtReg is passed in the RM slot for the AVX512 narrowing instructions
* Applying formatting patch
* Update src/coreclr/jit/lowerxarch.cpp
Jyothi Krishna V S [Sun, 9 Apr 2023 01:38:49 +0000 (18:38 -0700)]
Avx512 arithmetic (#84429)
* Add and Subtract support for AVX512
* Removing absovled condition
* fixing formatting issues
* Addressing review comments,
Using non saturation version for add.
* Update src/coreclr/jit/hwintrinsiclistxarch.h
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
---------
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Kunal Pathak [Sat, 8 Apr 2023 21:16:19 +0000 (14:16 -0700)]
Perform ldr to ldp peephole optimization (#84399)
* Perform ldr to ldp peephole optimization
* jit format
* handle non-gc str cases
* Add the comment
Dong-Heon Jung [Sat, 8 Apr 2023 18:29:53 +0000 (03:29 +0900)]
[RISC-V] coreclr-jit directory (#82379)
* [RISCV-V] coreclr-jit directory
- Successfully cross-build for RISC-V.
- Run A simple application "helloworld"
- Fail a test in clr.paltest
* Fix in jit/CMakeLists.txt
* Tidy up by jit-format
* Add a emitIns_S_R_R to handling more temporary reg
* Fix jit code format
* Fix
* [JIT] Fix test
* [JIT] Updated
* [JIT] JitFormat
* [JIT] Enable IsImplicitByrefParameterValuePostMorph
* [JIT] Update
- Use rsGetRsvdReg
- Remove unnecessary codes
* [JIT] Replace to RISCV64
I implemented based on LOONGARCH.
Some comments in the codes are not updated yet.
* [JIT] Update emitter and fix bugs
* [JIT] Fix a build error (remove GT_ADDR)
* [JIT] FIX BUILD ERROR
- Remove GTF_BLK_VOLATILE
- Replace GT_LCL_VAR_ADDR and GT_LCL_FLD_ADDR with GT_LCL_ADDR
* [JIT] Update by reviews
* [JIT] Update JCMP and fix related errors
* [JIT] Add NYI
* [JIT] Add getRISCV64PassStructInRegisterFlags
* [JIT] Remove constant handling in genRangeCheck
* [VM] Add getRISCV64PassStructInRegisterFlags
* [VM] Update JITEEVersionIdentifier
David Mason [Sat, 8 Apr 2023 15:10:58 +0000 (08:10 -0700)]
Update enabledisable.csproj (#84506)
Egor Bogatov [Sat, 8 Apr 2023 08:10:53 +0000 (10:10 +0200)]
NativeAOT: Partially expand static initialization (#83911)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Adeel Mujahid [Sat, 8 Apr 2023 03:09:32 +0000 (06:09 +0300)]
Write linker script for lld to enable gc-sections (#84493)
VincentWu [Sat, 8 Apr 2023 02:20:33 +0000 (10:20 +0800)]
[mono] [RISC-V] re-implement floating point arithmetic without r4fp (#84470)
* fix no r4fp
* format
* defined MONO_ARCH_FLOAT32_SUPPORTED
Zoltan Varga [Sat, 8 Apr 2023 01:46:22 +0000 (21:46 -0400)]
Reenable VectorLookup tests for mono. (#84330)
David Mason [Sat, 8 Apr 2023 00:25:01 +0000 (17:25 -0700)]
Allow multiple EventCounters sessions and make sure EventListeners always send a Disable command (#82970)
Jackson Schuster [Fri, 7 Apr 2023 23:52:19 +0000 (18:52 -0500)]
[ComInterfaceGenerator] Strip public keyword from managedToNative stub (#84496)
Nicholas Orlowsky [Fri, 7 Apr 2023 22:17:30 +0000 (17:17 -0500)]
typo fix (#84485)
Bruce Forstall [Fri, 7 Apr 2023 21:56:17 +0000 (14:56 -0700)]
Introduce BBJ_EHFAULTRET (#84467)
The IL `endfinally` and `endfault` instructions are aliases,
imported in the JIT IR as `BBJ_EHFINALLYRET`.
Introduce `BBJ_EHFAULTRET` for cases within `fault` clauses.
This simplifies some code, and makes it more clear when writing
code that `fault` clauses need to be considered, separately from
`finally` clauses.
To do this, after importing EH clauses, convert any `BBJ_EHFINALLYRET`
as necessary. Also, try/finally cloning, which (sometimes) converts
`finally` clauses to `fault` clauses, needs to update the corresponding
`BBJ_EHFINALLYRET`. When creating new try/fault clauses for synchronized
functions, use `BBJ_EHFAULTRET` now.
Fixes #84307
Jeremy Koritzinsky [Fri, 7 Apr 2023 21:12:04 +0000 (14:12 -0700)]
Derived Interface support in ComInterfaceGenerator (#84271)
Vlad Brezae [Fri, 7 Apr 2023 21:10:49 +0000 (00:10 +0300)]
[mono][sgen] Remove more dead code (#84476)
Jakob Botsch Nielsen [Fri, 7 Apr 2023 19:05:26 +0000 (21:05 +0200)]
JIT: Avoid unnecessary GTF_GLOB_REFs (#84349)
* Avoid setting GTF_GLOB_REF on GT_FIELD_ADDR nodes
* Avoid setting GTF_GLOB_REF on GT_FIELD nodes off of implicit byrefs.
This is ok now since implicit byref morphing indiscriminately sets
GTF_GLOB_REF for these.
* Manually clone a "pointer to span" in span intrinsic expansion when it points to a local. Unfortunately this does not fall out from the above since gtClone does not handle FIELD_ADDR, and making it handle this needs some more work.
These changes are necessary to avoid address exposure in the two user
benchmarks in #83388.
Fix #74563
Fix #856
Jeremy Koritzinsky [Fri, 7 Apr 2023 18:09:56 +0000 (11:09 -0700)]
Use a tuned ConcurrentDictionary in the default caching implementation for the COM source generator (#84335)
Vitek Karas [Fri, 7 Apr 2023 15:57:10 +0000 (08:57 -0700)]
Add a test for warning behavior of Requires on type with a const field (#84452)
The IL tools (illink, ilc) don't see const field references in code, since the compiler inlines the values. But analyzer does see them. If the const field is on a type with Requires attribute, that access is reported as a warning, which is only produced by the analyzer.
This adds tests for these cases, no product changes.
Tests for https://github.com/dotnet/runtime/issues/84433
Eric StJohn [Fri, 7 Apr 2023 15:28:37 +0000 (08:28 -0700)]
Make service wait on its state before stopping (#84447)
Alexander Köplinger [Fri, 7 Apr 2023 14:04:00 +0000 (16:04 +0200)]
[mono] Fix build error due to undeclared identifier 'llvm' (#84473)
`llvm` is only declared when ENABLE_LLVM is defined.
Tomáš Rylek [Fri, 7 Apr 2023 07:53:47 +0000 (09:53 +0200)]
Mitigation for #84446: comment out problematic JIT assertion check (#84449)
The most recent aggregated runtime MIBC optimization data contains
a combination of block and edge counts, possibly after a change
from January 2023 that switched MIBC logic over from using block
counts to edge counts. The offending assertion check wasn't expecting
it and started crashing Crossgen2 during compilation of
System.Private.CoreLib on Windows x64 / arm. Based on Andy Ayers'
advice I'm proposing to comment out the assertion check; I have
created the tracking issue #84446 to follow up on consolidation of
JIT and MIBC production logic in this respect.
Thanks
Tomas
Ilona Tomkowicz [Fri, 7 Apr 2023 07:04:32 +0000 (09:04 +0200)]
[browser][non-icu] `HybridGlobalization` compare (#84249)
* Added support for hybrid globalization comparison.
* Clean-up. Added exception test cases to docs.
* Nit changes from @kg's review.
* Applied @kg's review.
* Revert unintentional change.
* Refactor: all hybrid globalization js methods in one file.
* Color the syntax.
* Undeline the fact that this PR is only for WASM.
* Move interop functions to proper location.
Michal Strehovský [Fri, 7 Apr 2023 06:04:01 +0000 (15:04 +0900)]
Shrink hello world by 3.2% (#84463)
* Get rid of the MethodTable for double/float
* Get rid of any `Array<T>` methods
Vladimir Sadov [Fri, 7 Apr 2023 02:04:47 +0000 (19:04 -0700)]
[NativeAOT] Using the same CastCache implementation as in CoreClr (#84430)
* Getter
* different limits on debug/release
* tweaks
* remove now unnecessary CrstCastCache
* implement flushing
* move coreclr castcache to a separate file
* Unified CastCache implementation
* comments and cleanups
* couple more cleanups
* trivial implementation of the cast cache for the Test.Corlib
* use Numerics.BitOperations for bit math
Tarek Mahmoud Sayed [Fri, 7 Apr 2023 01:59:03 +0000 (18:59 -0700)]
Introducing Time abstraction Part2 (down-level support) (#84235)
Adeel Mujahid [Thu, 6 Apr 2023 23:23:56 +0000 (02:23 +0300)]
Simplify numasupport (#84207)
* Simplify numasupport
* short-circuit
* Cleanup from QUIC readme
* Address CR feedback: early bail for < 2 NUMA nodes
* Fix node numbering, which is 0-based
Mukund Raghav Sharma (Moko) [Thu, 6 Apr 2023 22:56:05 +0000 (15:56 -0700)]
Added the ability to specify a Spin Count Unit via a GC Configuration
Added the ability to specify a Spin Count Unit via a GC Configuration and make use of this value in the SetYieldProcessorScalingFactor function if the value is valid. If this configuration is not specified, we default to 0 and fall back to the original logic.
Elinor Fung [Thu, 6 Apr 2023 22:36:03 +0000 (15:36 -0700)]
Move startup hook tests targeting `StartupHookProvider` out of hosting tests (#84338)
Jakob Botsch Nielsen [Thu, 6 Apr 2023 22:05:19 +0000 (00:05 +0200)]
JIT: Set GTF_DEBUG_NODE_MORPHED properly in block morph (#84352)
With side effects that may go on top, it may be block morph's
responsibility to set this flag.
Also set the type of the reused GT_COMMA nodes; haven't actually seen
any issues here, but seems prudent to do this.
Fixes some stress issues seen over in #83771.
Alexander Köplinger [Thu, 6 Apr 2023 21:51:02 +0000 (23:51 +0200)]
Fix eventpipe/enabledisable.cs test on Android (#84409)
It needs the same customization that we have in IpcTraceTest.cs
Mukund Raghav Sharma (Moko) [Thu, 6 Apr 2023 21:47:56 +0000 (14:47 -0700)]
Correctly display the GCSettings specified in the runtimeconfig json via the GC Configuration API Call (#84201)
Fixes #84198 by honoring the user specified GC Configuration by appropriately setting the Configuration obtained from both the Environment Variables and the JSON Configuration.
Maoni Stephens [Thu, 6 Apr 2023 21:19:36 +0000 (14:19 -0700)]
added explanation to more GC data structures (#84162)
+ added explanation to generation, dynamic_data and heap_segment, especially to mention which fields will need to be taken care of if we change the heap count
+ removed the unused pinned_allocated field from generation
Levi Broderick [Thu, 6 Apr 2023 21:09:21 +0000 (14:09 -0700)]
Unit tests should re-enable BinaryFormatter for compat testing (#84437)
Zoltan Varga [Thu, 6 Apr 2023 21:03:51 +0000 (17:03 -0400)]
[mono][jit] Revert parts of '[mono] Remove the support for non r4fp, its not used by any supported platforms. (#82005)' (#84418)
Some platforms don't support r4fp, so put back the general JIT support code.
Force r4fp on platforms that support it.
Fixes https://github.com/dotnet/runtime/issues/84401.
VincentWu [Thu, 6 Apr 2023 21:02:41 +0000 (05:02 +0800)]
[RISC-V] Port Mono for RISC-V 64 Arch (3/3) IL Lowering & Outputting (#83716)
* IL lowering & output
* add blank line at end of file
* format
Levi Broderick [Thu, 6 Apr 2023 21:01:00 +0000 (14:01 -0700)]
Reserving two diagnostic codes for serialization work (#84439)
Jacques Eloff [Thu, 6 Apr 2023 20:59:52 +0000 (13:59 -0700)]
Enable building preview workload components (#84365)
To support insertions of multiple SDKs into Visual Studio, the components associated with workloads need to have unique IDs. Currently there is a 1:1 mapping between VS components and .NET workloads. Inserting multiple SDKs into VS creates a conflict. The Aracde tasks used to create workloads were updated to produce two sets of components with the second set containing an additional .pre suffix.
The build would produce one additional artifact for VS
Mark Plesko [Thu, 6 Apr 2023 20:39:50 +0000 (13:39 -0700)]
Fixes for BuildAsStandalone in tests (#84374)
This should fix test builds with `set BuildAsStandalone=true`.
- [Remove](https://github.com/dotnet/runtime/commit/
5f14f058f4ed2f70633abea1bb59f34203e1718d) unconditional `<BuildAsStandalone>false</BuildAsStandalone>` from various HardwareIntrinsics tests. This is already the default via Directory.Build.props but interferes with `set BuildAsStandalone=true`. (nit - also remove an empty `PropertyGroup` from GitHub_43569.csproj)
- [Remove `Main` methods](https://github.com/dotnet/runtime/commit/
0a886f8ee12eff9abb6d52391a1c324da6add1e6). We might be able to pursue a strategy where the test author provides a `Main(args)` method for local custom execution. The test would either need a separate parameterless [Fact] method or a [Theory] plus data for `Main` for merged group to execute it. However, a RequiresProcessIsolation/BuildAsStandalone build would ignore that metadata, so I'd like to avoid that complexity. The Main methods here set a bool or parse an int, which can be added locally to any test as needed.
- [Add comment](https://github.com/dotnet/runtime/commit/
e79a10c9e397caf90c8342dfea5707b8a35f3b3d) to Directory.Merged.props (addressing feedback on #83462)
- [Add the Methodical test back into the superpmi test](https://github.com/dotnet/runtime/commit/
7c61de8574b0995fbd7779987a8eb6a35c059117) using RequiresProcessIsolation
Fixes #76421
Fixes #81984
Thays Grazia [Thu, 6 Apr 2023 19:14:22 +0000 (16:14 -0300)]
Removing test case that is not working on chrome anymore (#84440)
Egor Bogatov [Thu, 6 Apr 2023 18:57:59 +0000 (20:57 +0200)]
Disable StackallocBlkTests test on Mono (#84408)
* Disable StackallocBlkTests test on Mono
* trigger CI
Tom Deseyn [Thu, 6 Apr 2023 18:50:50 +0000 (20:50 +0200)]
Microsoft.NETCore.Platforms: support adding rids with '-' in the base part. (#84413)
* Microsoft.NETCore.Platforms: support adding rids with '-' in the base part.
Currently when trying to add a rid like 'linux-musl-x64'
the rid is not understood to be base = 'linux-musl', arch = 'x64'.
Instead the parser considers a potential optional qualifier.
This causes the rid to be parsed as base = 'linux', arch = 'musl',
and qualifier = 'x64'.
We know the rids being added won't have a qualifier. If we take
this into account while parsing, we can parse the rid correctly.
* Update src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
---------
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Jeremy Koritzinsky [Thu, 6 Apr 2023 18:00:25 +0000 (11:00 -0700)]
Move over all interop generator unit tests to use raw string literals (#84391)
Bruce Forstall [Thu, 6 Apr 2023 15:49:07 +0000 (08:49 -0700)]
Always create loop pre headers (#83956)
* Always create loop pre-header
As part of finding natural loops and creating the loop
table, create a loop pre-header for every loop. This
simplifies a lot of downstream phases, as the loop
pre-header will be guaranteed to exist, and will already
exist in the dominator tree.
Introduce code to preserve an empty pre-header block through
the optimization phases.
Remove now unnecessary code in hoisting and elsewhere.
Fixes #77033, #62665
* Fix loop unrolling to work with loop pre-headers
* Add `optLoopsRequirePreHeaders` variable
* Prevent removing pre-header blocks
* Allow removing unreachable pre-headers
Disallow creating pre-header after SSA is built
* Make optLoopCloningEnabled() static
* Teach loop cloning to expect and respect loop pre-headers
* Remove special case pre-header handling in hoisting
* Remove unused SSA update code in fgCreateLoopPreHeader
* Remove unneeded pre-header code from fgDominate
* Remove workaround to avoid extraneous LSRA diffs due to bbNum ordering
* Update comments
* Improve loop table rebuilding with pre-headers
When the loop table is built, it looks around for various loop patterns,
including looking for a guaranteed-executed, pre-loop constant initializer.
This is used in loop cloning and loop unrolling. It needs to look
"a little harder" in the case we created loop pre-headers, then
rebuild the loop table (currently, only due to loop unrolling of loops that
contain nested loops). The new code only allows for empty pre-headers. This
works since in our current phase ordering, no hoisting happens by the time
the loop table is rebuilt.
(Actually, it's currently not necessary to do this at all, since the constant
initializer info is only used by cloning and loop unrolling, both of which
have finished by the time the loop table is rebuilt. However, we might someday
choose to rebuild the loop table after cloning and before unrolling, at which
point it would be necessary.)
* Update comments
VincentWu [Thu, 6 Apr 2023 15:08:32 +0000 (23:08 +0800)]
[RISC-V] Port Mono for RISC-V 64 Arch (2/3) thunk & tramponlie (#83715)
* thunk & tramponlie for riscv64, also exception call
* format
Eric Erhardt [Thu, 6 Apr 2023 14:31:01 +0000 (09:31 -0500)]
Use better trimming message in ValidationContext (#84326)
* Use better trimming message in ValidationContext
Add more details about why ValidationContext requires unreferenced code.
Fix #84324
* Exclude RequiresUnreferencedCodeAttribute from baseline API compat
Viktor Hofer [Thu, 6 Apr 2023 14:30:38 +0000 (16:30 +0200)]
Don't overwrite pinned assembly versions in servicing (#84079)
* Don't overwrite pinned assembly versions in servicing
There are eight packable projects that pin their assembly version for .NET
Framework compatibility. The incremental package servicing
infrastructure didn't check if the assembly version is pinned and always
changed it.
As an example, System.Speech pins its assembly version to 4.0.0.0 but
that version gets overwritten during servicing. I.e. for .NET 7 the
version would then change to "7.0.0.$(ServicingVersion)" which is
incorrect.
Please find the full list of impacted assemblies below:
- System.ComponentModel.Composition
- System.DirectoryServices
- System.DirectoryServices.AccountManagement
- System.DirectoryServices.Protocols
- System.Management
- System.Reflection.Context
- System.Runtime.Caching
- System.Speech
* Only pin AssemblyVersion in netstandard2.0 assemblies
These assemblies pin their AssemblyVersion to be compatible with
.NETFramework where the same assembly is inbox.
The only TargetFramework we build that is compatible with .NETFramework
is netstandard2.0, so only pin the assembly on that framework.
* Override AssemblyVersion in Directory.Build.targets
Previously assemblies would set AssemblyVersion in Directory.Build.props
which was too early, because later packaging.targets could not distinguish
between a value that was explicitly set and the default value of the repo.
Instead override the value after the Servicing value is set, in
Directory.Build.targets
* Update comments
* Remove ValidateAssemblyVersionsInRefPack target
The only thing this target did was a redundant check that AssemblyVersion was
set for projects in the Targeting Pack. That check was failing for
the NETStandard build of System.DirectoryServices.
This target was providing no value, instead we need to fix https://github.com/dotnet/runtime/issues/42961
which will be a proper check of our servicing version rules.
* Address feedback
---------
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Anton Firszov [Thu, 6 Apr 2023 13:55:21 +0000 (15:55 +0200)]
Fix BeginReceiveMessageFromV4BoundToSpecificV6_NotReceived (#83463)
Vlad Brezae [Thu, 6 Apr 2023 13:43:42 +0000 (16:43 +0300)]
[mono][interp] Remove MINT_LEAVE opcode (#84410)
It is identical to MINT_BR
Vlad Brezae [Thu, 6 Apr 2023 13:29:35 +0000 (16:29 +0300)]
[mono][tests] Properly triage known GC failure (#84403)
Katelyn Gadd [Thu, 6 Apr 2023 12:08:58 +0000 (05:08 -0700)]
[wasm] Implement LEAVE_CHECK in the jiterpreter (as a bailout) (#84387)
LEAVE_CHECK is a variant of LEAVE that only appears inside catch clauses, and catch clauses will not be running during normal optimized execution. So it's reasonable for the jiterpreter to compile them into bailouts, which will allow trace compilation to continue past the catch clause.
Stephen Toub [Thu, 6 Apr 2023 11:12:46 +0000 (07:12 -0400)]
Add Utf8.TryWrite (#83852)
* Add Utf8.TryWrite
Initial implementation of Utf8.TryWriteUtf8. The performance of this won't be great at present, but will improve as our cores types add implementation of IUtf8SpanFormattable. For tests, I copy/pasted the tests we had for MemoryExtensions.TryWrite and searched/replaced to make them work for Utf8.TryWrite.
* Address PR feedback
Jeremy Koritzinsky [Thu, 6 Apr 2023 06:23:49 +0000 (23:23 -0700)]
Fix Roslyn dependency version in source-build (#84366)
Jeremy Koritzinsky [Thu, 6 Apr 2023 05:23:20 +0000 (22:23 -0700)]
Disable nullability checks in file shared between the managed type system and ILVerificationTests (#84382)
This file is shared between the managed type system and the ILVerificationTests suite.
The managed type system doesn't have nullable checks turned on, but ILVerificationTests does. This was causing build failures in PRs that build the ILVerificationTests.
We should enable nullable checking in the future in the managed type system as a whole at some point, but we aren't there yet.
Zoltan Varga [Thu, 6 Apr 2023 05:20:31 +0000 (01:20 -0400)]
[mono][aot] Fix an assert. (#84385)
This is hit when AOTing GitHub_27678.dll.
Michał Petryka [Thu, 6 Apr 2023 05:14:14 +0000 (07:14 +0200)]
Fix ThunkGenerator (#84390)
* Fix ThunkGenerator
Fixes:
```
error CA1859: Change type of parameter 'tr' from 'System.IO.TextReader' to 'System.IO.StreamReader' for improved performance
error CA1859: Change return type of method 'ParseInput' from 'System.Collections.Generic.IEnumerable<Thunkerator.FunctionDecl>' to 'System.Collections.ObjectModel.ReadOnlyCollection<Thunkerator.FunctionDecl>' for improved performance
```
* Fix typo
Eric StJohn [Thu, 6 Apr 2023 04:42:17 +0000 (21:42 -0700)]
Make WindowsServiceLifetime gracefully stop (#83892)
* Make WindowsServiceLifetime gracefully stop
WindowsServiceLifetime was not waiting for ServiceBase to stop the service. As a result
we would sometimes end the process before notifying service control manager that the service
had stopped -- resulting in an error in the eventlog and sometimes a service restart.
We also were permitting multiple calls to Stop to occur - through SCM callbacks, and through
public API. We must not call SetServiceStatus again once the service is marked as stopped.
* Alternate approach to ensuring we only ever set STATE_STOPPED once.
* Avoid calling ServiceBase.Stop on stopped service
I fixed double-calling STATE_STOPPED in ServiceBase, but this fix will
not be present on .NETFramework. Workaround that by avoiding calling
ServiceBase.Stop when the service has already been stopped by SCM.
* Add tests for WindowsServiceLifetime
These tests leverage RemoteExecutor to avoid creating a separate service
assembly.
* Respond to feedback and add more tests.
This better integrates with the RemoteExecutor component as well,
by hooking up the service process and fetching its handle.
This gives us the correct logging and exitcode handling from
RemoteExecutor.
* Honor Cancellation in StopAsync
* Fix bindingRedirects in RemoteExecutor
* Use Async lambdas for service testing
* Fix issue on Win7 where duplicate service descriptions are disallowed
* Respond to feedback
* Fix comment and add timeout
SwapnilGaikwad [Thu, 6 Apr 2023 02:47:28 +0000 (03:47 +0100)]
Arm64: Optimize pairs of "str wzr" to "str xzr" (#84350)
Optimise following patterns
```
stp wzr, wzr, [x2, #0x08] => str xzr, [x2, #0x08]
```
and
```
stp wzr, wzr, [x14, #0x20]
str xzr, [x14, #0x18] => stp xzr, xzr, [x14, #0x18]
```
Stephen Toub [Thu, 6 Apr 2023 02:33:21 +0000 (22:33 -0400)]
Add ArgumentOutOfRangeException.ThrowIf{Not}Equal (#83853)
* Add ArgumentOutOfRangeException.ThrowIf{Not}Equal
* Address PR feedback
* Address PR feedback
Stephen Toub [Thu, 6 Apr 2023 02:32:36 +0000 (22:32 -0400)]
Add back IComparable-based optimization to FrozenDictionary/Set (#84301)
* Add back IComparable-based optimization to FrozenDictionary/Set
We previously had an optimization in FrozenDictionary/Set that special-cased a small number of value types when the default comparer is used... if that type was IComparable, we would sort the types, which would then a) enable us to immediately reject items larger than the known max, and b) enable us to stop searching once we hit an item larger than the one for which we were searching (which then implicitly also immediately rules out items smaller than the known min).
We removed that optimization in general because some prominent IComparable implementations don't always work, in particular container types like ValueTuple that implement IComparable but then it's only functional if the contained types are also comparable. This commit puts it back for an allow-list of types.
* Address PR feedback
Michal Strehovský [Wed, 5 Apr 2023 23:58:06 +0000 (08:58 +0900)]
Speed up named type lookups in managed type system (#84285)
When the type system needs to resolve a named type in a module, it will do a `foreach` loop over all types in the module looking for the type. This can get mildly hot and I've seen it in CPU profiles but it never looked too important to address (despite the TODO).
But when MIBC files are passed to the compiler, this gets ridiculously hot. Compile Hello world by default: 0.98 seconds. Compile hello world with 5 MIBC files: 9.1 seconds.
This adds a hashtable to the lookup and drops the MIBC case to 1.4 seconds (we'll want to parallelize the MIBC loading on a background thread to get rid of the last mile, but first things first).
Steve Pfister [Wed, 5 Apr 2023 22:32:04 +0000 (18:32 -0400)]
[Android] Free up more disk space on CI builds (#84354)
The android builds are running out of disk space when building the library test apps. This change tries to recoup some of that space by deleting artifacts after each test was built.
Jan Kotas [Wed, 5 Apr 2023 21:55:43 +0000 (14:55 -0700)]
Add missing step to native AOT dev workflow instructions (#84381)
Parker Bibus [Wed, 5 Apr 2023 20:56:55 +0000 (13:56 -0700)]
Removed pipeline dependencies and steps for running Maui-iOS as it has been moved to the performance repo. (#84363)
Andrew Au [Wed, 5 Apr 2023 20:46:38 +0000 (13:46 -0700)]
Avoid scaning the used region if there are no free units (#81525)
Eirik Tsarpalis [Wed, 5 Apr 2023 20:21:06 +0000 (21:21 +0100)]
Implement the JsonSerializer.IsReflectionEnabledByDefault feature switch (#83844)
* Implement the STJ.DisableDefaultReflection feature switch.
* Reinstate accidentally stripped attribute
* Address feedback.
* Address feedback.
* Add a trimming test for STJ
* Move trimming test to existing trimming tests folder.
* Add source gen serialization test case to Trimming test.
* Fix style.
* Expose the feature switch as a property on JsonSerializer -- rename feature switch to match namespace.
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Helpers.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Text.Json/tests/System.Text.Json.Tests/TrimmingTests/IsReflectionEnabledByDefaultFalse.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Address feedback.
* Address feedback.
* Add entry to feature-switches.md
---------
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Will Smith [Wed, 5 Apr 2023 20:07:04 +0000 (13:07 -0700)]
[JIT] X86/X64 - Eliminate redundant 'cmp' instructions (#82750)
* Fixed improper peephole zero-extension removal when cdq/cdqe/cwde instructions are involved
* Update regression test
* Formatting
* Handle cdq differently
* Handle cdq differently
* Handle cdq differently
* Initial commit to eliminate redundant 'cmp' instructions
* Take into account cmpxchg
* Take into account cmpxchg
* Feedback
* Temporarily disable cmp opt if we encounter a mov
* Allow checking for mov
* Allow regardless of targetReg
* Allow regardless of targetReg
* Checking if an instruction resets a flag.
* Remove useless comment
* Minor fix
* Abort are checking cmp
* Some refactoring. Taking into account any instruction that modifies flags.
* Minor cleanup
* Remove function from header
* Quick fix
* Sync
* Formatting
* Only look for 'cmp reg, reg'
* Added comment
* Update src/coreclr/jit/emitxarch.cpp
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
* Update src/coreclr/jit/emitxarch.cpp
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
---------
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Thays Grazia [Wed, 5 Apr 2023 19:48:58 +0000 (16:48 -0300)]
[wasm][debugger] Retry after timeout on debugger tests on CI (#84080)
* retrying if timeout OpenSessionAsync.
* Update src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
Co-authored-by: Larry Ewing <lewing@microsoft.com>
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
dotnet bot [Wed, 5 Apr 2023 18:41:51 +0000 (11:41 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2149956 (#84276)
Andrew Au [Wed, 5 Apr 2023 18:25:30 +0000 (11:25 -0700)]
Caching settings.pause_mode to avoid deadlock (#84189)
Zoltan Varga [Wed, 5 Apr 2023 18:15:03 +0000 (14:15 -0400)]
[mono][aot] Fix an assert in the aot compiler. (#84343)
Happens when AOT-ing Regression_1.dll from the JIT test suite.
Jan Kotas [Wed, 5 Apr 2023 17:36:38 +0000 (10:36 -0700)]
Switch CustomAttributeTypeNameParser to use common type name parser (#84281)
Andrew Au [Wed, 5 Apr 2023 17:35:59 +0000 (10:35 -0700)]
Avoid clearing uncommitted mark array (#83623)
Jakob Botsch Nielsen [Wed, 5 Apr 2023 17:08:04 +0000 (19:08 +0200)]
JIT: Ensure tail merging does not add preds to scratch block (#84353)
Fix issue seen in #83388 where tail merging ended up adding new
predecessors to the scratch block, making adding more "initialization
IR" impossible for downstream phases.
Radek Doulik [Wed, 5 Apr 2023 16:10:52 +0000 (18:10 +0200)]
[wasm] Freeze the emscripten cache (#84356)
This fixes https://github.com/dotnet/runtime/issues/83655
We prime the cache before packaging the emsdk cache package and also
in docker images, so we don't need to update the cache, which might be
in read-only location anyway.
The underlying issue was problem with the cache lock:
"C:/helix/work/correlation/build/emsdk/upstream/bin\clang.exe" --version
cache:WARNING: Accessing the Emscripten cache at "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache" (for "sanity") is taking a long time, another process should be writing to it. If there are none and you suspect this process has deadlocked, try deleting the lock file "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache\cache.lock" and try again. If this occurs deterministically, consider filing a bug.
cache:WARNING: Accessing the Emscripten cache at "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache" (for "sanity") is taking a long time, another process should be writing to it. If there are none and you suspect this process has deadlocked, try deleting the lock file "C:\helix\work\correlation\build\emsdk\upstream\emscripten\cache\cache.lock" and try again. If this occurs deterministically, consider filing a bug.
Katelyn Gadd [Wed, 5 Apr 2023 12:23:38 +0000 (05:23 -0700)]
[wasm] Implement the ENDFINALLY opcode in the jiterpreter (#84273)
* Mark the opcode following CALL_HANDLER interpreter opcodes as a back branch target
* In the jiterpreter, record each CALL_HANDLER location when compiling them
* Then when compiling an ENDFINALLY opcode check to see whether the branch target is one we recognize and if so do a branch, otherwise bail out
* Tweak CFG to filter out branch targets that are never used
* Add browser-bench measurement for try-finally
Radek Doulik [Wed, 5 Apr 2023 11:16:13 +0000 (13:16 +0200)]
[wasm] Simd refactoring (#84170)
* [wasm] Simd refactoring
Rename few opcodes to contain `_SIMD_`.
Use more SimdIntrinsic fields to simplify the code.
* Fix build
* Fix narrowing intrinsics
* Verbose aot compilation
* Feedback
* Make it verbose on helix
* Do not set op for narrowing methods
Because `emit_hardware_intrinsics` doesn't call custom emit in such case
and so we endup with code emitted with wrong zero c0.
* Feedback
* Be quiet again :-)
Vlad-Alexandru Ionescu [Wed, 5 Apr 2023 08:24:27 +0000 (10:24 +0200)]
Enabled Sqrt and Abs intrinsics (#84011)
* Enabled abs and sqrt intrinsics
---------
Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-4.local>
Co-authored-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-4.local>
Egor Bogatov [Tue, 4 Apr 2023 23:36:00 +0000 (01:36 +0200)]
Optimize stackalloc zeroing via BLK (#83255)
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Buyaa Namnan [Tue, 4 Apr 2023 23:22:03 +0000 (16:22 -0700)]
Suppress linker warnings properly (#84272)
* Suppress linker warnings properly
* Update core assembly types handling
* Update src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/SignatureHelper.cs
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>