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.
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`
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
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.
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.
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.
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.
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.
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.
hrrrrustic [Tue, 9 May 2023 17:00:08 +0000 (20:00 +0300)]
Update equals (#85896)
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
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
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>
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
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
Miha Zupan [Tue, 9 May 2023 14:59:14 +0000 (16:59 +0200)]
Improve IndexOfAnyValues for needles with 0 (#84184)
Egor Bogatov [Tue, 9 May 2023 14:25:01 +0000 (16:25 +0200)]
Fix ReadOnlySpanGetReferenceAndReadInteger on BigEndian (#85969)
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
Egor Bogatov [Tue, 9 May 2023 14:07:22 +0000 (16:07 +0200)]
Fold "FrozenObjectHandle(REF) + CNS" to a byref constant (#85888)
Siqi Lu [Tue, 9 May 2023 14:05:13 +0000 (14:05 +0000)]
Fix comment for File.Exists (#85648)
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)
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
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
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>
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...
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.
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)
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
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.
Egor Bogatov [Tue, 9 May 2023 01:09:22 +0000 (03:09 +0200)]
Remove check from FillStringChecked and rename it to CopyStringContent (#85880)
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>
Michal Strehovský [Mon, 8 May 2023 23:50:12 +0000 (08:50 +0900)]
Delete call to `GetMethod` in runtime type system (#85902)
I think this is a leftover from one of the appmodels that we deleted. I don't believe this ever returns non-empty enumeration.
github-actions[bot] [Mon, 8 May 2023 23:38:34 +0000 (17:38 -0600)]
[main] Servicing docs improvements (#85855)
* Servicing docs improvements
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
* Apply suggestions from code review
* Update .github/workflows/check-service-labels.yml
* Update .github/workflows/check-service-labels.yml
---------
Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
Parker Bibus [Mon, 8 May 2023 22:37:53 +0000 (15:37 -0700)]
Previous changes fixed some runs, but some are still broken due to reinstall installing a broken urllib version. (#85935)
Tanner Gooding [Mon, 8 May 2023 21:53:14 +0000 (14:53 -0700)]
Ensure the insTupleType mask entries stay correct (#85870)
* Ensure the insTupleType mask entries stay correct
* Ensure the bitwise result remains uint16_t
Michal Strehovský [Mon, 8 May 2023 21:08:59 +0000 (06:08 +0900)]
Speed up `GVMLookupForSlot` (#85901)
BasicMinimalApi spends about 1% of samples in this method.
Jeremy Koritzinsky [Mon, 8 May 2023 19:03:05 +0000 (12:03 -0700)]
Use Roslyn Source Generator Testing SDK to test interop source generators (#84867)
Andrii Kurdiumov [Mon, 8 May 2023 18:46:39 +0000 (00:46 +0600)]
Add test for unnmanaged delegates interop (#85903)
Tomáš Rylek [Mon, 8 May 2023 18:31:23 +0000 (20:31 +0200)]
Fix RVA field access in composite Crossgen2 build (#78723) (#85800)
The pre-existing behavior was copying all RVA fields in
single-file builds and only selectively copying explicitly
referenced fields in composite builds. This has bitten us
in WPF where Managed C++ emits an array of early initializers
that are marked by an initial and final RVA field. By only
selectively copying those two without the remaining entries
in-between we end up crashing later on as the app is not
fully initialized.
Based on David Wrighton's advice I have kept the logic for
copying RVA fields in case of array initializers that seem
to be hot in terms of performance. For the remaining field
access I have ended up constructing a new precode fixup
RVA_FIELD_ADDRESS for this purpose.
Fixes: #78723
Thanks
Tomas
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Milos Kotlar [Mon, 8 May 2023 17:03:55 +0000 (19:03 +0200)]
performance-setup.sh requires urllib3 version <2 (#85915)
dotnet-maestro[bot] [Mon, 8 May 2023 16:57:05 +0000 (11:57 -0500)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230506.1 (#85885)
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23254.2 -> To Version 3.3.5-beta1.23256.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Mon, 8 May 2023 16:50:59 +0000 (12:50 -0400)]
[main] Update dependencies from dotnet/arcade (#85867)
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.1 -> To Version 8.0.0-beta.23255.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Katelyn Gadd [Mon, 8 May 2023 15:52:55 +0000 (08:52 -0700)]
[wasm] Fetch interpreter opcode info from the runtime instead of generating a table (#85904)
* No longer generate a typescript opcode info table
* Fetch opcode info from the interpreter on-demand
Katelyn Gadd [Mon, 8 May 2023 15:51:48 +0000 (08:51 -0700)]
[wasm] Prune opcodes in the jiterpreter if they follow an unconditional bailout/exit (#85905)
* Prune opcodes that follow an unconditional bailout/abort since they are unreachable and we don't need to compile them
Andy Ayers [Mon, 8 May 2023 15:01:58 +0000 (08:01 -0700)]
JIT: assert if we see schema mismatches with dynamic pgo data (#85898)
When the profile data comes from dynamic PGO, the spanning tree encoded in the
schema produced by an earlier tier should exactly match the spanning tree for
the current jit attempt, since the JIT and method IL are identical.
(This is not the case for static PGO; that schema may have come from a different
JIT and/or different version of IL).
Note in release modes we won't assert; instead, we will silently throw the PGO
data away.
Follow-on change to #85805 to catch more issues like #85799.
Vlad Brezae [Mon, 8 May 2023 10:39:51 +0000 (13:39 +0300)]
[mono][interp] Fix arg alignment issues when mixing with compiled code (#85153)
* [mono][interp] Refactor arg offset computation to make code clearer
* [mono][interp] Remove redundant assign
* [mono][interp] Move mint_type out from header file
It makes no sense to inline this big method into callers.
* [mono][interp] Fix arg offset computation when doing pinvoke and aot/jit calls from interp
The previous code wasn't handling alignment of simd types.
* [mono][interp] Use the correct alignment for args when entering interp
We stop computing the arguments on the fly since it's getting too expensive doing the alignment checks. We directly use `imethod->arg_offsets` instead which is computed once during the first call, while also ensuring consistency with the calculation.
* [mono][interp] Fix arg offset computation when running clauses with interp
* [mono][interp] Remove dead code
* Temporaril disable jiterp for CI
* Update jiterpreter interp_entry wrapper generator and re-enable jiterp
* Revert options-def.h changes
---------
Co-authored-by: Katelyn Gadd <kg@luminance.org>
Michal Strehovský [Mon, 8 May 2023 06:34:59 +0000 (15:34 +0900)]
Get rid of reflection blocked types (#85810)
Fixes #72570.
Still need to delete workarounds that make things public in corelib but maybe this diff is large enough already?
We were gradually getting less and less from reflection blocking:
* We stopped blocking things outside corelib (.NET Native blocked all of BCL; we don't).
* We trim reflection metadata and that allows us to have method bodies without metadata.
With this, we should be able to get type definition-level reflection metadata for any MethodTable there is in the system.
This is a ~30 kB size regression for BasicMinimalApis. It is pretty much a wash for Hello World, because all the BCL cruft to handle reflection blocked types costs as much as the benefit of blocking.
Parker Bibus [Mon, 8 May 2023 05:45:34 +0000 (22:45 -0700)]
Pin urllib to version 1.26.15 based on github comments to fix ssl requests error. (#85881)
Pent Ploompuu [Sun, 7 May 2023 22:29:39 +0000 (01:29 +0300)]
Fix JsonNode.ToString allocations (#85886)
SingleAccretion [Sun, 7 May 2023 21:13:44 +0000 (00:13 +0300)]
Fix flags checking for GT_IND (#85890)
Katelyn Gadd [Sun, 7 May 2023 05:11:33 +0000 (22:11 -0700)]
[wasm] Add Vector128 and PackedSimd support to the jiterpreter; add PackedSimd to the interpreter (#82773)
* Add PackedSIMD support to the interpreter (off by default)
* Add SIMD support to the jiterpreter
* Add runtime options governing interpreter vector128 and packedsimd support
* Add some R4 vector128 operations to the interpreter
* Fix jiterpreter MINT_POPCNT_I8 implementation
* Enable compiling the runtime with wasm simd support so that intrinsics can be used
* Add browser-bench measurements for packing vector128
Andy Ayers [Sun, 7 May 2023 01:22:31 +0000 (18:22 -0700)]
JIT: fix another case of early flow graph divergence (#85873)
The JIT will sometimes decide to instrument a Tier0 method even if `BBINSTR`
is not passed by the VM (this is enabled when the VM passes `BBINSTR_IF_LOOPS`
so that we can provide some PGO data to OSR methods).
In such cases we build the flow graph and then decide to instrument, so the
flow graph shape may differ from the case where we know up front that we are going
to instrument or optimize.
Remedy this by also running the early branch to next flow graph opt when a Tier0
JIT is passed `BBINSTR_IF_LOOPS`.
Addresses another case of #85856.
Alexander Batishchev [Sun, 7 May 2023 00:12:32 +0000 (17:12 -0700)]
Fixed link to PR guide in CONTRIBUTING.md (#85876)
Tanner Gooding [Sat, 6 May 2023 16:09:26 +0000 (09:09 -0700)]
Ensure getMaxSIMDStructBytes doesn't report `compVerifyInstructionSetUnusable` (#85370)
Andy Ayers [Sat, 6 May 2023 14:53:10 +0000 (07:53 -0700)]
JIT: produce consistent flow graph when producing or consuming profile data (#85860)
Always try and merge "branch to next" blocks when building the intial flow graph
if BBINSTR or BBOPT is set.
Fixes #85856.
Jan Kotas [Sat, 6 May 2023 13:50:43 +0000 (06:50 -0700)]
Replace GetInternalValue methods on RuntimeHandles with public equivalents (#85861)
Tanner Gooding [Sat, 6 May 2023 11:12:53 +0000 (04:12 -0700)]
Save some space in the hwintrinsic and instruction tables (#85853)
* Save some space in the hwintrinsic and instruction tables
* Apply formatting patch
Jakob Botsch Nielsen [Sat, 6 May 2023 10:06:16 +0000 (12:06 +0200)]
JIT: Generalize assignment decomposition in physical promotion (#85323)
Generalize assignment decomposition to handle arbitrary combinations of
physically promoted structs. Do this by introducing a DecompositionPlan
class that keeps track of the copies to do that involve replacement
fields. The first step is then to fill out this plan. In the general
case where both the source and destination are physically promoted this
involves iterating the replacements in lockstep. For promotions that map
exactly, a direct copy between their locals is queued into the plan; in
other cases (e.g. partial overlap) it may involve writing the source
back to the struct local.
The plan is used to generate the IR and to figure out the best strategy to
use for the remaining parts of the struct. Additional it is used to check for
some optimization opportunities (e.g. we avoid superfluous write barriers
in some cases).
SingleAccretion [Sat, 6 May 2023 04:44:37 +0000 (07:44 +0300)]
Move `ASG` rationalization to just after global morph (#85494)
* If Conversion
* SSA descriptor
* VN-based dead store removal
* Range Check
* Global assertion prop
* CSE
* Redundant branch opts
* Copy propagation
* Loop hoisting
* Value numbering
* Early prop
* SSA
* Delete GTF_IND_ASG_LHS
* Liveness
* Redundant zero inits
* Move assignment rationalization to before the opt phases
* Ref counting
* Cast morph opt
* Optimized STOREIND(LCL_ADDR, ...)
* Move assignment rationalization to before loop opts
* MD array morphing
* Loop unrolling
* Loop cloning
* Loop recognition
* Delete code from fgRationalizeAssignment
* GS security
* Fix formatting
Kunal Pathak [Sat, 6 May 2023 03:37:52 +0000 (20:37 -0700)]
Skip FP registers processing if method don't have floating points use (#85744)
* skip processing floating point registers if method doesn't have one
* Rename to needNonIntegerRegisters
* jit format
SingleAccretion [Sat, 6 May 2023 00:45:26 +0000 (03:45 +0300)]
Address `TODO-FIELD`s and delete quirks (#85735)
* Adjust a comment
* Simplify CreateAddressNodeForSimdHWIntrinsicCreate
No diffs.
* Limit the usages of gtNewFieldIndirNode
One tiny regression in a Regex method due to us not clearing GLOB_REF where not needed.
* Delete the side effects quirk
About neutral in improvements and regressions.
Both come from the differences in the handling of unused indirs and NULLCHECK nodes.
* Add a convenience gtNewFieldAddrNode overload
Sven Boemer [Fri, 5 May 2023 21:43:39 +0000 (14:43 -0700)]
Use Ubuntu 22.04 for runtime-dev-innerloop (#85836)
This makes the innerloop runs more reflective on a typical dev environment - a recent Ubuntu, and not a cross build. These images don't have `lld` (see https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/865).
Bruce Forstall [Fri, 5 May 2023 21:21:36 +0000 (14:21 -0700)]
Disable NativeLibraryTests for ilasm round-trip testing (#85832)
Tracking: https://github.com/dotnet/runtime/issues/84914
Xu Liangyu [Fri, 5 May 2023 20:30:42 +0000 (04:30 +0800)]
Implements the CodeGen::genCodeForIncSaturate(). (#85502)
Nickolas McDonald [Fri, 5 May 2023 20:07:00 +0000 (16:07 -0400)]
Fix Diagnostic port suspension message doesn't report expected port name (#85430)
Sven Boemer [Fri, 5 May 2023 19:39:36 +0000 (12:39 -0700)]
Run NativeAot tests on arm64 (#82307)
Adds arm64 build and run of NativeAot smoke tests
dotnet-maestro[bot] [Fri, 5 May 2023 18:45:23 +0000 (20:45 +0200)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20230504.3 (#85817)
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.23229.3 -> To Version 1.0.0-prerelease.23254.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Fri, 5 May 2023 18:44:23 +0000 (20:44 +0200)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230504.2 (#85820)
Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
From Version 3.3.5-beta1.23251.1 -> To Version 3.3.5-beta1.23254.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Fri, 5 May 2023 18:43:01 +0000 (20:43 +0200)]
Update dependencies from https://github.com/dotnet/roslyn build
20230504.5 (#85823)
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.7.0-1.23253.10 -> To Version 4.7.0-1.23254.5
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Fri, 5 May 2023 18:42:21 +0000 (20:42 +0200)]
Update dependencies from https://github.com/dotnet/arcade build
20230505.1 (#85818)
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.23253.5 -> To Version 8.0.0-beta.23255.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
SingleAccretion [Fri, 5 May 2023 18:09:56 +0000 (21:09 +0300)]
Delete the concept of "location" values from local morph (#85604)
* Delete the concept of "location" values from local morph
No longer necessary after ADDR's removal.
* Fix spelling
Co-authored-by: Andy Ayers <andya@microsoft.com>
* Fix spelling №2
Co-authored-by: Andy Ayers <andya@microsoft.com>
---------
Co-authored-by: Andy Ayers <andya@microsoft.com>
SingleAccretion [Fri, 5 May 2023 17:54:19 +0000 (20:54 +0300)]
Stop passing around struct handles in importer (#85561)
* Stop passing around struct handles in importer
No longer needed.
* Fix getSIMDStructFromField
* Conflict resolution fix
Pavel Savara [Fri, 5 May 2023 17:03:24 +0000 (19:03 +0200)]
[browser] prevent <DebuggerSupport> from disabling interp optimizations (#85792)
* [wasm] Don't enable debugging for library tests by default
@pavelsavara and @brzvlad found that some tests like
System.Collections.Immutable.Tests run slower because the runtime has
debugging enabled which causes the interpreter to disable optimizations.
Reason:
- Some tests depend on debugger attributes, and thus set
`$(DebuggerSupport)=true` to preserve them while linking.
- Which sets `$(WasmDebugLevel)=-1`. But setting `$(WasmDebugLevel)<0`
enables debugging support in the runtime.
- So, set this to `<0` only when building with `Configuration=Debug` .
* set it to zero only on CI
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Egor Bogatov [Fri, 5 May 2023 16:21:37 +0000 (18:21 +0200)]
Remove [AO] in SpanHelpers methods (#85819)
t-mustafin [Fri, 5 May 2023 15:18:41 +0000 (18:18 +0300)]
[RISC-V][GC] Use 128gb for regions_range on RISCV64 (#84797)
* Set virtual memory limit for RISCV64 SV39
Use 128gb for regions_range cause RISCV64 SV39 memory layout allows to use only 256gb of virtual memory: https://docs.kernel.org/riscv/vm-layout.html#risc-v-linux-kernel-sv39.
* PR feedback
Kunal Pathak [Fri, 5 May 2023 14:57:42 +0000 (07:57 -0700)]
Skip displaying raw instruction bytes by default for non-xarch (#85808)
Andy Ayers [Fri, 5 May 2023 14:44:48 +0000 (07:44 -0700)]
JIT: prepare for instrumentation before incorporating profile counts (#85805)
Otherwise the spanning tree we generate may be biased by the profile data
and not match the spanning tree we generated in Tier0.
Fixes #85799.
Qiao Pengcheng [Fri, 5 May 2023 13:43:52 +0000 (21:43 +0800)]
[LoongArch64] modify the define of `FLOAT_REGISTER_SIZE`. (#85812)
Vlad Brezae [Fri, 5 May 2023 12:43:09 +0000 (15:43 +0300)]
[mono][interp] Fix first arg offset computation for unoptimized newobj (#85787)
Instead of obtaining the offset directly, we were computing it as the next available offset (once the arguments were pop'ed), which was not accounting for the case where the first argument was aligned.
dotnet bot [Fri, 5 May 2023 12:42:06 +0000 (05:42 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2174100 (#85802)
Radek Doulik [Fri, 5 May 2023 09:30:58 +0000 (11:30 +0200)]
[wasm] PackedSimd, add floating point methods (#85705)
* [wasm] PackedSimd, add floating point methods
* Fix pmax/pmin
dotnet-maestro[bot] [Fri, 5 May 2023 00:48:01 +0000 (19:48 -0500)]
Update dependencies from https://github.com/dotnet/arcade build
20230503.5 (#85766)
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.23253.3 -> To Version 8.0.0-beta.23253.5
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Fri, 5 May 2023 00:47:29 +0000 (19:47 -0500)]
Update dependencies from https://github.com/dotnet/roslyn build
20230503.10 (#85771)
Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
From Version 4.7.0-1.23226.15 -> To Version 4.7.0-1.23253.10
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Eirik Tsarpalis [Thu, 4 May 2023 22:13:35 +0000 (01:13 +0300)]
Remove a number of unneeded nullability suppressions. (#85788)
* Fix nullability annotation of the JsonSerializer.Serialize methods.
* Remove a few more suppressions from the implementation.
* Revert annotations in the public APIs.
Radek Doulik [Thu, 4 May 2023 22:07:35 +0000 (00:07 +0200)]
[wasm] Update path in the README (#85794)
Jeremy Koritzinsky [Thu, 4 May 2023 22:00:55 +0000 (15:00 -0700)]
Convert the ComWrappers API tests to Xunit-style (#85790)
Jackson Schuster [Thu, 4 May 2023 21:43:03 +0000 (16:43 -0500)]
Don't add duplicate suffix in LibraryImport code fix. (#85668)
Elinor Fung [Thu, 4 May 2023 21:34:20 +0000 (23:34 +0200)]
Revert "SetThreadDpiAwareness for host error dialog (#81930)" (#85773)
This reverts commit
6f36be56480dc0a24a9713df5d81875a9ca2c980.
There is an issue with the Windows TaskDialog where expanding/collapsing the detail area will result in incorrect resizing of the window when the DPI awareness of the process and thread are not the same. Instead of explicitly making the thread starting the dialog DPI aware, we just leave it whatever the process is set to. This means that if the developer specified a manifest that made their application DPI aware, the dialog will be non-blurry, but if the developer did not, it will remain blurry on high DPI.
Stephen Toub [Thu, 4 May 2023 20:22:49 +0000 (13:22 -0700)]
Avoid using two-char search in IndexOfOrdinalIgnoreCase for 1-char values (#85781)
Ankit Jain [Thu, 4 May 2023 19:16:27 +0000 (15:16 -0400)]
[wasm] WBT: Disable blazor test due to https://github.com/dotnet/runt… (#85786)
…ime/issues/85769
test: `Wasm.Build.Tests.Blazor.BuildPublishTests.BlazorBuildRunTest`
Buyaa Namnan [Thu, 4 May 2023 17:13:34 +0000 (10:13 -0700)]
Add GenericTypeParameterBuilder implementation and save a generic type into assembly. (#85658)
* Save a type with generic type parameters
* Update GenericParameterAttribute in test that causing a class contraint
Sven Boemer [Thu, 4 May 2023 16:56:21 +0000 (09:56 -0700)]
Make dependency on lld optional (#85667)
This detects availability of lld by reusing the logic in
`init-compiler.sh`.
Vladimir Sadov [Thu, 4 May 2023 16:45:24 +0000 (09:45 -0700)]
[NativeAOT] Simplifying access to thread static variables (#84566)
Fixes: https://github.com/dotnet/runtime/issues/84373
- [x] separate "fast" inlinable case . (used for singlemodule, not dynamic cases, when optimizing)
- [x] make the storage for fast threadstatics a single "combo" instance instead of array of instances.
github-actions[bot] [Thu, 4 May 2023 15:34:07 +0000 (08:34 -0700)]
Sync shared code from aspnetcore (#85748)
Co-authored-by: JamesNK <JamesNK@users.noreply.github.com>
Zoltan Varga [Thu, 4 May 2023 15:19:47 +0000 (11:19 -0400)]
[mono][wasm] Make experimental-gshared-mrgctx really true on WASM AOT. (#85770)
Andy Ayers [Thu, 4 May 2023 14:43:34 +0000 (07:43 -0700)]
JIT: properly scrub SSA from return address buffers (#85746)
These can be in SSA and were not getting their SSA numbers cleaned by
`fgResetForSsa`, so in repeat mode they might trigger SSA check failures.
Also changed it so you can dump the SSA number without triggering an
assert.
Fixes #85629
Andy Ayers [Thu, 4 May 2023 14:42:33 +0000 (07:42 -0700)]
Add mcs support for new FROZEN_ALLOC_ALLOWED jit flag (#85745)
Jakob Botsch Nielsen [Thu, 4 May 2023 14:19:20 +0000 (16:19 +0200)]
JIT: Allow forward sub to reorder trees throwing the same single exception (#85647)
Allow forward sub to move a tree past another tree that throws an exception provided that they both throw the same exception.
mphelt [Thu, 4 May 2023 13:49:36 +0000 (15:49 +0200)]
Missing overrides in LoggingHttpMessageHandler and LoggingScopeHttpMessageHandler (#85143)
* add missing overrides in LoggingHttpMessageHandler and LoggingScopeHttpMessageHandler (https://github.com/dotnet/runtime/issues/85104)
* Update LoggingUriOutputTests.cs
* Update LoggingHttpMessageHandler.cs
* Update LoggingScopeHttpMessageHandler.cs
* Update LoggingScopeHttpMessageHandler.cs
* Update LoggingUriOutputTests.cs
* Update LoggingScopeHttpMessageHandler.cs
* Update LoggingUriOutputTests.cs
* Update LoggingUriOutputTests.cs
* Update LoggingUriOutputTests.cs
* Update LoggingUriOutputTests.cs
* Update LoggingHttpMessageHandler.cs
* Update LoggingScopeHttpMessageHandler.cs
* Update LoggingHttpMessageHandler.cs
* Update LoggingScopeHttpMessageHandler.cs
* Update LoggingHttpMessageHandler.cs
* Update LoggingHttpMessageHandler.cs
* Update LoggingScopeHttpMessageHandler.cs
* Code style update
* back to private methods
* merge with dotnet/runtime (#7)
Stephen Toub [Thu, 4 May 2023 13:48:58 +0000 (06:48 -0700)]
Annotate IHtmlString.ToHtmlString's return as nullable (#85742)