Michał Petryka [Mon, 1 May 2023 17:54:00 +0000 (19:54 +0200)]
Set lvSingleDef for non TYP_REF locals (#85398)
* Set lvSingleDef for non TYP_REF locals
* Apply suggestions from code review
Co-authored-by: Andy Ayers <andya@microsoft.com>
* Rewrite an if
---------
Co-authored-by: Andy Ayers <andya@microsoft.com>
Michal Strehovský [Mon, 1 May 2023 16:58:14 +0000 (01:58 +0900)]
Fix trimmability issues in Quic test (#85579)
Stephen Toub [Mon, 1 May 2023 16:56:20 +0000 (12:56 -0400)]
Enable regex to use IndexOf(..., OrdinalIgnoreCase) for prefix searching (#85438)
As one of its many ways of finding the next possible match starting location, Regex recognizes a string known to start the expression and uses IndexOf to find it. With this change, it can also do so for OrdinalIgnoreCase. With improvements to IndexOf(..., OrdinalIgnoreCase), this now yields significantly faster searches through longer inputs, in addition to leading to simpler code in source generated regexes.
Shreyas Jejurkar [Mon, 1 May 2023 15:45:46 +0000 (21:15 +0530)]
fix: Change severity for SYSLIB1006 to Info instead of warning (#85581)
Zoltan Varga [Mon, 1 May 2023 15:42:23 +0000 (17:42 +0200)]
Revert "[mono][llvm] Enable the cold calling conv on osx/linux. (#83519)" (#85554)
This reverts commit
a2acc6c6529fc25ed350b239efe459b08b0310a6.
Revert this as it causes an assert on osx.
Stephen Toub [Mon, 1 May 2023 14:36:52 +0000 (10:36 -0400)]
Improve vectorization of IndexOf(chars, StringComparison.OrdinalIgnoreCase) (#85437)
* Improve vectorization of IndexOf(chars, StringComparison.OrdinalIgnoreCase)
Use the same general "Algorithm 1: Generic SIMD" that we do for StringComparison.Ordinal, adapter for OrdinalIgnoreCase.
* Fix duplicate local
Kunal Pathak [Mon, 1 May 2023 12:29:50 +0000 (05:29 -0700)]
Do not set pre-decided consecutive registers as busy (again) (#85566)
SwapnilGaikwad [Mon, 1 May 2023 12:29:28 +0000 (13:29 +0100)]
Fix processing of x86 test results (#82301)
Huo Yaoyuan [Mon, 1 May 2023 11:57:34 +0000 (19:57 +0800)]
Remove cached Type instances (#85557)
* Remove the Type cache in Convert
* Remove Type cache in MaskedTextProvider
* Remove Type cache in DataSetUtil
* Remove Type cache in ResourceManager
* Remove Type cache in XmlBinaryReader
* Remove Type cache in XsltConvert
* Remove Type cache in DataTypeImplementation
* Introduce a local variable for typeof(string)
Michal Strehovský [Mon, 1 May 2023 11:56:46 +0000 (20:56 +0900)]
Translate AV in RhpByRefAssignRef to NullReferenceException (#85575)
Fixes dotnet/runtimelab#197.
Ran into this again when curiosity made my try a newly added JIT test with NativeAOT.
Milos Kotlar [Mon, 1 May 2023 11:36:32 +0000 (14:36 +0300)]
[mono][aot] Refactor deduplication to use enum instead of flags (#85384)
* Use enum instead of multiple dedup flags
Michal Strehovský [Mon, 1 May 2023 10:17:01 +0000 (19:17 +0900)]
Delete finally blocks in EcmaSignatureParser (#85577)
These lightweight structs are not meant to be reusable.
Michal Strehovský [Mon, 1 May 2023 10:16:39 +0000 (19:16 +0900)]
Emission and reading of custom modifiers (#85504)
Fixes #71883.
* Emit custom modifiers to the native metadata format
* Read custom modifiers at runtime
* Bugfix in the type loader
SingleAccretion [Mon, 1 May 2023 10:04:12 +0000 (13:04 +0300)]
Split assignment rationalization into a separate phase (#85180)
* General IR support
* Introduce GTK_STORE
And make "OperIsStore" means exactly these opers:
GT_STORE_LCL_VAR
GT_STORE_LCL_FLD
GT_STOREIND
GT_STORE_BLK
Notable: GT_STORE_DYN_BLK is excluded as it does
not follow conventions of all other stores (e. g.
is VOID-typed) and acts more like opaque atomic
operations instead.
Also fix an old bug with gtNodeHasSideEffects.
* Fix OperExceptions
* Introduce and use gtNewStoreLclFldNode
* gtNewStoreLclVar -> gtNewStoreLclVarNode
* Use OperIsAnyLocal in more places
* Introduce ASG rationalization phase
* Introduce switch for stress-morphing
* Fix formatting
Egor Bogatov [Mon, 1 May 2023 08:37:51 +0000 (10:37 +0200)]
JIT: Make optAssertionPropGlobal_RelOp less conservative for side-effects (#85532)
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Michal Strehovský [Mon, 1 May 2023 04:40:42 +0000 (13:40 +0900)]
Delete more type equivalence logic (#85507)
* Delete more type equivalence logic
In .NET Native times we could have a situation where two different `MethodTable` pointers represented the same type. This could happen for cloned types, or structurally equivalent parameterized types. The cloned type concept was never used in Native AOT. The structural equivalence disappeared in https://github.com/dotnet/runtimelab/commit/
0ef7bd6cfe129f4c308f5d6dae1eccf48c3cdff4. Neither of those seems useful. So getting rid of some of the vestiges.
* Delete more stuff
* Remember statically present pointer and mdarrays
Michal Strehovský [Mon, 1 May 2023 04:39:37 +0000 (13:39 +0900)]
Delete `arrayArgumentsFound` logic from type loader (#85509)
I think this was handling a situation where we're trying to find an existing `MethodTable` for `Foo<SomeType[]>` and such `MethodTable` does statically exist but we didn't have a mapping table entry for `SomeType[]` and we couldn't get a `MethodTable` for it, even though it statically exists in the image. Since the compiler optimization to skip emitting this mapping got commented out, it wasn't actually possible to end up in a situation where we wouldn't know how to find a `MethodTable` for an existing array at runtime. We therefore don't need the slow path that tries to find the type without having `MethodTable`s for all generic arguments.
Gérald Barré [Sun, 30 Apr 2023 23:12:57 +0000 (19:12 -0400)]
Replace InvariantCulture comparison with Ordinal (#85572)
Stephen Toub [Sun, 30 Apr 2023 22:59:34 +0000 (18:59 -0400)]
Reduce overheads of Regex.Replace with a text replacement string (#85564)
* Reduce overheads of Regex.Replace with a text replacement string
If the replacement string doesn't contain any backreferences, we can reduce the overheads involved in processing the replacement. Rather than storing a list of `ReadOnlyMemory<char>` segments for every portion of the original string or replacement, we can just store a list of `(int offset, int count)` pairs; if the offset is non-negative it refers to the original string, and if it's negative, it means to use the whole replacement. We can also avoid evaluating the rules each time, and since we're not storing string references into the arrays, we don't need to clear the arrays before returning them to the pool.
* Replace builders with more generic StructListBuilder
SingleAccretion [Sun, 30 Apr 2023 18:17:41 +0000 (21:17 +0300)]
Delete `OBJ(LCL_ADDR)` args handling from local morph ref counting (#85544)
* Delete OBJ args handling from local morph
* Delete outdated comments
Maksim Golev [Sun, 30 Apr 2023 16:58:26 +0000 (20:58 +0400)]
Fix/31527 invalid currentculture applying (#85297)
Co-authored-by: Maksim Golev <mgolev@htc-cs.ru>
SingleAccretion [Sat, 29 Apr 2023 20:32:21 +0000 (23:32 +0300)]
Simplify some importer code (#84656)
Qiao Pengcheng [Sat, 29 Apr 2023 16:36:15 +0000 (00:36 +0800)]
[LoongArch64] fix the errors when reverse GT_JCC. (#85555)
* [LoongArch64] fix the errors when reverse GT_JCC.
* just modify the LA64's files for CRs.
Zoltan Varga [Sat, 29 Apr 2023 04:23:29 +0000 (06:23 +0200)]
[mono][jit] Emit a null check when storing to valuetype fields. (#82663)
* [mono][jit] Emit a null check when storing to valuetype fields.
Fixes https://github.com/dotnet/runtime/issues/82535.
* Add a test.
* Disable the test on coreclr.
SingleAccretion [Fri, 28 Apr 2023 22:02:43 +0000 (01:02 +0300)]
Fix volatility checks in VN and loop side effects code (#85467)
* Fix volatile check in loop side effects code
* Restore the volatility logic in VN
Volatile stores should be processed at the point of ASG.
Andy Ayers [Fri, 28 Apr 2023 21:26:09 +0000 (14:26 -0700)]
JIT: enhance SSA checker to check some PHI properties (#85533)
* Ensure PhiArgs have the right local number.
* Ensure PhiArgs have unique `gtPredBB` (for most blocks)
* Verify phidef/non-phidef order
Handler entries may have multiple PhiArgs with the same `gtPredBB`. This
is by design, to model exceptional flow from the middle of the block to a
handler.
Jump threading relies on there being just a single PhiArg per pred.
So exclude handler entry blocks from jump threading.
Prep work for possibly changing SSA to produce one PhiArg per pred, instead
of one PhiArg per ssa def.
Jan Vorlicek [Fri, 28 Apr 2023 21:12:27 +0000 (23:12 +0200)]
Fix exception leaking from filter in nativeAOT (#85366)
* Fix exception leaking from filter in nativeAOT
There is a bug in handling exceptions that occur in exception filters in
nativeAOT. If such exception is not handled in the filter, it needs to
be swallowed and the filter should behave as if it returned `false`.
Instead of that, the current behavior is that debug build of the runtime
asserts and the release build fails fast without any message.
This change fixes it by catching the exception in the exception handling
code. It was also necessary to modify the stack frame iterator to let it
unwind past the filter funclet instead of failing fast.
* Reenable tests disabled due to the issue
Ivan Diaz Sanchez [Fri, 28 Apr 2023 20:39:49 +0000 (13:39 -0700)]
Fix XUnit Log Fixer Irregularities (#85183)
* Fixed the log tags regular expressions.
* Added test exit code to the XUnit Log Checker, and made it return it as well for Helix to process it.
* Finished fixes.
* Decoupled the test's exit code from the XUnit Log Checker.
Juan Hoyos [Fri, 28 Apr 2023 20:39:16 +0000 (13:39 -0700)]
Add documentation for merge on red, build analysis, and v1/v2 tests (#84982)
Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Aleksey Kliger (λgeek) [Fri, 28 Apr 2023 19:54:14 +0000 (15:54 -0400)]
[wasm-mt] Support async JS interop on threadpool threads (#84494)
This is the last part of #84489 - initial runtime support for async JS interop on threadpool threads in multi-threaded WebAssembly.
Conceptually there are a few things here:
* A mechanism for the native runtime to start some threads as "exitable" so that we don't clean up when they return from their thread start function. (we will clean up when the pthreads TLS dtor runs)
* A change to make JSHostImplementation.s_csOwnedObjects a thread-static in multithreaded builds. This is because the map keys on a small integer handle that is allocated per-thread on the JS side as a handle for JS objects that are to be kept alive because managed code depends on them. (This is needed in general, but also makes the new smoke test work)
* A version of the PortableThreadPool.WorkerThread that starts as an exitable thread and uses asynchronous callbacks to wait for available threadpool work items and returns to the JS event loop periodically in order to allow JS promises to settle.
* A smoke test that does a background JS fetch and some async callbacks on it.
---
* [wasm-mt] Enable JSInterop on threadpool workers
Implement PortableThreadPool loop using semaphore callbacks
manage emscripten event loop from PortableThreadPool.WorkerThread
make sure to keep the thread alive after setting up the semaphore wait.
Cleanup the thread when exiting
minimal sample - fetch on a background thread works
Add WebWorkerEventLoop internal class to managed event loop keepalive
Start threadpool threads with keepalive checks
Add a flag to mono's thread start wrappers to keep track of threads that may not want cleanup to run after the Start function returns.
Use the flag when starting threadpool threads.
make minimal FetchBackground sample more like a unit test
Set WorkerThread.IsIOPending when the current thread has unsettled JS interop promises.
When IsIOPending is true, the worker will not exit even if it has no more work to do. Instead it will repeatedly wait for more work to arrive or for all promises to settle.
change minimal sample's fetch helper to artificially delay
the delay is longer that the threadpool worker's semaphore timeout, in order to validate that the worker stays alive while there are unsettled promises
* [wasm-mt] Add background interop to smoketest
* update to use the LowLevelLifoAsyncWaitSemaphore
* adjust to renamed PortableThreadPool helper methods
* adjust to renamed WebWorkerEventLoop.HasJavaScriptInteropDependents
* extend and rationalize the smoke test a bit
Add a test that just starts a thread and asserts that it has a different thread ID than the main thread. This should allow us to rule out accidentally having the test pass on a single-threaded runtime
* hide some debug output
* smoke test: dispose of the ImportAsync result after the task is done
* [wasm-mt] make JSHostImplementation.s_csOwnedObjects ThreadStatic
The integer jsHandles are not global - they are essentially indices into a JS array. So the mapping from a jsHandle to a JSObject must be per-thread.
This fixes the thread affinity assertions in the smoketest (which were false positives - we looked up a worker's jsHandle and got back the main thread's JSObject - and then asserted that it was accessed from the wrong thread)
* remove locking on JSHostImplementation.CsOwnedObjects
In single-threaded wasm, there is no need to lock since there is only one caller at a time.
In multi-threaded wasm, the underlying dictionary is thread-static
* [threads] make the "external eventloop" platform independent
It only does something on WASM, but in principle if other platforms allow us to run some code after returning from a thread start function, we could do it there, too.
* Add a Thread.HasExternalEventLoop managed property
Set it from WebWorkerEventLoop.StartExitable.
In native code, use it to set the `MONO_THREAD_CREATE_FLAGS_EXTERNAL_EVENTLOOP` flag when starting the thread.
* rename JSHostImplementation.ThreadCsOwnedObjects
(used to be CsOwnedObjects)
Rename to make it clear that it's objects owned by the current thread, not the runtime globally
* [checked] assert GC Safe mode, when returning to external eventloop
Will Smith [Fri, 28 Apr 2023 19:22:08 +0000 (12:22 -0700)]
Skip methods in test-merging if they use the named argument 'Skip' for the Fact attributes (#85495)
* Skip methods in test-merging if they use the named argument 'Skip'
* Use ActiveIssueAttribute instead of FactAttribute with Skip. Add documentation about FactAttribute and Skip.
Fan Yang [Fri, 28 Apr 2023 19:13:57 +0000 (15:13 -0400)]
[Mono] Intrinsify Vector128.Create on Arm64 for mini JIT (#85404)
* Intrinsify Vector128.Create
* Hopefully fix the test failure
* Increase maximal instruction length
Zoltan Varga [Fri, 28 Apr 2023 19:05:13 +0000 (21:05 +0200)]
[mono][llvm] Assert on unhandled opcodes instead of falling back to the mini JIT. (#85454)
Stephen Toub [Fri, 28 Apr 2023 18:50:39 +0000 (14:50 -0400)]
Remove redundant dictionary lookup in XPathDocument (#85534)
Stephen Toub [Fri, 28 Apr 2023 18:50:25 +0000 (14:50 -0400)]
Remove Base64 value length limit from Utf8JsonWriter (#85334)
* Remove Base64 value length limit from Utf8JsonWriter
* Address PR feedback by adding some more asserts
Buyaa Namnan [Fri, 28 Apr 2023 17:43:06 +0000 (10:43 -0700)]
Abstract out ParameterBuilder and implement it (#85446)
* Save parameters into assembly and test it
* Add MarshalAs pseduo attribute handling and other refactoring
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Zoltan Varga [Fri, 28 Apr 2023 16:46:56 +0000 (18:46 +0200)]
Reduce some collection sizes in the System.Collections.Immutable tests. (#85508)
The previous sizes caused timeouts when running on wasm+interpreter on CI.
Sergio Pedri [Fri, 28 Apr 2023 16:38:49 +0000 (09:38 -0700)]
Add ImmutableCollectionsMarshal type and AsImmutableArray/AsArray APIs (#85526)
* Add ImmutableCollectionsMarshal type
* Add ImmutableCollectionsMarshal to ref assembly
* Add ImmutableCollectionsMarshal unit tests
* Use ImmutableCollectionsMarshal in System.Reflection.Metadata
* Remove ImmutableArrayFactory and use new API
* Leverage internal members in ImmutableCollectionsMarshal
* Remove leftover unsafe modifier in ImmutableCollectionsMarshal
dotnet-maestro[bot] [Fri, 28 Apr 2023 16:36:32 +0000 (12:36 -0400)]
Update dependencies from https://github.com/dotnet/xharness build
20230428.3 (#85519)
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.23228.2 -> To Version 1.0.0-prerelease.23228.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Radek Doulik [Fri, 28 Apr 2023 16:31:45 +0000 (18:31 +0200)]
[wasm] PackedSimd, add comparison methods (#85512)
Zoltan Varga [Fri, 28 Apr 2023 16:22:19 +0000 (18:22 +0200)]
[mono] Invoke AssemblyLoad hooks from RuntimeAssemblyBuilder:.ctor () instead from native code. (#85307)
The call from native code is made before the manifest module was created, causing errors if the
hook tried to access Assembly.ManifestModule.
Fixes https://github.com/dotnet/runtime/issues/84771.
Pavel Savara [Fri, 28 Apr 2023 15:37:47 +0000 (17:37 +0200)]
[browser] cleanup of early startup code (#83411)
Michal Strehovský [Fri, 28 Apr 2023 13:53:53 +0000 (22:53 +0900)]
Make preinitialized delegates reflection-visible (#85506)
Frozen delegate instances were bypassing the callback to metadata manager that lets metadata manager inject reflection dependencies on delegate construction. Introduce a spot for the callback.
Fixes dotnet/aspnetcore#47941.
Vladimir Sadov [Fri, 28 Apr 2023 13:33:49 +0000 (06:33 -0700)]
[NativeAOT] Use 8.1 atomics, if available, in RhpCheckedXchg/RhpCheckedLockCmpXchg (#85283)
* use atomics when available
* exch win
* conditional atomics
* moving ARM64_ATOMICS_FEATURE_FLAG_BIT to AsmOffsets.h and adding a static assert.
* enable lse locally in the asm helpers
Vladimir Sadov [Fri, 28 Apr 2023 13:32:49 +0000 (06:32 -0700)]
[NativeAOT] Allow reverse pinvoke in DoNotTriggerGc thread state regardless of coop mode. (#85435)
* Allow reverse pinvoke in DoNotTriggerGc thread state regardless of coop mode.
* do not attach DoNotTriggerGc threads in reverse pinvoke
* propagate useful msbuild arguments to the build
* more PR feedback.
* a nit - more consistent formatting
* Do not pass through StripSymbols
Egor Bogatov [Fri, 28 Apr 2023 13:10:42 +0000 (15:10 +0200)]
JIT: ARR_LENGTH(new T[CNS]) --> CNS (#85496)
dotnet-maestro[bot] [Fri, 28 Apr 2023 12:56:20 +0000 (12:56 +0000)]
Update dependencies from https://github.com/dotnet/xharness build
20230428.2 (#85513)
[main] Update dependencies from dotnet/xharness
Milos Kotlar [Fri, 28 Apr 2023 10:42:00 +0000 (12:42 +0200)]
[mono][tests] Enable runtime tests for local aliasing on Mono Interpreter (#85250)
* Enable runtime tests when a local can be modified indirectly
* Split the test project into two
* Disable test in issues.targets
Pavel Savara [Fri, 28 Apr 2023 09:13:18 +0000 (11:13 +0200)]
[browser] Expanding timeouts for long running test projects (#85313)
Marie Píchová [Fri, 28 Apr 2023 08:37:08 +0000 (10:37 +0200)]
[HTTP/3] Stress hack for msquic dropping connections (#84793)
* Implement the same hack as for functional tests to prevent msquic from dropping connections
* Feedback: removed code sharing and used reflaction
* Try to fix missing build dependency
* Feedback - removed test only function and replaced with shared code + some reflection
* fix argument handling in build-local.ps1
* do not use MsQuicLibraryVersion
* copy msquic interop utils to the SDK base image
* use LinkBase in Functional.Tests.csproj for wildcard include
* Use MsQuicLibraryVersion in out internal logging and as a side-effect avoid the property being trimmed
* Comment
* also copy files to the Linux container
---------
Co-authored-by: antonfirsov <antonfir@gmail.com>
Vladimir Sadov [Fri, 28 Apr 2023 04:10:17 +0000 (21:10 -0700)]
Comment out support for mtag extension in libunwind (#85474)
Works around build breaks with some compiler versions.
Fixes https://github.com/dotnet/source-build/issues/3424
* added a commit reference to libunwind-version.txt
* move commit to the right file
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Adeel Mujahid [Fri, 28 Apr 2023 04:08:03 +0000 (07:08 +0300)]
Disable crossgen on riscv64 (#85499)
Adeel Mujahid [Fri, 28 Apr 2023 04:05:50 +0000 (07:05 +0300)]
Add better fix for UnhandledExceptionHandlerUnix (#85497)
Egor Bogatov [Thu, 27 Apr 2023 23:47:58 +0000 (01:47 +0200)]
Enable AVX-512 for block unrollings (both copying and zeroing) (#85389)
Parker Bibus [Thu, 27 Apr 2023 22:53:57 +0000 (15:53 -0700)]
[PERF] Add Android BenchmarkDotNet test (#85282)
* Setup testing and add missing depends on.
Shift perflab dependencies to the app build through insertion rather than being in the Maui repo.
Add PERFLAB_INLAB preprocessor constant to include the environment variables section of the Maui app in the build.
Switch to using the main branch of the perf repo.
Hardcoded in the output path to avoid unused variable error when building the Maui App.
* Print runtime pack locations after updating the locations to allow verification of correct package usage.
* Up timeout time for the BDN app test as they take a little bit of time.
Bruce Forstall [Thu, 27 Apr 2023 22:51:07 +0000 (15:51 -0700)]
Try to fix _MergedWrapperMarker (#85476)
Don't include markers without execution scripts
Juan Hoyos [Thu, 27 Apr 2023 22:06:22 +0000 (15:06 -0700)]
Fix createdump arg parsing for signal-based exceptions (#85422)
Ankit Jain [Thu, 27 Apr 2023 22:03:58 +0000 (18:03 -0400)]
[wasm] GenerateWasmBootJson - close file handles (#85480)
Close files opened with `File.OpenRead` by utilizing the `using`
pattern.
Ankit Jain [Thu, 27 Apr 2023 20:07:31 +0000 (16:07 -0400)]
[wasi] Fix support for paths with spaces (#85022)
* [wasi] Fix disabling wasi build for projects
* [wasi] Fix quoting in Wasi targets
* [wasi] WBT: don't run wasi targets for the tests project
Michał Petryka [Thu, 27 Apr 2023 17:52:36 +0000 (19:52 +0200)]
Reduce calli address spilling (#85349)
Jakob Botsch Nielsen [Thu, 27 Apr 2023 17:41:50 +0000 (19:41 +0200)]
JIT: Handle GT_RETFILT in fgInsertStmtNearEnd (#85420)
Also add some logging for read backs in physical promotion.
Fix #85088
Jakob Botsch Nielsen [Thu, 27 Apr 2023 17:16:33 +0000 (19:16 +0200)]
JIT: Propagate some more indir flags in physical promotion (#85453)
When physical promotion creates multiple indirections for arbitrary
BLK/FIELD sources, make sure we propagate all relevant flags.
Fix #85449
Qiao Pengcheng [Thu, 27 Apr 2023 17:12:40 +0000 (01:12 +0800)]
[LoongArch64] Implements the emitter::emitDispIns. (#85375)
* [LoongArch64] Implements the emitter::emitDispIns.
* LA64 don't support Instruction list before jump distance binding.
* delete some unused codes.
* amend code for CR.
Alexander Soldatov [Thu, 27 Apr 2023 17:11:59 +0000 (20:11 +0300)]
[RISC-V] GT_JMP implementation in codegen (#85416)
Added GT_JMP support to codegen. Based on ARM64 implemetation.
Dong-Heon Jung [Thu, 27 Apr 2023 17:11:25 +0000 (02:11 +0900)]
[RISC-V][JIT] JIT/CodeGenBringUpTest (#84748)
* [JIT] Update RISCV64
- Update Floating Point Compare
- Implement NYI functions
* [JIT] Update RISCV64
- Implement NYI functions
* [JIT] FIX TEST ERRORS
- Implement NYI functions
* [JIT] FIX TEST ERROR
- Update genFnPrologCalleeRegArgs
* [JIT] FIX TEST ERRORS
* [JIT] FIX TEST ERROR
Fix an error in ./JIT/CodeGenBringUpTests/struct16args_d/struct16args_d.sh
* [JIT] Fix rotate test errors
Fixed erros in belows
./JIT/CodeGenBringUpTests/Rotate_d/Rotate_d.sh
./JIT/CodeGenBringUpTests/Rotate_do/Rotate_do.sh
./JIT/CodeGenBringUpTests/Rotate_r/Rotate_r.sh
./JIT/CodeGenBringUpTests/Rotate_ro/Rotate_ro.sh
* [JIT] Fix erorrs in JTrueNeFP
Resolve
```
./JIT/CodeGenBringUpTests/JTrueNeFP_do/JTrueNeFP_do.sh
./JIT/CodeGenBringUpTests/JTrueNeFP_d/JTrueNeFP_d.sh
./JIT/CodeGenBringUpTests/JTrueNeFP_r/JTrueNeFP_r.sh
./JIT/CodeGenBringUpTests/JTrueNeFP_ro/JTrueNeFP_ro.sh
```
* [JIT] Fix an error
Add a missed part for making constant.
In the cases, it is -12.
Resolved
./JIT/CodeGenBringUpTests/NegRMW_do/NegRMW_do.sh
./JIT/CodeGenBringUpTests/NegRMW_ro/NegRMW_ro.sh
* [JIT] Optimize making constant a little
TODO-RISCV64: We should optimize constant and address construction.
* [JIT] Update emitIns_I_la more
* Add todo comment about code quality
* [JIT] Fix bugs in float and double
- Change fcvt to fmv in ins_Copy
* [JIT] Remove unnecessary comment
* [JIT] FIX
- Add rounding mode
* [JIT] Fix error
- Add Neg for float
- Add rounding mode in float arithmetic
* [JIT] Update Float Neg
* [JIT] Update rounding mode and register use
* [JIT] Update
- remove dead code
* [JIT] Support Float JumpCompare
* [JIT] Remove GT_OBJ and LCL_VAR_ADDR
* [JIT] JIT-FORMAT
* [JIT] Fix JCMP cond error
- Reverse JCMP cond for reversing jump opt
* Revert "[JIT] Fix JCMP cond error"
This reverts commit
bed8b9c12bd0340bc1519e1436d4acde209a9222.
* [JIT] Remove rounding mode comments
* [JIT] Fix Float-to-Float copy
* Update Alignment and Definitions
---------
Co-authored-by: Gleb Balykov <g.balykov@samsung.com>
Andy Gocke [Thu, 27 Apr 2023 16:56:15 +0000 (09:56 -0700)]
Store unhandled exception info on stack in Native AOT (#84871)
Allocates a span on the stack to hold the ToString of the exception, as well as a CrashRecord which contains a unique cookie that can be used to find the exception info.
Fixes #84636
dotnet-maestro[bot] [Thu, 27 Apr 2023 16:28:07 +0000 (11:28 -0500)]
[main] Update dependencies from dotnet/llvm-project dotnet/runtime-assets dotnet/emsdk dotnet/hotreload-utils dotnet/cecil (#85310)
* Update dependencies from https://github.com/dotnet/emsdk build
20230424.2
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.4.23219.1 -> To Version 8.0.0-preview.4.23224.2
* Update dependencies from https://github.com/dotnet/cecil build
20230424.2
Microsoft.DotNet.Cecil
From Version 0.11.4-alpha.23218.2 -> To Version 0.11.4-alpha.23224.2
* Update dependencies from https://github.com/dotnet/llvm-project build
20230424.3
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
From Version 14.0.0-alpha.1.23221.2 -> To Version 14.0.0-alpha.1.23224.3
* Update dependencies from https://github.com/dotnet/runtime-assets build
20230425.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
From Version 8.0.0-beta.23218.1 -> To Version 8.0.0-beta.23225.1
* Update dependencies from https://github.com/dotnet/emsdk build
20230425.2
Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
From Version 8.0.0-preview.4.23219.1 -> To Version 8.0.0-preview.5.23225.2
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20230425.6
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 8.0.0-alpha.0.23219.2 -> To Version 8.0.0-alpha.0.23225.6
* bump to p5
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20230426.3
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 8.0.0-alpha.0.23219.2 -> To Version 8.0.0-alpha.0.23226.3
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Ankit Jain [Thu, 27 Apr 2023 15:47:53 +0000 (11:47 -0400)]
[wasm] Use latest stable version of chrome (#85114)
Michal Strehovský [Thu, 27 Apr 2023 13:43:27 +0000 (22:43 +0900)]
Delete support for IAT indirecting base type/interfaces (#85376)
* Delete support for IAT indirecting base type/interfaces
This is used if we have a SharedLibrary.dll a la .NET Native. SharedLibrary.dll model had a lot of problems around versioning and a "framework-dependent" deployment model like that is unlikely to come back. I think we can start to slowly get rid of and get marginally faster code and less maintenance cost in return.
* Bump header
Radek Zikmund [Thu, 27 Apr 2023 12:47:50 +0000 (14:47 +0200)]
Make some SystemNetSecurity properties public (#85402)
* Change API
* Fix Quic
* Expose TlsClientHelloInfo ctor
* Remove now unnecessary suppression file
* Add API comments
dotnet-maestro[bot] [Thu, 27 Apr 2023 08:46:44 +0000 (10:46 +0200)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20230425.2 (#85393)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Radek Doulik [Thu, 27 Apr 2023 08:43:31 +0000 (10:43 +0200)]
[mono] Add back OP_XOP_OVR_X_X for arm64 (#85401)
And also add missing intrinsic attributes.
This addresses feedback from https://github.com/dotnet/runtime/pull/85390
dotnet-maestro[bot] [Thu, 27 Apr 2023 08:41:13 +0000 (10:41 +0200)]
[main] Update dependencies from dotnet/arcade (#85308)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Adeel Mujahid [Thu, 27 Apr 2023 08:22:05 +0000 (11:22 +0300)]
Enable other native subsets for linux-riscv64 in CI (#85443)
Follow up on https://github.com/dotnet/runtime/commit/
277a28d0a357d2e568681efb400523f1cf848ecd (which enabled `linux-riscv64` coreclr build in the CI):
This PR adds `linux-riscv64 Release AllSubsets_Mono` leg in the CI to build `mono`, `libs`, `host` and `packs` subsets.
We are not running tests in the CI, but this leg is to protect the build from regressing.
Zoltan Varga [Thu, 27 Apr 2023 07:03:25 +0000 (03:03 -0400)]
[mono][llvm] Enable the cold calling conv on osx/linux. (#83519)
Kunal Pathak [Thu, 27 Apr 2023 06:10:15 +0000 (23:10 -0700)]
[Arm64] Replace pairs of `str` with `stp` (#85032)
* Add emitIns_SS_R_R_R_I()
* Introduce instrDescStrPair and use it
* rename some variables and fix a bug in outputInstr
* Rename to instrDescLclVarPair
* Add the missing SetIsLclVar()
* review feedback
* Use same code for GC/non-GC lclVar for stp'
* Use same code path for ldp/stp
* Just have asending/descending
* refactor code around emitOutputInstr()
* jit format
* Remove the comment
* Separate instrDescLclVarPair and instrDescLclVarPairCns
* useRsvdReg for assert
* add back the assert around `adr + ofs`
* Move OptimizeLdrStr() in emitarm64.cpp
* Update the assert for offset distance
* Rename emitIns_SS_R_R_R_I() to emitIns_R_R_R_I_LdStPair()
* jit format
* review feedback
Andy Ayers [Thu, 27 Apr 2023 01:05:59 +0000 (18:05 -0700)]
JIT: prefer edge counts; keep class profiles even if tossing counts (#85406)
If there are both edge and block counts for a method, prefer to use the
edge counts (block counts are no longer the default, so are more likely
to be stale).
Sometimes we decide not to use count data because of correlation or
solver issues. When this happens, keep the class profile data viable
and let the code that deals with class profiles handle the possibility
of stale or mismatched data.
Addresses some aspects of #84446, though it's still not clear why we see
static profiles with both block and edge counts.
Evgeny Karpov [Thu, 27 Apr 2023 00:45:00 +0000 (02:45 +0200)]
Add arm64 wasm support (#83677)
Andy Ayers [Wed, 26 Apr 2023 23:48:46 +0000 (16:48 -0700)]
JIT: fix phase status for some minimal instrumentation cases (#85411)
The instrumentation phase may modify the flow graph in anticipation of doing
some instrumentation, but then (because of minimal profiling) decide not to
instrument.
Make sure the phase status properly reflects that the phase made changes in
this case, and a few other cases where we exit early without actually doing
any instrumentation.
Fixes #85061.
Jakob Botsch Nielsen [Wed, 26 Apr 2023 22:43:47 +0000 (00:43 +0200)]
Fix physical promotion scenario name and a couple of bugs (#85343)
This was renamed but I forgot to update these occurrences. The result is
that runtime-jit-experimental is not actually running with physical
promotion enabled.
Also fix a couple of bugs that made it in in the meantime.
Jakob Botsch Nielsen [Wed, 26 Apr 2023 21:16:02 +0000 (23:16 +0200)]
JIT: Change GTF_ICON_INITCLASS -> GTF_IND_INITCLASS (#85396)
The JIT has a flag GTF_ICON_INITCLASS that represents that accesses off
that address are cctor dependent. Hoisting uses this to avoid hoisting
cctor dependent indirections unless all cctors are also hoisted.
However, local constant prop/VN-based constant prop do not handle this
flag, so we could run into cases where addresses with GTF_ICON_INITCLASS
were propagated and then subsequently hoisted incorrectly.
This change moves the flag to an OperIsIndir() flag instead of being a
flag on the constant. After some digging, I found that the original
reason the flag was not an indir flag was simply that there were no more
indir flags available, but we do have available flags today. This fix
is much simpler than the alternatives which would be to teach VN/local
copy prop to propagate this GTF_ICON_INITCLASS flag.
Also remove GTF_FLD_INITCLASS which is never set.
Anton Firszov [Wed, 26 Apr 2023 20:38:54 +0000 (22:38 +0200)]
Fix stress builds (#85342)
Fix #85338, by switching to centos-stream8
Stephen Toub [Wed, 26 Apr 2023 20:30:11 +0000 (16:30 -0400)]
Add CompositeFormat.MinimumArgumentCount and remove TryParse (#85348)
* Add CompositeFormat.MinimumArgumentCount
* Remove CompositeFormat.TryParse
It encourages bad patterns of consumption.
Jan Kotas [Wed, 26 Apr 2023 19:51:27 +0000 (12:51 -0700)]
Fix generic dictionary lookups for param types and function pointers (#85369)
* Fix generic dictionary lookups for param types and function pointers
Fixes #85240
* AllowUnsafeBlocks
* Disable test on Mono
Badre BSAILA [Wed, 26 Apr 2023 19:39:02 +0000 (21:39 +0200)]
let user know working directory will be used as content root path by default (#82445)
Michał Petryka [Wed, 26 Apr 2023 19:21:01 +0000 (21:21 +0200)]
Fix totalILArgs for explicithis (#85347)
* Fix totalILArgs for explicithis
* Fix missed places
Adeel Mujahid [Wed, 26 Apr 2023 19:07:58 +0000 (22:07 +0300)]
Add introspection for readelf (#85298)
Carlos Sánchez López [Wed, 26 Apr 2023 19:06:24 +0000 (12:06 -0700)]
Bump main preview version to 5 (#85368)
Buyaa Namnan [Wed, 26 Apr 2023 16:28:25 +0000 (09:28 -0700)]
AssemblyBuilder.Save add custom attributes handling. (#84580)
* Initial custom attributes handling
* Pseudo custom attributes handling and tests
* Use ReadOnlySpan for CustomAttribute binaryData
* Update some pseudo attributes handling and apply feedback
* Add one more pseudo attribute and a few small changes
* Move pseudo attributes handling
* Remove type loading logic from CustomAttributes parsing, use constants for some values
* Add MarshalAsAttribute handling and apply other feedbacks
---------
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Zoltan Varga [Wed, 26 Apr 2023 15:01:05 +0000 (11:01 -0400)]
[mono][jit] Add an option to use an mrgctx for all gshared methods. (#82981)
Enable it by default on WASM.
In this mode, all gshared methods get an mrgctx, which means they can access
their data using a simple load from the mrgctx instead of having to call
a rgctx fetch trampoline.
Upsides:
- much simpler.
- faster access to gshared data
- smaller code and data size in the AOT case
- if enabled by default on all platforms, large amount of gshared
code can be removed
Downsides:
- the methods have to initialize their mrgctx in their prolog
- on non-wasm platforms, indirect calls to gshared methods
(like virtual calls) will need to use rgctx trampolines more often
to pass the mrgctx.
Pavel Savara [Wed, 26 Apr 2023 14:24:59 +0000 (16:24 +0200)]
[wasm][nodejs] enable EH for unit tests (#85387)
Ivan Diaz Sanchez [Wed, 26 Apr 2023 14:16:19 +0000 (07:16 -0700)]
Made helixpublishwitharcade's TargetOS property lowercase. (#85357)
Fixes #81141. In PR #80164, the build scripts were updated to always require and/or convert the MSBuild `TargetOS` property to lowercase. However, the _helixpublishwitharcade.proj_ file was not included in these efforts, which led to some confusing behavior and misplaced files, as described in issue #81141. This PR addresses and fixes that.
Pavel Savara [Wed, 26 Apr 2023 14:11:22 +0000 (16:11 +0200)]
[browser] Fix webcil lazy loading and satellite assemblies in Wasm SDK (#85335)
Co-authored-by: Marek Fišera <mara@neptuo.com>
Jan Dupej [Wed, 26 Apr 2023 14:03:37 +0000 (16:03 +0200)]
[mono][jit] Adding Vector128.ConvertXX as intrinsic on arm64. (#85163)
* [mono][jit] Adding Vector128.ConvertXX as intrinsic on arm64.
* Changed rounding model on f->i conversion.
* Disabled f32->i32 casting test.
* Disabled all of failing JIT tests.
Will Smith [Wed, 26 Apr 2023 13:58:08 +0000 (06:58 -0700)]
Skip 84693 test (#85381)
Jan Dupej [Wed, 26 Apr 2023 12:47:57 +0000 (14:47 +0200)]
[mono][jit] Add Vector128.WithElement as intrinsic on arm64. (#85158)
* [mono][jit] Add Vector128.WithElement as intrinsic on arm64.
* Fixed store opcode mismatch.
* Optimize the nonconstant case only for Vector128 in mini.
Pavel Savara [Wed, 26 Apr 2023 12:00:30 +0000 (14:00 +0200)]
[wasm][WBT] Fix pack pattern take two (#85391)
Egor Bogatov [Wed, 26 Apr 2023 11:06:05 +0000 (13:06 +0200)]
Implement ICorProfilerInfo14::EnumerateNonGCObjects (#85100)
Jakob Botsch Nielsen [Wed, 26 Apr 2023 08:04:03 +0000 (10:04 +0200)]
JIT: Introduce GT_JTEST and clean up GT_JCMP flags (#85242)
* Introduce GT_JTEST to replace GTF_JCMP_TEST
* Stop encoding JCMP conditions in GenTreeFlags by switching GT_JCMP to
a GenTreeOpCC node. This removes GTF_JCMP_EQ and the
LoongArch64/RISC-V specific mechanism to communicate condition codes
to the backend via gtFlags.
Egor Bogatov [Wed, 26 Apr 2023 07:34:39 +0000 (09:34 +0200)]
Fix simd12_t size (#85362)