Adeel Mujahid [Sun, 20 Oct 2019 18:21:02 +0000 (21:21 +0300)]
Avoid unintended cached var in CMake's find_program (dotnet/coreclr#27322)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2c22d9946b0f04c603a13cf7cc6196317e97442f
Ilya Shipitsin [Sun, 20 Oct 2019 13:24:13 +0000 (18:24 +0500)]
src/pal/src/cruntime/wchar.cpp: remove redundant condition (dotnet/coreclr#27308)
found by cppcheck
"while (*string)" already checks "string" against NULL
[src/pal/src/cruntime/wchar.cpp:641] -> [src/pal/src/cruntime/wchar.cpp:639]: (warning) Either the condition 'string?string:W16_NULLSTRING' is redundant or there is possible null pointer dereference: string.
[src/pal/src/cruntime/wchar.cpp:712] -> [src/pal/src/cruntime/wchar.cpp:710]: (warning) Either the condition 'string?string:W16_NULLSTRING' is redundant or there is possible null pointer dereference: string.
Commit migrated from https://github.com/dotnet/coreclr/commit/
89dedbec8df5c34732f5a248051b921a74da437a
Jan Vorlicek [Sun, 20 Oct 2019 02:10:15 +0000 (04:10 +0200)]
Mark GetTypeFromHandle as intrinsic (dotnet/coreclr#27306)
This change marks GetTypeFromHandle as intrinsic and add related
missing case CorInfoHelpFunc.CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE_MAYBENULL
to GetHelperFtnUncached.
This enables crossgen2 to eliminate call to GetTypeFromHandle.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9db8990bca7e0f44f60494d2608342a930d484ca
6opuc [Sat, 19 Oct 2019 20:09:20 +0000 (01:09 +0500)]
Changes in virtual.cpp to reduce coredump size(~20 times less) (dotnet/coreclr#27089)
* dotnet/coreclrdotnet/coreclr#10524 do not include reserved memory in coredump. MADV_DONTDUMP/MADV_DODUMP
* madvise(...MADV_DONTDUMP|MADV_DODUMP) only if MADV_DONTDUMP|MADV_DODUMP declared(for OSX)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2c6068c5986771f0650cb218d5a0afcb6fd4014
Michal Strehovský [Sat, 19 Oct 2019 01:33:27 +0000 (03:33 +0200)]
Extend test coverage for SafeHandle (dotnet/coreclr#27285)
* Extend test coverage for SafeHandle
Trigger unmarshaling failure using an array marshaller. This is something crossgen2 will be able to pregenerate. The existing test case with CustomMarshaller will always be jitted and never pregenerated.
* a
Commit migrated from https://github.com/dotnet/coreclr/commit/
605124c975c78a0aeb875c70f359737747bf55a8
Ilia [Sat, 19 Oct 2019 00:02:21 +0000 (03:02 +0300)]
Use a new COR_PRF_SUSPEND_FOR_PROFILER in ICorProfilerCallback::RuntimeThreadSuspended() when requested by profiler (dotnet/coreclr#27041)
Fixes https://github.com/dotnet/coreclr/issues/26576
Commit migrated from https://github.com/dotnet/coreclr/commit/
09f9c9c40e96496ac0762dc63b0626b1e3fe9a7c
Jeremy Koritzinsky [Fri, 18 Oct 2019 23:40:51 +0000 (16:40 -0700)]
Validate cmake version in build scripts. (dotnet/coreclr#27293)
* Validate cmake version in build scripts.
* Only check CMake version in build-test.cmd when building native test components.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b1dea7b4e4bfad9b845873f60ba0261e425e9f2
Sergey Andreenko [Fri, 18 Oct 2019 22:46:57 +0000 (15:46 -0700)]
Disable VectorMgdMgd_ro.csproj under stress modes. (dotnet/coreclr#27291)
* Disable VectorMgdMgd_ro.csproj under stress modes.
* disable only on arm64.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a80153c544bbf6297c0079c6fad687582419b16d
Sergey Andreenko [Fri, 18 Oct 2019 22:11:41 +0000 (15:11 -0700)]
Fix `costEx/Sz/level` for `GT_STORE_DYN_BLK`. (dotnet/coreclr#27277)
* Fix `costEx/Sz/level` for `GT_STORE_DYN_BLK`.
* delete more extra lines.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc13d23a4d9351e85e90cb21faf758879ce7baf4
Austin Wise [Fri, 18 Oct 2019 20:52:05 +0000 (13:52 -0700)]
Fix assert when CORECLR_PROFILER is set but CORECLR_PROFILER_PATH is not (dotnet/coreclr#27138)
The null DLL name is eventually passed to FakeCoCallDllGetClassObject which
knowns how to look up the DLL name based on the CLSID specified by
CORECLR_PROFILER.
Commit migrated from https://github.com/dotnet/coreclr/commit/
55f39c6037ee66771599a7b912ea210e7e61eaf2
Simon Nattress [Fri, 18 Oct 2019 18:23:30 +0000 (11:23 -0700)]
Re-enable crossgen2 DGML log (dotnet/coreclr#27281)
The dependency graph can be dumped to disk as an XML-based DGML file. This functionality was severed when we moved over from the CoreRT repo.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3131a2490df1f97d1af4fa31763884a6bd895fe
Sinan Kaya [Fri, 18 Oct 2019 18:01:08 +0000 (11:01 -0700)]
Replace gtIndex. with AsIndex()-> (dotnet/coreclr#27257)
* find src/jit -type f -exec sed -i -e 's/gtIndex\./AsIndex()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
f2cbf9100e5ace69557eea679a9685e09a491bd6
Sinan Kaya [Fri, 18 Oct 2019 18:00:19 +0000 (11:00 -0700)]
Replace gtArrOffs. with AsArrOffs()-> (dotnet/coreclr#27265)
* find src/jit -type f -exec sed -i -e 's/gtArrOffs\./AsArrOffs()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
8531b61bbfba101789423d6b5d3fcac93fafe41b
John Salem [Fri, 18 Oct 2019 16:59:26 +0000 (09:59 -0700)]
Fix unique ETW events for GC Type logging, so they are also fired across EventPipe (dotnet/coreclr#27250)
Commit migrated from https://github.com/dotnet/coreclr/commit/
309d1f46f3ab947725f097b62602726a17219f5e
Jan Kotas [Fri, 18 Oct 2019 16:23:34 +0000 (09:23 -0700)]
Rewrite Buffer.BlockCopy in C# (dotnet/coreclr#27216)
* Rewrite Buffer.BlockCopy in C#
Fixes dotnet/coreclr#27106
* Workaround to enable type check optimizations for BlockCopy only
Commit migrated from https://github.com/dotnet/coreclr/commit/
495a6b5be006cbe16d0db961af4c493ce1b8382e
Steve MacLean [Fri, 18 Oct 2019 16:04:25 +0000 (12:04 -0400)]
Fix step with stackalloc (dotnet/coreclr#27246)
* Make ControllerStackInfo::m_returnFrame private
* Make ControllerStackInfo always capture a return frame
In case the active frame has no managed caller, capture
the unmanaged frame
* Fix step over stackalloc
Generalize handling of stack allocations and stepping
* Fix GetFunctionFromToken() argument checking
Check token type is a method before creating a CordbFunction.
Add extra assert to check for invalid tokens
Commit migrated from https://github.com/dotnet/coreclr/commit/
551710b95a0aa795f42750966a199c26cc9cd0d9
Koundinya Veluri [Fri, 18 Oct 2019 14:35:27 +0000 (07:35 -0700)]
Process/send etw rundown events only during graceful shutdown and not during process detach (a form of abrupt shutdown) (dotnet/coreclr#27238)
Longer-term fix for https://github.com/dotnet/coreclr/issues/27129:
- Etw rundown events sent during process shutdown are currently (and have for a long time) been sent during process detach. By that time, all other threads have been abruptly terminated by the OS, and as a result the state of the system is fundamentally unpredictable.
- In this particular case, locks have been orphaned by threads that have been abruptly terminated, so taking locks is not feasible during processing of rundown events, and if acquiring locks were to be avoided based on such knowledge (not recommended, this would get messy), we'd have to resort to providing information that would not accurately reflect the state, in the events
- I consider any situation where process detach occurs before an opportunity to handle graceful shutdown (that is, the runtime is unaware that a shutdown is about to happen and does not have an opportunity to handle shutdown prior to process detach (before the OS already shuts some things down)), then that is abrupt shutdown and in that scenario all bets are off - in the case of this change, etw rundown events would not be sent
- This change has the following effects:
- Graceful shutdown such as returning from `Main` or `Environment.Exit()` will send rundown events very slighly earlier than before. Background threads will still be running and there may be other etw events interspersed among rundown events and sent after rundown events.
- On Windows, Ctrl+C and Ctrl+Break are not handled by the runtime and by default result in abrupt termination. The only indication the runtime gets is the process detach event, by which time the OS has already terminated all other threads
- When these events are not handled (by the runtime or by the app), this is an abrupt shutdown scenario and rundown events will not be sent
- When these events are handled by the app and canceled along with `Environment.Exit()`, that converts these events into graceful shutdown (see above). If an app handles these events and chooses to not cancel the event, the event remains unhandled and leads to abrupt shutdown (see immediately above).
- On Unixes, there is no significant change. SIGTERM is graceful shutdown as described above and there are no similar issues of abrupt shutdown.
- There is an option of sending rundown events upon process detach (when we don't have an opportunity to do so gracefully), but as I described above that will get messy and is not a path that we should be headed down
Commit migrated from https://github.com/dotnet/coreclr/commit/
147da0d2f36fc9a01eec609f33687ae829077a4f
David Mason [Fri, 18 Oct 2019 08:19:30 +0000 (01:19 -0700)]
only set THREAD_IS_SUSPENDED if we are truly doing an async stack walk (dotnet/coreclr#26985)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef3180c7c737cb888bd1fea77e9d4c1a40fc5855
Jeremy Koritzinsky [Fri, 18 Oct 2019 07:24:26 +0000 (00:24 -0700)]
Change MSBuild property name for Microsoft.Private.CoreFx.NETCoreApp version. (dotnet/coreclr#27276)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e285505646547ffbf12ed699c37665e05360f35b
Sung Yoon Whang [Fri, 18 Oct 2019 05:31:07 +0000 (22:31 -0700)]
Fix LTTng build for build environments with older liblttng-ust-dev (dotnet/coreclr#27273)
* Fix macro redefinition to use XplatEventLogger instead of simply writing FALSE
* Fix linker error
* undo newline changes
* Some changes to comment
* Move wrapper export from eventpipe.cpp to eventtrace.cpp
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e7552afb359d1fba2dc57d6f82f03d20db32dd2
Tanner Gooding [Fri, 18 Oct 2019 02:31:25 +0000 (19:31 -0700)]
Improve codegen for IsNan (dotnet/coreclr#27272)
* Updating double.IsNaN and float.IsNaN to just `return x != x`
* Updating x86 codegen to optimize `x != x` for floating-point
* Changing the isnan optimization to only check the operand assigned registers
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e1125c0339dff5747162babe73ed09409f18ba0
Dong-Heon Jung [Fri, 18 Oct 2019 00:23:51 +0000 (09:23 +0900)]
Enable NGEN for methods marked with AggressiveOptimization (dotnet/coreclr#27259)
- Methods marked with AggressiveOptimization are not NGENed at all.
- The methods are compiled during the runtime with high JITC overhead.
- It makes launching time slower over 6% in our embedded systems.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fc41ef23147964d621c28b76c18cda245e16f694
Andy Ayers [Fri, 18 Oct 2019 00:17:02 +0000 (17:17 -0700)]
JIT: describe requested and actual opt levels more accurately (dotnet/coreclr#27249)
Note in jit dump headers and in `COMPlus_DumpJittedMethods` traces when the jit
changed the optimization level that the VM requested.
Also remove the FCOMI handling in the jit, x87 is not longer a thing. Needs to
stay in the options for now though.
Finally, reorder the `Options` struct fields to avoid gratuitous padding.
Commit migrated from https://github.com/dotnet/coreclr/commit/
79319d50d45a95375f26f60341575e0284c3fa00
Sinan Kaya [Thu, 17 Oct 2019 23:52:51 +0000 (16:52 -0700)]
Replace gtCmpXchg with AsCmpXchg()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4c2246075d5c8cb040f75fbe58cbc089f67a5b2
Sinan Kaya [Thu, 17 Oct 2019 23:51:48 +0000 (16:51 -0700)]
Replace gtField. with AsField()-> (dotnet/coreclr#27264)
* find src/jit -type f -exec sed -i -e 's/gtField\./AsField()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a9115bbf775bf24592ef0af53ef38c599aef714
Jeremy Koritzinsky [Thu, 17 Oct 2019 23:29:52 +0000 (16:29 -0700)]
Simplify native component build (dotnet/coreclr#27077)
* Move discovery of compiler-specific tools out of gen-buildsys-* and into CMake via a configuretools.cmake file.
* Split finding the compiler from calling CMake to generate the build system. Fold as much of gen-buildsys into the CMake scripts as possible.
First pass at moving builds to cmake --build.
* Clean up build.cmd.
* Remove extra MSBuild-specific logging of native components builds.
* Fix discovering linux id.
* Move code-coverage enable out of gen-buildsys.sh
* Fix gen-buildsys.sh argument validation.
* Fix objcopy search condition.
* Add back logging parameters. Make sure we don't regress on throughput.
* Match version lookup behavior in find-clang and find-gcc.
* Determine compiler version for tool location from the file name.
* Fix typo
* PR Feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c1e029deac53212c496c14010b11fc5fa3601a6
mikedn [Thu, 17 Oct 2019 22:02:45 +0000 (01:02 +0300)]
Delete fgMorphUnsafeBlk (dotnet/coreclr#27234)
Making block copy ops non-interruptible can and should be done during lowering, at least because this is intended only for unrolled block ops and it's lowering that decides when to unroll.
This also avoids accidentally making block init ops non-interruptible - the block op starts as copy but then assertion propagation managed to transform it into init but nothing resets gtBlkOpGcUnsafe.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8825ac695c7c510e72c8ef1043bd122da1d28f62
Steve MacLean [Thu, 17 Oct 2019 20:02:12 +0000 (16:02 -0400)]
Fix incorrect log statements (dotnet/coreclr#27267)
Commit migrated from https://github.com/dotnet/coreclr/commit/
62bba3cc35b3ca761c542551f6140f054e88e682
Sinan Kaya [Thu, 17 Oct 2019 18:12:41 +0000 (11:12 -0700)]
Replace gtArrElem. with AsArrElem()-> (dotnet/coreclr#27220)
* find src/jit -type f -exec sed -i -e 's/gtArrElem\./AsArrElem()\./g' {} \;
AsArrElem
* Format patch
* create lclVar in gentree.cpp and remove extra cast
* delete extra casts in lower.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ad8229e5ed52e882a19f73f2e9fda6f70f7b1cf
Sinan Kaya [Thu, 17 Oct 2019 17:07:10 +0000 (10:07 -0700)]
Replace gtIntCon. with AsIntCon()-> (dotnet/coreclr#27213)
* find src/jit -type f -exec sed -i -e 's/gtIntCon\./AsIntCon()\./g' {} \;
* format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e518f820a5db8f61ffe0dd653852558f1f238d9
Sinan Kaya [Thu, 17 Oct 2019 16:58:21 +0000 (09:58 -0700)]
Replace gtArgPlace. with AsArgPlace()->
Commit migrated from https://github.com/dotnet/coreclr/commit/
cecb0e25cdc99d893adc9c8c10fe68e94b27e550
Sinan Kaya [Thu, 17 Oct 2019 16:58:05 +0000 (09:58 -0700)]
Replace gtIntrinsic. with AsIntrinsic()
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0cd1b84bdf47d784dde57b212c896df37366c92
Sergey Andreenko [Thu, 17 Oct 2019 16:38:28 +0000 (09:38 -0700)]
Fix debug check in `CheckAndMoveRMWLastUse`. (dotnet/coreclr#27248)
* `toTree` can't be `nullptr` because the previous condition has checked it.
* define and use the function only for x86.
* fix the issue
Commit migrated from https://github.com/dotnet/coreclr/commit/
10bf5d2010ed7416afed2234ee9ffea2264ae55b
Jarret Shook [Thu, 17 Oct 2019 16:34:30 +0000 (09:34 -0700)]
Revert "Use ubuntu 1804 arm64 queue outerloop (dotnet/coreclr#26984)" (dotnet/coreclr#27262)
This reverts commit dotnet/coreclr@
54d536fd7597541b860784edebb2389723626143.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c9ea85d7be7ebebf9f7c48076cbad097260639a
Sinan Kaya [Thu, 17 Oct 2019 08:21:31 +0000 (01:21 -0700)]
find src/jit -type f -exec sed -i -e 's/gtAddrMode\./AsAddrMode()\./g' {} \; (dotnet/coreclr#27256)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9045d9dcbb3f2586231e62c9762e8480e40841b
Sinan Kaya [Thu, 17 Oct 2019 08:00:14 +0000 (01:00 -0700)]
Replace gtLclFld. with AsLclFld()-> (dotnet/coreclr#27218)
* find src/jit -type f -exec sed -i -e 's/gtLclFld\./AsLclFld()\./g' {} \;
AsLclFld
* Format patch
* Remove double cast
Commit migrated from https://github.com/dotnet/coreclr/commit/
93ef3998f079be0859eda77362e55e9e7c7cd96e
Jarret Shook [Thu, 17 Oct 2019 05:07:46 +0000 (22:07 -0700)]
Use armarch queue for internal builds (dotnet/coreclr#27244)
* Use Ubuntu.1804.Armarch for the internal arm32 jobs
* Stop testing arm32 on ubuntu16.04
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd0ca058d96513d0b9aba543ea5239b9de2c634f
Egor Chesakov [Thu, 17 Oct 2019 03:44:55 +0000 (20:44 -0700)]
Use aligned memory access in JIT_StackProbe (dotnet/coreclr#27235)
Commit migrated from https://github.com/dotnet/coreclr/commit/
73b9f63aecbc8157464c20adbf15ac9a3eb85ea3
Jan Kotas [Thu, 17 Oct 2019 03:44:30 +0000 (20:44 -0700)]
Delete ENABLE_WINRT define (dotnet/coreclr#27240)
.NET Native specific code not needed anymore
Commit migrated from https://github.com/dotnet/coreclr/commit/
fec0438426784470425abdd16ba088355bc9014e
Jan Vorlicek [Thu, 17 Oct 2019 03:43:09 +0000 (05:43 +0200)]
Fix field offset computation in crossgen2 (dotnet/coreclr#27245)
The logic for determining when to align base offset was not matching the
logic that is used in the coreclr runtime. This resulted in assert
failure: m_alignpad == 0 at runtime in 4 CoreMangLib tests.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f744448122b6fc3c1868105bcb9e767ed62889d3
Sinan Kaya [Thu, 17 Oct 2019 01:34:42 +0000 (18:34 -0700)]
Replace gtLclVar. with AsLclVar()-> (dotnet/coreclr#27222)
* find src/jit -type f -exec sed -i -e 's/gtLclVar\./AsLclVar()\./g' {} \;
AsClsVar and AsArrElem
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
9fff11771055eec97c4f9769d1a2f97ff796ac6a
Sinan Kaya [Thu, 17 Oct 2019 01:33:39 +0000 (18:33 -0700)]
find src/jit -type f -exec sed -i -e 's/gtLngCon\./AsLngCon()\./g' {} \; (dotnet/coreclr#27219)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1776e777741ec31fca550207426f6cfdc33512b9
Elinor Fung [Thu, 17 Oct 2019 01:06:42 +0000 (18:06 -0700)]
Update scripts to include activity ID / related activity ID in generated (dotnet/coreclr#27209)
native functions for firing runtime events through event pipe
Commit migrated from https://github.com/dotnet/coreclr/commit/
32a1bd8f854d4b65565ad90cd42fc9643c42d510
Aaron Robinson [Thu, 17 Oct 2019 00:52:01 +0000 (17:52 -0700)]
Update UWP Jupiter interaction interface methods defined in .NET Core (dotnet/coreclr#27239)
Update Jupiter host interface method names defined in .NET Core to match officially documented method names. The interface names are still different, but all function names now match.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9504d23951bc29b98e8f3d55138493d51abaff87
Sinan Kaya [Wed, 16 Oct 2019 23:21:46 +0000 (16:21 -0700)]
Replace gtClsVar. with AsClsVar()-> (dotnet/coreclr#27223)
* find src/jit -type f -exec sed -i -e 's/gtClsVar\./AsClsVar()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3060ceeef92858052384f6d14cc8eafa6d02a50
Egor Bogatov [Wed, 16 Oct 2019 21:58:53 +0000 (00:58 +0300)]
Optimize u>=1 to u!=0 and u<1 to u==0 (dotnet/coreclr#25458)
* Optimize u >= 1 to u != 0 and u < 1 to u == 0 (u - unsigned)
* undo some changes
* make clang-format happy
* Address feedback
* Update morph.cpp
Commit migrated from https://github.com/dotnet/coreclr/commit/
580024875e08a1569b847086ac54f3b549fff334
Jarret Shook [Wed, 16 Oct 2019 21:29:41 +0000 (14:29 -0700)]
Use ubuntu 1804 arm64 queue outerloop (dotnet/coreclr#26984)
* For pr use armarch queue for arm64 linux testing
* Set for pr to test
* Reflect armarch queue name
* Fix typo
* Fix other typo
* Only use armarch queue for outerloop testing
* Correctly use the old queue name
* Use armarch queue for all arm64 jobs
* Use arm32 and arm64 in the friendly names
Commit migrated from https://github.com/dotnet/coreclr/commit/
54d536fd7597541b860784edebb2389723626143
Alexander Soldatov [Wed, 16 Oct 2019 20:21:18 +0000 (23:21 +0300)]
[armel/Tizen] Fix broken crossgen2 build (dotnet/coreclr#27227)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c5e3a0171f01af2f8a38d57aed7758d141a61943
mikedn [Wed, 16 Oct 2019 18:42:45 +0000 (21:42 +0300)]
Refactor init/copy block codegen (dotnet/coreclr#27035)
* Delete INITBLK/CPBLK_STOS_LIMIT
* Treat 0 sized block ops as unrolled
Normally 0 sized block ops should be simply removed during lowering. But these are rare enough that adding special code to deal with them is questionable.
Instead unroll such block ops, the unroll codegen simply won't generate any code for a 0 sized block op. Of course, some registers will still be allocated.
* Cleanup BuildBlockStore
* BlkOpKindHelper is not available on x86
* Use GT_STORE_BLK/unroll consistently
Non-GC GT_STORE_OBJ nodes were changed to GT_STORE_BLK in block copy ops
but not in block init ops. Since block init is effectvely non-GC it is
preferable to be consistent and change to GT_STORE_BLK in both cases.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8370e676f2d558fc20b5920d3a424c4e419d5e3a
Anubhav Srivastava [Wed, 16 Oct 2019 18:24:12 +0000 (11:24 -0700)]
Preparation to introduce parallelism into CrossGen2 (dotnet/coreclr#27068)
* Preparation to introduce parallelism into CrossGen2
- Change dictionaries in ReadyToRunCodegenNodeFactory and ReadyToRunSymbolNodeFactory to NodeCaches (i.e. ConcurrentDictionary, at the moment)
- Add structs to act as keys for the above NodeCaches (MethodFixupKey, DynamicHelperKey, ReadyToRunHelperKey)
- Synchronize logger
- Update some Dictionaries to ConcurrentDictionary
- Add .Equals and GetHashCode to SignatureContext.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ac3fc45d5ea5100caaf578dd4baaa1f9fd28640
Egor Chesakov [Wed, 16 Oct 2019 15:48:02 +0000 (08:48 -0700)]
Fix JIT.superpmi\superpmicollect broken on ReadyToRun jobs (dotnet/coreclr#25218)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e153d5dfd52bf4f6083b1d741c95e3a70868a963
Ben Adams [Wed, 16 Oct 2019 15:14:17 +0000 (16:14 +0100)]
Improve Dictionary TryGetValue size/perfomance (dotnet/coreclr#27195)
* Dictionary avoid second bounds check in Get methods
* Add NullRef methods to Unsafe
Commit migrated from https://github.com/dotnet/coreclr/commit/
921b39ccb5d075cb61ee9b167d0d17fc4acfda59
Peter Sollich [Wed, 16 Oct 2019 09:30:15 +0000 (11:30 +0200)]
Manually managed card bundles windows (dotnet/coreclr#27087)
* Changes to set gen0 bricks always. This reduces the time spent in find_first_object when finding the start of objects for marking interior pointers.
* Revert "Changes to set gen0 bricks always. This reduces the time spent in find_first_object when finding the start of objects for marking interior pointers."
This reverts commit dotnet/coreclr@
9d53ff910ceb5482c67350a88e6687b8f94d5634.
* Initial check point for manually managed card bundles on x64 Windows.
* Small optimization in JIT_ByRefWriteBarrier - instead of memory access, use lea from a register to restore destination address.
* Fix issue with arm64 - forgot to push my local change.
* Address code review change request - make arm64 Windows write barrier trash only x12 and x15, but not x16 for consistency with Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c3432f0f43b5669413b3a9c80f5a74736e5b0558
Omair Majid [Wed, 16 Oct 2019 09:25:29 +0000 (05:25 -0400)]
Handle glibc sys/sysctl.h deprecation (dotnet/coreclr#27048)
glibc has deprecated sys/sysctl.h:
In file included from /coreclr/src/pal/src/misc/sysinfo.cpp:32:
/usr/include/sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
#warning "The <sys/sysctl.h> header is deprecated and will be removed."
^
1 error generated.
Fix that by preferring sysconf and only including sys/sysctl.h if
HAVE_SYSCONF is not true. This mirrors the order of the implementation
code in this file (sysinfo.cpp) which checks for HAVE_SYSCONF
before HAVE_SYSCTL.
Fixes dotnet/coreclr#27008
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ce179a17061abbbe9f904f878943a28c8041a62
Levi Broderick [Wed, 16 Oct 2019 03:02:27 +0000 (20:02 -0700)]
Fix DecoderNLS.Convert to out the correct value for 'completed' (dotnet/coreclr#27210)
This is a complementary fix to https://github.com/dotnet/coreclr/issues/23020
Commit migrated from https://github.com/dotnet/coreclr/commit/
c07ec4cd2f88c23edc87500893576d83c20f2e6d
Tanner Gooding [Wed, 16 Oct 2019 01:46:44 +0000 (18:46 -0700)]
Adding tests and fixing codegen for the Arm 'Aes' and 'ArmBase' hwintrinsics (dotnet/coreclr#27151)
* Adding arm hwintrinsic tests for AdvSimd.LoadVector64 and AdvSimd.LoadVector128
* Adding arm hwintrinsic tests for Aes.Decrypt, Aes.Encrypt, Aes.InverseMixColumns, and Aes.MixColumns
* Fixing compSetProcessor to support the Arm AES instruction set
* Adding arm hwintrinsic tests for ArmBase.LeadingZeroCount, ArmBase.Arm64.LeadingSignCount, and ArmBase.Arm64.LeadingZeroCount
* Improving the arm hwintrinsic test generator
* Regenerating the arm hwintrinsic tests
* Fixing the arm hwintrinsic codegen to support scalar and aes intrinsics
* Applying formatting patch.
* Don't pass in opts to INS_mov
* Ensure the arm Aes.Decrypt and Aes.Encrypt intrinsics set tgtPrefUse for op1 and mark op2 as delay free
Commit migrated from https://github.com/dotnet/coreclr/commit/
643fda7fc7809f22e8cba4341f6e4c8a2507b6c6
Egor Chesakov [Wed, 16 Oct 2019 01:35:18 +0000 (18:35 -0700)]
Add STRESS_PROFILER_CALLBACKS JIT stress mode (dotnet/coreclr#26549)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9020ffa85b13600c292ca085f9d90e3c0126e7c0
Egor Chesakov [Wed, 16 Oct 2019 01:34:31 +0000 (18:34 -0700)]
Fix RBM_PROFILER_TAILCALL_TRASH on x86 in src/jit/target.h (dotnet/coreclr#27190)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d62c2d4c7f21cf37aa764b9b0c2473ed0ef08f2e
Del Myers [Wed, 16 Oct 2019 01:12:56 +0000 (18:12 -0700)]
Enable ETW/EventSource logging of task IDs for boxed state machines (dotnet/coreclr#27115)
* Wrap MoveNext Action for TPL event tracing
Wraps the MoveNext action of the AsyncStateMachineBox in a
continuation wrapper when async causality tracing is on so that the
TPL event source can find the task that is associated with a
continuation. Does not wrap otherwise.
* Clarifying comment
* removing trailing whitespace
* code review feedback.
Makes AsyncMethodBuilderCore.TryFindContinuationTask check to
whether the target of a continuation is itself a task, as a fall-back
to checking to see if the continuation is a ContinuationWrapper
* Got rid of unnecessary null checks
Commit migrated from https://github.com/dotnet/coreclr/commit/
faf20708867611e0ba134005f5b93b6eb575c160
mikedn [Wed, 16 Oct 2019 00:07:23 +0000 (03:07 +0300)]
Fix Compare and gtHashValue handling of BLK & OBJ (dotnet/coreclr#27196)
* These 2 are GTK_UNOP so they do not belong under "if (kind & GTK_BINOP)".
* OBJ was already present under "if (kind & GTK_UNOP)" but not BLK.
* BLK was marked GTK_UNOP but not GTK_EXOP so its size was simply ignored by Compare.
* DYN_BLK nodes are GTK_SPECIAL but appeared in the GTK_BINOP section of gtHashValue
* Also fix indir/block node classes in gtlist.h (only used by MEASURE_NODE_SIZE & co.)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4bd89c11d75d9d5496e21bbd5f7ab3dddbd0f210
Sergey Andreenko [Tue, 15 Oct 2019 22:48:42 +0000 (15:48 -0700)]
Fix some optimization warnings in jit. (dotnet/coreclr#27193)
* Do not pass structs by value where you can use const ref.
* Optimize struct layouts.
Gives 0.09% release memory consumtion decrease.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9997becf0d2fcbbb1c3fb5143e24c1380e2b043
Sinan Kaya [Tue, 15 Oct 2019 21:45:13 +0000 (14:45 -0700)]
Replace gtCall. with AsCall()-> (dotnet/coreclr#27172)
* find src/jit -type f -exec sed -i -e 's/gtCall\./AsCall()\./g' {} \;
ascall
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
e961d2c9a558ef5191f23adc796d0bafb2ca3ba1
Sergey Andreenko [Tue, 15 Oct 2019 21:40:04 +0000 (14:40 -0700)]
Rewrite some blocks exposed by dotnet/coreclr#27122. (dotnet/coreclr#27197)
Commit migrated from https://github.com/dotnet/coreclr/commit/
af07163769719bd35bdb2a06905f38c5c1830a98
Sinan Kaya [Tue, 15 Oct 2019 19:22:01 +0000 (12:22 -0700)]
Replace gtSIMD. with AsSIMD()-> (dotnet/coreclr#27165)
* find src/jit -type f -exec sed -i -e 's/gtSIMD\./AsSIMD()\./g' {} \;
* too early
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
cea2abf54bcee9c155db39774f2d8a1ccd4b4c66
Sinan Kaya [Tue, 15 Oct 2019 19:21:09 +0000 (12:21 -0700)]
Replace gtCast. with AsCast()-> (dotnet/coreclr#27166)
* find src/jit -type f -exec sed -i -e 's/gtCast\./AsCast()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c5bbddc3956244eb27755375524faa020be9395
Levi Broderick [Tue, 15 Oct 2019 17:51:07 +0000 (10:51 -0700)]
Update Utf8String to match latest prototype (dotnet/coreclr#27046)
Commit migrated from https://github.com/dotnet/coreclr/commit/
52687970a692805d4865abf1ce4e592578b43bcb
mikedn [Tue, 15 Oct 2019 15:52:38 +0000 (18:52 +0300)]
Cleanup LowerBlockStore (dotnet/coreclr#27170)
* Add initblk 0 init test
* Cleanup LowerBlockStore
* Improve comment about the need for ClearContained
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b95b4a92bbaca53547e4ad5b0607ea034c63cec
Stephen Toub [Tue, 15 Oct 2019 12:53:04 +0000 (08:53 -0400)]
Use stackalloc expressions with builder ctors (dotnet/coreclr#27194)
Commit migrated from https://github.com/dotnet/coreclr/commit/
76f4c52b9c03487982a8f256f83ab676bbeff476
Sinan Kaya [Tue, 15 Oct 2019 04:20:35 +0000 (21:20 -0700)]
Replace `gtArrLen` with `AsArrLen`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
29bf1a377acf11ed1be81c2782189f930aa5162e
Sinan Kaya [Tue, 15 Oct 2019 04:18:06 +0000 (21:18 -0700)]
Replace gtBox. with AsBox() (dotnet/coreclr#27161)
* find src/jit -type f -exec sed -i -e 's/gtBox\./AsBox()\./g' {} \;
* Cleanup cast
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b94535444dae420ac3b1b4d186e4ab14d6a83cf
David Wrighton [Tue, 15 Oct 2019 03:21:20 +0000 (20:21 -0700)]
Buildwork to remove dir.props files (dotnet/coreclr#26960)
- Remove dir.props and dir.targets
- Move all hierarchical build work into Directory.Build.props and Directory.Build.targets
- Remove some vestiges of BuildTools
- Remove concept of "Arcade" build. All product components (and nearly all of test) now include the Arcade Sdk
- Convert test tree to use nuget.config instead of RestoreSources
- Managed binaries now use the arcade convention for storing their intermediates
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a17098515dbf530c831fa084d981396f97715c8
Sinan Kaya [Tue, 15 Oct 2019 01:44:56 +0000 (18:44 -0700)]
Replace gtRetExpr. with AsRetExpr()-> (dotnet/coreclr#27162)
* find src/jit -type f -exec sed -i -e 's/gtRetExpr\./AsRetExpr()\./g' {} \;
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
d27ecf2a5e0034a7d8c80a8ec8cca07b652a9a23
Carol Eidt [Tue, 15 Oct 2019 00:14:46 +0000 (17:14 -0700)]
Update first-class-structs doc (dotnet/coreclr#27189)
Commit migrated from https://github.com/dotnet/coreclr/commit/
fabf4625e9ce28aa1d1965dc0056d25cd4d1b98a
mikedn [Mon, 14 Oct 2019 23:10:23 +0000 (02:10 +0300)]
Fix 2 small Statement issues (dotnet/coreclr#27183)
1. Statement data members have "incorrect" order that leads to unnecessary alignment holes
2. LocalAddressVisitor dumps the statement tree twice
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f71a90f41cfae2a9675bb37150d3a7d4e8b1423
Andrew Au [Mon, 14 Oct 2019 23:06:53 +0000 (16:06 -0700)]
Handle the case where customAttributeConstructorHandle could be a MemberRef (dotnet/coreclr#27181)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3a181629de2114fed57b5d1828c50182015a334
Sinan Kaya [Mon, 14 Oct 2019 23:02:01 +0000 (16:02 -0700)]
Replace gtIntConCommon. with AsIntConCommon()-> (dotnet/coreclr#27160)
* find src/jit -type f -exec sed -i -e 's/gtIntConCommon\./AsIntConCommon()\./g' {} \;
IntConCommon
* Format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
d015ba37663d22e70b912f0fd4afba58c021041f
Sinan Kaya [Mon, 14 Oct 2019 23:01:39 +0000 (16:01 -0700)]
Replace gtDblCon. with AsDblCon()
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc8c0ec37108eb621596f5251542ddad13f3f326
Egor Chesakov [Mon, 14 Oct 2019 22:12:58 +0000 (15:12 -0700)]
Add regression test for https://github.com/dotnet/coreclr/issues/26491 (dotnet/coreclr#26518)
Commit migrated from https://github.com/dotnet/coreclr/commit/
45a136968ab6e0446f5309852008b3cf151f83a6
Elinor Fung [Mon, 14 Oct 2019 21:56:09 +0000 (14:56 -0700)]
Remove unused binder code (dotnet/coreclr#27180)
Commit migrated from https://github.com/dotnet/coreclr/commit/
97fbdc7a45a865520b228d1560348a095519e1ac
Aaron Robinson [Mon, 14 Oct 2019 20:33:59 +0000 (13:33 -0700)]
Conditionally remove the GC transition from a P/Invoke (dotnet/coreclr#26458)
* Provide mechanism to remove the GC transition from a P/Invoke.
New Attribute: 'System.Runtime.InteropServices.SuppressGCTransitionAttribute'
Commit migrated from https://github.com/dotnet/coreclr/commit/
45a3a485e3b7cd8593f3cf764bb8ea697aefb2ba
Michal Strehovský [Mon, 14 Oct 2019 20:08:06 +0000 (22:08 +0200)]
Wrap PerfEventSource usage in IsEnabled checks (dotnet/coreclr#27177)
After the recent start/stop event refactoring, this is the only use of PerfEventSource that is not wrapped in a IsEnabled call.
Tools like IL Linker are able to strip EventSource usage to make the app smaller and the way they do it is by replacing IsEnabled to always return false and making Write methods always throw. If we don't wrap EventSource usage in IsEnabled checks, this results in a broken app.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d636cdcb90b0e880b45126b4f65cb815f3872f4
Sinan Kaya [Mon, 14 Oct 2019 18:08:21 +0000 (11:08 -0700)]
Fix integer conversion issues (dotnet/coreclr#27173)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3f573e6f2a2883ee0bbca2d851e2dec6e62d2ba
Michal Strehovský [Mon, 14 Oct 2019 18:07:16 +0000 (20:07 +0200)]
Copy exception regions in the copy constructor (dotnet/coreclr#27176)
This is used to create MethodIL for the interop stubs. I introduced this field in dotnet/coreclr#27109 but forgot to make a copy here.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cacb1a790e0c484f58731811f3460053af9adc12
Jan Kotas [Mon, 14 Oct 2019 05:32:46 +0000 (22:32 -0700)]
Replace primitive Array fcalls with managed implementations (dotnet/coreclr#27123)
Prep-work for dotnet/coreclr#27106
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c0b70ea5f81c810a375db688a5d1ac3aee0b2ca
Ben Adams [Sun, 13 Oct 2019 23:01:24 +0000 (00:01 +0100)]
Update Jit formatting link (dotnet/coreclr#27171)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b415b57a15b0c6ba77e63df901823bb46b8aafda
Sinan Kaya [Sat, 12 Oct 2019 08:39:11 +0000 (01:39 -0700)]
Replace gt## with As## (dotnet/coreclr#27122)
* Replace gt## with Get##
* Format patch
* minor cleanups
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd0ca99c4214538de6f821db6a38c9b6aca5ee62
mikedn [Fri, 11 Oct 2019 22:16:32 +0000 (01:16 +0300)]
Cleanup unrolled block op codegen (dotnet/coreclr#27146)
* Move genCodeForInitBlkUnroll to codegenarmarch
* Cleanup unrolled block op codegen
* Fix comment header
* Delete GT_INIT_VAL support from genConsumeRegs
* Add XArch TODO
* Use explicit size in instruction selection
Commit migrated from https://github.com/dotnet/coreclr/commit/
711a7168b5fc7b07b0086f5ded33ec360a9549ac
mikedn [Fri, 11 Oct 2019 21:23:03 +0000 (00:23 +0300)]
Remove duplicate code from emitIns_R_AR[R|X]/AR[R|X]_R (dotnet/coreclr#27145)
Commit migrated from https://github.com/dotnet/coreclr/commit/
99839c5182a5b28348824d90d4d838e9163b3401
Jeremy Koritzinsky [Fri, 11 Oct 2019 20:43:25 +0000 (13:43 -0700)]
Run tests on Alpine 3.10. (dotnet/coreclr#27093)
* Run tests on Alpine 3.10.
* Only run Alpine 3.10 in public PR/CI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac547d2df8b9ef1243a93a41e054ad8d91556f47
Egor Bogatov [Fri, 11 Oct 2019 20:29:56 +0000 (23:29 +0300)]
Enable fast-paths on Mono for Array (dotnet/coreclr#27144)
Commit migrated from https://github.com/dotnet/coreclr/commit/
909e6d883a0e45c6a37311822ed1d30d8053e431
Sinan Kaya [Fri, 11 Oct 2019 18:05:10 +0000 (11:05 -0700)]
Replace regNum with GetRegNum() (dotnet/coreclr#27120)
* find src/jit -type f -exec sed -i -e 's/->regNum/->getRegNum()/g' {} \;
Add forgotten regNum<-> getRegNum
* GetRegNum fix
* more forgotten
* more forgotten
Commit migrated from https://github.com/dotnet/coreclr/commit/
3219e8b5633522c9ef39e39ee99974c71f5e928f
Michal Strehovský [Fri, 11 Oct 2019 15:16:53 +0000 (17:16 +0200)]
Add support for emitting finally regions in ILEmitter (dotnet/coreclr#27109)
This will be needed to properly do cleanups in marshalling stubs.
The usage goes like (I couldn't come up with anything better):
```
var b = codeStream.BeginTry();
//...
codeStream.EndTry(b);
codeStream.BeginHandler(b);
// ...
codeStream.EndHandler(b);
emit.NewFinallyRegion(b);
```
Commit migrated from https://github.com/dotnet/coreclr/commit/
a7ffbba5a2843e7da03fdffe40ac85b9adfe126e
Jan Kotas [Fri, 11 Oct 2019 14:13:10 +0000 (07:13 -0700)]
Close unused diagnostic server thread handle (dotnet/coreclr#27141)
Fixes dotnet/coreclr#27135
Commit migrated from https://github.com/dotnet/coreclr/commit/
d8bbcc485be92b2feaf392eb750b7b523a872b6c
Eugene Rozenfeld [Fri, 11 Oct 2019 07:50:31 +0000 (00:50 -0700)]
Merge pull request dotnet/coreclr#27114 from erozenfeld/Fix27027
Jit: Fix SetIndirExceptionFlags.
Commit migrated from https://github.com/dotnet/coreclr/commit/
58b016c17e375f30c9d0d0437cc5b01fcca7de5d
Sinan Kaya [Fri, 11 Oct 2019 06:58:32 +0000 (23:58 -0700)]
Replace lvArgReg with GetArgReg() (dotnet/coreclr#27097)
* find src/jit -type f -exec sed -i -e 's/.*declspec.*lvArgReg.*//g' {} \;
lvArgReg->GetArgReg
lvArgReg = GetArgReg
* Format patch
* Prefer _lvArgReg
* casting
Commit migrated from https://github.com/dotnet/coreclr/commit/
a3253f3c7f8ce00f1cc8bc4770063f70799d0bf2
Tanner Gooding [Fri, 11 Oct 2019 03:44:47 +0000 (20:44 -0700)]
Refactoring the ARM intrinsics to match API review and share code with x86 (dotnet/coreclr#25508)
* Rewriting the ARM64 HWIntrinsic JIT infrastructure to share with and mirror the x86 infrastructure where possible.
* Lowercasing the hwintrinsicarm64 and hwintrinsiclistarm64 files.
* Applying formatting patch.
* Fixing up some names in the PAL and VM that were missed.
* Adding support for AdvSimd.Add
* Ensure impSpecialIntrinsic returns nullptr for unsupported base types.
* Rewording various method headers and simplifying some code.
* Fixing getEmitter to GetEmitter
* Adding support for the ld1 instruction
* Applying formatting patch
* Clarifying a todo comment and removing a stray newline
* Fixing the Arm64 impSpecialIntrinsic to not assert for helper intrinsics
* Fixing some intrinsic signatures that were incorrect
* Adding the initial template files for generating Arm HWIntrinsic tests
* Generating the initial batch of Arm HWIntrinsic tests
* Replace gtRegNum with GetRegNum()
* Fixing the test template alignment checks for Arm
* Regenerating the Arm HWIntrinsic tests
* Fixing the namespace checked for Arm intrinsics
* Changing Base to ArmBase and fixing some Arm hwintrinsic metadata
* Fixing the arm emitter and lowering to not assert for hwintrinsics
* Fixing the arm intrinsics to not set the number of vector elements for SIMDScalar intrinsics
* Updating the AdvSimd.Abs tests to use negative input values
* Regenerating the arm hwintrinsic tests
* Fixing the arm hwintrinsic codegen to use the element size for simd scalar operations.
* Fixing the arm scalar intrinsic tests to check for 0 on upper bits
* Regenerating the ARM intrinsic tests
* Fixing AdvSimd.AbsScalar and AdvSimd.AddScalar to be recursive
* Marking AdvSimd.Arm64 and ArmBase.Arm64 as implemented
* Ensure that AdvSimd.Arm64.Abs is marked as variable size
Commit migrated from https://github.com/dotnet/coreclr/commit/
8184d3f86a5cec22efc8963a2ccb3affa231a202
Sung Yoon Whang [Fri, 11 Oct 2019 03:42:06 +0000 (20:42 -0700)]
Do not create diagnostics server thread and pipe if EnableDiagnostics is set to 0 (dotnet/coreclr#27137)
* Do not create diagnostics server thread and pipe if EnableDiagnostics is set to 0
* Remove unnecessary check for config var in DiagnosticServer::Shutdown
Commit migrated from https://github.com/dotnet/coreclr/commit/
c2afcec36eeaad7288842bb517e034ef57164238
Sung Yoon Whang [Fri, 11 Oct 2019 03:39:14 +0000 (20:39 -0700)]
Remove unnecessary cleanup on diagnostics server thread during shutdown (dotnet/coreclr#27136)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3ec59a02624bf4b52f5ffe82d1ecde84c20402bc
Eugene Rozenfeld [Fri, 4 Oct 2019 23:04:33 +0000 (16:04 -0700)]
Jit: Fix SetIndirExceptionFlags.
SetIndirExceptionFlags should not set `GTF_IND_NONFAULTING` flag if the
address has `GTF_EXCEPT` flag.
The failing scenario was:
We were setting `GTF_IND_NONFAULTING` on this indirection (since `ADDR` Node
can't be null)
```
[000003] *--XG------- * IND int
[000002] ---XG------- \--* ADDR byref Zero Fseq[i]
[000001] ---XG------- \--* FIELD struct s
[000000] ------------ \--* LCL_VAR ref V00 arg0
```
this was then transformed to
```
[000003] *---G------- * IND int
[000013] -----+------ \--* ADD byref
[000000] -----+------ +--* LCL_VAR ref V00 arg0
[000012] -----+------ \--* CNS_INT long 8 field offset Fseq[s, i]
```
The `GTF_EXCEPT` flag was cleared on `IND` because it had `GTF_IND_NONFAULTING`set
and the address no longer had `GTF_EXCEPT` flag.
Fixes dotnet/coreclr#27027.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f58ce06e619e607d8e297d57f10afdc15cfce232
Andy Ayers [Thu, 10 Oct 2019 06:46:23 +0000 (23:46 -0700)]
JIT: only tail recursive calls become loops (dotnet/coreclr#27079)
Importer was a bit too liberal marking recursive calls as loop-inducing, at
least from the standpoint of enforcing backward-branch constraints. This would
sometimes lead us to inline into cold paths like throws. Only tail-recursive
calls will turn into loops.
Also, future-proof the propagation of simple loopness the root compiler, in
case we ever decide to enable inlining at Tier0.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6b13065e7ac88671795a01577e017ff7cdc26f35