Zoltan Varga [Tue, 13 Jun 2023 22:00:41 +0000 (18:00 -0400)]
[mono][jit] Add JIT support for the methods in Vector128<T> on amd64. (#86546)
* [mono][jit] Add JIT support for the methods in Vector128<T> on amd64.
* Avoid emitting OP_NOT_NULL opcodes in non-llvm mode, they are not used, and they keep their inputs alive.
* Return true for IsSupported for non 128 bit types even if the operations are not supported.
* Fix windows support.
* Add support for some binary operations.
* Disable Dot for integer types.
* Add support for Create.
* Fix some typos in the intrinsics tests.
* Enable As methods.
* Enable Abs/AndNot. Simplify INSERT_R8.
* Add more methods.
* Add compare methods.
* Add CreateScalar/CreateScalarUnsafe.
* Add Sqrt/Sum.
* Fix GetElement/WithElement<long>.
* Implement some of the convert methods, disable the rest.
* Fix GetElement<int>.
* Require SSE41.
* Fix OP_EXTRACT_I1.
* Fix INSERT_R8.
* Improve OP_NEGATION R4/R8.
ms-hujia [Tue, 13 Jun 2023 21:49:14 +0000 (05:49 +0800)]
Shrink ManifestEnvelope.MaxChunkSize to hold extended data (#87322)
Jeremy Koritzinsky [Tue, 13 Jun 2023 21:36:39 +0000 (14:36 -0700)]
Emit additional attributes with global qualifier (#87497)
Eirik Tsarpalis [Tue, 13 Jun 2023 21:10:48 +0000 (22:10 +0100)]
Subject src-gen serializer to full number-handling test (#87484)
* Subject src-gen serializer to full number-handling tests
* Make failing tests pass
* Revert API break and use contract APIs instead
* React to test infra changes
* Fix rebase conflicts & ensure all tests are passing.
---------
Co-authored-by: Layomi Akinrinade <laakinri@microsoft.com>
Dan Moseley [Tue, 13 Jun 2023 21:01:37 +0000 (14:01 -0700)]
Update debugging-vscode.md (#87338)
Radek Doulik [Tue, 13 Jun 2023 20:39:58 +0000 (22:39 +0200)]
[wasm] Change optimization flag to workaround llvm issue (#87473)
Ankit Jain [Tue, 13 Jun 2023 20:05:47 +0000 (16:05 -0400)]
[wasm] Fix perf pipeline (#87469)
* [wasm] Use the current `test-main.js` instead of the one for 7.0
* [wasm] perf: Add `--module` arg for v8, to support the es6 module
* [wasm] perf: Use tar for BrowserWasm for perf runs
.. because the new image does not have `zip` installed.
* remove debug bits
Elinor Fung [Tue, 13 Jun 2023 20:04:43 +0000 (13:04 -0700)]
Fix break from wchar_t usage in disableddotnetruntime (#87509)
Dong-Heon Jung [Tue, 13 Jun 2023 19:18:09 +0000 (04:18 +0900)]
[RISC-V][JIT] Fix encoding of CallGCregs (#87467)
- It fixes what Encoding and Decoding logic handle CallGCregs differently.
dotnet-maestro[bot] [Tue, 13 Jun 2023 18:13:31 +0000 (13:13 -0500)]
[main] Update dependencies from dotnet/runtime dotnet/icu dotnet/xharness dotnet/emsdk dotnet/cecil dotnet/sdk (#87375)
* Update dependencies from https://github.com/dotnet/sdk build
20230610.2
Microsoft.DotNet.ApiCompat.Task
From Version 8.0.100-preview.6.23309.13 -> To Version 8.0.100-preview.6.23310.2
* Update dependencies from https://github.com/dotnet/runtime build
20230609.7
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.6.23304.2 -> To Version 8.0.0-preview.6.23309.7
* Update dependencies from https://github.com/dotnet/sdk build
20230612.2
Microsoft.DotNet.ApiCompat.Task
From Version 8.0.100-preview.6.23309.13 -> To Version 8.0.100-preview.6.23312.2
* Update dependencies from https://github.com/dotnet/icu build
20230612.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 8.0.0-preview.6.23305.2 -> To Version 8.0.0-preview.6.23312.1
* Update dependencies from https://github.com/dotnet/xharness build
20230612.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 8.0.0-prerelease.23307.1 -> To Version 8.0.0-prerelease.23312.1
* Update dependencies from https://github.com/dotnet/emsdk build
20230612.1
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.6.23307.1 -> To Version 8.0.0-preview.6.23312.1
* Update dependencies from https://github.com/dotnet/cecil build
20230612.1
Microsoft.DotNet.Cecil
From Version 0.11.4-alpha.23306.1 -> To Version 0.11.4-alpha.23312.1
* Update dependencies from https://github.com/dotnet/sdk build
20230613.1
Microsoft.DotNet.ApiCompat.Task
From Version 8.0.100-preview.6.23309.13 -> To Version 8.0.100-preview.6.23313.1
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Tue, 13 Jun 2023 18:13:03 +0000 (13:13 -0500)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#87124)
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230604.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.23303.6 -> To Version 1.0.0-prerelease.23304.4
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230605.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.23303.6 -> To Version 1.0.0-prerelease.23305.4
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230606.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.23303.6 -> To Version 1.0.0-prerelease.23306.3
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230607.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.23303.6 -> To Version 1.0.0-prerelease.23307.4
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230608.6
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.23303.6 -> To Version 1.0.0-prerelease.23308.6
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230609.6
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.23303.6 -> To Version 1.0.0-prerelease.23309.6
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230610.6
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.23303.6 -> To Version 1.0.0-prerelease.23310.6
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230611.2
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.23303.6 -> To Version 1.0.0-prerelease.23311.2
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Tanner Gooding [Tue, 13 Jun 2023 17:43:42 +0000 (10:43 -0700)]
Don't return `0` from `getMaxVectorByteLength` when intrinsics are disabled (#87420)
Elinor Fung [Tue, 13 Jun 2023 15:47:43 +0000 (08:47 -0700)]
Fix WCHAR definition on non-Windows for nativeaot (#87465)
This fixes enabling of runtime events on non-Windows. The GC events that don't go
through ETW::GCLog are now fired/collected on non-Windows.
There is still work needed to pull in the ETW::GCLog implementation on non-Windows
Elinor Fung [Tue, 13 Jun 2023 15:47:05 +0000 (08:47 -0700)]
Fix missing GC counter data on non-Windows (#87430)
This sets FEATURE_EVENT_TRACE on non-Windows platforms as well, such that GC counter
information is tracked and provided when requested.
This does not fully enable runtime event tracing via EventPipe on non-Windows.
SwapnilGaikwad [Tue, 13 Jun 2023 15:28:53 +0000 (16:28 +0100)]
Combine two table lookups into one while formatting Guid on Arm64 (#87126)
* Combine two table lookups into one while formatting Guid on Arm64
* Add a comment to explain the combined table look-up and hex indices
Hamish Arblaster [Tue, 13 Jun 2023 14:58:17 +0000 (00:58 +1000)]
Clone files on OSX-like platforms when possible, instead of copying the whole file (#79243)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Michal Strehovský [Tue, 13 Jun 2023 13:34:48 +0000 (22:34 +0900)]
Redirect ActiveIssue on a test (#87468)
Ilona Tomkowicz [Tue, 13 Jun 2023 11:57:38 +0000 (13:57 +0200)]
[browser][debugger][MT] Make operations on dictionary thread-safe. (#87405)
* `ConcurrentDicionary` should be thread-safe.
Co-authored-by: Ankit Jain <radical@gmail.com>
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Jasper [Tue, 13 Jun 2023 11:53:59 +0000 (13:53 +0200)]
Fold const WithElement to CNS_VEC (#86212)
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
Zoltan Varga [Tue, 13 Jun 2023 11:21:12 +0000 (07:21 -0400)]
[wasm] Disable the PackedSimd.Shuffle intrinsic. (#86025)
LLVM crashes if the underlying intrinsic has a non-constant
shuffle argument, and we can't guarantee that.
Co-authored-by: Radek Doulik <radek.doulik@gmail.com>
Radek Doulik [Tue, 13 Jun 2023 11:09:08 +0000 (13:09 +0200)]
[wasm] Add PackedSimd load and load scalar methods (#87052)
* [wasm] Add PackedSimd load and load scalar methods
* Fix build
Jakob Botsch Nielsen [Tue, 13 Jun 2023 10:06:26 +0000 (12:06 +0200)]
JIT: Handle commas in physical promotion (#87401)
Physical promotion was not properly handling accounting in the presence
of commas and was not properly handling struct commas during
replacement.
Egor Bogatov [Tue, 13 Jun 2023 09:21:18 +0000 (11:21 +0200)]
Use INS_inc for Interlocked.Increment (#87442)
Egor Bogatov [Tue, 13 Jun 2023 09:21:02 +0000 (11:21 +0200)]
Properly check ISAs for static readonly simd fields (#87402)
Eirik Tsarpalis [Tue, 13 Jun 2023 08:30:27 +0000 (09:30 +0100)]
Ensure that types of ignored or inaccessible properties are not included by the source generator. (#87383)
Justin Anderson [Tue, 13 Jun 2023 07:28:19 +0000 (00:28 -0700)]
ApplyStartupHook diagnostic IPC command (#86813)
Jeff Handley [Tue, 13 Jun 2023 05:55:57 +0000 (22:55 -0700)]
The CLA bot can now be rerun with a comment. Fix broken CLA links. (#86825)
Jan Kotas [Tue, 13 Jun 2023 04:56:15 +0000 (21:56 -0700)]
[NativeAOT] Avoid redundant unwind info lookup during stackwalks (#87419)
Unwind info was looked up twice on non-Windows: Once during initial frame inspection
and second during the actual unwind. Cache the lookup results from the
initial frame inspection and use them from the actual unwind later, same
as it is done on Windows.
Parker Bibus [Tue, 13 Jun 2023 03:51:19 +0000 (20:51 -0700)]
Update HelloiOS.app publish folder path. (#87439)
Tarek Mahmoud Sayed [Tue, 13 Jun 2023 03:34:04 +0000 (20:34 -0700)]
Fix neutral cultures created with the underscore (#87411)
Jeremy Koritzinsky [Tue, 13 Jun 2023 03:10:33 +0000 (20:10 -0700)]
Warn when user code casts between runtime-based COM interop types and source-generated COM interop types (#87425)
Dan Moseley [Tue, 13 Jun 2023 02:05:13 +0000 (19:05 -0700)]
Disable StressTestDeepNestingOfLoops for NonBacktracking engine (#87369)
* Disable hanging RE test
* feedback
* Oops
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update testing.md
---------
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Tomas Weinfurt [Tue, 13 Jun 2023 01:32:17 +0000 (03:32 +0200)]
add RID for Debian 12 (#87433)
David Wrighton [Tue, 13 Jun 2023 01:24:47 +0000 (18:24 -0700)]
Fix determinism stress perf, by using the ConditionalWeakTable as a static, not as an instance method (#87447)
Tomáš Rylek [Tue, 13 Jun 2023 00:49:39 +0000 (02:49 +0200)]
Adapt Tarjan generic cycle detector for use in Crossgen2 (#71426)
This change modifies Crossgen2 to use the generic cycle detector
originally implemented for NativeAOT to trim infinite generic
expansion as observed in the LanguageExt public nuget package
and tracked by the issue
https://github.com/dotnet/runtime/issues/66079
For now the generic cycle detector is opt-in as it's relatively costly
in terms of compiler performance and it seems to be a relatively
niche case. We can follow up by optimizing the detector if it turns
out to be more prevalent or if we make the call to turn it on by
default, I have mentioned several options for that in the PR.
Thanks
Tomas
DeepakRajendrakumaran [Mon, 12 Jun 2023 23:18:39 +0000 (16:18 -0700)]
Upgrading Vector256/512 Shuffle() with VBMI support (#87083)
* Upgrading Shuffle()
* Simplifying 'needsZero' initialization. Should be initialized to 'false' for (simdSize == 32) IMO
* Review Changes
* Another review fix.
Jeremy Koritzinsky [Mon, 12 Jun 2023 22:30:59 +0000 (15:30 -0700)]
Configure ComInterfaceGenerator to be referenced by default (#87422)
Jakob Botsch Nielsen [Mon, 12 Jun 2023 21:25:19 +0000 (23:25 +0200)]
Account for CORINFO_HELP_VIRTUAL_FUNC_PTR in GT_LABEL; avoid double resolving (#87395)
In the helper-based tailcall mechanism it is possible that we expand the
target call into two actual calls: first, a call to
CORINFO_HELP_VIRTUAL_FUNC_PTR to compute the target, and second a call
to that target. We were not taking into account that the return address
needed for the tailcall mechanism needs to be from the second call.
In this particular case the runtime does not request the JIT to pass the
target; that means we end up resolving the target from both the caller
and from the CallTailCallTarget stub. Ideally the JIT would be able to
eliminate the CORINFO_HELP_VIRTUAL_FUNC_PTR call in the caller since it
turns out to be unused, but that requires changes in DCE (and is
somewhat non-trivial, as we have to preserve a null-check).
A simpler way to improve the case is to just change the runtime to
always request the target from the JIT for GVMs, which means the
CallTailCallTarget stub no longer needs to resolve it. That also has the
effect of fixing the original issue, but I have left the original fix in
as well.
Fix #87393
skyoxZ [Mon, 12 Jun 2023 20:49:10 +0000 (04:49 +0800)]
Fix Double.NegativeZero (#87364)
Jeremy Koritzinsky [Mon, 12 Jun 2023 20:24:08 +0000 (13:24 -0700)]
Change the stresslog message layout to support extra-large modules and modules loaded at far-apart addresses that use the stresslog (#83855)
Pavel Savara [Mon, 12 Jun 2023 19:43:16 +0000 (21:43 +0200)]
[browser][MT] GC, threadpool and some JS interop improvements (#86759)
David Wrighton [Mon, 12 Jun 2023 19:14:25 +0000 (12:14 -0700)]
Fix #61604 by simply removing the possibility of throwing an exception in those cases (#87355)
David Wrighton [Mon, 12 Jun 2023 19:14:02 +0000 (12:14 -0700)]
Fix name mangling issue where two subtly different MethodWithToken instances which only differ by OwningType had the same mangled name (#87353)
Eirik Tsarpalis [Mon, 12 Jun 2023 18:55:10 +0000 (19:55 +0100)]
Add a JsonConverter.Type property. (#87382)
Jackson Schuster [Mon, 12 Jun 2023 18:36:56 +0000 (11:36 -0700)]
Clean up code, use DiagnosticInfo in LibraryImportGenerator, Cache well known attribute types in StubEnvironment (#87348)
Remove unused usings and simplify access to CodeAnalysis.Location.
Cache the attributes searched for in incremental stub calculations.
Add warning if unsafe blocks are not allowed.
Removes assert in ComMethodInfo that was throwing when editing files in the test project.
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Jeremy Koritzinsky [Mon, 12 Jun 2023 18:08:06 +0000 (11:08 -0700)]
Move System.Transactions.Local over to using source-generated COM instead of built-in COM whenever possible. (#87351)
Co-authored-by: Shay Rojansky <roji@roji.org>
Jeremy Koritzinsky [Mon, 12 Jun 2023 17:52:42 +0000 (10:52 -0700)]
Fix official build's WASM legs (#87416)
Jackson Schuster [Mon, 12 Jun 2023 17:26:29 +0000 (10:26 -0700)]
Warn in CustomMarshallerAnalyzer if the MarshaMode is not valid (#87198)
I ran into an issue when making some tests where I tried to use MarshalMode as a flags enum, which lead to the generated code not being correct, but no warning was showing up. This PR creates a warning if you try to do an operation on the MarshalMode argument or if a casted int value is not defined in the MarshalMode enum.
Fixes #87139
Tomas Weinfurt [Mon, 12 Jun 2023 17:24:51 +0000 (19:24 +0200)]
enable disabled Quic tests (#87385)
Sven Boemer [Mon, 12 Jun 2023 16:51:49 +0000 (09:51 -0700)]
Fix trim analyzer warning for inferred type arguments (#87156)
Fixes https://github.com/dotnet/runtime/issues/86032.
This replaces the syntax-based logic with:
- ISymbol-based logic that looks at generic instantiations in
parameter types, return types, and base/interface types
- IOperation-based logic that looks at invocations
The syntax-based logic used to also warn for the types of local
variables, but `SymbolKind.Local` isn't supported for
`RegisterSymbolAction`. Since this falls into the category of
warnings that isn't strictly necessary (based on nativeaot logic
which only warns on generic instantiations that can actually lead
to code execution), I just left out local variables.
I'm slightly concerned that this could be missing some cases, but
at least it works on our existing testcases. This also adds tests
for delegate creation using generic methods, which was one such
missing case noticed during code review.
There are two slight differences in warning locations, which I
don't expect to cause issues for warning suppressions:
- For invocations, the warning location used to be the generic
method name, without the argument list. Using the
IOperation-based approach, we use the invocation's location
that includes the argument list.
- For properties that use arrow syntax (`RequireMethods<TFields>
Property => null`), the ISymbol-based approach warns on the
underlying getter method, whose location seems to be the body
of the accessor. We used to warn on the return type
specifically, but I couldn't find a better way to get the
location.
Milos Kotlar [Mon, 12 Jun 2023 12:47:15 +0000 (14:47 +0200)]
[mono][aot] Add @kotlarmilos as code owner for Mono AOT and iOS (#87396)
Co-authored-by: Marek Safar <marek.safar@gmail.com>
Jakob Botsch Nielsen [Mon, 12 Jun 2023 11:54:30 +0000 (13:54 +0200)]
JIT: Clean up physical promotion heuristics (#87376)
* Document that we intentionally do not account for writebacks before
returns
* Make the metrics only used for debug logging DEBUG-only
Peter Sollich [Mon, 12 Jun 2023 09:38:12 +0000 (11:38 +0200)]
Fixes and improvements: (#87218)
- Fix hang bug caused by race condition in change_heap_count
- Change way we store dynamic heap input metrics to make it easier to surface them via ETW events.
- Refactor enter_spin_lock_msl into an inlineable part and a slower, more complex out-of-line part.
- Subtract time spent in safe_switch_to_thread and WiatLongerNoInstru from msl wait time - this makes this metric much less noisy.
- add more diagnostic output to check_heap_count and change_heap_count.
- add more spinning to EnterFinalizeLock to address slow suspensions in some ASP.NET benchmarks.
Dan Moseley [Mon, 12 Jun 2023 03:15:58 +0000 (20:15 -0700)]
Fix tests (#87386)
Milos Kotlar [Sun, 11 Jun 2023 18:04:57 +0000 (20:04 +0200)]
[mono][tests] Run Mono iOS sample as functional test on the simulator and maccatalyst on Helix (#86578)
* Add HelloiOS sample on iossimulator
* Enable AOT compilation and JustInterp mode on iossimulator
* Remove custom tasks from the sample app
* Set default props for the sample app. Use diagnostics_tracing and marshal-ilgen for RuntimeComponents
---------
Co-authored-by: Filip Navara <filip.navara@gmail.com>
Michał Petryka [Sun, 11 Jun 2023 16:16:08 +0000 (18:16 +0200)]
Fix NativeAOT JIT-EE bug (#87378)
Stephen Toub [Sun, 11 Jun 2023 15:10:18 +0000 (11:10 -0400)]
Optimize zero-byte receives on ManagedWebSocket (#87329)
Today you can perform a zero-byte receive on ManagedWebSocket, but doing so still issues a request to the underlying stream with the receive header buffer. That in turn can cause the underlying stream to rent and/or pin a buffer. By special-casing zero-byte reads, we can take advantage of any special-casing in the base stream, and hopefully make it so that when the actual read is performed, the data necessary to satisfy it synchronously is already available.
Milos Kotlar [Sat, 10 Jun 2023 19:23:52 +0000 (21:23 +0200)]
Enable DriveInfoUnix test on iOS (#87162)
dotnet-maestro[bot] [Sat, 10 Jun 2023 18:58:49 +0000 (11:58 -0700)]
[main] Update dependencies from dotnet/arcade dotnet/sdk (#87318)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Adeel Mujahid [Sat, 10 Jun 2023 18:29:16 +0000 (21:29 +0300)]
Emit pointer alignment before config knobs (#87360)
Dong-Heon Jung [Sat, 10 Jun 2023 18:27:37 +0000 (03:27 +0900)]
[RISC-V] Fix errors in vm (#87310)
* [RISC-V] Fix JUMP block size
* [RISC-V] Update constant values
* [RISC-V] Fix decodeJump
* [RISC-V] Update constant values more self-describing
Jeremy Koritzinsky [Sat, 10 Jun 2023 18:15:56 +0000 (11:15 -0700)]
Mark GeneratedComClass code as generated (#87342)
Dong-Heon Jung [Sat, 10 Jun 2023 14:06:10 +0000 (23:06 +0900)]
Remove unused methods in cgencpu.h (#87357)
- `isJump` and `isBackToBackJump`
Egor Bogatov [Sat, 10 Jun 2023 12:05:09 +0000 (14:05 +0200)]
Bump HandleHistogram32::SIZE to 16 (#87332)
Badre BSAILA [Sat, 10 Jun 2023 12:04:54 +0000 (14:04 +0200)]
fuse < and > with = when applicable (#78786)
Stephen Toub [Sat, 10 Jun 2023 11:38:35 +0000 (07:38 -0400)]
Simplify ManagedWebSocket.ApplyMask (#87331)
The alignment code isn't necessary or implemented ideally and can make shorter lengths slower to process. Deleting it for now, and if we decide it's valuable to add back forced-alignment later, we can do so in a more optimal manner.
Alexander Soldatov [Sat, 10 Jun 2023 00:43:48 +0000 (03:43 +0300)]
[RISC-V] Fix Stubs for Generics (#87316)
Fix register saving before passing generic instantiation parameter.
Jackson Schuster [Fri, 9 Jun 2023 23:12:29 +0000 (18:12 -0500)]
Use HashCode.Combine() in interop source generators and analyzers instead of custom GetHashCode implementations (#87221)
Use the HashCode.Combine from shared Roslyn code rather than use the custom implementations that xor the values together. This PR fixes all overrides of GetHashCode in System.Runtime.InteropServices.
Sven Boemer [Fri, 9 Jun 2023 22:45:29 +0000 (15:45 -0700)]
Incremental mibc merge (#87336)
Before this change, the merged mibc file would inherit the
timestamp of the input (which are often days in the past, from
the optimization data nuget package). This caused merging to
happen on every incremental build, as dotnet-pgo.dll is always
newer than the output file.
The timestamp was inherited to fix a different incremental build
issue, where updating to a newer optimization data package
wouldn't make the input timestamp new enough to trigger a
re-merge. See https://github.com/dotnet/runtime/pull/56397 for
context.
This fixes both issues by caching the input modification
timestamps, so that the merged output file will get a new
timestamp when it is created, but will be considered out of date
whenever the input timestamps change.
This reduces incremental build times on my machine by
~3s. Contributes to
https://github.com/dotnet/runtime/issues/47022
Also deletes the --inherit-timestamp logic.
Jeremy Koritzinsky [Fri, 9 Jun 2023 22:25:59 +0000 (15:25 -0700)]
Update to use the cbl-mariner webassembly images. (#86806)
Jackson Schuster [Fri, 9 Jun 2023 22:25:44 +0000 (17:25 -0500)]
Add marshalling tests and warn if interface is not partial (#87146)
Adds tests that marshal different types to and from native, and adds a warning if the interface or any containing types are not marked partial.
Jakob Botsch Nielsen [Fri, 9 Jun 2023 20:53:22 +0000 (22:53 +0200)]
JIT: Reorder physical promotion and forward sub (#87265)
Physical promotion breaks more forward sub opportunities than it
introduces, so reorder these phases. Then teach physical promotion to
recognize when it creates new opportunities and selectively reinvoke
forward sub for just those cases.
Egor Bogatov [Fri, 9 Jun 2023 20:26:15 +0000 (22:26 +0200)]
Fix ndpinfinal test with JitStress (#87320)
Tanner Gooding [Fri, 9 Jun 2023 19:03:36 +0000 (12:03 -0700)]
Removing the struct/unmanaged constraint from the Vector types (#87283)
Jakob Botsch Nielsen [Fri, 9 Jun 2023 17:57:46 +0000 (19:57 +0200)]
JIT: Fix gtGetClassHandle with commas (#87313)
gtGetClassHandle has comments about "Tunnel through commas", yet several
of the cases then do not actually use the effective value, resulting in
possible asserts when this function is passed a comma.
Fixes an issue I saw in #87265 when morph invokes gtFoldTypeCompare for
the following IR:
```
fgMorphTree BB19, STMT00013 (before)
[000045] -ACXG------ * JTRUE void
[000044] -ACXG------ \--* NE int
[000623] -ACXG------ +--* COMMA ref
[000622] DA--------- | +--* STORE_LCL_VAR ref V29 tmp18
[000621] ----------- | | \--* LCL_FLD ref V07 loc3 [+0]
[000041] -ACXG------ | \--* CALL nullcheck ref Microsoft.Extensions.Configuration.Test.ConfigurationProviderTestBase+TestKeyValue:get_AsArray():System.String[]:this
[000620] -A--------- this | \--* COMMA ref
[000619] DA--------- | +--* STORE_LCL_VAR ref V30 tmp19
[000618] ----------- | | \--* LCL_FLD ref V07 loc3 [+8]
[000617] ----------- | \--* LCL_VAR ref V30 tmp19
[000043] ----------- \--* CNS_INT ref null
```
Jeremy Koritzinsky [Fri, 9 Jun 2023 17:23:37 +0000 (10:23 -0700)]
Add newly introduced modifiers to our csharp_preferred_modifier_order editorconfig (#86668)
David Wrighton [Fri, 9 Jun 2023 16:25:39 +0000 (09:25 -0700)]
Crossgen2 determinism fix and stress mode (#87302)
* Build determinism stress mode
To use this, pass --determinism-stress:<howManyTimesToReRunTheJIT> to the compiler.
Also add use of this new mode to our crossgen2 comparison runs
* Fix determinism issue found in JIT
Fixed by always zero-initializing the GenTreeVcon's gtSimdVal field
The exact issue that I debugged to find was at
https://github.com/dotnet/runtime/blob/
d88f9a0ed3ac7387d4c16905ff279f4310c03667/src/coreclr/jit/importercalls.cpp#LL3538C1-L3547C18 In particular the issue is that the code constructs a vector constant, but does not zero out the entire constant.
Andy Ayers [Fri, 9 Jun 2023 15:21:29 +0000 (08:21 -0700)]
Revise how we set tiering and pgo options for spmi benchmark collections (#87292)
Don't set these in the BDN environment; set them via the BDN command line
so they only impact the process being benchmarked.
Fixes #86410
Matt Mitchell [Fri, 9 Jun 2023 15:05:00 +0000 (08:05 -0700)]
Don't publish wixpacks (#87222)
Not needed after build is complete when PostBuildSign != true
madelson [Fri, 9 Jun 2023 14:37:37 +0000 (10:37 -0400)]
Assign correct slots during IEnumerable resolution (#80410)
Pavel Savara [Fri, 9 Jun 2023 10:45:21 +0000 (12:45 +0200)]
[wasi] make console always redirected (#87278)
Jan Kotas [Fri, 9 Jun 2023 05:38:58 +0000 (22:38 -0700)]
Disable Quic_IsSupportedTests against ActiveIssue (#87306)
Related #87275
Michal Strehovský [Fri, 9 Jun 2023 04:06:18 +0000 (13:06 +0900)]
Set PublishTrimmed in NativeAOT targets (#87304)
Looks like this is still needed. Fixes #87303.
Tanner Gooding [Fri, 9 Jun 2023 03:52:42 +0000 (20:52 -0700)]
Ensure that Vector<T> is tracked as "optimistic" for crossgen2 (#87240)
Jeremy Koritzinsky [Fri, 9 Jun 2023 03:36:25 +0000 (20:36 -0700)]
Add analyzers and code-fixes to help adoption of source-generated COM (#87223)
* Add first pass of the "convert to generated COM interface" analyzer and add tests for the various other analyzers we are going to introduce.
* Get all analyzer-specific components of the "convert" tests passing.
* Implement all interface-attribute-level changes in the code fixer.
* Add bool marshalling insertion logic to the fixer.
* Add support for removing shadowing members from interfaces.
* Rename fixer
* ActiveIssue the new tests
* Implement basic AddGeneratedComClass analyzer/fixer
* Add ComHosting + GeneratedComInterface analyzer implementation.
* Implement the "runtime COM APIs with source-generated COM types" analyzer.
* Factor out a base class from the ConvertToLibraryImportFixer so we can share it with the ComInterfaceGenerator-family of fixers.
* Move more of the ConvertToLibraryImportFixer to use SyntaxGenerator APIs instead of dropping to C#-specific syntax APIs (improves consistency throughout our code fixes)
* Move support for specifying explicit boolean marshalling rules up to the base class.
* Move the code fixes in ComInterfaceGenerator over to using the ConvertToSourceGeneratedInteropFixer base type.
* Remove use of multicasted delegates and use a more traditional "array of delegates" model.
* Do some refactoring to move more into the new fixer base class.
* Remove custom CodeAction-derived types now that we have a record type to represent fixes from the subclasses.
* Make sure we make types and containing types partial
* Fix negative test.
* Add tests for transitive interface inheritance and add iids.
* Change bool parsing for internal parsing and add warning annotation text. Update diagnostics list md.
Jan Kotas [Fri, 9 Jun 2023 03:24:32 +0000 (20:24 -0700)]
Bump the max Dwarf warning limit (#87301)
Michal Strehovský [Fri, 9 Jun 2023 02:21:24 +0000 (11:21 +0900)]
Generate debug info even if managed debug info not present (#87251)
The names/types of parameters are available even without a PDB in .NET - surface them to the native debugger.
We could also surface fake information about locals because the type information is there (just no names/compiler generated bit), but it's unclear if that would be an improvement.
Jan Kotas [Fri, 9 Jun 2023 00:26:27 +0000 (17:26 -0700)]
Delete Debian 10 test runs (#87288)
Debian 10 is not supported for .NET 8.
Fixes #87268
Elinor Fung [Fri, 9 Jun 2023 00:10:47 +0000 (17:10 -0700)]
Remove some dead code that threw file load exception (#87290)
* Remove some dead code that threw file load exception
* Remove FUSION_E_CACHEFILE_FAILED
t-mustafin [Fri, 9 Jun 2023 00:04:21 +0000 (03:04 +0300)]
Fix typo in dac-notes.md (#87295)
dotnet-maestro[bot] [Thu, 8 Jun 2023 23:37:41 +0000 (16:37 -0700)]
[main] Update dependencies from 10 repositories (#87125)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
Jakob Botsch Nielsen [Thu, 8 Jun 2023 20:20:44 +0000 (22:20 +0200)]
JIT: Handle primitive remainder stores to regularly promoted fields in physical promotion (#87217)
If the remainder of a block copy is handled as a primitive, then it is
possible that the destination or source is a regularly promoted field.
In this case we do not have to DNER it.
Example. Before:
```
Processing block operation [000009] that involves replacements
V08 (field V02.hasValue (fldOffset=0x0)) <- V16 (V00.[000..001)) (last use)
Remainder: [004..008)
=> Remainder strategy: int at +004
Local V00 should not be enregistered because: was accessed as a local field
Local V02 should not be enregistered because: was accessed as a local field
New statement:
STMT00003 ( 0x00D[E-] ... 0x00E )
[000090] -A--------- ▌ COMMA void
[000087] DA--------- ├──▌ STORE_LCL_VAR bool V08 tmp4
[000086] ----------- │ └──▌ LCL_VAR bool V16 tmp12 (last use)
[000089] UA--------- └──▌ STORE_LCL_FLD int (P) V02 loc1 [+4]
▌ bool V02.<unknown class>:hasValue (offs=0x00) -> V08 tmp4
▌ int V02.<unknown class>:value (offs=0x04) -> V09 tmp5
[000088] ----------- └──▌ LCL_FLD int V00 arg0 [+4]
```
After:
```
Processing block operation [000009] that involves replacements
V08 (field V02.hasValue (fldOffset=0x0)) <- V16 (V00.[000..001)) (last use)
Remainder: [004..008)
=> Remainder strategy: int at +004
Local V00 should not be enregistered because: was accessed as a local field
New statement:
STMT00003 ( 0x00D[E-] ... 0x00E )
[000090] -A--------- ▌ COMMA void
[000087] DA--------- ├──▌ STORE_LCL_VAR bool V08 tmp4
[000086] ----------- │ └──▌ LCL_VAR bool V16 tmp12 (last use)
[000089] DA--------- └──▌ STORE_LCL_VAR int V09 tmp5
[000088] ----------- └──▌ LCL_FLD int V00 arg0 [+4]
```
Sven Boemer [Thu, 8 Jun 2023 19:43:18 +0000 (12:43 -0700)]
Move DynamicCodeSupport default into aot targets (#87135)
* Move DynamicCodeSupport default into aot targets
* Clean up redundant PublishTrimmed setting
Eric Erhardt [Thu, 8 Jun 2023 19:25:49 +0000 (14:25 -0500)]
Add IHostApplicationBuilder interface (#86974)
* Add IHostApplicationBuilder and implement it in HostApplicationBuilder.
- Move ILoggingBuilder from MS.Ext.Logging to MS.Ext.Logging.Abstractions so IHostApplicationBuilder can reference it.
- Add IConfigurationManager and implement it in ConfigurationManager.
- Add CompatiibilitySuppressions. These errors are caused by ILoggingBuilder being moved to Logging.Abstractions, and ApiCompat not respecting TypeForwardedTo attributes.
Fix #85486
Eirik Tsarpalis [Thu, 8 Jun 2023 18:39:04 +0000 (19:39 +0100)]
Fix DeserializeAsyncEnumerable generic recursion issue. (#87276)
Sven Boemer [Thu, 8 Jun 2023 17:10:58 +0000 (10:10 -0700)]
Don't enable ILLink analyzers for unsupported TFMs (#87071)
* Don't enable ILLink analyzers for unsupported TFMs
This adds a condition to EnableSingleFileAnalyzer to prevent it from requiring
the ILLink pack that is only supported on netcoreapp3.0 and above.
Adding a condition on the TFM requires moving the setting into a targets file.
Also consolidates more of the analyzer logic into this file.
---------
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Katelyn Gadd [Thu, 8 Jun 2023 16:33:53 +0000 (09:33 -0700)]
[wasm] Fix for getelema1 crash & cpblk crash in jiterpreter (#87246)
* Fix for getelema1 crash in specific scenarios
* Check more of the zero page for nonzero data
* If we ever see garbage in the zero page disable it permanently
* Log an error if garbage appears in the zero page after startup
* Overhaul trace local variable naming and reuse
* Fix count not being initialized for cpblk in some cases
Pavel Savara [Thu, 8 Jun 2023 16:17:24 +0000 (18:17 +0200)]
make mono_wasm_invoke_method_bound safer with exception root (#87266)
Peter Sollich [Thu, 8 Jun 2023 15:52:42 +0000 (17:52 +0200)]
Remove calls to GetHighPrecisionTimeStamp from allocate_uoh_object that made it into main by mistake (my bad). (#87273)
Jakob Botsch Nielsen [Thu, 8 Jun 2023 15:04:35 +0000 (17:04 +0200)]
JIT: Fix a couple of inequalities in promotion decomposition (#87186)
These checks were of the form `end < start` when more precisely they
can be `end <= start`. It was causing some unnecessarily conservative
writebacks to occur in some cases.
Also skip entries in the decomposition plan that are writing to the
remainder when the remainder is dead. Saw a bunch of these cases in
the regressions and realized we were missing this case.