Mike Danes [Mon, 19 Dec 2016 19:53:56 +0000 (21:53 +0200)]
Stop narrowing cmp(cast<ubyte>(icon), 0)
This isn't useful and requires special code to narrow the cast operand. The expression is constant and compiling such an expression shows that JIT does fold it so it doesn't reach lowering.
No FX diffs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c198a2cbbc8412901a83d908d904e177050ef37
Mike Danes [Mon, 19 Dec 2016 19:12:37 +0000 (21:12 +0200)]
Introduce genTypeValueFitsIn
Commit migrated from https://github.com/dotnet/coreclr/commit/
b2ee033a9ce71cf5d26d63078f857f9f12b81964
Mike Danes [Mon, 19 Dec 2016 06:36:02 +0000 (08:36 +0200)]
Handle small memory compares against 0
The previous commit missed the TYP_BOOL case that the original code handled. But then the original code failed to do this thinking that "test" will be used. But that means we end up with a "movzx" as well:
movzx rax, byte ptr [rsi+24]
test eax, eax
instead of just
cmp byte ptr [rsi+24], 0
The Intel manual actually recomends against using the "cmp mem, imm" form but not if other instructions need to be added. This may warrant further investigation though.
FX diff shows a 7579 bytes improvement without any regressions.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9bc2e775a85667fa85a1254fa4138fb98f417543
Mike Danes [Sun, 18 Dec 2016 11:54:21 +0000 (13:54 +0200)]
Contain "op1" from "cmp op1, icon" only if types are identical
LowerCompare already adjust the types to match when possible so there's no point in comparing type sizes.
No FX diffs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0fdbd1d2b531a1c0d0e0531e50a5d2c889dd2fb3
Mike Danes [Sat, 17 Dec 2016 20:28:07 +0000 (22:28 +0200)]
Remove unused code
Commit migrated from https://github.com/dotnet/coreclr/commit/
a379e21469ea9f7d9a5c10cd7004e691eb75afd8
Mike Danes [Sat, 17 Dec 2016 19:51:59 +0000 (21:51 +0200)]
Move and-cmp-test transform from TreeNodeInfoInitCmp to LowerCompare
FX diff shows a 32 bytes improvement without any regressions. Previously the first GT_AND operand wasn't marked reg optional and sometimes it ended up being loaded into a register:
mov eax, dword ptr [rsp+B0H]
test eax, 1
Not anymore:
test dword ptr [rsp+B0H], 1
Also, we now generate TEST instead of AND even in cases where the second AND operand isn't a containable constant.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a909bec98f796a4136a9d4ea955013ebf574703c
Mike Danes [Sat, 17 Dec 2016 18:49:50 +0000 (20:49 +0200)]
Add GT_TEST_EQ and GT_TEST_NE
Commit migrated from https://github.com/dotnet/coreclr/commit/
9bed8735d138e244ca340d7df1253ba6dac4c629
Mike Danes [Sat, 17 Dec 2016 18:26:13 +0000 (20:26 +0200)]
Move and-cmp-nonzero transform from TreeNodeInfoInitCmp to LowerCompare
FX diff shows a 34 byte improvement without any regressions. In the original code this transform was unnecessarily blocked by an uncontainable GT_AND bit mask:
mov rax, 0x80000000
and rax, qword ptr [rsp+08H]
mov rdx, 0x80000000
cmp rax, rdx
sete al
now generates
mov rax, 0x8000000000000000
and rax, qword ptr [rsp+08H]
setne al
Commit migrated from https://github.com/dotnet/coreclr/commit/
e74c08ecdde10a84af4fa555efbd925f2cc08547
Mike Danes [Sat, 17 Dec 2016 17:47:17 +0000 (19:47 +0200)]
Remove unused GTF_RELOP_SMALL
Commit migrated from https://github.com/dotnet/coreclr/commit/
187b9b7249881b13cd8807def27c10012238b9aa
Mike Danes [Sat, 17 Dec 2016 17:36:21 +0000 (19:36 +0200)]
Move cast elision from TreeNodeInfoInitCmp to LowerCompare
No FX diffs
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3c868f6b8d1c99a0df52a49b3805c912161a6f7
Mike Danes [Sat, 17 Dec 2016 16:28:42 +0000 (18:28 +0200)]
Move narrowing from TreeNodeInfoInitCmp to LowerCompare
FX diff shows a 1274 bytes improvement without any regressions. The original code didn't narrow the compare when op2 was 0. Because of this we had
movzx eax, byte ptr [ebx]
test eax, eax
instead of the shorter
cmp byte ptr[ebx], 0
Commit migrated from https://github.com/dotnet/coreclr/commit/
734a83412b5f87c3accf55b6724c4d07041e1313
Pat Gavlin [Tue, 17 Jan 2017 17:36:11 +0000 (09:36 -0800)]
Merge pull request dotnet/coreclr#8925 from pgavlin/HeapVerifyIncompatibleTests
Mark a small number of tests heap-verify-incompatible.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9fdd43ad023c138f39f29490c65f67002d0f14e7
Carol Eidt [Tue, 17 Jan 2017 16:59:59 +0000 (08:59 -0800)]
Merge pull request dotnet/coreclr#8908 from CarolEidt/Contained
Don't treat spill temps as contained
Commit migrated from https://github.com/dotnet/coreclr/commit/
2538e231e90c730aeb16caaba89bfa4d26215b19
Toni Solarin-Sodara [Tue, 17 Jan 2017 16:39:38 +0000 (17:39 +0100)]
Use nameof in place of hardcoded variable names (dotnet/coreclr#8968)
Fixes dotnet/coreclr#8967
Commit migrated from https://github.com/dotnet/coreclr/commit/
411da7488a89a00eed6f2501ea5d5a073ba4c757
chunseoklee [Tue, 17 Jan 2017 14:48:00 +0000 (23:48 +0900)]
Fix armel toolchain setting (dotnet/coreclr#8961)
This PR fixes build fail for armel(debian)
Signed-off-by: chunseoklee <chunseok.lee@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
03da0073707c0a4231080e41332838adbc2f3dc0
Hyung-Kyu Choi [Tue, 17 Jan 2017 14:45:38 +0000 (23:45 +0900)]
Update description related to ARM rootfs (dotnet/coreclr#8962)
Update description in script and documentation related to ARM rootfs.
1. Change arm-softfp to armel to apply recent changes.
2. Change UbuntuCodeName to LinuxCodeName
For arm and armel, rootfs are available from three different Linux distro.
For arm, Ubuntu is available.
For armel, Debian and Tizen are available.
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
c73f3a1a5b2616d039a9bf69803fe9942976410e
Hyeongseok Oh [Tue, 17 Jan 2017 12:41:58 +0000 (21:41 +0900)]
[ARM32/Linx] cross-architecture build: restrict build project list (dotnet/coreclr#8918)
* [ARM32/Linx] cross-architecture build: restrict build project list
Restrict build project for ARM32/Linux cross-architecture
We can build these projects with PR dotnet/coreclr#8866 and dotnet/coreclr#8917. (release build)
- crossgen
- clrjit
- protojit
* modify crosscomponents.cmake
Add list items when not Linux, instead remove in Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
69c55380c1c611388b8c9e3668f41ed099bdd5f1
Jonghyun Park [Mon, 16 Jan 2017 11:59:00 +0000 (20:59 +0900)]
[x86/Linux] Port ''ExceptionTracker::UpdateNonvolatileRegisters' (dotnet/coreclr#8915)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc63a8b9a7e899c2ed46e0fad8ec4564faefb8c1
mikedn [Mon, 16 Jan 2017 04:49:52 +0000 (06:49 +0200)]
Remove unused mscoree files and code (dotnet/coreclr#8956)
Commit migrated from https://github.com/dotnet/coreclr/commit/
094a2a0d9935afaf603a99c971bef76f61f4ed57
mikedn [Mon, 16 Jan 2017 04:49:18 +0000 (06:49 +0200)]
Remove mscorpe cruft (dotnet/coreclr#8957)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8c2db15331291324573d752fb3b6a3a9dae73b31
Jan Kotas [Sat, 14 Jan 2017 08:33:15 +0000 (00:33 -0800)]
Merge pull request dotnet/coreclr#8953 from kouvel/InterruptInFinally
Enable thread interrupt in finally blocks, remove some invalid asserts
Commit migrated from https://github.com/dotnet/coreclr/commit/
496c33f0b5c6ad87257dd1ff1c42ea8db0a53ae0
Koundinya Veluri [Sat, 14 Jan 2017 05:18:34 +0000 (21:18 -0800)]
Remove invalid asserts in threads.cpp, DoAppropriateWaitWorker(int, ...)
These cases are actually possible because Windows APIs are inconsistent in their behavior when invalid handles are concerned. Depending on the invalid handle's value, a multi-wait can error with ERROR_INVALID_HANDLE, and a single-wait on an invalid handle could return WAIT_TIMEOUT.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4367c8d5205f233ddf9db2c0d23a330d4b72d05c
Sean Gillespie [Sat, 14 Jan 2017 03:06:05 +0000 (19:06 -0800)]
Enable Standalone GC builds in the CI on OSX and Linux (dotnet/coreclr#8950)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6870583bfe5ed18b827194665e8150ae9d633efb
Koundinya Veluri [Sat, 14 Jan 2017 00:34:36 +0000 (16:34 -0800)]
Enable thread interrupt in finally blocks
Thread abort was not allowed in finally blocks, but the same logic was being applied to thread interrupt as well. There is nothing special about thread interrupt that requires it to not work in finally blocks.
Commit migrated from https://github.com/dotnet/coreclr/commit/
626a286433b6e3ed040744746c9b851361ea9546
Cesar Blum Silveira [Sat, 14 Jan 2017 00:09:46 +0000 (16:09 -0800)]
Check if xsave is enabled by OS before calling xgetbv in XmmYmmStateSupport (dotnet/coreclr#8939)
* Check if xsave is enabled by OS before calling xgetbv in XmmYmmStateSupport. Fix dotnet/coreclr#8903
* Add ebx to clobbered registers.
Commit migrated from https://github.com/dotnet/coreclr/commit/
590ff450b982e73782286ff3da80cd5665457de9
Carol Eidt [Fri, 9 Dec 2016 19:22:41 +0000 (11:22 -0800)]
Don't treat spill temps as contained
Make Contained refer only to whether code is only generated for a node as part of its parent.
Spill temps that are used from memory are not contained, as code is generated for them.
Add methods to indicate whether an operand is used from register, memory (including spill),
or spill specifically, for use by codegen in distinguishing these cases.
Commit migrated from https://github.com/dotnet/coreclr/commit/
751bc601e5f7fc9debaeb19d5b6bba7c11b5c0d8
Matt Ellis [Fri, 13 Jan 2017 22:15:21 +0000 (14:15 -0800)]
Merge pull request dotnet/coreclr#8938 from ellismg/fix-corefx-hash-and-artifacts-for-ci
Use a fixed version of CoreFX for testing
Commit migrated from https://github.com/dotnet/coreclr/commit/
de31af90a6d9c1f1d36cff03ed0ab5a628b716ad
Jan Vorlicek [Fri, 13 Jan 2017 22:11:54 +0000 (23:11 +0100)]
Fixes to make runtime work on ARM64 Linux (dotnet/coreclr#8947)
This is a result of attempt to bring up CoreCLR on ARM64 Android.
The bring up is on hold now, but I want to check in the changes
that added ARM64 asm helpers and fixed general Linux ARM64 issues.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2d4a792e306097a7c7e8afd954eeb50f2d2f23e
William Godbe [Fri, 13 Jan 2017 22:06:17 +0000 (14:06 -0800)]
Merge pull request dotnet/coreclr#8934 from wtgodbe/localpkg
Stop build from leaving localpkg cache in src
Commit migrated from https://github.com/dotnet/coreclr/commit/
b3136bb3281058e162bd072bdb7433663d3d456f
wtgodbe [Fri, 13 Jan 2017 00:35:45 +0000 (16:35 -0800)]
Stop build from leaving localpkg cache in src
Commit migrated from https://github.com/dotnet/coreclr/commit/
0ee3c2676b79c15370d3ae30b62fd4ed5bbbafd3
Matt Ellis [Fri, 13 Jan 2017 01:37:15 +0000 (17:37 -0800)]
Use a fixed version of CoreFX for testing
CoreFX is going to be merging changes soon that will break how we
consume them to do our testing. To give us time to react, we'll fix
the version of the repository we build to a commit before the
changes. We'll also download artifacts from a saved build (produced
before the change took place) so the layout is as we expect.
The issue tracking cleaning this up is dotnet/coreclr#8937
Commit migrated from https://github.com/dotnet/coreclr/commit/
396c9577f1a947224d73d12d95c45c5b2c624306
Andy Ayers [Fri, 13 Jan 2017 18:21:44 +0000 (10:21 -0800)]
Merge pull request dotnet/coreclr#8935 from AndyAyersMS/FixSmAssert
JIT: remove match accounting from inliner state machine
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d01c0e02ea49a2cc12ddfb520964285402a775c
Koundinya Veluri [Fri, 13 Jan 2017 16:45:57 +0000 (08:45 -0800)]
Fix Mutex.ReleaseMutex exception type for compatibility (dotnet/coreclr#8941)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0ee13af5321bd7340133e2beae14cf3664d5fb90
Dan Moseley [Fri, 13 Jan 2017 04:39:03 +0000 (20:39 -0800)]
Remove #if false blocks (dotnet/coreclr#8933)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6e1fc571c716635d4e0106594b3731669926b33
Andy Ayers [Fri, 13 Jan 2017 00:59:00 +0000 (16:59 -0800)]
JIT: remove match accounting from inliner state machine
The inliner's code-size estimating state machine keeps count of
matches, but the count was only used in an assert that checked
that the count did not overflow.
The assert fired when jit stress drove the inliner to evaluate a
huge method as a potential inline candidate and the count reached
the overflow value.
This change removes the counting and the related assert.
Closes dotnet/coreclr#8932.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7a4db6754a20aa6cb0a11850d08c844b9653af94
Gaurav Khanna [Fri, 13 Jan 2017 00:19:17 +0000 (16:19 -0800)]
Merge pull request dotnet/coreclr#8931 from dotnet-bot/master-UpdateDependencies
Update CoreClr to beta-24912-04 (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
eb4a102fce9495599d7a7248874555f0d6993a0b
Carol Eidt [Thu, 12 Jan 2017 23:36:04 +0000 (15:36 -0800)]
Merge pull request dotnet/coreclr#8928 from CarolEidt/Fix8898
Fix putArgStk dstCount and ConsumeReg errors
Commit migrated from https://github.com/dotnet/coreclr/commit/
b775947e7e313dc4bddd36b5f8c4859937f899ed
sandreenko [Thu, 12 Jan 2017 22:03:34 +0000 (14:03 -0800)]
Merge pull request dotnet/coreclr#8806 from sandreenko/array-bounds-check
Сhange children order in GenTreeBoundsChk. Fix dotnet/coreclr#8077
Commit migrated from https://github.com/dotnet/coreclr/commit/
0adb691bb55a428409bc0750b9f2075f1ea45ae8
mikedn [Thu, 12 Jan 2017 20:59:10 +0000 (22:59 +0200)]
Prefer using Array.Length as upper for loop limit (dotnet/coreclr#8923)
The JIT can't eliminate range checks if it can't "see" Length and uses loop cloning which generates a lot of code. Even in cases where not all range checks can be eliminated and loop cloning is used anyway it's still preferable to have fewer range checks.
For example, SortExceptions is ~140 bytes shorter after this change, despite the fact that loop cloning is still being used.
Commit migrated from https://github.com/dotnet/coreclr/commit/
01a9eaaa14fc3de8f11eafa6155af8ce4e44e9e9
dotnet-bot [Thu, 12 Jan 2017 20:57:32 +0000 (20:57 +0000)]
Update CoreClr to beta-24912-04
Commit migrated from https://github.com/dotnet/coreclr/commit/
431e18305e00810f5cc727238db598de15251886
Carol Eidt [Thu, 12 Jan 2017 20:15:16 +0000 (12:15 -0800)]
Fix putArgStk dstCount and ConsumeReg errors
The LastConsumedNode used in genCheckConsumeNode was not initialized for arm64.
Fixing this exposed several places where nodes were being consumed twice or in the wrong order.
In addition, since GT_PUTARG_STK doesn't define a register, its dstCount needs to be zero. This is enabled by checking IsValue() instead of type of TYP_VOID for the default case of TreeNodeInfoInit. This was missed for both arm and arm64.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3a44fd490bb83fb3c486cd9b90fe3934733f4a96
Pat Gavlin [Thu, 12 Jan 2017 18:41:54 +0000 (10:41 -0800)]
Mark a small number of tests heap-verify-incompatible.
These tests simply take too long to execute when run with heap
verification.
Commit migrated from https://github.com/dotnet/coreclr/commit/
36427c85b96fd57577ffea4a844cc830c0694097
Gaurav Khanna [Thu, 12 Jan 2017 18:11:44 +0000 (10:11 -0800)]
Merge pull request dotnet/coreclr#8909 from gkhanna79/Docker1404
Add optional argument to skip unmount for rootfs
Commit migrated from https://github.com/dotnet/coreclr/commit/
a33f44f70a992f153d7fd27c840661978ce1e0f4
Carol Eidt [Thu, 12 Jan 2017 16:54:49 +0000 (08:54 -0800)]
Merge pull request dotnet/coreclr#8840 from CarolEidt/Fix8824
Fix initialization of resolution sets
Commit migrated from https://github.com/dotnet/coreclr/commit/
d69811c1ab0074f3ad82697348672c74114e121d
Jonghyun Park [Thu, 12 Jan 2017 15:43:54 +0000 (00:43 +0900)]
[x86/Linux] Port 'ExceptionTracker::ProcessOSExceptionNotification' (dotnet/coreclr#8912)
Commit migrated from https://github.com/dotnet/coreclr/commit/
033b11d631f346a55c4d7c453bca1f49f77a44d5
Sivarv [Thu, 12 Jan 2017 07:11:05 +0000 (23:11 -0800)]
Merge pull request dotnet/coreclr#8588 from litian2025/AVX_SSE
Remove AVX/SSE transition penalties
Commit migrated from https://github.com/dotnet/coreclr/commit/
d187267134f1de239914ef684fe43330b22682e6
Li Tian [Thu, 12 Jan 2017 05:08:11 +0000 (21:08 -0800)]
fix format
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6d69f5da791efceedbda0fc7d001900efe0f326
dotnet bot [Thu, 12 Jan 2017 04:55:50 +0000 (20:55 -0800)]
Update CoreClr, CoreFx to beta-24911-02, beta-24911-08, respectively (dotnet/coreclr#8855)
Commit migrated from https://github.com/dotnet/coreclr/commit/
22ddf5187597a9fe46099141591ec7ef35142cae
Li Tian [Thu, 12 Jan 2017 04:47:48 +0000 (20:47 -0800)]
Add more comments to document remove AVX/SSE transition penalty logic
Commit migrated from https://github.com/dotnet/coreclr/commit/
0981bb41916937f60b5c9b1b0c5691556f630fe1
Joseph Tremoulet [Thu, 12 Jan 2017 02:24:40 +0000 (21:24 -0500)]
Merge pull request dotnet/coreclr#8905 from JosephTremoulet/OneMoreHeapUse
Remove bogus fgCurHeapDef guard
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf2fd1ccd7e575190cc11760f0fb2e04f0c91441
Russell C Hadley [Thu, 12 Jan 2017 01:19:58 +0000 (17:19 -0800)]
Merge pull request dotnet/coreclr#8879 from russellhadley/span-intrinsics
Initial implementation of two field span.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d4fd78eb013de26639b3327f45072807858d0dde
Carol Eidt [Sat, 7 Jan 2017 02:21:31 +0000 (18:21 -0800)]
Fix initialization of resolution sets
This was causing a failure during dumping.
Fixing it exposed another dumping failure in crossgen of System.Private.Corelib.dll on x86, due to a dead node. I've fixed the assert, but I believe the dead node should have been eliminated. I filed issue dotnet/coreclr#8839 for this.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ec7c0b227544c2edec9166216df16dabf495afe3
Mike McLaughlin [Thu, 12 Jan 2017 00:40:49 +0000 (16:40 -0800)]
Fix issue dotnet/coreclr#8139 amd64 decoder bug. (dotnet/coreclr#8901)
Ignore modrm == 0 which ignores "inc dword ptr []" instructions.
Also fixed minor EEHeap formatting bug on Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f2b0e13c2f828b52386b86a6b64cd0187d37c8d9
Drew Scoggins [Thu, 12 Jan 2017 00:36:41 +0000 (16:36 -0800)]
Merge pull request dotnet/coreclr#8907 from DrewScoggins/PullRequestFix
Fix pull request title automation
Commit migrated from https://github.com/dotnet/coreclr/commit/
79be18f28e961ef4e5e2ec4963bdd7e2783046d6
Maarten Mensink [Thu, 12 Jan 2017 00:28:18 +0000 (01:28 +0100)]
Add clang 3.7 support and remove __FakePrologName to fix build (dotnet/coreclr#8904)
* add clang 3.7 support
* Removing
__FakePrologName="DelayLoad_Helper\suffix\()_FakeProlog"
based on https://github.com/dotnet/coreclr/issues/4332#issuecomment-
271990909
Commit migrated from https://github.com/dotnet/coreclr/commit/
7cdeedaa3b69d1dc4b0dc775ab85aa4c6d29b6ab
Drew Scoggins [Thu, 12 Jan 2017 00:24:43 +0000 (16:24 -0800)]
Fix pull request title automation
When I added the ability to give a custom name to a run that was kicked
off using the PR leg I did it by adding an additional parameter. When
using a variable name there I need to use the dollar sign syntax of
groovy and not an environment variable.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4bce446ccc86a500bc7002ce0c91bc6fd6a22557
Gaurav Khanna [Thu, 12 Jan 2017 00:03:51 +0000 (16:03 -0800)]
Add optional argument to skip unmount for rootfs
Commit migrated from https://github.com/dotnet/coreclr/commit/
f345c1d93fef6af12a04200af9e0a555342a45be
Pat Gavlin [Wed, 11 Jan 2017 23:44:28 +0000 (15:44 -0800)]
Merge pull request dotnet/coreclr#8897 from pgavlin/GH8860.1
Fix dotnet/coreclr#8860.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4692866468c1fb5c8a167efebbe2b0365fb69b97
Pat Gavlin [Wed, 11 Jan 2017 23:15:31 +0000 (15:15 -0800)]
Format code.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d7f28722caa2f6d8dc5c5ed74ec3f622dc13a57b
Pat Gavlin [Wed, 11 Jan 2017 23:07:44 +0000 (15:07 -0800)]
Merge pull request dotnet/coreclr#8899 from pgavlin/FixTotalMemoryTest
Fix the GC total memory test.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdc3ce471e56e1f7dee52c954dd4778561192669
Michelle McDaniel [Wed, 11 Jan 2017 23:06:30 +0000 (15:06 -0800)]
Merge pull request dotnet/coreclr#8900 from adiaaida/fix8550
Copy lvExactSize to shadowVar
Commit migrated from https://github.com/dotnet/coreclr/commit/
08058f91ed2d187e1b4ed505450ac37f486ec4c9
Li Tian [Wed, 11 Jan 2017 22:48:20 +0000 (14:48 -0800)]
use assert insteaf of if statement
Commit migrated from https://github.com/dotnet/coreclr/commit/
3d5e08f057970ee07327a86fea34ecce95574f97
Jonghyun Park [Wed, 11 Jan 2017 22:22:00 +0000 (07:22 +0900)]
Rewrite CalleeSavedRegisters for x86 (dotnet/coreclr#8871)
This commit revises CalleeSavedRegisters for x86 using
ENUM_CALLEE_SAVED_REGISTERS as in x64.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8c5993d5f79468b373d9796a18a5e052c72d5c86
Jan Kotas [Wed, 7 Dec 2016 05:30:54 +0000 (21:30 -0800)]
Initial implementation of two field span.
Implements two field span struct which is comprised of a byref field
that may be an interior pointer to a managed object, or a native
pointer indicating the start of the span, and a length field which
describes the span of access.
Since there is no MSIL operation which assign a byref field, the jit
gets involved and treats the constructor and getter of a special struct
called ByReference that contains an declared IntPtr. This special
struct is then used as a field in the span implementation and recognized
by the runtime as a field that may contain a GC pointer. In
implementation, the ctor of ByReference is converted into an assignment
value is returned by a reverse assignment.
Since there are some dependencies on CoreFX for the span implementation
local testing of the implementation has been done using the
BasicSpanTest.cs in the CoreCLR tests. Once this is checked in and is
propagated to CoreFX the apporopate code in the packages will be enabled
and then may be referenced in CoreCLR tests. At that time more span
tests will be added.
Additional comments and fixes based on code review added.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0bedde3a63f22b65155d5f369e75c448c6afb786
Sven Boemer [Wed, 11 Jan 2017 21:32:56 +0000 (13:32 -0800)]
Merge pull request dotnet/coreclr#8570 from sbomer/dasm_automation
Fix some problems with the ubuntu dasm output
Commit migrated from https://github.com/dotnet/coreclr/commit/
baa998029e27b5927122d40f3a3a208e6e728421
Andy Ayers [Wed, 11 Jan 2017 21:20:57 +0000 (13:20 -0800)]
Merge pull request dotnet/coreclr#8551 from AndyAyersMS/FinallyCloning
Finally cloning
Commit migrated from https://github.com/dotnet/coreclr/commit/
c3673afaaa3c18495c7b3941c20d82fc9a71a873
Joseph Tremoulet [Wed, 11 Jan 2017 20:59:29 +0000 (15:59 -0500)]
Remove bogus fgCurHeapDef guard
We should set fgCurHeapUse when visiting a heap use regardless of whether
fgCurHeapDef is set, because we haven't proven that the def writes all
memory that the use might read. This should have been included in dotnet/coreclr#8757
but somehow slipped through.
Commit migrated from https://github.com/dotnet/coreclr/commit/
334cf4e004367b8c0c717fe3974ae008ecec0f62
Michelle McDaniel [Wed, 11 Jan 2017 20:48:55 +0000 (12:48 -0800)]
Copy lvExactSize to shadowVar
For TYP_SIMD12 vars, we need to copy the lvExactSize to the shadowVar
so that we have the right size in lower.
Fixes dotnet/coreclr#8550.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c5164321762be137643b3152c5b1a6800df595f6
Pat Gavlin [Wed, 11 Jan 2017 20:34:21 +0000 (12:34 -0800)]
Fix the GC total memory test.
This test was relying upon the result of GC.GetTotalMemory() returning a
greater number after allocating a large array. However, the array was
not kept live past the call to GC.GetTotalMemory, which resulted in this
test failing under GCStress=0xC (in which a GC is performed after each
instruction). This change adds the requisite call to GC.KeepAlive to
keep the allocated array live enough to be observed by
GC.GetTotalMemory.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b24a580d65272e7e29723d1665eb608dc973e8e
Pat Gavlin [Wed, 11 Jan 2017 19:42:30 +0000 (11:42 -0800)]
Fix dotnet/coreclr#8860.
These failure was an assertion under GC stress due to registers that
were reported as live while containing an invalid GC reference. The root
cause of this assertion was the use of SIMD instructions that did not
kill any GC ref contained in their destination register. This change fixes
the bug by properly killing any GC ref in the destination register for
such an instruction, which required two changes:
- Instructions with the format `IF_RRW_RRW_CNS` were never killing the
destination register. The code that handles this format has been
updated to do so when necessary.
- `pextrw` and `pmovmskb` were not handled correctly in
`emitInsCanOnlyWriteSSE2OrAVXReg`. These instructions may write to
GPRs, so that function must return false when they are passed as
input.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd967163ddb0844f4ebe4356ad9d67b681156737
Joseph Tremoulet [Wed, 11 Jan 2017 19:47:11 +0000 (14:47 -0500)]
Merge pull request dotnet/coreclr#8880 from JosephTremoulet/SimplifyHeapPhiArg
Simplify HeapPhiArg
Commit migrated from https://github.com/dotnet/coreclr/commit/
fb3270f7756830f8f055b4c76831f684908463cb
Thiago Camargos Lopes [Wed, 11 Jan 2017 19:12:22 +0000 (17:12 -0200)]
Add parameterless overloads of TrimStart/TrimEnd (dotnet/coreclr#8834)
Add parameterless overloads of TrimStart/TrimEnd
Commit migrated from https://github.com/dotnet/coreclr/commit/
f00766b583aea7c4ab7515233b2a5054d86f3555
Stephen Toub [Wed, 11 Jan 2017 17:35:06 +0000 (12:35 -0500)]
Merge pull request dotnet/coreclr#8892 from stephentoub/enumeq_ser
Fix deserialization of EnumEqualityComparer
Commit migrated from https://github.com/dotnet/coreclr/commit/
b345a55d10dc7227558f71191ef8519e0e6bdaff
Hyeongseok Oh [Wed, 11 Jan 2017 14:37:21 +0000 (23:37 +0900)]
[ARM32/Linux] Fix cross-architecture build error: T_CONTEXT (dotnet/coreclr#8888)
confusion of T_CONTEXT and CONTEXT in projects
- cee_dac
- gc_wks
related issue: dotnet/coreclr#8885
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf047369a4f0450b1045d75542df5b8702b8cf46
Stephen Toub [Wed, 11 Jan 2017 13:58:53 +0000 (08:58 -0500)]
Fix deserialization of EnumEqualityComparer
Its deserialization ctor is getting removed by the rewriter, causing deserialization of its instances to fail.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1eef9df849527d4471737407140f20192e24f018
Stephen Toub [Wed, 11 Jan 2017 13:52:58 +0000 (08:52 -0500)]
Merge pull request dotnet/coreclr#8868 from stephentoub/linkedcts_array
Remove array allocation from CTS.CreateLinkedTokenSource
Commit migrated from https://github.com/dotnet/coreclr/commit/
b2b63a82592e433fc4d1a36bbf7ea79819af31f8
Li Tian [Wed, 11 Jan 2017 07:32:57 +0000 (23:32 -0800)]
fix format error
Commit migrated from https://github.com/dotnet/coreclr/commit/
eecbbbf769a1f2f35f4994da4b72f2f57703a510
Li Tian [Wed, 11 Jan 2017 06:09:47 +0000 (22:09 -0800)]
fix comments, assertion failure in crossgen mscorlib
Commit migrated from https://github.com/dotnet/coreclr/commit/
ec2f1deecb4f567de2c0028b40e4988b4e6ddf3a
Andy Ayers [Thu, 1 Dec 2016 02:16:17 +0000 (18:16 -0800)]
JIT: Finally Optimizations
Adds two optimization for try-finallys: empty finally removal and
finally cloning.
Empty finally removal identifies trivially empty finally clauses and
removes the entire try-finally EH region. COde in the try is "promoted"
to be in the parent EH region (or method region). Empty finallys often
appear after inlining empty Dispose methods. Removing a try-finally with
an empty finally both reduces code size and improves code speed.
Finally cloning duplicates the code for the finally and 'inlines' it
along one of the normal exit paths from the try. This improves code
speed in the typical case where there is no exception raised while
the try is active. It generally increases code size slightly. However,
finallys are rare enough that the overall code size increase across
all methods is quite small. The jit will clone most finallys, provided
they are not too large, and are not contained in or contain other EH
constructs. If a try contains multiple exit paths only the final "fall
through" path will be optimized.
These optimizations are enabled for all target architectures. Finally
cloning is currently disabled for desktop CLR because more work is needed
to support thread abort.
More details on both optimizations can be found in the design document
added as part of this commit.
In debug builds, finally cloning can be selectively disabled or enabled
by setting COMPlus_JitEnableFinallyCloning to 0 or 1 respectively. This
config setting can thus be used override the default behavior (cloning
enabled for CoreCLR, disabled otherwise) for diagnostic or testing purposes.
Closes dotnet/coreclr#1505. Closes dotnet/coreclr#8065.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f2a2d9e1bd210b463fa929bab786e9b3529853f8
sandreenko [Wed, 11 Jan 2017 01:12:52 +0000 (17:12 -0800)]
Merge pull request dotnet/coreclr#8862 from sandreenko/ReversePInvoke-encoding-in-gc
SetReversePInvokeFrameSlot into gcInfo for reversePInvoke
Commit migrated from https://github.com/dotnet/coreclr/commit/
8adfff094df36eaf0a62f506f63d75ff6cf3527f
Sedar Gokbulut [Wed, 11 Jan 2017 00:54:16 +0000 (16:54 -0800)]
Add Microsoft.NETCore.Native package (2nd attempt) (dotnet/coreclr#8882)
* Adding Microsoft.NETCore.Native package (dotnet/coreclr#8791)
* "Adding Microsoft.NETCore.Native package"
* Adding generic linux configuration to Microsoft.NETCore.Native package
* Fixing the OSX pkgproj of Microsoft.NETCore.Native to include S.Globalization.Native.dylib and not .so
* Fixing the osx release build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
decdf7d5a2ad1b8163d5d6756a1c43a6a028f438
Li Tian [Wed, 11 Jan 2017 00:52:34 +0000 (16:52 -0800)]
rename, use getSIMDInstructionSet()
Commit migrated from https://github.com/dotnet/coreclr/commit/
c0627f858f2dd28f89374bfc079034fc3d15d954
Jonghyun Park [Wed, 11 Jan 2017 00:48:43 +0000 (09:48 +0900)]
[x86/Linux] Fix WIN64EXCEPTIONS build error (dotnet/coreclr#8629)
* Move GetUnwindInfo and GetNumberOfUnwindInfos into the real code header
This commit fixes dotnet/coreclr#8342.
* Use WIN64EXCEPTIONS instead of _TARGET_X86_
* Revise FaultingExceptionFrame
This commit revises FaultingExceptionFrame to support WIN64EXCEPTIONS in
x86/Linux port.
* Add RUNTIME_FUNCTION__EndAddress as NYI
* Revise regdisp.h
* Revise eetwain.h
* Comment out exinfo.cpp if WIN64EXCEPTIONS is defined
* Revises excep.cpp
* Fix mistmatch in ThrowControlForThread defintion
* Revises cgenx86.cpp
* Disable SEH-based exception handlers when WIN64EXCEPTIONS is defined
* Revise stackwalk.cpp
* Revise jitinterface.cpp
* Revise readytorun.h
* Revise dbgipcevents.h
* Revise zapcode.cpp
* Revise clrnt.h
* Fix Windows build error
* Mark FaultingExceptionFrame::UpdateRegDisplay as NYI
* Revise per feedback
* Revert #if defined(..) as #ifdef
* Fix style changes
* Fix style changes
* Remove #undef _TARGET_X86_
* 2nd attempt to fix Windows build error
* Revise per feedback
* Revert the chagnes in clrdefinitions.cmake and add BIT32 in CMakeLists.txt
* Use !BIT64 instead of BIT32
* Include exceptionhandling.cpp and gcinfodecoder.cpp in build
This commit includes exceptionhandling.cpp and gcinfodecoder.cpp in
build, and fixes related compile errors.
* Fix COMPlus_EndCatch undefined reference
* Fix build error
* Fix GcInfoDecoder-related undefined references
* Fix AdjustContextForVirtualStub undefined reference
* Fix GetCallerSP undefined reference
* Fix ResetThreadAbortState undefined reference
* Attempt to fix Windows build error
* Fix CLRNoCatchHandler undefined reference
* Another attemp to fix Windows build error
* Fix GetXXXFromRedirectedStubStackFrame undefined references
* Fix Windows Build Error
* Add RtlpGetFunctionEndAddress and RtlVirtualUnwind as NYI
* Fix undefined references on JIT helpers
* Enable Dummy Application Run with WIN64EXCEPTIONS
* Revert "Move GetUnwindInfo and GetNumberOfUnwindInfos into the real code header"
This reverts commit dotnet/coreclr@
c2bad85ac1136be3c6fb6ad7eedc5b3814b2ab29.
* Use indirect code header when WIN64EXCEPTIONS is enabled
* Port 'SyncRegDisplayToCurrentContext' and 'FillRegDisplay'
* Revise style 'RUNTIME_FUNCTION__SetUnwindInfoAddress'
* Extract out HandlerData from #ifdef region
* Add UNIXTODO
* Add UNIXTODO
* Port 'GetRegdisplayReturnValue'
* Fix incorrect comment
* Remove messages that mentions WIN32EXCEPTIONS
* Revise AdjustContextForWriteBarrier
* Port 'FaultingExceptionFrame::UpdateRegDisplay'
* Extract out 'AdjustContextForVirtualStub' and 'CLRNoCatchHandler' from #ifdef region
* Merge two #ifdef regions
* Set WIN64EXCEPTIONS as a default for x86/Linux
* Remove unnecessary #ifdef from ThrowControlForThread
* Remove unnecessary stubs
* Add Dependency Check between Compile Flags
* Revise per feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
2fc44782c783f363c1a98e0767f6fa65b5548c95
Carol Eidt [Wed, 11 Jan 2017 00:20:41 +0000 (16:20 -0800)]
Merge pull request dotnet/coreclr#8881 from CarolEidt/FixPutArgStk
Fix handling of PutArgStk
Commit migrated from https://github.com/dotnet/coreclr/commit/
09c95bfa26420b7f29d04b5d47a06cf52f430ffe
SaeHie Park [Tue, 10 Jan 2017 23:43:23 +0000 (08:43 +0900)]
[x86/Linux] Fix generic context(hidden arg) position (dotnet/coreclr#8848)
This fixes how to handle generic context position in x86 by num of arguments
Commit migrated from https://github.com/dotnet/coreclr/commit/
b1586fb32ae6bbb37966952c10308b328021db43
SaeHie Park [Tue, 10 Jan 2017 23:42:12 +0000 (08:42 +0900)]
[x86/Linux] Introduce UNIX_X86_ABI definition (dotnet/coreclr#8863)
Add UNIX_X86_ABI definition for Unix/Linux specific ABI parts
First will be for 16 byte stack alignment codes
Commit migrated from https://github.com/dotnet/coreclr/commit/
7bb52294ab9d555d773eb5f64e2fbd876d1a5dff
Carol Eidt [Tue, 10 Jan 2017 22:19:46 +0000 (14:19 -0800)]
Updates based on PR review.
Commit migrated from https://github.com/dotnet/coreclr/commit/
589bf0aed4e69685e976e69678731d774ebaa05c
Li Tian [Tue, 10 Jan 2017 22:07:52 +0000 (14:07 -0800)]
fix format error
Commit migrated from https://github.com/dotnet/coreclr/commit/
3fdc10a616d6e80024531a66597c27181916e58d
Pat Gavlin [Tue, 10 Jan 2017 22:04:12 +0000 (14:04 -0800)]
Merge pull request dotnet/coreclr#8876 from pgavlin/LVAThroughput
Do not rerun LVA if only live-out has changed.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c6c5b6c07618016af9313a1df40d5986952881e5
Carol Eidt [Tue, 10 Jan 2017 21:55:47 +0000 (13:55 -0800)]
Fix handling of PutArgStk
GT_PUTARG_STK doesn't produce a value, so it should have the GTK_NOVALUE flag set.
Although the dstCount was being set to zero by the parent call, localDefUse was also being set, causing a register to be allocated. Fixing this produces a number of improvements due to reuse of constant registers that were otherwise unnecessarily "overwritten" by the localDefUse.
Also on x86, GT_LONG shouldn't be used to pass a long, since GT_LONG should always be a value-producing node. Instead, use the existing GT_FIELD_LIST approach.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8acbaf9c77a19ba833e5150b24c79449f31221fb
Andy Ayers [Tue, 10 Jan 2017 21:42:32 +0000 (13:42 -0800)]
Merge pull request dotnet/coreclr#8867 from AndyAyersMS/BinaryTreesVariant
JIT: Add BinaryTrees benchmark variant
Commit migrated from https://github.com/dotnet/coreclr/commit/
ec54d18ab8102305f1aad7a1a77da67637ee13f0
Li Tian [Tue, 10 Jan 2017 21:42:22 +0000 (13:42 -0800)]
remove unnecessary check in CalleeSavedFltRegs
Commit migrated from https://github.com/dotnet/coreclr/commit/
933257ec88bae2722618c39c0a55ffd2e50c0c48
Joseph Tremoulet [Fri, 30 Dec 2016 16:43:32 +0000 (08:43 -0800)]
Simplify HeapPhiArg
There's no need to have two "modes" of heap phi args; we can simply always
store the SSA number, which has always already been computed and stored in
the bbHeapSsaNumOut field of the pred already when the HeapPhiArg is
created. We weren't using the block for anything other than to fetch the
pred's ssa-out number.
The code to add a try-begin block's predecessors' live-out heap defs to
the try's handlers' phis used to assert that the phi args being added
correspond to different blocks. While they do correspond to different
blocks, it turns out that sometimes those different blocks have the same
live-out heap def. This redundancy hasn't been hurting anything, and
de-duplication could be fairly expensive, so in this change I've simply
removed the assertion and left the redundancy as-is.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6fc16186bd71d97e422f7c527dfa529c0b94bd5e
Sergey Andreenko [Tue, 10 Jan 2017 19:34:40 +0000 (11:34 -0800)]
don't copy LclVarDsc
Commit migrated from https://github.com/dotnet/coreclr/commit/
d4e754281ada1167a493dcdc943b80db2381e344
Pat Gavlin [Tue, 10 Jan 2017 19:12:22 +0000 (11:12 -0800)]
Format code.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9cc550506b4c68a30bc1ff3a6321dbb9f4225838
Sergey Andreenko [Mon, 9 Jan 2017 23:29:05 +0000 (15:29 -0800)]
SetReversePInvokeFrameSlot into gcInfo for reversePInvoke
Commit migrated from https://github.com/dotnet/coreclr/commit/
414c60066cb3b247bd9085124f162bd183530236
Michelle McDaniel [Tue, 10 Jan 2017 18:52:11 +0000 (10:52 -0800)]
Merge pull request dotnet/coreclr#8874 from adiaaida/addx86ReleasePRTrigger
Add x86 Release PR Trigger
Commit migrated from https://github.com/dotnet/coreclr/commit/
59163438e9b7197b1fe3c9d8db464d97a5ac477a
Andy Ayers [Tue, 10 Jan 2017 18:35:59 +0000 (10:35 -0800)]
Match CoreFX update of arm-softfp -> armel (dotnet/coreclr#8875)
Commit migrated from https://github.com/dotnet/coreclr/commit/
02525231fd4f4481eb6db0bb493062246dbb287c
Pat Gavlin [Mon, 9 Jan 2017 20:12:14 +0000 (12:12 -0800)]
Do not rerun LVA if only live-out has changed.
If only the live-out set for a block changes during live variable
analysis, the LVA algorithm does not need to be re-run. As per the
dataflow equations for LVA:
liveOut(block) = union(liveIn(s) for all s in successors(block))
Thus, unless a change to the live-out set for a block propagates through
to a change to the live-in set for that block, it will not affect the
live-in/out sets of any of its predecessors and liveness need not be
re-run.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4b2c59bcee02ea95844abfe00e86b1cb7adfdd0f
Michelle McDaniel [Tue, 10 Jan 2017 17:48:49 +0000 (09:48 -0800)]
Add x86 Release PR Trigger
Currently, only checked runs can be triggered for x86. This adds a trigger
for release runs as well.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee9a8486528f40fbf571b9ca0c6dd3c02a17862e