platform/upstream/dotnet/runtime.git
3 years agoEnable PGO packaging for Linux & win-x86 (#51047)
Andy Gocke [Thu, 15 Apr 2021 00:52:52 +0000 (17:52 -0700)]
Enable PGO packaging for Linux & win-x86 (#51047)

Co-authored-by: Anton Lapounov <anton.lapounov@microsoft.com>
3 years agoCreate a nuget package for RuntimeConfigParser (#51240)
Fan Yang [Thu, 15 Apr 2021 00:24:34 +0000 (20:24 -0400)]
Create a nuget package for RuntimeConfigParser (#51240)

Fixes #51236

3 years agoEnable JsonSerializerOptions cache clearing for hot reload metadata update (#51160)
Stephen Toub [Wed, 14 Apr 2021 23:58:30 +0000 (19:58 -0400)]
Enable JsonSerializerOptions cache clearing for hot reload metadata update (#51160)

* Enable JsonSerializerOptions cache clearing for hot reload metadata update

* Address PR feedback

3 years agoMake portable builds work across OpenSSL 1.0.2/1.1.1/3.0
Jeremy Barton [Wed, 14 Apr 2021 23:38:19 +0000 (16:38 -0700)]
Make portable builds work across OpenSSL 1.0.2/1.1.1/3.0

Overall structure of changes

* Pull compatibility headers out into separate include files, because opensslshim.h is too big.
* Use forward definition of EVP_PKEY_CTX_set_rsa_keygen_bits and friends.
  * These are in a new apibridge file because they're for bridging up to 3.0, and the existing one was for 1.1(.1)
  * Some constants needed for this file changed between 1.1 and 3.0, so there are a lot of asserts and redefines.
* On OpenSSL 3.0, build a legacy version of ERR_put_error since it has the easier signature to work with.
* FALLBACK_FUNCTION doesn't care which version it bound to, if it doesn't find it use a local_ function.
* Renamed NEW_REQUIRED_FUNCTION to REQUIRED_FUNCTION_110 because "new" is now "sort of old".
* There's a manual sanity test that either ERR_put_error or the three new functions that together replace it are found, so we don't end up in a state where we can't report shim-injected errors.

Portable build checker:
* Built with OpenSSL 1.0.2 headers (Ubuntu 16.04 default libssl-dev)
  * Ran with 1.0.2 (Ubuntu 16.04 default libssl)
  * Ran with 1.1.1 (Ubuntu 18.04 default libssl)
  * Ran with 3.0 (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13)
* Built with OpenSSL 1.1.1 headers (Ubuntu 18.04 default libssl-dev)
  * Ran with 1.0.2 (Ubuntu 16.04 default libssl)
  * Ran with 1.1.1 (Ubuntu 18.04 default libssl)
  * Ran with 3.0 (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13)
* Built with OpenSSL 3.0 headers (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13 and some surgery to the extra_libs.cmake)
  * Ran with 1.0.2 (Ubuntu 16.04 default libssl)
  * Ran with 1.1.1 (Ubuntu 18.04 default libssl)
  * Ran with 3.0 (Ubuntu 16.04 with local build of OpenSSL 3.0 alpha 13)

3.0 doesn't run error-free, but it runs with the same error rate from portable and direct builds.   All verification was limited to the System.Security.Cryptography.Algorithms.Tests run, but that's generally representative of the bindings.

3 years ago[mbr] Add support for editing property getters/setters (#51011)
Aleksey Kliger (λgeek) [Wed, 14 Apr 2021 22:07:49 +0000 (18:07 -0400)]
[mbr] Add support for editing property getters/setters (#51011)

* wip: allow Property table (0x17) EnCLog entries in pass1

* [mbr] Allow MONO_TABLE_PROPERTY updates in pass2

Note that modifications of getter or setter bodies add new rows to the
MethodSemantics table that point to an existing method def (with an updated IL)
and to an existing row in the property table.  So there is nothing to do.

* [mbr] Add pass1 check that new MethodSemantics are pointing at existing methods.

We only support modifications of getters/setters, not adding a new getter or
setter where there wasn't one previously.

(Adding new methods in general fails right now)

* address feedback

3 years agoUpdate dependencies from https://github.com/dotnet/xharness build 20210414.1 (#51228)
dotnet-maestro[bot] [Wed, 14 Apr 2021 21:38:19 +0000 (21:38 +0000)]
Update dependencies from https://github.com/dotnet/xharness build 20210414.1 (#51228)

[main] Update dependencies from dotnet/xharness

3 years agoUse target_size_t for VNForByrefCon (#50984)
Brian Sullivan [Wed, 14 Apr 2021 20:50:18 +0000 (13:50 -0700)]
Use target_size_t for VNForByrefCon (#50984)

* Use target_size_t for VNForByrefCon

* run clang-format

* Change assert to use TYP_I_IMPL

3 years ago[Wasm] Add AutoImport.props to indicated native workload is installed (#51192)
Larry Ewing [Wed, 14 Apr 2021 20:45:58 +0000 (15:45 -0500)]
[Wasm] Add AutoImport.props to indicated native workload is installed (#51192)

* Set sentinel property that auto enables the workload

* include the AutoImports.props in the package

3 years agoJIT: reduce importer spilling for some stfld (#51158)
Andy Ayers [Wed, 14 Apr 2021 19:18:43 +0000 (12:18 -0700)]
JIT: reduce importer spilling for some stfld (#51158)

If we know which local is going to be updated, just spill that local.

3 years agoOptimize KnownColor value lookup via a combined color table (#50489)
Mansoor Saqib [Wed, 14 Apr 2021 18:54:33 +0000 (11:54 -0700)]
Optimize KnownColor value lookup via a combined color table (#50489)

* Optimize KnownColor value lookup via a combined color table

3 years agoImprove background mark stack overflow performance (#50214)
Andrew Au [Wed, 14 Apr 2021 18:32:33 +0000 (11:32 -0700)]
Improve background mark stack overflow performance (#50214)

3 years agoFix resolution code for scenarios where values are copied from stack (#50890)
Kunal Pathak [Wed, 14 Apr 2021 18:18:15 +0000 (11:18 -0700)]
Fix resolution code for scenarios where values are copied from stack (#50890)

* Fix resolution code for scenarios where values are copied from stack

During resolution, when we decide to resolve a `targetReg` "RA" which is the source of
another register "RB" that is also participating in resolution, we would spill "RA" and
add resolution move into "RA". However, we were not recording the fact that resolution of "RB"
now has to happen from `REG_STK`.

Also, when we perform resolution, we add back the source register into `targetRegsReady`
(data structure to tell which `targetReg`s are ready for resolution). This is not needed if
that source register was never one of the `targetReg`s we decided to resolve.

* Do not resolve targets using "reg to reg" mov

if they are set to be resolved from "stack to reg" mov.

* jit format

* Revert "Disable JIT/Methodical/fp/exgen/10w5d_cs_ro for Linux/arm32 (#50056)"

This reverts commit 8722cdac9b5d6837cf6232a34c95b6cf24e9bbc4.

* fix assert

3 years agoAdd JsonNode feature (#51025)
Steve Harter [Wed, 14 Apr 2021 17:30:38 +0000 (12:30 -0500)]
Add JsonNode feature (#51025)

3 years agoDisable SendRecvPollSync_TcpListener_Socket on Windows 8 (#51186)
Miha Zupan [Wed, 14 Apr 2021 15:57:55 +0000 (17:57 +0200)]
Disable SendRecvPollSync_TcpListener_Socket on Windows 8 (#51186)

3 years ago[mono] Enable explicit null checks on tvOS and watchOS (#51136)
Ryan Lucia [Wed, 14 Apr 2021 15:44:04 +0000 (11:44 -0400)]
[mono] Enable explicit null checks on tvOS and watchOS (#51136)

The implicit checks do not work due to platform limitations in the signal handling

3 years agoIntroduce DateOnly and TimeOnly types (#50980)
Tarek Mahmoud Sayed [Wed, 14 Apr 2021 15:34:01 +0000 (08:34 -0700)]
Introduce DateOnly and TimeOnly types (#50980)

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
3 years agoRemove not needed properties from specially recognizes list for mono host (#51225)
Marek Safar [Wed, 14 Apr 2021 14:58:32 +0000 (16:58 +0200)]
Remove not needed properties from specially recognizes list for mono host (#51225)

3 years ago[mono][debugger ]Adding version to dbgshim and mscordbi (#51194)
Thays Grazia [Wed, 14 Apr 2021 14:08:07 +0000 (11:08 -0300)]
[mono][debugger ]Adding version to dbgshim and mscordbi (#51194)

* Adding version to dbgshim and mscordbi

* Adding code owners

* Fix Mac compilation

3 years agoCompile tvOS Mono and libs with bitcode (#51220)
Filip Navara [Wed, 14 Apr 2021 13:48:08 +0000 (15:48 +0200)]
Compile tvOS Mono and libs with bitcode (#51220)

Contributes to #48508.

3 years ago[mono] Add a comment about freeing caches. (#51223)
Zoltan Varga [Wed, 14 Apr 2021 12:08:57 +0000 (08:08 -0400)]
[mono] Add a comment about freeing caches. (#51223)

3 years agoPut native library loading helpers in a separate file from dllimport.cpp (#51201)
Elinor Fung [Wed, 14 Apr 2021 04:12:15 +0000 (21:12 -0700)]
Put native library loading helpers in a separate file from dllimport.cpp (#51201)

3 years agoIANA To/From Windows Ids Conversion APIs (#51093)
Tarek Mahmoud Sayed [Wed, 14 Apr 2021 04:08:52 +0000 (21:08 -0700)]
IANA To/From Windows Ids Conversion APIs (#51093)

* Iana To/From Windows Ids Conversion APIs

* Address the feedback and fix the browser build breaks

* Address the feedback

3 years agoExpose an eeIsJitIntrinsic method for quickly determining if a method handle represen...
Tanner Gooding [Wed, 14 Apr 2021 03:03:45 +0000 (20:03 -0700)]
Expose an eeIsJitIntrinsic method for quickly determining if a method handle represents an intrinsic method (#51124)

* Updating the JIT/EE interface to expose `isJitIntrinsic`

* Update JITEEVersionIdentifier

* Update fgFindJumpTargets to use the much cheaper `eeIsJitIntrinsic`

* Ensure IsJitIntrinsic exists in the LightWeightMap and fix a copy/paste error

* Run ThunkGenerator

* Don't resolve tokens for CEE_CONSTRAINED when making inlining observations

3 years agoFix issues with version resilient hash (#51191)
Andy Ayers [Wed, 14 Apr 2021 02:53:30 +0000 (19:53 -0700)]
Fix issues with version resilient hash (#51191)

I noticed that some methods under dynamic PGO did not have PGO data.
Tracked this down to the Tier0 jit being unable to allocate a PGO schema.
This in turn was caused by the IL hash computation failing.

So, this PR fixes issues in the IL hash:
* pass in the right pointer to the IL
* advance the pointer as we scan the IL
* don't bail out early for the InlineNone case

3 years agoSimplify mibc usage in the build (#50536)
David Wrighton [Wed, 14 Apr 2021 00:35:31 +0000 (17:35 -0700)]
Simplify mibc usage in the build (#50536)

- Produce a merged mibc with all scenarios squished together
- Properly attach the mibc data to the incremental build for System.Private.CoreLib
  - This can't be done for the framework here. It will require mibc integration in the SDK
- Enable pgo optimization in checked builds
- Enable pgo optimization in framework compile for outerloop runs

3 years ago[mono] Use the proper memory manager in the JIT code. (#51175)
Zoltan Varga [Wed, 14 Apr 2021 00:27:32 +0000 (20:27 -0400)]
[mono] Use the proper memory manager in the JIT code. (#51175)

3 years ago[mono] Transition memory allocations from image sets to memory managers. (#50299)
Zoltan Varga [Wed, 14 Apr 2021 00:27:13 +0000 (20:27 -0400)]
[mono] Transition memory allocations from image sets to memory managers. (#50299)

* [mono] Transition memory allocations from image sets to memory managers.

* Move hashes from MonoImageSet to MonoGenericMemoryManager.
* Add a mono_mem_manager_get_generic () function which returns
  a memory manager for a set images. Same as the get_image_set ()
  function.
* Transition users of image sets to use MonoGenericMemoryManager.

* [mono] Unify MonoMemoryManager subclasses.

* Remove unused image set code.

3 years agoFix Crossgen2 compilation failures in several type generator tests (#51090)
Tomáš Rylek [Tue, 13 Apr 2021 23:40:53 +0000 (16:40 -0700)]
Fix Crossgen2 compilation failures in several type generator tests (#51090)

As the PR

https://github.com/dotnet/runtime/pull/44041

effectively decoupled OwningType from Method in MethodWithToken,
I believe we now need to include OwningType in the Equals check,
otherwise we may (and sometimes do) crash in the assertion failure
checking that OwningType matches between instances.

Thanks

Tomas

3 years agoFix native stack size alignment on macOS arm64 (#51179)
Jan Vorlicek [Tue, 13 Apr 2021 23:07:41 +0000 (01:07 +0200)]
Fix native stack size alignment on macOS arm64 (#51179)

We were setting an unaligned stack size to the MethodDesc of ILStub. The
lowest two bits actually overlap with two flags in the extended flags,
so the size is expected to be aligned at least to 4 to not to overwrite
the flags. On macOS arm64, the computed native stack size can be misaligned,
so this change adds explicit alignment before storing the stack size to
the MethodDesc.

3 years agoUpdate lpFirst and lpTop to reflect accurate compacted blocks (#51033)
Kunal Pathak [Tue, 13 Apr 2021 22:44:44 +0000 (15:44 -0700)]
Update lpFirst and lpTop to reflect accurate compacted blocks (#51033)

* include first and top in compacting

* Convert to assert

* Revert "Convert to assert"

This reverts commit 7da1a8c7d910ad00bbc7b40314997f70960729a5.

3 years agoJIT: remove guarded devirtualization restriction for small struct returns (#51157)
Andy Ayers [Tue, 13 Apr 2021 20:10:49 +0000 (13:10 -0700)]
JIT: remove guarded devirtualization restriction for small struct returns (#51157)

Now that we're not retyping small structs, the existing transformation works
for methods returning small structs too.

Fixes #51138.

3 years ago[wasm] Initial test support on windows (#49830)
Radek Doulik [Tue, 13 Apr 2021 19:48:35 +0000 (21:48 +0200)]
[wasm] Initial test support on windows (#49830)

Add support to run libraries tests on windows. Examples of how to run the tests:

    .\build.cmd libs.tests -test -os browser
    .\dotnet.cmd build /t:Test /p:TargetOS=Browser src\libraries\System.Collections.Concurrent\tests
    .\dotnet.cmd build /t:Test /p:TargetOS=Browser /p:JSEngine="SpiderMonkey" src\libraries\System.Text.Json\tests

3 years agoUpdate SOS readme install instructions (#51181)
Tom McDonald [Tue, 13 Apr 2021 19:40:39 +0000 (12:40 -0700)]
Update SOS readme install instructions (#51181)

3 years ago[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm...
dotnet-maestro[bot] [Tue, 13 Apr 2021 19:28:59 +0000 (19:28 +0000)]
[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project (#51145)

[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project

3 years ago[mono] Emit instances for EnumComparer<T> into the mscorlib aot image, so the (#51180)
Zoltan Varga [Tue, 13 Apr 2021 19:23:59 +0000 (15:23 -0400)]
[mono] Emit instances for EnumComparer<T> into the mscorlib aot image, so the (#51180)

gsharedvt version is not used.

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

3 years agoExpose Adjustment Rule BaseUtcOffsetDelta (#51055)
Tarek Mahmoud Sayed [Tue, 13 Apr 2021 18:17:44 +0000 (11:17 -0700)]
Expose Adjustment Rule BaseUtcOffsetDelta (#51055)

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
3 years agoAdd support for adding RIDs to runtime.json during build (#50818)
Eric StJohn [Tue, 13 Apr 2021 18:00:14 +0000 (11:00 -0700)]
Add support for adding RIDs to runtime.json during build (#50818)

* Add support for adding RIDs to RidGraph during build

* Address code review feedback

* Ensure GenerateRuntimeJson runs before Pack

The pack task itself doesn't do anything but depend on a sequence of tasks.
As a result running a target `BeforeTargets="Pack"` actually runs after
the package is created, since dependencies run before BeforeTargets.

Sequence the target before GenerateNuspec instead.

* Only add target RID to the RID graph

3 years agoClean up optSetBlockWeights (#51044)
Bruce Forstall [Tue, 13 Apr 2021 17:11:22 +0000 (10:11 -0700)]
Clean up optSetBlockWeights (#51044)

Try to avoid traversing the return block list it it's not necessary.

Add a header comment.

No diffs.

3 years agoEnable MacCatalyst tests in System.Runtime.Extensions.Tests (#51169)
Alexander Köplinger [Tue, 13 Apr 2021 15:59:26 +0000 (17:59 +0200)]
Enable MacCatalyst tests in System.Runtime.Extensions.Tests (#51169)

We now have the necessary support in the runtime and arcade.

3 years ago[main] Update dependencies from mono/linker (#51162)
dotnet-maestro[bot] [Tue, 13 Apr 2021 15:54:07 +0000 (17:54 +0200)]
[main] Update dependencies from mono/linker (#51162)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[debugger][mono][icordbg] Implement minimal version of dbgshim to start an applicatio...
Thays Grazia [Tue, 13 Apr 2021 15:11:06 +0000 (12:11 -0300)]
[debugger][mono][icordbg] Implement minimal version of dbgshim to start an application on desktop (#50505)

* Running debugger tests on windows using mono runtime

* Coreclr Debugger Tests are running on windows

* Removing wrong comments

* Update src/mono/dlls/dbgshim/dbgshim.cpp

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
* Changing what was suggested by @lambdageek

* Fix running tests on Mac

* Fix windows compilation removing unused messages

* Fix merge

* Fix compilation on other platforms then amd64

* Fix copy files when does not generate dbgshim and mscordbi

* Ignore  when mscodbig and dbgshim is not found

* Fix copy files when they don't exist

* Update src/mono/mono/mini/debugger-protocol.c

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
3 years ago[design] Mono runtime components (#49913)
Aleksey Kliger (λgeek) [Tue, 13 Apr 2021 14:55:34 +0000 (10:55 -0400)]
[design] Mono runtime components (#49913)

* [design] MonoVM Runtime Components

* Add details about writing a new component

* Update design doc to reflect latest changes in the prototype

3 years agoReturn iOS version in Environment.OSVersion on Mac Catalyst (#50990)
Filip Navara [Tue, 13 Apr 2021 12:03:58 +0000 (14:03 +0200)]
Return iOS version in Environment.OSVersion on Mac Catalyst (#50990)

* Return iOS version in Environment.OSVersion on Mac Catalyst.
Implement OperatingSystem.IsMacCatalyst and OperatingSystem.IsMacCatalystVersionAtLeast.

* Address feedback

* Ensure NSThread is in multi-threaded mode before using autorelease pool

3 years agoSeparate GetResourceString method with defaultString value. (#51073)
Marek Safar [Tue, 13 Apr 2021 10:25:02 +0000 (12:25 +0200)]
Separate GetResourceString method with defaultString value. (#51073)

It's not used in Release build and it injects ununsed null value to every callsite

3 years agoFix card mark stealing issue (#51104)
Peter Sollich [Tue, 13 Apr 2021 09:53:06 +0000 (11:53 +0200)]
Fix card mark stealing issue (#51104)

Fix issue with card marking stealing where getting a new chunk caused the "card" variable to go backwards. This caused an extra call to card_transition, which in turn caused cards to be cleared that should be set. The ultimate result is memory corruption.

Here are the conditions that cause the bug to surface:
- an object containing pointers that straddles a 2 MB boundary
- the objects contains just value types (i.e. no pointers) for at least 256 bytes after the 2 MB boundary
- there is a generation-crossing pointer afterwards in the same object
- but that is the only generation-crossing pointer in that 256 byte range

The bug comes about because of the following sequence of events:
- in mark_through_cards_for_segments, we scan an object at the end of a 2 MB chunk
- we encounter a pointer location that is already outside of that chunk (it belongs to card 2 in the next chunk)
- we call card_transition, which advances the card to the card of the pointer location (i.e., to card 2 in the next chunk)
- we realize that we need to get a new chunk
- when we get the chunk, we set the card to card 0 in the chunk
- we return to mark_through_cards_for_segments
- as the next chunk is adjacent to the current one, we continue processing the current object
- when we encounter the next pointer location in the object, we trigger a card_transition again
- this will erroneously not clear cards 0 and 1 because we think it there is a cross-gen pointer
- it will also reset the cross-gen generation pointer counter
- thus, if there are no other cross-generation pointers in the 256 bytes described by card 2, card 2 will be erroneously cleared
- having cards cleared erroneously ultimately leads to heap corruption

The fix simply makes sure the "card" variable doesn't go backwards in find_next_chunk.

It fixes the issue because it avoids the double card_transition.

It is safe because during iteration of a segment, the "card" variable must always increase. When we switch to another segment, it may decrease, but that is fine because in this case it will be re-initialized by the logic in mark_through_cards_segments.

3 years agoRemove unused ParamTypes method from DispatchProxyGenerator (#51119)
campersau [Tue, 13 Apr 2021 09:51:33 +0000 (11:51 +0200)]
Remove unused ParamTypes method from DispatchProxyGenerator (#51119)

3 years agoFix JITEEInterface::IsValueClass to return false for pointers. (#50749)
Sergey Andreenko [Tue, 13 Apr 2021 07:42:50 +0000 (00:42 -0700)]
Fix JITEEInterface::IsValueClass to return false for pointers. (#50749)

* lets VM return `isValueClass=false` for pointers.

* fix assert and add a comment.

* fix diffs.

* fix crossgen2 part.

* Update JITEEVersionIdentifier.

3 years agoDelete `JitDoOldStructRetyping` artifacts. (#51092)
Sergey Andreenko [Tue, 13 Apr 2021 07:42:27 +0000 (00:42 -0700)]
Delete `JitDoOldStructRetyping` artifacts. (#51092)

* Delete `JitDoOldStructRetyping`.

* delete unnecessary spilling in `fgUpdateInlineReturnExpressionPlaceHolder`.

3 years agoFix the buffering bug that blocks SDK (#51151)
Adam Sitnik [Tue, 13 Apr 2021 06:56:38 +0000 (08:56 +0200)]
Fix the buffering bug that blocks SDK (#51151)

* add a failing test that mimcs the SDK bug

* fix the buffering bug

3 years ago[AndroidCrypto] Use new test certs for System.Net (#51143)
Elinor Fung [Tue, 13 Apr 2021 06:43:27 +0000 (23:43 -0700)]
[AndroidCrypto] Use new test certs for System.Net (#51143)

3 years agoGeneralize loop inversion (#50982)
Bruce Forstall [Tue, 13 Apr 2021 05:58:03 +0000 (22:58 -0700)]
Generalize loop inversion (#50982)

* Generalize loop inversion

Starting with an experimental branch from @AndyAyersMS,
generalize the loop inversion `optInvertWhileLoop` code
to consider duplicating an entire conditional block, not
just a conditional block that contains exactly one JTRUE
tree. Since the JTRUE itself wasn't considered before in
the costing, bump up the maximum cost allowed by 2 to account
for that. (Note that there is a lot of room here for tuning
the cost/benefit analysis.)

Additionally, the code already bumped the allowed cost if the
condition tree contained calls to a shared static helper. Add
another boost if the tree contains array.Length expressions,
which are likely to be CSE'ed.

Loop inversion by itself doesn't buy much, but our downstream
phases, like natural loop recognition, loop hoisting, and loop
cloning, depend on an inverted loop structure with a zero trip
test.

There are many diffs, typically size regressions because we
are duplicating code. Some notable cases:
1. BenchI Puzzle. This was a motivating example, from #6569.
It ends up with multiple new CSEs and BDN shows a 24% run-time
improvement.
2. RegexRedux_5 and ReverseComplement_1 also report faster
3. On the contrary, FannkuchRedux_5 reports 23% slower. It appears
we create fewer CSEs and end up with a couple more instructions
inside some tight loops.
4. Other things typically seen in diffs: (a) removed null and
bounds checks, (b) additional CSEs, (c) loop alignment kicks in.

The loop matching at the stage inversion runs is lexical and very
simplistic, as it is before natural loop recognition. As a result,
for some loops, like multiple-condition `while` loops (e.g.,
`while (--digits >= 0 || value != 0)` in
`System.Number:UInt32ToDecChars`), the inversion ends up creating
some pretty weird flow. (That's actually not new to this change.)

I added a `COMPlus_JitDoLoopInversion` config to allow turning
off the phase to do experiments.

Here are the diffs for SPMI on the benchmarks:
```

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 306240
Total bytes of diff: 306022
Total bytes of delta: -218 (-0.07% of base)
    diff is an improvement.
```
<details>

<summary>Detail diffs</summary>

```

Top file regressions (bytes):
         204 : 18210.dasm (13.98% of base)
         123 : 17149.dasm (3.84% of base)
         115 : 12617.dasm (1.95% of base)
         106 : 19256.dasm (5.92% of base)
         105 : 8717.dasm (8.19% of base)
          94 : 5445.dasm (9.49% of base)
          85 : 16452.dasm (1.48% of base)
          82 : 19234.dasm (12.01% of base)
          76 : 4626.dasm (20.05% of base)
          64 : 18620.dasm (6.97% of base)
          52 : 19202.dasm (16.20% of base)
          50 : 19210.dasm (3.15% of base)
          48 : 25971.dasm (0.66% of base)
          46 : 18490.dasm (6.05% of base)
          46 : 19131.dasm (8.44% of base)
          36 : 17812.dasm (1.84% of base)
          36 : 10409.dasm (4.20% of base)
          36 : 15922.dasm (17.48% of base)
          35 : 17997.dasm (11.18% of base)
          34 : 14621.dasm (4.82% of base)

Top file improvements (bytes):
        -557 : 18190.dasm (-19.94% of base)
        -525 : 18412.dasm (-12.80% of base)
        -260 : 18400.dasm (-19.89% of base)
        -202 : 17991.dasm (-16.67% of base)
        -201 : 20540.dasm (-18.91% of base)
        -200 : 18417.dasm (-9.96% of base)
        -159 : 17736.dasm (-7.87% of base)
        -128 : 18326.dasm (-7.15% of base)
         -90 : 18182.dasm (-4.71% of base)
         -67 : 18177.dasm (-3.94% of base)
         -59 : 18359.dasm (-5.13% of base)
         -53 : 20672.dasm (-8.02% of base)
         -53 : 18280.dasm (-10.77% of base)
         -45 : 18575.dasm (-8.08% of base)
         -42 : 16930.dasm (-7.89% of base)
         -40 : 17935.dasm (-4.77% of base)
         -38 : 17814.dasm (-2.11% of base)
         -38 : 18458.dasm (-4.87% of base)
         -36 : 18222.dasm (-3.07% of base)
         -36 : 18440.dasm (-6.75% of base)

376 total files with Code Size differences (153 improved, 223 regressed), 5 unchanged.

Top method regressions (bytes):
         204 (13.98% of base) : 18210.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamedTypeSymbol:MakeAcyclicInterfaces(Roslyn.Utilities.ConsList`1[[Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.DiagnosticBag):System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:this
         123 ( 3.84% of base) : 17149.dasm - Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.LanguageParser:ParseNamespaceBody(byref,byref,byref,ushort):this
         115 ( 1.95% of base) : 12617.dasm - Utf8Json.Formatters.DictionaryFormatterBase`5[Int32,__Canon,__Canon,Enumerator,__Canon][System.Int32,System.__Canon,System.__Canon,System.Collections.Generic.Dictionary`2+Enumerator[System.Int32,System.__Canon],System.__Canon]:Serialize(byref,System.__Canon,Utf8Json.IJsonFormatterResolver):this
         106 ( 5.92% of base) : 19256.dasm - <Microsoft-Cci-ITypeDefinition-GetExplicitImplementationOverrides>d__31:MoveNext():bool:this
         105 ( 8.19% of base) : 8717.dasm - System.String:SplitWithPostProcessing(System.ReadOnlySpan`1[Int32],System.ReadOnlySpan`1[Int32],int,int,int):System.String[]:this
          94 ( 9.49% of base) : 5445.dasm - System.Uri:CreateUriInfo(long):this
          85 ( 1.48% of base) : 16452.dasm - DynamicClass:_DynamicMethod9(System.IO.TextReader,int):MicroBenchmarks.Serializers.MyEventsListerViewModel
          82 (12.01% of base) : 19234.dasm - <GetTopLevelTypesCore>d__53:MoveNext():bool:this
          76 (20.05% of base) : 4626.dasm - System.Collections.Generic.PriorityQueue`2[__Canon,__Canon][System.__Canon,System.__Canon]:MoveDownCustomComparer(System.ValueTuple`2[__Canon,__Canon],int):this
          64 ( 6.97% of base) : 18620.dasm - Microsoft.CodeAnalysis.CSharp.Binder:BindSimpleBinaryOperator(Microsoft.CodeAnalysis.CSharp.Syntax.BinaryExpressionSyntax,Microsoft.CodeAnalysis.DiagnosticBag):Microsoft.CodeAnalysis.CSharp.BoundExpression:this
          52 (16.20% of base) : 19202.dasm - <GetAssemblyReferencesFromAddedModules>d__36:MoveNext():bool:this
          50 ( 3.15% of base) : 19210.dasm - <GetTopLevelTypes>d__23[__Canon,__Canon,__Canon,__Canon,__Canon,__Canon,__Canon,__Canon,__Canon][System.__Canon,System.__Canon,System.__Canon,System.__Canon,System.__Canon,System.__Canon,System.__Canon,System.__Canon,System.__Canon]:MoveNext():bool:this
          48 ( 0.66% of base) : 25971.dasm - DynamicClass:_DynamicMethod1(System.IO.TextReader,int):MicroBenchmarks.Serializers.CollectionsOfPrimitives
          46 ( 6.05% of base) : 18490.dasm - Microsoft.CodeAnalysis.CSharp.ClsComplianceChecker:VisitAssembly(Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol):this
          46 ( 8.44% of base) : 19131.dasm - <AddedModulesResourceNames>d__200:MoveNext():bool:this
          36 ( 1.84% of base) : 17812.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol:MakeNameToMembersMap(Microsoft.CodeAnalysis.DiagnosticBag):System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.NamespaceOrTypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]:this
          36 ( 4.20% of base) : 10409.dasm - System.Net.Security.SslStream:FillHandshakeBufferAsync(System.Net.Security.AsyncReadWriteAdapter,int):System.Threading.Tasks.ValueTask`1[Int32]:this
          36 (17.48% of base) : 15922.dasm - System.Number:DecimalToNumber(byref,byref)
          35 (11.18% of base) : 17997.dasm - <CreateNestedTypes>d__126:MoveNext():bool:this
          34 ( 4.82% of base) : 14621.dasm - BenchmarksGame.KNucleotide_1:Bench(System.IO.Stream,BenchmarksGame.NucleotideHelpers,bool):bool

Top method improvements (bytes):
        -557 (-19.94% of base) : 18190.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamedTypeSymbol:MakeDeclaredBases(Roslyn.Utilities.ConsList`1[[Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.DiagnosticBag):System.Tuple`2[[Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]:this
        -525 (-12.80% of base) : 18412.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:ComputeInterfaceImplementations(Microsoft.CodeAnalysis.DiagnosticBag,System.Threading.CancellationToken):System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.SynthesizedExplicitImplementationForwardingMethod, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:this
        -260 (-19.89% of base) : 18400.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.OverriddenOrHiddenMembersHelpers:FindOverriddenOrHiddenMembersInType(Microsoft.CodeAnalysis.CSharp.Symbol,bool,Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,byref,byref,byref)
        -202 (-16.67% of base) : 17991.dasm - Microsoft.CodeAnalysis.CSharp.CSharpCompilation:GetRuntimeMember(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,byref,Microsoft.CodeAnalysis.RuntimeMembers.SignatureComparer`5[[Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.FieldSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.PropertySymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol):Microsoft.CodeAnalysis.CSharp.Symbol
        -201 (-18.91% of base) : 20540.dasm - Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel:GetDeclaredMember(Microsoft.CodeAnalysis.CSharp.Symbols.NamespaceOrTypeSymbol,Microsoft.CodeAnalysis.Text.TextSpan,System.String):Microsoft.CodeAnalysis.CSharp.Symbol:this
        -200 (-9.96% of base) : 18417.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:CheckMemberNameConflicts(Microsoft.CodeAnalysis.DiagnosticBag):this
        -159 (-7.87% of base) : 17736.dasm - Microsoft.CodeAnalysis.CSharp.CSharpCompilation:GetDiagnostics(int,bool,Microsoft.CodeAnalysis.DiagnosticBag,System.Threading.CancellationToken):this
        -128 (-7.15% of base) : 18326.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:MakeTypeMembers(Microsoft.CodeAnalysis.DiagnosticBag):System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]:this
         -90 (-4.71% of base) : 18182.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamedTypeSymbol:PostDecodeWellKnownAttributes(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.CSharpAttributeData, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Syntax.AttributeSyntax, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.DiagnosticBag,short,Microsoft.CodeAnalysis.WellKnownAttributeData):this
         -67 (-3.94% of base) : 18177.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:ForceComplete(Microsoft.CodeAnalysis.SourceLocation,System.Threading.CancellationToken):this
         -59 (-5.13% of base) : 18359.dasm - Microsoft.CodeAnalysis.CSharp.Binder:ValidateParameterNameConflicts(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.TypeParameterSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.DiagnosticBag):this
         -53 (-8.02% of base) : 20672.dasm - Microsoft.CodeAnalysis.CSharp.Imports:LookupSymbolInUsings(System.Collections.Immutable.ImmutableArray`1[NamespaceOrTypeAndUsingDirective],Microsoft.CodeAnalysis.CSharp.Binder,Microsoft.CodeAnalysis.CSharp.LookupResult,System.String,int,Roslyn.Utilities.ConsList`1[[Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],int,bool,byref)
         -53 (-10.77% of base) : 18280.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.NamespaceOrTypeSymbol:GetSourceTypeMember(System.String,int,ushort,Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode):Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamedTypeSymbol:this
         -45 (-8.08% of base) : 18575.dasm - Microsoft.CodeAnalysis.CSharp.ExecutableCodeBinder:ValidateIteratorMethods(Microsoft.CodeAnalysis.DiagnosticBag):this
         -42 (-7.89% of base) : 16930.dasm - V8.Crypto.BigInteger:fromByteArray(System.Byte[]):this
         -40 (-4.77% of base) : 17935.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.NamespaceOrTypeSymbol:LookupMetadataType(byref):Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol:this
         -38 (-2.11% of base) : 17814.dasm - Microsoft.CodeAnalysis.CSharp.MergedNamespaceDeclaration:MakeChildren():System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.MergedNamespaceOrTypeDeclaration, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:this
         -38 (-4.87% of base) : 18458.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberMethodSymbol:ForceComplete(Microsoft.CodeAnalysis.SourceLocation,System.Threading.CancellationToken):this
         -36 (-3.07% of base) : 18222.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:MakeAllMembers(Microsoft.CodeAnalysis.DiagnosticBag):System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]:this
         -36 (-6.75% of base) : 18440.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:CheckTypeParameterNameConflicts(Microsoft.CodeAnalysis.DiagnosticBag):this

Top method regressions (percentages):
          17 (36.17% of base) : 22943.dasm - System.Collections.IndexerSetReverse`1[Int32][System.Int32]:Array():System.Int32[]:this
          17 (36.17% of base) : 24496.dasm - System.Collections.IndexerSetReverse`1[__Canon][System.__Canon]:Array():System.__Canon[]:this
          18 (27.27% of base) : 13842.dasm - System.Collections.IterateFor`1[__Canon][System.__Canon]:Get(System.Collections.Generic.IList`1[__Canon]):System.__Canon:this
          15 (26.79% of base) : 13055.dasm - System.Number:UInt32ToDecChars(long,int,int):long
          15 (25.86% of base) : 975.dasm - System.Number:UInt32ToDecChars(long,int,int):long
          16 (25.81% of base) : 20092.dasm - System.Collections.IndexerSet`1[__Canon][System.__Canon]:Set(System.Collections.Generic.IList`1[__Canon]):System.Collections.Generic.IList`1[__Canon]:this
          22 (25.58% of base) : 9613.dasm - System.Xml.XmlLoader:LoadDocSequence(System.Xml.XmlDocument):this
          18 (25.35% of base) : 11926.dasm - EMFloatClass:normalize(InternalFPF)
          14 (22.95% of base) : 25097.dasm - V8.Richards.Packet:addTo(V8.Richards.Packet):V8.Richards.Packet:this
          16 (21.92% of base) : 4954.dasm - System.IO.Compression.DeflateStream:WriteDeflaterOutput():this
          10 (20.41% of base) : 27331.dasm - System.Collections.IterateFor`1[Int32][System.Int32]:ImmutableList():int:this
          10 (20.41% of base) : 9944.dasm - System.Collections.IterateFor`1[Int32][System.Int32]:ImmutableSortedSet():int:this
          76 (20.05% of base) : 4626.dasm - System.Collections.Generic.PriorityQueue`2[__Canon,__Canon][System.__Canon,System.__Canon]:MoveDownCustomComparer(System.ValueTuple`2[__Canon,__Canon],int):this
          10 (20.00% of base) : 14834.dasm - System.Collections.IterateFor`1[__Canon][System.__Canon]:ImmutableList():System.__Canon:this
          10 (20.00% of base) : 15485.dasm - System.Collections.IterateFor`1[__Canon][System.__Canon]:ImmutableSortedSet():System.__Canon:this
          24 (19.05% of base) : 8484.dasm - System.Collections.IterateForEach`1[__Canon][System.__Canon]:ImmutableArray():System.__Canon:this
          17 (18.09% of base) : 11992.dasm - Newtonsoft.Json.Utilities.DateTimeUtils:CopyIntToCharArray(System.Char[],int,int,int)
           9 (18.00% of base) : 19831.dasm - System.Reflection.Metadata.Ecma335.MetadataSizes:CalculateTableStreamHeaderSize():int:this
          16 (17.98% of base) : 4541.dasm - System.Collections.IndexerSetReverse`1[__Canon][System.__Canon]:Span():System.__Canon:this
          36 (17.48% of base) : 15922.dasm - System.Number:DecimalToNumber(byref,byref)

Top method improvements (percentages):
         -19 (-28.79% of base) : 18465.dasm - Microsoft.CodeAnalysis.CSharp.MergedTypeDeclaration:get_AnyMemberHasAttributes():bool:this
        -557 (-19.94% of base) : 18190.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamedTypeSymbol:MakeDeclaredBases(Roslyn.Utilities.ConsList`1[[Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.DiagnosticBag):System.Tuple`2[[Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]:this
        -260 (-19.89% of base) : 18400.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.OverriddenOrHiddenMembersHelpers:FindOverriddenOrHiddenMembersInType(Microsoft.CodeAnalysis.CSharp.Symbol,bool,Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,byref,byref,byref)
         -30 (-19.35% of base) : 19588.dasm - Microsoft.Cci.MetadataWriter:MayUseSmallExceptionHeaders(System.Collections.Immutable.ImmutableArray`1[[Microsoft.Cci.ExceptionHandlerRegion, Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):bool
        -201 (-18.91% of base) : 20540.dasm - Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel:GetDeclaredMember(Microsoft.CodeAnalysis.CSharp.Symbols.NamespaceOrTypeSymbol,Microsoft.CodeAnalysis.Text.TextSpan,System.String):Microsoft.CodeAnalysis.CSharp.Symbol:this
         -11 (-16.92% of base) : 18912.dasm - Microsoft.CodeAnalysis.CSharp.CodeGen.CodeGenerator:EmitStatements(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.BoundStatement, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-16.92% of base) : 18800.dasm - Microsoft.CodeAnalysis.CSharp.DataFlowPass:DeclareVariables(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.LocalSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-16.92% of base) : 18812.dasm - Microsoft.CodeAnalysis.CSharp.DataFlowPass:ReportUnusedVariables(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.LocalFunctionSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
        -202 (-16.67% of base) : 17991.dasm - Microsoft.CodeAnalysis.CSharp.CSharpCompilation:GetRuntimeMember(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol,byref,Microsoft.CodeAnalysis.RuntimeMembers.SignatureComparer`5[[Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.FieldSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.PropertySymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.CodeAnalysis.CSharp.Symbols.AssemblySymbol):Microsoft.CodeAnalysis.CSharp.Symbol
         -11 (-16.18% of base) : 20764.dasm - Microsoft.CodeAnalysis.CSharp.AbstractRegionDataFlowPass:MakeSlots(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.94% of base) : 19532.dasm - Microsoft.Cci.MetadataVisitor:Visit(System.Collections.Immutable.ImmutableArray`1[[Microsoft.Cci.IParameterDefinition, Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.71% of base) : 19548.dasm - Microsoft.Cci.MetadataVisitor:Visit(System.Collections.Immutable.ImmutableArray`1[[Microsoft.Cci.ILocalDefinition, Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.71% of base) : 19553.dasm - Microsoft.Cci.MetadataVisitor:Visit(System.Collections.Immutable.ImmutableArray`1[[Microsoft.Cci.ExceptionHandlerRegion, Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.71% of base) : 19457.dasm - Microsoft.Cci.MetadataVisitor:Visit(System.Collections.Immutable.ImmutableArray`1[[Microsoft.Cci.IParameterTypeInformation, Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.71% of base) : 19459.dasm - Microsoft.Cci.MetadataVisitor:Visit(System.Collections.Immutable.ImmutableArray`1[[Microsoft.Cci.ICustomModifier, Microsoft.CodeAnalysis, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.49% of base) : 18811.dasm - Microsoft.CodeAnalysis.CSharp.DataFlowPass:ReportUnusedVariables(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.LocalSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.07% of base) : 18797.dasm - Microsoft.CodeAnalysis.CSharp.DataFlowPass:EnterParameters(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -11 (-15.07% of base) : 20750.dasm - Microsoft.CodeAnalysis.CSharp.PreciseAbstractFlowPass`1[LocalState][Microsoft.CodeAnalysis.CSharp.DataFlowPass+LocalState]:VisitMultipleLocalDeclarations(Microsoft.CodeAnalysis.CSharp.BoundMultipleLocalDeclarations):Microsoft.CodeAnalysis.CSharp.BoundNode:this
         -11 (-15.07% of base) : 18768.dasm - Microsoft.CodeAnalysis.CSharp.PreciseAbstractFlowPass`1[LocalState][Microsoft.CodeAnalysis.CSharp.ControlFlowPass+LocalState]:VisitStatements(System.Collections.Immutable.ImmutableArray`1[[Microsoft.CodeAnalysis.CSharp.BoundStatement, Microsoft.CodeAnalysis.CSharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]):this
         -12 (-13.64% of base) : 18415.dasm - Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol:CheckMemberNamesDistinctFromType(Microsoft.CodeAnalysis.DiagnosticBag):this

376 total methods with Code Size differences (153 improved, 223 regressed), 5 unchanged.

```

</details>

--------------------------------------------------------------------------------

Additionally, I removed some dead "optimization enabling" code.

* Code review feedback: fix one condition

3 years agoImprove flowgraph xml/dot dumping (#51082)
Bruce Forstall [Tue, 13 Apr 2021 05:57:25 +0000 (22:57 -0700)]
Improve flowgraph xml/dot dumping (#51082)

* Improve flowgraph xml/dot dumping

1. Decouple it from JitDump
2. Add some documentation, including a useful link to https://sketchviz.com/
3. Fix DUMP_FLOWGRAPHS Release build
4. Fix some xml dumping issues
5. Replace custom function pattern parsing with CONFIG_METHODSET ".contains" function
6. Make dot format the default (instead of xml)

Fixes #43712

* Code review feedback: use `getCalledCount`

3 years agoAvoid intermediate allocations in MethodInfo/ConstructorInfo.Invoke (#50814)
Levi Broderick [Tue, 13 Apr 2021 05:45:40 +0000 (22:45 -0700)]
Avoid intermediate allocations in MethodInfo/ConstructorInfo.Invoke (#50814)

* Avoid temporary array allocations in reflection

* Add nullability annotations

* Move some lazy property getters out of the hot path

* More factoring out common fast paths

* Comment cleanup - no functional changes

* Moved some function blocks around for clarity - no functional changes

* Pass span into native stack byref

* Knock max stackalloced ctor parameters back to 4

* Move all CheckConsistency logic inline

3 years agoFix race in ComWrappers test (#51153)
Aaron Robinson [Tue, 13 Apr 2021 05:22:37 +0000 (22:22 -0700)]
Fix race in ComWrappers test (#51153)

Since the finalizer thread runs async with the test, we need to
atomically decrement the static instance counter.

3 years agoRely on initial pthread_jit_write_protect_np state (#51135)
Steve MacLean [Tue, 13 Apr 2021 00:57:00 +0000 (20:57 -0400)]
Rely on initial pthread_jit_write_protect_np state (#51135)

3 years agoAdd support in comhost tooling to embed type libraries. (#50986)
Jeremy Koritzinsky [Tue, 13 Apr 2021 00:10:48 +0000 (17:10 -0700)]
Add support in comhost tooling to embed type libraries. (#50986)

* Add support in comhost tooling to embed type libraries.

Sdk work will still be needed to enable developers to embed tlbs in their comhosts.

* Cleanup.

* PR feedback. Update validation to throw specific exception types for specific errors so the SDK can accurately report errors to the user.

3 years agoFix some memory attributions (#51065)
Bruce Forstall [Mon, 12 Apr 2021 23:29:43 +0000 (16:29 -0700)]
Fix some memory attributions (#51065)

* Fix some memory attributions

This doesn't change the memory stats greatly, overall.

* Formatting

3 years agoAdd ConfigurationKeyNameAttribute to binder and updated tests. (#50338)
Rob Lindley [Mon, 12 Apr 2021 23:19:04 +0000 (18:19 -0500)]
Add ConfigurationKeyNameAttribute to binder and updated tests. (#50338)

3 years ago[mono] Remove owns_vtable_slot (), its incorrect, and its not needed any more. (...
Zoltan Varga [Mon, 12 Apr 2021 21:21:54 +0000 (17:21 -0400)]
[mono] Remove owns_vtable_slot (), its incorrect, and its not needed any more. (#51127)

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

3 years agoFix EMITTER_STATS build (#51063)
Bruce Forstall [Mon, 12 Apr 2021 19:14:23 +0000 (12:14 -0700)]
Fix EMITTER_STATS build (#51063)

3 years agoRemove CSE ifdefs (#51043)
Bruce Forstall [Mon, 12 Apr 2021 19:13:54 +0000 (12:13 -0700)]
Remove CSE ifdefs (#51043)

* Remove CSE ifdefs

`FEATURE_ANYCSE` and `FEATURE_VALNUM_CSE` are always enabled, and
are expected to remain so, so remove the ifdefs.

* Formatting

3 years agoFix minimum iOS/tvOS version and add iOS 14 to RID graph (#50167)
Alexander Köplinger [Mon, 12 Apr 2021 18:13:39 +0000 (20:13 +0200)]
Fix minimum iOS/tvOS version and add iOS 14 to RID graph (#50167)

As specified in https://github.com/dotnet/runtime/issues/44654 the minimum iOS/tvOS version we're targeting for .NET 6 is iOS 10.
Bump the versions used in our build scripts and RID graph to that and also add iOS 14.

3 years agoMake it clearer what internal TimersDescriptionAttribute ctor is for (#51075)
Marek Safar [Mon, 12 Apr 2021 18:10:14 +0000 (20:10 +0200)]
Make it clearer what internal TimersDescriptionAttribute ctor is for (#51075)

3 years agoCall used comparer directly instead of non-generic Compare wrapper (#51001)
Marek Safar [Mon, 12 Apr 2021 18:07:06 +0000 (20:07 +0200)]
Call used comparer directly instead of non-generic Compare wrapper (#51001)

3 years agoAdd IL Offset and Method Token to stacktrace (#44013)
ws77.cho [Mon, 12 Apr 2021 17:56:45 +0000 (02:56 +0900)]
Add IL Offset and Method Token to stacktrace (#44013)

* Add IL Offset and Method Token to stacktrace

For easier debugging, if the PDB is not deployed, add the Method Token and IL Offset to the stacktrace.
This functionality can be turned on and off by environment setting "COMPlus_ILOffsetToStackTrace"

* Use LocalAppContextSwitch and HexConverter

Use LocalAppContextSwitch to get environment variable without using static constructor in StackTrace.
Also, use HexConverter to get metadata token and il offset without unnecessary complex.

* Use AppendFormat instead of HexConverter

Use AppendFormat() for formatting of the hex number.

* Use switch to activate ILOffset in stacktrace

- Change switch name from ILOffsetsToStackTrace to ShowILOffset
- Use "Switch.System.Diagnostics.StackTrace.ShowILOffsets" to activate ILOffset in stacktrace
- Use "DOTNET_" prefix for environment variable name (DOTNET_ILOffsetToStackTrace)

* Use AppContextConfigHelper for get switch value

* Add test case for ILOffsetToStackTrace

* Remove unused variable

* Use RemoteExecutor.Invoke for testing

* Update src/libraries/System.Private.CoreLib/src/System/LocalAppContextSwitches.cs

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
* TC contents are added

* Remove setting code using enviornment variable

remove setting code using environment variable and change switch default value to true.

* code clean-up. remove unused code

* Sort using statements

* Skipt test in mono interpreter mode.

Related issue : https://github.com/dotnet/runtime/issues/51096

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
3 years ago[wasm][tests] Enable line numbers in stack traces (#50893)
Ankit Jain [Mon, 12 Apr 2021 17:01:25 +0000 (13:01 -0400)]
[wasm][tests] Enable line numbers in stack traces (#50893)

3 years agoUse nuget standardized properties (#51014)
Viktor Hofer [Mon, 12 Apr 2021 16:37:58 +0000 (18:37 +0200)]
Use nuget standardized properties (#51014)

* Use nuget standardized properties

Requires https://github.com/dotnet/arcade/pull/7212. Helps with the pkgproj to csproj conversion.

3 years agotesting Unicode roundtrip (#51105)
Pavel Savara [Mon, 12 Apr 2021 16:37:16 +0000 (18:37 +0200)]
testing Unicode roundtrip (#51105)

* testing unicode roundtrip

* code review feedback

* fix Narrow No-Break Space

3 years ago[main] Update dependencies from dotnet/runtime dotnet/runtime-assets (#51110)
dotnet-maestro[bot] [Mon, 12 Apr 2021 16:35:30 +0000 (16:35 +0000)]
[main] Update dependencies from dotnet/runtime dotnet/runtime-assets (#51110)

[main] Update dependencies from dotnet/runtime dotnet/runtime-assets

3 years agoSystem.Text.Json: Add IAsyncEnumerable support (#50778)
Eirik Tsarpalis [Mon, 12 Apr 2021 16:06:01 +0000 (17:06 +0100)]
System.Text.Json: Add IAsyncEnumerable support (#50778)

* implement IAsyncEnumerable JsonConverter

* Prototype of IAsyncEnumerable deserialize with Stream

* Use a Queue + test buffersizes

* Avoid 1 item lag

* Add support for Serialize

* Misc cleanup on test

* extend DeserializeAsyncEnumerable test coverage

also removes SerializeAsyncEnumerable components

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableConverterFactory.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* address feedback

* tweak test buffer values

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableOfTConverter.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableOfTConverter.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* address feedback

* increase delayInterval in serialization tests

* address feedback

* address feedback

* add test on exceptional IAsyncDisposable disposal

* address feedback

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadAsyncState.cs

Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs

Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
* fix build and remove dead code

* address feedback

* Revert unneeded JsonClassInfo.ElementType workaround

* remove state allocation on async deserialization methods

* remove tooling artifacts

* address feedback

* reset AsyncEnumeratorIsPendingCompletion field

Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
3 years agoPass CORINFO_CALLINFO_ALLOWINSTPARAM to speculative eeGetCallInfo to make it cheaper...
Jan Kotas [Mon, 12 Apr 2021 15:26:15 +0000 (05:26 -1000)]
Pass CORINFO_CALLINFO_ALLOWINSTPARAM to speculative eeGetCallInfo to make it cheaper (#51088)

3 years agomake emsdk installation instructions clear on which version need to be installed...
Pavel Savara [Mon, 12 Apr 2021 15:17:20 +0000 (17:17 +0200)]
make emsdk installation instructions clear on which version need to be installed (#51071)

* make emsdk installation instructions clear on which version need to be installed

* whitespace

* Radek's feedback

3 years agoRevert "Switch to VS preview pool for public builds (#50993)" (#51103)
Alexander Köplinger [Mon, 12 Apr 2021 14:15:13 +0000 (16:15 +0200)]
Revert "Switch to VS preview pool for public builds (#50993)" (#51103)

3 years agoPrint Native Stacktrace on mono_llvm_cpp_throw_exception when profiler is enabled...
Thays Grazia [Mon, 12 Apr 2021 13:43:17 +0000 (10:43 -0300)]
Print Native Stacktrace on mono_llvm_cpp_throw_exception when profiler is enabled. (#51026)

* Print call stack when profile is enabled in a mono_llvm_cpp_throw_exception (void) this was asked by @jeromelaban

* Update src/mono/mono/mini/llvm-runtime.cpp

Co-authored-by: Jérôme Laban <jlaban@gmail.com>
* As suggested by @jeromelaban

Co-authored-by: Jérôme Laban <jlaban@gmail.com>
3 years agoInclude Mono in the name of all Mono runtime packs (#50327)
Steve Pfister [Mon, 12 Apr 2021 13:32:33 +0000 (09:32 -0400)]
Include Mono in the name of all Mono runtime packs (#50327)

We previously only used this naming on platforms that already had coreclr as an option. Using Mono in the name all the time will make what runtime you're dealing with less ambiguous.

Fixes #49718

3 years agoFix DispatchProxy not working with in parameters (#49214)
Wei Zheng [Mon, 12 Apr 2021 10:25:24 +0000 (18:25 +0800)]
Fix DispatchProxy not working with in parameters (#49214)

* Fix DispatchProxy not working with in parameters

* Correct typo

Co-authored-by: Christopher Watford <christopher.watford@ge.com>
* Fixed Calling Convention

Removed unneeded mods

Co-authored-by: Christopher Watford <christopher.watford@ge.com>
3 years agoAdd ILLink annotations to Microsoft.CSharp (#50239)
Krzysztof Wicher [Mon, 12 Apr 2021 10:09:47 +0000 (12:09 +0200)]
Add ILLink annotations to Microsoft.CSharp (#50239)

* Add ILLink annotations to Microsoft.CSharp

* apply PR feedback

* Apply PR feedback

* Fix missed comment

* apply pr feedback

3 years agoRun processenvironment test in separate process. (#51022)
Johan Lorensson [Mon, 12 Apr 2021 06:16:39 +0000 (08:16 +0200)]
Run processenvironment test in separate process. (#51022)

3 years agoFix handling of unmanaged member function pointers in Crossgen2 (#51089)
Tomáš Rylek [Mon, 12 Apr 2021 01:31:06 +0000 (18:31 -0700)]
Fix handling of unmanaged member function pointers in Crossgen2 (#51089)

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

Without setting found to true we lose the transformed calling
convention (StdcallMemberFunction) and we end up lying to JIT
that getSize is an unmanaged static function pointer so that
JIT doesn't emit proper code for passing the "this" pointer
to the PInvoke.

Thanks

Tomas

3 years agoCast to uint instead of nuint in {ReadOnly}Span.{Try}CopyTo (#51083)
Stephen Toub [Sun, 11 Apr 2021 21:30:47 +0000 (17:30 -0400)]
Cast to uint instead of nuint in {ReadOnly}Span.{Try}CopyTo (#51083)

3 years agoAdd internal String.{Try}CopyTo and use in a few places in corelib (#51062)
Stephen Toub [Sun, 11 Apr 2021 17:52:54 +0000 (13:52 -0400)]
Add internal String.{Try}CopyTo and use in a few places in corelib (#51062)

* Add internal String.{Try}CopyTo and use in a few places in corelib

We can use in more if it's made public.

* Apply suggestions from code review

Co-authored-by: Levi Broderick <GrabYourPitchforks@users.noreply.github.com>
Co-authored-by: Levi Broderick <GrabYourPitchforks@users.noreply.github.com>
3 years agoSimplify RuntimeType.ClearCache (#51070)
Jan Kotas [Sun, 11 Apr 2021 17:52:44 +0000 (07:52 -1000)]
Simplify RuntimeType.ClearCache (#51070)

3 years ago[main] Update dependencies from dotnet/arcade (#51074)
dotnet-maestro[bot] [Sun, 11 Apr 2021 16:51:34 +0000 (16:51 +0000)]
[main] Update dependencies from dotnet/arcade (#51074)

[main] Update dependencies from dotnet/arcade

 - revert changes to publish-using-darc.ps1

https://github.com/dotnet/arcade/issues/6987

3 years agoMove some Marshal functions to shared partition (#51045)
John Tur [Sun, 11 Apr 2021 09:02:43 +0000 (05:02 -0400)]
Move some Marshal functions to shared partition (#51045)

3 years agosome small proxy-related fixes (#50770)
Geoff Kizer [Sun, 11 Apr 2021 08:40:06 +0000 (01:40 -0700)]
some small proxy-related fixes (#50770)

* add tests

* add and use DoProxyAuth

* don't apply max connections to ProxyConnect connections

* make DoProxyAuth a property

* disable WinHttpHandler for new tests

* improve test robustness

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoFix Random.Next(int, int) on 64-bit when max-min overflows int.MaxValue (#50922)
Stephen Toub [Sun, 11 Apr 2021 02:59:43 +0000 (22:59 -0400)]
Fix Random.Next(int, int) on 64-bit when max-min overflows int.MaxValue (#50922)

* Fix Random.Next(int, int) on 64-bit when max-min overflow int

The fix is a missing cast.  Everything else is asserts and test changes.

* Update Random.cs

3 years agoAdd a dummy item to SingleFileHostIncludeFilename to make sure the opt-in list is...
Vladimir Sadov [Sun, 11 Apr 2021 02:13:09 +0000 (19:13 -0700)]
Add a dummy item to SingleFileHostIncludeFilename to make sure the opt-in list is present. (#51030)

3 years agoJIT: fix osr gc info this reporting (#51057)
Andy Ayers [Sun, 11 Apr 2021 01:03:39 +0000 (18:03 -0700)]
JIT: fix osr gc info this reporting (#51057)

With the advent of #38229 an optimized method may need to report generics
context via `this` while the un-optimzed version did not need to report.

This impacts OSR, which previously was always trying to use the unoptimized
root method frame reporting. Now under OSR we must sometimes add a slot to
the OSR frame instead.

Addresses one of the failure cases in #43534.

3 years ago[main] Update dependencies from dotnet/xharness dotnet/runtime-assets (#51049)
dotnet-maestro[bot] [Sat, 10 Apr 2021 23:56:09 +0000 (19:56 -0400)]
[main] Update dependencies from dotnet/xharness dotnet/runtime-assets (#51049)

* Update dependencies from https://github.com/dotnet/xharness build 20210409.2

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21207.1 -> To Version 1.0.0-prerelease.21209.2

* Update dependencies from https://github.com/dotnet/runtime-assets build 20210409.2

System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
 From Version 6.0.0-beta.21174.2 -> To Version 6.0.0-beta.21209.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[AndroidCrypto] Handle setting non-default SslProtocols (#50987)
Elinor Fung [Sat, 10 Apr 2021 17:45:47 +0000 (10:45 -0700)]
[AndroidCrypto] Handle setting non-default SslProtocols (#50987)

3 years agoUpdate logic around BB_MAX_WEIGHT (#51027)
Andy Ayers [Sat, 10 Apr 2021 16:16:15 +0000 (09:16 -0700)]
Update logic around BB_MAX_WEIGHT (#51027)

Consider any weight greater or equal to be a max weight. Rule of thumb
is that you can assign BB_MAX_WEIGHT but for comparsions one should always
use an inequality or call the helper method.

Fixes #50808.

3 years agoMake composite MVID checks resilient to failures (#51018)
Tomáš Rylek [Sat, 10 Apr 2021 10:16:36 +0000 (03:16 -0700)]
Make composite MVID checks resilient to failures (#51018)

I noticed that several ALC-related CoreCLR tests fail in Crossgen2
composite mode. I tracked this down to a missing null check.
In addition to that, we were erroneously putting the composite
image to the validation list even when it had been loaded previously.

Thanks

Tomas

3 years agochange GC committed bytes unit to MB (#51031)
Sung Yoon Whang [Sat, 10 Apr 2021 07:45:34 +0000 (00:45 -0700)]
change GC committed bytes unit to MB (#51031)

* change GC committed bytes unit to MB

* change other memory counters to use 1_000_000

3 years agoFix incremental CMake command line check on Windows (#51035)
Jeremy Koritzinsky [Sat, 10 Apr 2021 04:12:48 +0000 (21:12 -0700)]
Fix incremental CMake command line check on Windows (#51035)

3 years agoFixed regression caused by performance change (#51032)
David Fowler [Sat, 10 Apr 2021 04:03:04 +0000 (21:03 -0700)]
Fixed regression caused by performance change (#51032)

- Pass empty array instead of null for validations

3 years agoAdd CI validation leg for source-build against an image with the tools our source...
Jeremy Koritzinsky [Sat, 10 Apr 2021 03:39:24 +0000 (20:39 -0700)]
Add CI validation leg for source-build against an image with the tools our source-build partners use to ensure we don't break our source-build partners. (#50811)

* Add CI validation leg for source-build against an image with the tools our source-build partners use to ensure we don't break our source-build partners.

* Update global-build.yml

* Update global-build.yml

* Update centos image.

* Explicitly invoke scl enable llvm-toolset-7.0 since docker doesn't do it for command executed in a running container.

* Skip mono in the source-build build.

* Set param in platform-matrix.yml

3 years agoInstall crossgen, jitinterface, clrjit into the sharedframework folder in crosscompon...
Jeremy Koritzinsky [Sat, 10 Apr 2021 01:15:26 +0000 (18:15 -0700)]
Install crossgen, jitinterface, clrjit into the sharedframework folder in crosscomponent build. (#51004)

* Install crossgen, jitinterface, clrjit into the sharedframework folder.

* Remove unneeded dependency

* Add dac/dbi to cross-component sharedFramework folder.

* Don't install the cross-os dac in crosscomponents in cross-bitness scenarios.

* Jit Interface doesn't need to go into the sharedFramework folder (it wasn't there in 6.0.0p3)

3 years agoMark the Crossgen2 regression test GitHub_49982 ilasm-incompatible (#51005)
Tomáš Rylek [Sat, 10 Apr 2021 00:08:48 +0000 (17:08 -0700)]
Mark the Crossgen2 regression test GitHub_49982 ilasm-incompatible (#51005)

3 years agoRemoved must-init requirement for GS Cookies (#50702)
SingleAccretion [Fri, 9 Apr 2021 23:20:53 +0000 (02:20 +0300)]
Removed must-init requirement for GS Cookies (#50702)

The cookie is always initialized in the prolog, where no user code is allowed.
There should be no GC concerns either as the prolog is not interruptible.

3 years agoJIT: Fix loop unscaling computations (#50807)
Andy Ayers [Fri, 9 Apr 2021 23:19:08 +0000 (16:19 -0700)]
JIT: Fix loop unscaling computations (#50807)

Changes made in #50633 were simply wrong, and lead to division by
infinite values.

Fixes #50743.