platform/upstream/dotnet/runtime.git
14 months agoClean up shared ArrayPool naming and add some env var config (#86109)
Stephen Toub [Thu, 11 May 2023 23:56:43 +0000 (19:56 -0400)]
Clean up shared ArrayPool naming and add some env var config (#86109)

* Clean up shared ArrayPool naming and add some env var config

We've had several requests to be able to tweak / experiment with how many arrays the shared array pool might store.  This adds two environment variables, one that controls the number of partitions the shared pool uses, and one that controls the number of arrays cacheable in each partition.  Previously these values were constants.

As part of doing that, I needed to choose names that were a bit more palatable for external consumption, and I renamed thngs in the implementation accordingly.

* Rename file to SharedArrayPool.cs

* Fix naming scheme

* Avoid using globalization

* Avoid using Environment.GetEnvironmentVariable

* Move nopool env var into Environment

* Move static readonly fields to statics type

14 months ago[wasm] [jiterp] Fix jit calls and interp entry wrappers (#86120)
Katelyn Gadd [Thu, 11 May 2023 23:18:48 +0000 (16:18 -0700)]
[wasm] [jiterp] Fix jit calls and interp entry wrappers (#86120)

14 months agoAdd necessary subset of wide char APIs to minipal (#86055)
Aaron Robinson [Thu, 11 May 2023 21:15:05 +0000 (14:15 -0700)]
Add necessary subset of wide char APIs to minipal (#86055)

* Update minipal with UTF-16 functions

* Remove function redefines from PAL header

* Remove need of PAL_wcslen from LTTNG
generator.

* Remove specified calling conventions for x86

14 months agoSupport ConfigurationBinder.GetValue in source-gen (#86076)
Layomi Akinrinade [Thu, 11 May 2023 21:03:01 +0000 (14:03 -0700)]
Support ConfigurationBinder.GetValue in source-gen (#86076)

* Support ConfigurationBinder.GetValue in source-gen

* Address feedback

14 months agoHardcode the path to libclang from Mariner, not Clang 9 on CentOS 7 (#86096)
Jo Shields [Thu, 11 May 2023 20:09:12 +0000 (16:09 -0400)]
Hardcode the path to libclang from Mariner, not Clang 9 on CentOS 7 (#86096)

* Hardcode the path to libclang from Mariner, not Clang 9 on CentOS 7

14 months agoEnsure DecomposeRotate correctly orders parameters. (#86066)
Tanner Gooding [Thu, 11 May 2023 19:10:03 +0000 (12:10 -0700)]
Ensure DecomposeRotate correctly orders parameters. (#86066)

* Add a regression test for dotnet/runtime#86207

* Ensure RotateRight and RotateLeft decomposition orders parameters correctly

* Add explicit tests covering the other two DecomposeRotate paths

* Ensure other code paths that create GT_RSH_LO nodes aren't broken

14 months agoMake casting helpers look more like in CoreCLR (#86029)
Michal Strehovský [Thu, 11 May 2023 19:07:15 +0000 (04:07 +0900)]
Make casting helpers look more like in CoreCLR (#86029)

* Make casting helpers look more like in CoreCLR

Speeds up casting to interfaces by about 50%. Speeds up casting to classes by about 20%.

There are small differences compared to CoreCLR:
* NativeAOT runtime considers interfaces implementable by arrays to be variant. We don't need to special case casting arrays to non-variant (in IL sense) interfaces because those naturally take the variant paths.
* The base type field on arrays holds the array element type so we need to check for the array case before starting to chase the base hierarchy.

Otherwise the top level helpers now look mostly the same as the CoreCLR ones.

* Make it tailcallable

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
14 months ago[browser] loader ES6 module (#85730)
Pavel Savara [Thu, 11 May 2023 19:02:02 +0000 (21:02 +0200)]
[browser] loader ES6 module (#85730)

14 months agoUpdate dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimizati...
dotnet-maestro[bot] [Thu, 11 May 2023 18:53:47 +0000 (13:53 -0500)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230510.3 (#86090)

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.23258.3 -> To Version 1.0.0-prerelease.23260.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoFix printing of arcs for local stores (#86098)
SingleAccretion [Thu, 11 May 2023 17:30:45 +0000 (20:30 +0300)]
Fix printing of arcs for local stores (#86098)

14 months agoSet SelfContained=true for browser-wasm runtimes (#86102)
Larry Ewing [Thu, 11 May 2023 17:02:01 +0000 (12:02 -0500)]
Set SelfContained=true for browser-wasm runtimes (#86102)

14 months agoSkip ProcessStartInfoTests.TestWindowStyle if COM interop is not supported (#85813)
Alexander Köplinger [Thu, 11 May 2023 16:58:09 +0000 (18:58 +0200)]
Skip ProcessStartInfoTests.TestWindowStyle if COM interop is not supported (#85813)

* Skip ProcessStartInfoTests.TestWindowStyle if COM interop is not supported

This happens on e.g. Mono or NativeAOT and results in this exception:

```
    System.Diagnostics.Tests.ProcessStartInfoTests.TestWindowStyle(windowStyle: Normal, useShellExecute: True) [FAIL]
      System.PlatformNotSupportedException : COM Interop is not supported on this platform.
      Stack Trace:
        /_/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs(262,0): at System.Threading.Thread.SetApartmentStateUnchecked(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(521,0): at System.Threading.Thread.SetApartmentState(ApartmentState state, Boolean throwOnError)
        /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs(499,0): at System.Threading.Thread.SetApartmentState(ApartmentState state)
        /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Win32.cs(177,0): at System.Diagnostics.Process.ShellExecuteHelper.ShellExecuteOnSTAThread()
        /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Win32.cs(74,0): at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
        /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Win32.cs(25,0): at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
        /_/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs(1282,0): at System.Diagnostics.Process.Start()
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.Windows.cs(108,0): at System.Diagnostics.Tests.ProcessStartInfoTests.TestWindowStyle(ProcessWindowStyle windowStyle, Boolean useShellExecute)
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodInvoker.Mono.cs(30,0): at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(59,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
```

* Only skip test on mono

14 months agoOptimizations for Ascii.Equals and Ascii.EqualsIgnoreCase (#85926)
Günther Foidl [Thu, 11 May 2023 16:48:04 +0000 (18:48 +0200)]
Optimizations for Ascii.Equals and Ascii.EqualsIgnoreCase (#85926)

14 months ago[NativeAOT] Another attempt to prevent stripping exported symbols from executables...
Ivan Povazan [Thu, 11 May 2023 14:52:57 +0000 (16:52 +0200)]
[NativeAOT] Another attempt to prevent stripping exported symbols from executables when explicitly specified (#86050)

14 months agoFix some nullable annotations / null handling in System.Text.Json (#86077)
Stephen Toub [Thu, 11 May 2023 13:19:27 +0000 (09:19 -0400)]
Fix some nullable annotations / null handling in System.Text.Json (#86077)

The `JsonConverter<T>`s for reference type `T`s need to be able to deal with null. Fix the nullable annotations accordingly. This then led to highlghting that the implementation can null ref if a dictionary returns a null key, so adding appropriate validation of that, too.

14 months agoRemove generated locals in RegexCompiler.LoadSearchValues (#86010)
Stephen Toub [Thu, 11 May 2023 13:12:28 +0000 (09:12 -0400)]
Remove generated locals in RegexCompiler.LoadSearchValues (#86010)

Rely instead of improvements to JIT's recognition of Unsafe.As.

14 months agoJIT: Fold typeof(T).TypeHandle.Value (#85804)
Egor Bogatov [Thu, 11 May 2023 12:35:16 +0000 (14:35 +0200)]
JIT: Fold typeof(T).TypeHandle.Value (#85804)

Co-authored-by: Andy Ayers <andya@microsoft.com>
14 months agoEnabling RuntimeEventSource in NativeAOT (#85424)
Lakshan Fernando [Thu, 11 May 2023 12:11:29 +0000 (05:11 -0700)]
Enabling RuntimeEventSource in NativeAOT (#85424)

* Enabling RuntimeEventSource for counters

* enable exception and assembly count

* FB

* make the exception count thread safe

* revert reflection blocking workaround and open an issue for the CoreCLR exceptioncount fix

* Missed syncing to branch before syncing with main

* Update src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
* FB

* Removing unnecessary whitespace chang

---------

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
14 months agoHandle cctor dependency on RVA static access (#86081)
Michal Strehovský [Thu, 11 May 2023 10:01:37 +0000 (19:01 +0900)]
Handle cctor dependency on RVA static access (#86081)

Contributes to #68278.

14 months agoChange IsolatedStorageFile path for mobile (#83380)
Meri Khamoyan [Thu, 11 May 2023 09:33:40 +0000 (13:33 +0400)]
Change IsolatedStorageFile path for mobile (#83380)

 Updated isolated storage root path for mobile platforms
---------
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
14 months agoAdd integration tests for PreserveSig and use the MemberFunction calling convention...
Jeremy Koritzinsky [Thu, 11 May 2023 08:09:14 +0000 (01:09 -0700)]
Add integration tests for PreserveSig and use the MemberFunction calling convention by default in the ComInterfaceGenerator (#86072)

14 months ago[wasm] Docs on overriding runtime pack in blazor wasm (#85455)
Marek Fišera [Thu, 11 May 2023 07:55:10 +0000 (09:55 +0200)]
[wasm] Docs on overriding runtime pack in blazor wasm (#85455)

14 months ago[mono][llvm] Fix the emission of nonnull metadata on loads. (#86071)
Zoltan Varga [Thu, 11 May 2023 06:32:08 +0000 (23:32 -0700)]
[mono][llvm] Fix the emission of nonnull metadata on loads. (#86071)

Fixes llvm verification errors in newer llvm versions:
```
nonnull metadata must be empty
   %49 = load ptr, ptr @aotconst_ldstr_21, align 8, !nonnull !1
```

14 months ago[mono] Move most runtime callbacks into the MonoRuntimeCallbacks structure. (#86080)
Zoltan Varga [Thu, 11 May 2023 06:31:51 +0000 (23:31 -0700)]
[mono] Move most runtime callbacks into the MonoRuntimeCallbacks structure. (#86080)

14 months ago[mono][wasm] Allow linking out some runtime code on wasm. (#86079)
Zoltan Varga [Thu, 11 May 2023 06:14:03 +0000 (23:14 -0700)]
[mono][wasm] Allow linking out some runtime code on wasm. (#86079)

14 months agoFix official build after removing win-arm runtime build (#86074)
Bruce Forstall [Thu, 11 May 2023 04:41:38 +0000 (21:41 -0700)]
Fix official build after removing win-arm runtime build (#86074)

win-arm CI builds were removed with https://github.com/dotnet/runtime/pull/85947

14 months ago[JIT] X64 - Centralize peephole optimization for removing redundant `mov` instruction...
Will Smith [Thu, 11 May 2023 04:39:02 +0000 (21:39 -0700)]
[JIT] X64 - Centralize peephole optimization for removing redundant `mov` instructions (#85780)

14 months agoDelete Windows arm32 support (#86065)
Jan Kotas [Thu, 11 May 2023 03:02:38 +0000 (20:02 -0700)]
Delete Windows arm32 support (#86065)

14 months ago[mono][aot] Fix an assert. (#86054)
Zoltan Varga [Wed, 10 May 2023 22:36:48 +0000 (15:36 -0700)]
[mono][aot] Fix an assert. (#86054)

Fixes https://github.com/dotnet/runtime/issues/86052.

14 months agoUpdate dependencies from https://github.com/dotnet/roslyn-analyzers build 20230508...
dotnet-maestro[bot] [Wed, 10 May 2023 21:51:35 +0000 (16:51 -0500)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230508.1 (#85972)

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.3.5-beta1.23256.1 -> To Version 3.3.5-beta1.23258.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoAdd linux-x64 hosted tpdiff to superpmi-diffs pipeline (#86021)
Bruce Forstall [Wed, 10 May 2023 21:42:26 +0000 (14:42 -0700)]
Add linux-x64 hosted tpdiff to superpmi-diffs pipeline (#86021)

* Add linux-x64 hosted tpdiff to superpmi-diffs pipeline

With this, we get instruction count diffs based on clang compiled
native JITs.

* Fix some variables

Also, fix some Python 'lint' issues.

* Fix more path issues, Windows targeting global var

* Feedback

1. Make `determine_jit_name` a utility library function.
All 3 versions were different, so required some adjustments.
jitrollingbuild.py had not previously used `jitutil` so added use
and removed additional duplicated code.
2. Renamed partitions to not use `unix` name. This is purely an internal
name, not exposed.
3. Simplified some FileSeparatorChar usage.
4. Fixed more pylint complaints

14 months ago[PERF] Add arm64 dynamic pgo runs (#86014)
Parker Bibus [Wed, 10 May 2023 21:18:05 +0000 (14:18 -0700)]
[PERF] Add arm64 dynamic pgo runs (#86014)

* Add DynamicPGO arm64 linux and windows runs.
* Added parity to performance-setup.sh for pgo (no, dynamic, full) runs.
* Pass the pgoRunType through to the performance (Unix) setup script as well in performance-job.yml.
* Add Linux x64 dynamic pgo.

14 months agoILLink should keep parameter names for methods which are used to create a delagate...
Vitek Karas [Wed, 10 May 2023 21:01:12 +0000 (14:01 -0700)]
ILLink should keep parameter names for methods which are used to create a delagate (#85831)

This is a fix for https://github.com/dotnet/linker/issues/3061.

If the app creates a delegate over a method and later on access the `Delegate.Method` property it can get a `MethodInfo` which it can use to inspect some aspects of the method, specifically parameter names.

NativeAOT already handles this correctly, but ILLink doesn't and will trim the parameter names away. The correct behavior is to treat such method as reflection accessible (we really don't want to mark the `Delegate.Method` property as trim incompatible).

The ideal way to implement this is to perform full data flow on method addresses, which would allow us to detect which method is the delegate created for. (this is what NativeAOT ends up doing through JIT)

But that is rather complex, an easier solution is to treat any method which address is accessed as reflection enabled. This covers all delegates. It might mark more methods as reflection enabled, but it's very uncommon.

So this change does that, it will mark all methods accessed via `ldftn` (or similar) as reflection enabled.
Additionally this cleans up marking of reflection enabled members in the MarkStep. Specifically there was a distinction between reflection accessed and indirect accessed methods, but the latter only kicked in for the obsolete preserve attributes. It's better to reflection mark those as well. This might cause a small size regression, but it's very unlikely to be even observable.

This requires lot more test changes to enable sane testing:
* In the ILC test infra, track if method was kept with or without reflection metadata (as that is the difference in NativeAOT which will provide parameter names or not)
* Teach both the ILLink and ILC test infras how to handle compiler generated code with the `Kept` attribute validation
  * This is in no way complete, but it's an improvement
  * Mostly it means that we don't fail the test if a compiler generated code is kept without it being marked with the `Kept` attribute (as that's not always possible)
  * Note that we have some support for this for things like backing fields and private implementation details, but nothing which can handle state machines, and closure types for lambdas. These should now be workable, without the ability to verify that they were indeed kept (and how)
  * Finally adds tests verifying the new functionality.

14 months agoAdd ArgumentException.ThrowIfNullOrWhiteSpace (#86007)
Stephen Toub [Wed, 10 May 2023 20:49:47 +0000 (16:49 -0400)]
Add ArgumentException.ThrowIfNullOrWhiteSpace (#86007)

* Add ArgumentException.ThrowIfNullOrWhiteSpace

* Fix tests

14 months agoCapture remaining binding Bind & Get methods for source generator support (#85843)
Layomi Akinrinade [Wed, 10 May 2023 20:19:12 +0000 (13:19 -0700)]
Capture remaining binding Bind & Get methods for source generator support (#85843)

* Capture remaining binding methods for source generator support

* Capture remaining binding methods for source generator support

* Implement method emission

* Restore binder implemenation

* Complete currently unsupported test annotation

* Clean up method gen implementation

* Refactor for ideal emitted code (for baseline tests)

* Clean up

14 months agoUpdate linux build instructions (#86062)
Sven Boemer [Wed, 10 May 2023 19:54:40 +0000 (12:54 -0700)]
Update linux build instructions (#86062)

To reflect recent series of changes to our official build. This
updates the mentioned images to use floating tags, and clarifies
that the new official build containers all are designed for
cross-building.

14 months agoRevert "let user know working directory will be used as content root path by default...
Steve Harter [Wed, 10 May 2023 19:15:12 +0000 (14:15 -0500)]
Revert "let user know working directory will be used as content root path by default (#82445)" (#86057)

This reverts commit c958573654937f9582b6a23522b2ad16cd7dbf96.

14 months agoUpdate dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimizati...
dotnet-maestro[bot] [Wed, 10 May 2023 19:06:18 +0000 (14:06 -0500)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230508.3 (#85968)

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.23256.3 -> To Version 1.0.0-prerelease.23258.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoUpdate dependencies from https://github.com/dotnet/roslyn build 20230509.11 (#86036)
dotnet-maestro[bot] [Wed, 10 May 2023 19:05:24 +0000 (14:05 -0500)]
Update dependencies from https://github.com/dotnet/roslyn build 20230509.11 (#86036)

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.7.0-1.23254.5 -> To Version 4.7.0-1.23259.11

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoUpdate dependencies from https://github.com/dotnet/arcade build 20230509.5 (#86034)
dotnet-maestro[bot] [Wed, 10 May 2023 19:04:50 +0000 (14:04 -0500)]
Update dependencies from https://github.com/dotnet/arcade build 20230509.5 (#86034)

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23255.2 -> To Version 8.0.0-beta.23259.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoFix null handling of built-in converters. (#86056)
Eirik Tsarpalis [Wed, 10 May 2023 18:18:38 +0000 (21:18 +0300)]
Fix null handling of built-in converters. (#86056)

14 months agoAdd PreserveSig support to ComInterfaceGenerator (#85941)
Jeremy Koritzinsky [Wed, 10 May 2023 18:09:44 +0000 (11:09 -0700)]
Add PreserveSig support to ComInterfaceGenerator (#85941)

14 months agoUpdate mariner images to latest with LLVM 16 (#84676)
Sven Boemer [Wed, 10 May 2023 17:09:52 +0000 (10:09 -0700)]
Update mariner images to latest with LLVM 16 (#84676)

This pulls in the updates from
https://github.com/dotnet/dotnet-buildtools-prereqs-docker/commit/53fee55b4115616c7029782c9733055db1bc565a
and moves to floating tags for the mariner images, which now
build the product with LLVM 16.

Once this flows to dotnet-optimization, this will require updates
to make the LLVM 16 tools available there. Before the opt data
collected with new LLVM flows into runtime, I plan to fix
https://github.com/dotnet/runtime/issues/85785 so that local
builds won't by default require clang-16.

14 months agoRemove Windows arm32 support (#85947)
Bruce Forstall [Wed, 10 May 2023 16:59:15 +0000 (09:59 -0700)]
Remove Windows arm32 support (#85947)

* Remove Windows arm32 support

Mostly, remove the CI runs. Windows arm32 product support was removed
before .NET 6.

* Restore a few files

Only change YML files to remove windows_arm runs.

Don't build Windows arm cross components.

Don't touch mono files.

Changing scripts to remove builds, and remove code, can follow.

14 months agoDisable autovectorization on wasm (#86038)
Katelyn Gadd [Wed, 10 May 2023 16:28:21 +0000 (09:28 -0700)]
Disable autovectorization on wasm (#86038)

7c75cbf added the -msimd128 flag to cmakelists so that the interpreter could use wasm vector intrinsics. That option appears to imply enabling all sorts of auto-vectorization, which may be responsible for the regressions in dotnet/perf-autofiling-issues#17570

14 months agoExpose various integer intrinsics for Avx512F, Avx512BW, and Avx512CD (#85833)
Tanner Gooding [Wed, 10 May 2023 16:04:09 +0000 (09:04 -0700)]
Expose various integer intrinsics for Avx512F, Avx512BW, and Avx512CD (#85833)

* Expose AlignRight32 and AlignRight64 on Avx512F

* Expose RotateLeft and RotateRight for Avx512F

* Expose SumAbsoluteDifferencesInBlock32 for Avx512BW + DetectConflicts and LeadingZeroCOunt for Avx512DQ

* Exponse TernaryLogic for Avx512F

* Apply formatting patch

* Ensure side effects are preserved when optimizing certain intrinsic imports

* Ensure the instruction code has the SIMD prefix before trying to encode the register

* Ensure side effects have been accounted for before swapping operands

* Move the complex ternary logic simplification logic to import, since the JIT will never produce such nodes itself

* Ensure gtNewSimdUnOpNode(GT_NOT) uses an in range constant for TernaryLogic

* Remove a new assert added to AND_NOT, logging an issue instead

* Add a missing `break;` statement

* Ensure val1/2/3 are GenTree** so swapping works and add a comment explaining the TernaryLogic table

* Fix formatting of a comment

* Don't double encode the 'vvvv' bits for `emitOutputAM`

* Avoid an assert in gtNewSimdCreateBroadcastNode for TYP_LONG on 32-bit

* Ensure we use CHECK_SPILL_ALL

* Ensure mustExpand is handled for `RotateLeft(Vector###<long>)` on 32-bit

* Make sure all tests are actually running and handle the "maybe no jmp table fallback"

* Handle a couple test issues  and ensure we set the constant when normalizing ~B | C

* Ensure ValidateRemaining uses firstOp[i]

14 months agoAdd instructions for running the runtime tests on iOS platforms (#86045)
Milos Kotlar [Wed, 10 May 2023 15:21:43 +0000 (17:21 +0200)]
Add instructions for running the runtime tests on iOS platforms (#86045)

14 months agoFix BigInteger parse hex strings on negative numbers (#84792)
Alexander Speshilov [Wed, 10 May 2023 14:36:50 +0000 (17:36 +0300)]
Fix BigInteger parse hex strings on negative numbers (#84792)

fixes dotnet#74758

14 months agofix JsonNode deserialising from null (#85463)
adj123 [Wed, 10 May 2023 14:00:36 +0000 (15:00 +0100)]
fix JsonNode deserialising from null (#85463)

* fix JsonNode deserialising from null

* add further tests for more null-deserialising scenarios

---------

Co-authored-by: Adam Jones <ajones@drwuk.com>
14 months agoFix mismatched types in native host test error messaging (#85995)
Elinor Fung [Wed, 10 May 2023 13:15:05 +0000 (15:15 +0200)]
Fix mismatched types in native host test error messaging (#85995)

14 months agoFix NativeLibraryTests for ilasm round-trip (#85991)
Elinor Fung [Wed, 10 May 2023 13:05:29 +0000 (15:05 +0200)]
Fix NativeLibraryTests for ilasm round-trip (#85991)

14 months agoJIT: Seed stress modes by string hash (#83771)
Jakob Botsch Nielsen [Wed, 10 May 2023 11:15:15 +0000 (13:15 +0200)]
JIT: Seed stress modes by string hash (#83771)

Instead of using the numeric value of each stress mode inside the enum,
calculate a hash based on the string name. This has the benefit that it
won't change based on new members being added/reordered and reduces
correlation of which stress modes get enabled together.

Fix #83733

14 months agoJIT: Peel offsets from spilled addresses for store decomposition (#85889)
Jakob Botsch Nielsen [Wed, 10 May 2023 10:59:54 +0000 (12:59 +0200)]
JIT: Peel offsets from spilled addresses for store decomposition (#85889)

For a block operation like

```
▌  ASG       struct (copy)
├──▌  BLK       struct<System.Nullable`1, 8>
│  └──▌  ADD       byref
│     ├──▌  LCL_VAR   ref    V00 this
│     └──▌  CNS_INT   long   40 Fseq[<unknown field>]
└──▌  LCL_VAR   struct<System.Nullable`1, 8>(P) V06 tmp2
└──▌    bool   V06.<unknown class>:hasValue (offs=0x00) -> V12 tmp8          (last use)
└──▌    int    V06.<unknown class>:value (offs=0x04) -> V13 tmp9          (last use)
```

We would previously spill the ADD(V00, 40) to a local and end up
producing:

```
▌  COMMA     void
├──▌  COMMA     void
│  ├──▌  ASG       byref
│  │  ├──▌  LCL_VAR   byref  V15 tmp11
│  │  └──▌  ADD       byref
│  │     ├──▌  LCL_VAR   ref    V00 this
│  │     └──▌  CNS_INT   long   40 Fseq[<unknown field>]
│  └──▌  ASG       bool
│     ├──▌  IND       bool
│     │  └──▌  LCL_VAR   byref  V15 tmp11
│     └──▌  LCL_VAR   bool   V12 tmp8
└──▌  ASG       int
   ├──▌  IND       int
   │  └──▌  ADD       byref
   │     ├──▌  LCL_VAR   byref  V15 tmp11
   │     └──▌  CNS_INT   long   4
   └──▌  LCL_VAR   int    V13 tmp9
```

Instead of this we can include the offsets with the field offsets. In
many cases that allows us to avoid any temporary locals, while in other
cases it usually allows us to avoid an instruction in favor of two
larger containments. In this case we instead end up with:

```
▌  COMMA     void
├──▌  ASG       bool
│  ├──▌  IND       bool
│  │  └──▌  ADD       byref
│  │     ├──▌  LCL_VAR   ref    V00 this
│  │     └──▌  CNS_INT   long   40 Fseq[<unknown field>]
│  └──▌  LCL_VAR   bool   V12 tmp8
└──▌  ASG       int
   ├──▌  IND       int
   │  └──▌  ADD       byref
   │     ├──▌  LCL_VAR   ref    V00 this
   │     └──▌  CNS_INT   long   44 Fseq[<unknown field>, 4]
   └──▌  LCL_VAR   int    V13 tmp9
```

14 months agoDisable HugeArray1 for crossgen2 x86 (#86020)
Bruce Forstall [Wed, 10 May 2023 06:05:58 +0000 (23:05 -0700)]
Disable HugeArray1 for crossgen2 x86 (#86020)

Tracking: https://github.com/dotnet/runtime/issues/85747

14 months agoMisc LSRA throughput improvements (#85842)
Kunal Pathak [Wed, 10 May 2023 05:00:45 +0000 (22:00 -0700)]
Misc LSRA throughput improvements (#85842)

* Use BitOperations in few hot methods

* Do not pass RegisterType for non-arm sarchitectures

* Add clearAssignedInterval()

* Consume clearAssignedInterval()

* Do not pass RegisterType for updateInterval()

* Revert the change in genFindLowestBit()

* Revert "Use BitOperations in few hot methods"

This reverts commit a75a7da436fe616d8226d8f2a4c5d50c0f447827.

* Add the missing case for clearAssignedInterval()

* Remove logging

* jit formatting

* Use popcount intrinsics

* Revert "Use popcount intrinsics"

This reverts commit 0b3da210a8b754521de29d40e01072fb1b01adc7.

* revert unintentional change from superpmi.py

* Revert "Do not pass RegisterType for non-arm sarchitectures"

This reverts commit 46d4d3d88704beca5f0817db3a6e48fc1a14dac6.

* fix the merge conflicts

14 months agoAllow set GC configuration in NativeAOT (#85921)
Andrii Kurdiumov [Wed, 10 May 2023 04:58:03 +0000 (10:58 +0600)]
Allow set GC configuration in NativeAOT (#85921)

Currently NativeAOT uses `uint32_t` for storing configuration values.
There assumption that configuration would take 8 characters in configuration.
If we set value which has 9 characters it would be silently ignored.
For example: `$env:DOTNET_GCHeapHardLimit="100000000"` which is 4Gb.
On CoreCLR GC uses `uint64_t` so it does not make sense to limit NativeAOT cofiguration
to 32-bit values here

14 months agoDelete rarely used bashing methods and add some documentation on bashing (#85925)
SingleAccretion [Wed, 10 May 2023 04:57:43 +0000 (07:57 +0300)]
Delete rarely used bashing methods and add some documentation on bashing (#85925)

14 months agoAdd aka.ms link for NativeAOT prerequisites to linker not found error messages (...
Michal Strehovský [Wed, 10 May 2023 04:02:21 +0000 (13:02 +0900)]
Add aka.ms link for NativeAOT prerequisites to linker not found error messages (#86024)

14 months ago[mono] Avoid an assert if the class name table is too large. (#85952)
Zoltan Varga [Wed, 10 May 2023 03:21:17 +0000 (20:21 -0700)]
[mono] Avoid an assert if the class name table is too large. (#85952)

Fixes https://github.com/dotnet/runtime/issues/85917.

14 months ago[mono][llvm] Fix an assert. (#85950)
Zoltan Varga [Wed, 10 May 2023 03:16:18 +0000 (20:16 -0700)]
[mono][llvm] Fix an assert. (#85950)

Fixes https://github.com/dotnet/runtime/issues/85724.

14 months agoDedup PemEncoding.TryCountBase64 with Base64.IsValid (#86002)
Stephen Toub [Wed, 10 May 2023 02:00:02 +0000 (22:00 -0400)]
Dedup PemEncoding.TryCountBase64 with Base64.IsValid (#86002)

* Dedup PemEncoding.TryCountBase64 with Base64.IsValid

* Address PR feedback

14 months agoJIT/EE interface cleanup (#85975)
Jan Kotas [Wed, 10 May 2023 01:46:58 +0000 (18:46 -0700)]
JIT/EE interface cleanup (#85975)

* JIT/EE interface cleanup
- Delete methods, fields and flags related to verification that is no longer supported
- Delete flags for old x86 models that are no longer needed given SSE2
  is our baseline

* Assert hardware minbar

14 months agoMake exception count performance counter thread-safe (#86018)
Jan Kotas [Wed, 10 May 2023 01:46:04 +0000 (18:46 -0700)]
Make exception count performance counter thread-safe (#86018)

Fixes #85997

14 months agoCreate a createdump static library for single-file dump generation (#84864)
Mike McLaughlin [Wed, 10 May 2023 00:32:34 +0000 (17:32 -0700)]
Create a createdump static library for single-file dump generation (#84864)

* Create a createdump static library for single-file and native AOT dump generation

A "createdump_static" lib is now built that is linked into the single-file host and
in the future can be linked into a Native AOT host/app going forward. For single-file
apps most of the same unhandled exception or crash dump generation code is the same
(same env vars, most of all the PAL code is the same) except where createdump executable
was execve, a callback invokes (set by the host) the static createdump lib entry point.

File full dumps are generated (which currently are very large under MacOS) but the user
can put the DAC side-by-side with their app and the smaller heap or mini dumps can be
generated. The SDK could give an option to publish the DAC SXS for a single-file app.

14 months agoJIT: enable profile repairs of OSR entry block weight is zero (#86011)
Andy Ayers [Tue, 9 May 2023 23:02:55 +0000 (16:02 -0700)]
JIT: enable profile repairs of OSR entry block weight is zero (#86011)

If the PGO solver finds the OSR entry block weight is zero, schedule the
method for profile repairs (similar to what we do for normal methods when
the method entry block weight is zero, see #84312).

Fixes #85838.

14 months agoUse string.IsNullOrEmpty and ArgumentException.ThrowIfNullOrEmpty in many more places...
Stephen Toub [Tue, 9 May 2023 22:15:38 +0000 (18:15 -0400)]
Use string.IsNullOrEmpty and ArgumentException.ThrowIfNullOrEmpty in many more places (#85858)

14 months agoJIT: Update class for Unsafe.As<>() (#85954)
Egor Bogatov [Tue, 9 May 2023 21:42:29 +0000 (23:42 +0200)]
JIT: Update class for Unsafe.As<>() (#85954)

14 months ago[mono][aot] Generate 'native-indirect' wrappers in full-aot mode. (#85923)
Zoltan Varga [Tue, 9 May 2023 21:30:30 +0000 (14:30 -0700)]
[mono][aot] Generate 'native-indirect' wrappers in full-aot mode. (#85923)

Fixes https://github.com/dotnet/runtime/issues/80853.

14 months agoUpdate life of data node for simd12 (#85956)
Kunal Pathak [Tue, 9 May 2023 21:23:29 +0000 (14:23 -0700)]
Update life of data node for simd12 (#85956)

* Update life of Data() node

* Review feedback

14 months agoSPMI: Use .tar.gz for pintools on Linux (#85999)
Jakob Botsch Nielsen [Tue, 9 May 2023 21:07:23 +0000 (23:07 +0200)]
SPMI: Use .tar.gz for pintools on Linux (#85999)

We need to preserve executable permissions on these files so use .tar.gz
instead of .zip.

14 months ago[wasm] Use a fixed chrome version for testing (#86012)
Ankit Jain [Tue, 9 May 2023 20:53:07 +0000 (16:53 -0400)]
[wasm] Use a fixed chrome version for testing (#86012)

`113.0.5672.63`

14 months agoUpgrade System.Reflection.Metadata version (#85738)
Andrew Au [Tue, 9 May 2023 19:33:59 +0000 (12:33 -0700)]
Upgrade System.Reflection.Metadata version (#85738)

* Upgrade System.Reflection.Metadata version

* Upgrade System.Collections.Immutable version

14 months agoSpeed up typeof (#85962)
Michal Strehovský [Tue, 9 May 2023 19:25:08 +0000 (04:25 +0900)]
Speed up typeof (#85962)

Saw it in BasicMinimalApi profiles. The ultimate fix is to make `RuntimeType` a frozen object, but this will do for now.

Also made a bit of progress in eradicating `EETypePtr` while I'm touching this.

14 months agoRevert "performance-setup.sh requires urllib3 version <2 (#85915)" (#86009)
Parker Bibus [Tue, 9 May 2023 19:00:05 +0000 (12:00 -0700)]
Revert "performance-setup.sh requires urllib3 version <2 (#85915)" (#86009)

This reverts commit b1329633572d124fe43f7d58bb113f59f886e80b.

14 months agoSPMI: Export dynamic symbols in superpmi for unix builds (#85967)
Jakob Botsch Nielsen [Tue, 9 May 2023 18:35:22 +0000 (20:35 +0200)]
SPMI: Export dynamic symbols in superpmi for unix builds (#85967)

This is necessary for Instrumentor_GetInsCount to get a public symbol
that pin can find.

14 months agoJIT: fix bug in jump threading (#85942)
Andy Ayers [Tue, 9 May 2023 18:20:32 +0000 (11:20 -0700)]
JIT: fix bug in jump threading (#85942)

Verify that the purported dominator of a block to be jump threaded dominates
all of the block's predecessors.

This will initially be true (modulo some odd cases with finally continuations),
but if we've jump threaded through the dominator it may not remain true as
we do not update dominators when optimizing.

Fixes #85892.

14 months agoMove assignment rationalization to before global morph (#85872)
SingleAccretion [Tue, 9 May 2023 17:54:44 +0000 (20:54 +0300)]
Move assignment rationalization to before global morph (#85872)

* Fix printing of volatile/unaligned

* Fix missing GTF_ASG

* QMARK expansion

* Global morph

* Tentatively fix stress

* Another stress fix

The assert is too strict, a better version in coming in the future changes.

14 months agoRevert "Previous changes fixed some runs, but some are still broken due to reinstall...
Parker Bibus [Tue, 9 May 2023 17:43:37 +0000 (10:43 -0700)]
Revert "Previous changes fixed some runs, but some are still broken due to reinstall installing a broken urllib version. (#85935)" (#86000)

This reverts commit 4ea93a6be4ea1b084158cf2aed7cac2414f10a2d due to the commit seemingly causes major failure in the pipelines.

14 months agoUpdate equals (#85896)
hrrrrustic [Tue, 9 May 2023 17:00:08 +0000 (20:00 +0300)]
Update equals (#85896)

14 months agoExclude the test DevDiv_255294.cmd on Windows arm in issues.targets (#85928)
Tomáš Rylek [Tue, 9 May 2023 16:36:52 +0000 (18:36 +0200)]
Exclude the test DevDiv_255294.cmd on Windows arm in issues.targets (#85928)

* Exclude the test DevDiv_255294.cmd on Windows arm in issues.targets

This test failure is known and tracked under

https://github.com/dotnet/runtime/issues/85663

I'm adding the issues.targets entry to baseline the failure and
make outerloop green again.

Thanks

Tomas

* Address Bruce's PR feedback

14 months agoDisable IUnknownTest under GCStress (#85937)
Bruce Forstall [Tue, 9 May 2023 16:28:55 +0000 (09:28 -0700)]
Disable IUnknownTest under GCStress (#85937)

Tracking: https://github.com/dotnet/runtime/issues/85234

14 months agoUnroll StringBuilder.Append for const string (#85894)
Jesper Meyer [Tue, 9 May 2023 16:27:52 +0000 (18:27 +0200)]
Unroll StringBuilder.Append for const string (#85894)

Co-authored-by: EgorBo <egorbo@gmail.com>
14 months ago[PERF] Fix Linux Musl Alpine Core Root build (#85946)
Parker Bibus [Tue, 9 May 2023 16:24:58 +0000 (09:24 -0700)]
[PERF] Fix Linux Musl Alpine Core Root build (#85946)

* Add crossbuild for coreroot building in perf-job.yml

14 months agoStop special casing reflected-on internals (#85963)
Michal Strehovský [Tue, 9 May 2023 15:11:26 +0000 (00:11 +0900)]
Stop special casing reflected-on internals (#85963)

* Stop special casing reflected-on internals

Concept of reflection blocked internals was deleted in #85810. This is no longer needed.

* Can no longer access ResourceSet outside corelib

14 months agoImprove IndexOfAnyValues for needles with 0 (#84184)
Miha Zupan [Tue, 9 May 2023 14:59:14 +0000 (16:59 +0200)]
Improve IndexOfAnyValues for needles with 0 (#84184)

14 months agoFix ReadOnlySpanGetReferenceAndReadInteger on BigEndian (#85969)
Egor Bogatov [Tue, 9 May 2023 14:25:01 +0000 (16:25 +0200)]
Fix ReadOnlySpanGetReferenceAndReadInteger on BigEndian (#85969)

14 months agoDelete `gtNewBlkOpNode` and `lvSimdBaseJitType` (#85848)
SingleAccretion [Tue, 9 May 2023 14:24:40 +0000 (17:24 +0300)]
Delete `gtNewBlkOpNode` and `lvSimdBaseJitType` (#85848)

* Delete "gtNewBlkOpNode"

Note: neither "initobj" nor "cpobj" can be preceded by "volatile.".

Delete the self-assignment handling

Block morphing will fold it to a NOP anyway.

I do not see the referenced liveness bug still being present.
It seems to have been a remnant of COPYBLK/COPYOBJ days.

Move the SIMD logic to gtNewAssignNode

Delete "gtNewBlkOpNode"

* Delete lvSimdBaseJitType

14 months agoFold "FrozenObjectHandle(REF) + CNS" to a byref constant (#85888)
Egor Bogatov [Tue, 9 May 2023 14:07:22 +0000 (16:07 +0200)]
Fold "FrozenObjectHandle(REF) + CNS" to a byref constant (#85888)

14 months agoFix comment for File.Exists (#85648)
Siqi Lu [Tue, 9 May 2023 14:05:13 +0000 (14:05 +0000)]
Fix comment for File.Exists (#85648)

14 months agoamend the multiply's overflow check and delete some unused codes. (#85959)
Qiao Pengcheng [Tue, 9 May 2023 14:01:47 +0000 (22:01 +0800)]
amend the multiply's overflow check and delete some unused codes. (#85959)

14 months ago[RISC-V] Fixed errors in jit and unwinding (#85900)
Dong-Heon Jung [Tue, 9 May 2023 14:01:25 +0000 (23:01 +0900)]
[RISC-V] Fixed errors in jit and unwinding (#85900)

* [JIT] Fix some errors in JIT

* Fix errors in unwinding

* [JIT] Pass float value with int arg reg

* [JIT] Fix register overwriting in RSVD

* [JIT] jit-format

* Fix an error

* [JIT] Add LOONGARCH64

14 months agoAttempt to bypass emscripten's generated wrappers for cwraps (#85919)
Katelyn Gadd [Tue, 9 May 2023 13:22:51 +0000 (06:22 -0700)]
Attempt to bypass emscripten's generated wrappers for cwraps (#85919)

Bypass emscripten's generated js wrappers when invoking cwraps, this may improve cross-language inlining
Fix signature for a cwrap that was missing an arg

14 months agoAdd Base64.IsValid and allow Base64.DecodeXx methods to skip whitespace (#85938)
Stephen Toub [Tue, 9 May 2023 12:32:08 +0000 (08:32 -0400)]
Add Base64.IsValid and allow Base64.DecodeXx methods to skip whitespace (#85938)

* Allow Base64Decoder to ignore space chars, add IsValid methods and tests

* Some cleanup of Base64.IsValid changes

This includes making FromBase64Transform significantly faster via SearchValues.

* Address PR feedback and some more cleanup

---------

Co-authored-by: Heath Baron-Morgan <heathbm@outlook.com>
14 months agoDo not generate PerfMap entries for methods we didn't compile (#85958)
Michal Strehovský [Tue, 9 May 2023 11:17:28 +0000 (20:17 +0900)]
Do not generate PerfMap entries for methods we didn't compile (#85958)

* Do not generate PerfMap entries for methods we didn't compile

dotnet/installer#16318 is currently blocked due to crossgen2 crash. While Jan (https://github.com/dotnet/installer/pull/16318#issuecomment-1537160058) is totally right that the command line to crossgen2 is garbage, we should try not to crash. Based on the stack we already emitted the PE and PDB. The crash seems to be caused by attempting to include methods that didn't successfully compile in the perfmap (`EnumerateCompilerMethods` has an `IsEmpty` check whereas walking all nodes looking for `MethodWithGCInfo` doesn't check that).

```
Internal.TypeSystem.TypeSystemException+TypeLoadException: Failed to load type 'System.Security.Policy.EvidenceBase' from assembly 'System.Security.AccessControl, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.ThrowHelper.ThrowTypeLoadException(ExceptionStringID, String, String) + 0x39 [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.ResolutionFailure.Throw() + 0x99 [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle, NotFoundBehavior) + 0x8f [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.Ecma.EcmaModule.GetType(EntityHandle) + 0x2c [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.Ecma.EcmaType.InitializeBaseType() + 0x81 [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.Ecma.EcmaType.ComputeTypeFlags(TypeFlags) + 0x48 [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.TypeDesc.InitializeTypeFlags(TypeFlags) + 0x1e [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.TypeNameFormatter.AppendName(StringBuilder, TypeDesc) + 0x2d [/__w/1/s/src/redist/redist.csproj]
    at ILCompiler.PEWriter.TypeString.AppendName(StringBuilder, ArrayType) + 0x1b [/__w/1/s/src/redist/redist.csproj]
    at Internal.TypeSystem.TypeNameFormatter.FormatName(TypeDesc) + 0x54 [/__w/1/s/src/redist/redist.csproj]
    at ILCompiler.PEWriter.OutputInfoBuilder.FormatMethodName(MethodDesc, TypeNameFormatter) + 0x174 [/__w/1/s/src/redist/redist.csproj]
    at ILCompiler.PEWriter.OutputInfoBuilder.<EnumerateMethods>d__16.MoveNext() + 0x15f [/__w/1/s/src/redist/redist.csproj]
    at ILCompiler.Diagnostics.PerfMapWriter.Write(String, Int32, IEnumerable`1, IEnumerable`1, TargetDetails) + 0x13b [/__w/1/s/src/redist/redist.csproj]
    at ILCompiler.PEWriter.SymbolFileBuilder.SavePerfMap(String, Int32, String) + 0x1ba [/__w/1/s/src/redist/redist.csproj]
    at ILCompiler.DependencyAnalysis.ReadyToRunObjectWriter.EmitPortableExecutable() + 0xa59 [/__w/1/s/src/redist/redist.csproj]
```

This is all based on the stack trace. I didn't validate this fixes the issue (or that it compiles at all) but the fix seems legit to me.

My local workflows are affected by the installer repo break because the runtime repo had a breaking change in CoreLib that is not compatible with existing installer builds. Nobody seems to be doing anything with the failing integration PR, so this is my attempt...

14 months agoDisable foreground-shutdown test on Windows (#85936)
Bruce Forstall [Tue, 9 May 2023 11:05:38 +0000 (04:05 -0700)]
Disable foreground-shutdown test on Windows (#85936)

This test has failed across many configurations, but apparently only
on Windows. Tracked by https://github.com/dotnet/runtime/issues/84006,
https://github.com/dotnet/runtime/issues/83658.

14 months ago[wasm] Wasm.Build.Tests - Override KnownWebAssemblySdkPack to 8.0.0-dev (#85815)
Marek Fišera [Tue, 9 May 2023 09:55:32 +0000 (11:55 +0200)]
[wasm] Wasm.Build.Tests - Override KnownWebAssemblySdkPack to 8.0.0-dev (#85815)

14 months agoJIT: Fix block morphing/physical promotion self-interference (#85887)
Jakob Botsch Nielsen [Tue, 9 May 2023 07:27:03 +0000 (09:27 +0200)]
JIT: Fix block morphing/physical promotion self-interference (#85887)

Fix a couple of cases where it's possible that the decomposed stores
will modify the address being used as part of the operation too early.
In those cases we must spill the address to a new local ahead of time.

Fix #85874

14 months agoJIT: Stop using ref counts in forward sub (#85909)
Jakob Botsch Nielsen [Tue, 9 May 2023 07:24:34 +0000 (09:24 +0200)]
JIT: Stop using ref counts in forward sub (#85909)

Instead of going to great lengths to keep the ref counts correct in
physical promotion just stop using them in forward sub. The last use
information generalizes what forward sub needs except for when the
tracking limit is reached, which shows in the improvements we actually
get from consulting the ref counts -- the improvements are very modest
and in tests only.

This makes early liveness the only consumer of the "regular" ref counts
computed by local morph. Weighted ref counts are still used for undoing
regular promotion of implicit byref parameters.

14 months agoRemove check from FillStringChecked and rename it to CopyStringContent (#85880)
Egor Bogatov [Tue, 9 May 2023 01:09:22 +0000 (03:09 +0200)]
Remove check from FillStringChecked and rename it to CopyStringContent (#85880)

14 months ago[main] Update dependencies from dnceng/internal/dotnet-optimization (#85866)
dotnet-maestro[bot] [Tue, 9 May 2023 00:38:46 +0000 (19:38 -0500)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#85866)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230505.3

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.23254.3 -> To Version 1.0.0-prerelease.23255.3

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230506.3

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.23254.3 -> To Version 1.0.0-prerelease.23256.3

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>