Jarret Shook [Wed, 16 Nov 2016 23:59:57 +0000 (15:59 -0800)]
Merge pull request dotnet/coreclr#8146 from jashook/test_update_arm64
Update arm64 tests used by the CI
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f46e5ddd7d8803f533efb3e62c246bb0003cd91
Rahul Kumar [Wed, 16 Nov 2016 23:42:56 +0000 (15:42 -0800)]
Merge pull request dotnet/coreclr#8147 from rahku/reflection
Expose MethodBase.IsSecuritySafeCritical
Commit migrated from https://github.com/dotnet/coreclr/commit/
e1a6a4de6c484bfaf443d9e5a6f40107c3f44b36
Rahul Kumar [Wed, 16 Nov 2016 21:38:38 +0000 (13:38 -0800)]
Expose MethodBase.IsSecuritySafeCritical
Commit migrated from https://github.com/dotnet/coreclr/commit/
e40a56feb2b2fb0e14bf57c9d249e361cb80811d
Dan Moseley [Wed, 16 Nov 2016 21:13:22 +0000 (13:13 -0800)]
Update IssuesFeedbackEngagement.md
Commit migrated from https://github.com/dotnet/coreclr/commit/
124754f2f5382f2781db8f132e3c89d21b56600b
Koundinya Veluri [Wed, 16 Nov 2016 20:55:53 +0000 (12:55 -0800)]
Expose a member of StrongNameKeyPair, fix bug in SynchronizationContext (dotnet/coreclr#8142)
Related to dotnet/corefxdotnet/coreclr#11636
Related to dotnet/corefxdotnet/coreclr#11808
Commit migrated from https://github.com/dotnet/coreclr/commit/
3baf3a71dfa8a1504efd54973fe7ae5aedef0e13
Dan Moseley [Wed, 16 Nov 2016 20:55:45 +0000 (12:55 -0800)]
Fixed string Join method
Fixed string Join(string separator, params object[] values) method.
Calling string.Join(",", null, 1, 2, 3); return empty string but should ",1,2,3".
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6e5a7fd2deaf73cb45ad82474b9e4beee7883a4
jashook [Wed, 16 Nov 2016 19:00:30 +0000 (11:00 -0800)]
Update arm64 tests used by the CI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0546743b83506e5d048a4996014df3c8fdccc2c0
Michelle McDaniel [Wed, 16 Nov 2016 17:48:23 +0000 (09:48 -0800)]
Merge pull request dotnet/coreclr#8144 from adiaaida/formatArtifacts
Fix the path to build artifacts for formatting
Commit migrated from https://github.com/dotnet/coreclr/commit/
60254333e47e432691734ff8f14a8799842d5357
Michelle McDaniel [Wed, 16 Nov 2016 17:45:49 +0000 (09:45 -0800)]
Fix the path to build artifacts for formatting
Commit migrated from https://github.com/dotnet/coreclr/commit/
967f4598f1ba31a4208253ce93f1d700abd950b0
Sean Gillespie [Wed, 16 Nov 2016 17:34:57 +0000 (09:34 -0800)]
Enable GCToOSInterface to be defined on the GC side of the GC interface (dotnet/coreclr#8121)
* Re-introduce changes lost in a merge conflict
* Enable GCToOSInterface to be defined behind the GC interface
when building the GC in standalone mode. Provide a skeleton Windows
implementation and the framework for a Unix implementation.
* Address code review feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
bb9f30e4658342f83bb3b5639ae24ec92e0a1d2a
Tarek Mahmoud Sayed [Wed, 16 Nov 2016 01:35:36 +0000 (17:35 -0800)]
Full support of idn mapping (dotnet/coreclr#8134)
* Enable full implementation of IdnMapping in corelib
* Add missing resources
Commit migrated from https://github.com/dotnet/coreclr/commit/
2c0a2c05ba82460a8d8a4b1e2d98e908e59d5d54
Pat Gavlin [Wed, 16 Nov 2016 01:00:10 +0000 (17:00 -0800)]
Merge pull request dotnet/coreclr#8135 from pgavlin/fixExtendPtrVN
Fix value numbering for FieldSeqStore::NotAField.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c917228c41b812e10ae7c9610570c205e17e13cf
Pat Gavlin [Wed, 16 Nov 2016 00:19:57 +0000 (16:19 -0800)]
Format code.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b4d13d5f8b2676c8bc07a80bc422ef9c30d747a3
jorive [Tue, 15 Nov 2016 23:25:52 +0000 (15:25 -0800)]
Changing JIT perf test names to fix how they are organized on BenchView (dotnet/coreclr#8083)
* Changing JIT performance tests' names to fix how tests are organized on BenchView.
* Adding changes based on PR suggestions.
- Add double quotes on cmd script
- Keep name casing consistent for the Benchstone benchmarks.
* Updating datacontractxml value to match new class name.
* Removing an extra / on the xmlns string.
* Making sure we are getting latest BenchView tools.
- Changed where BenchView tools are installed to (from C:\tools to %WORKSPACE%)
- Check if the tools already exist, if so, delete them and download them again.
Commit migrated from https://github.com/dotnet/coreclr/commit/
164b3f568209bdbe3ae40477decfb8c2e0e22382
Bruce Forstall [Tue, 15 Nov 2016 23:25:05 +0000 (15:25 -0800)]
Merge pull request dotnet/coreclr#8110 from BruceForstall/FixLIRCallArgDumping
Fix the arg name/number dumping for call args in LIR
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd16499452a87cf75dbc1d64f3cc746a7ddcad9a
Pat Gavlin [Tue, 15 Nov 2016 22:28:30 +0000 (14:28 -0800)]
Fix value numbering for FieldSeqStore::NotAField.
Before this change, value numbering produced the same value number for
each occurrence of `FieldSeqStore::NotAField`. This semantics is not
logically consistent with the semantics of `NotAField`, however:
`NotAField` indicates that we cannot reason about the address expression
that it annotates, therefore we cannot reason about the value stored at
the corresponding location. A recent change to admit the VN for
`NotAField` in `ExtendPtrVN` exposed SBCG due to this mismatch in
semantics: distinct array elements were assigned the same value number
because each had the same base coupled with the `NotAField` VN.
This change revises the representation of `NotAField` during value
numbering: instead of reusing the same value number for each
occurrence of `NotAField`, each occurrence is instead assigned a new,
unique value number. These value numbers are represented using a new
chunk attribute to retain the ability to decide whether or not a value
number represents `NotAField` without the use of a more heavyweight map
(e.g. a `VNMap`).
Fixes dotnet/coreclr#8133.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cfc122c62f1f00dafb2950d103275839f0dcb3a1
Stephen Toub [Tue, 15 Nov 2016 22:22:53 +0000 (17:22 -0500)]
Merge pull request dotnet/coreclr#8125 from stephentoub/divrem_perf
Improve Math.DivRem performance
Commit migrated from https://github.com/dotnet/coreclr/commit/
68e3e94374906bfef85de4881967aa313e9c6a6c
Koundinya Veluri [Tue, 15 Nov 2016 21:08:41 +0000 (13:08 -0800)]
Expose members of ExecutionContext and AsyncFlowControl (dotnet/coreclr#8107)
Expose members of ExecutionContext and AsyncFlowControl
- Fix ExecutionContext.Capture and AsyncFlowControl.Undo when flow is suppressed
- Expose deserialization constructor for ExecutionContext
Commit migrated from https://github.com/dotnet/coreclr/commit/
2246c1ff94cbd84df83e5308c81a1d1018c3f154
John Chen [Tue, 15 Nov 2016 20:44:10 +0000 (12:44 -0800)]
Merge pull request dotnet/coreclr#8131 from JohnChen0/xmm
Fix XMM register count in CONTEXT_SetThreadContextOnPort in PAL
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4c1915a833fadbf4e47c2bb31b425049d048343
Dan Moseley [Tue, 15 Nov 2016 20:00:13 +0000 (12:00 -0800)]
Merge pull request dotnet/coreclr#8124 from martijnhoekstra/doc-aggex
fix grammar for AggregateException.Flatten
Commit migrated from https://github.com/dotnet/coreclr/commit/
59c9e61eb49aad0f5a1306d13e08731b7669fcbe
John Chen (CLR) [Tue, 15 Nov 2016 19:09:20 +0000 (11:09 -0800)]
Fix XMM register count in CONTEXT_SetThreadContextOnPort in PAL
Commit migrated from https://github.com/dotnet/coreclr/commit/
e88fc98866433eb053160f50684ca26208953875
Jarret Shook [Tue, 15 Nov 2016 18:10:11 +0000 (10:10 -0800)]
Merge pull request dotnet/coreclr#8127 from jashook/arm64_post_build_script
Change over from the old arm64 scripting.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ecc88a6a4d8fe7cba1905f8f548c5a1eef603db0
jashook [Tue, 15 Nov 2016 01:48:56 +0000 (17:48 -0800)]
Change over from the old ar64 scripting.
This change moves away from hosting all of scripts on the Z:\ drive.
The share that used to be shared between the x64 machines and the
arm64 devices. It removes all the old scripting for one python script
arm64_post_build.py, which is responsible for setup of dotnet and
launching
the x64_client.
Commit migrated from https://github.com/dotnet/coreclr/commit/
896858eb63b455588976d8d35ee8b4e750db420b
Michelle McDaniel [Tue, 15 Nov 2016 15:59:56 +0000 (07:59 -0800)]
Merge pull request dotnet/coreclr#8120 from adiaaida/fixDebuggerVarargs
Add special handling of varargs for x86 debugger
Commit migrated from https://github.com/dotnet/coreclr/commit/
294bb94d18cc8f9d13ae69f51e002f31224d4bdd
Igor Kulaychuk [Tue, 15 Nov 2016 14:55:53 +0000 (17:55 +0300)]
Fix crash in FunctionMemberPtrArrayHolder destructor (dotnet/coreclr#8113)
Some elements in FunctionMember array might not be initialized
and contain garbage. This leads to crash when elements are being deleted.
Move array allocation inside FunctionMemberPtrArrayHolder class
and initialize all array elements to nullptr.
Commit migrated from https://github.com/dotnet/coreclr/commit/
de9e159ce0b1abad260100d447071c3377d2f34c
SaeHie Park [Tue, 15 Nov 2016 14:49:02 +0000 (23:49 +0900)]
clean build-roofs and add lldb option (dotnet/coreclr#8123)
- clean unused __MachineTriple
- add indents to case
- add lld 3.6 or 3.8 as option
Commit migrated from https://github.com/dotnet/coreclr/commit/
301ec423beaf8f31fe6172a846ec552c2cb9a14e
Stephen Toub [Tue, 15 Nov 2016 14:36:38 +0000 (09:36 -0500)]
Use Math.DivRem in another place in mscorlib
Went through all uses of % looking for places DivRem could be used. This looks like it's the only one of note.
Commit migrated from https://github.com/dotnet/coreclr/commit/
64edfc9b668d2f4af8c32d7dda2e64e776b40af1
Stephen Toub [Tue, 15 Nov 2016 12:28:20 +0000 (07:28 -0500)]
Improve Math.DivRem performance
Until the JIT is able to eliminate one of the two idiv operations, using a multiplication and subtraction is measurably faster than an extra division.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bd1f21d17c439481d7bc2a5219779e2474419a96
Martijn Hoekstra [Tue, 15 Nov 2016 12:24:05 +0000 (13:24 +0100)]
fix grammar for AggregateException.Flatten
The old phrasing wasn't gramatically correct. It's somewhat
difficult to find a concise summary
Commit migrated from https://github.com/dotnet/coreclr/commit/
463aca61eb527ac86f111d6e2e6c5519c84db850
Dan Moseley [Mon, 14 Nov 2016 23:47:55 +0000 (15:47 -0800)]
Reduce variable scope (dotnet/coreclr#8021)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7bd7335b34b3e4ee650b5db4991d922e3fbc56ea
chcosta [Mon, 14 Nov 2016 23:17:54 +0000 (15:17 -0800)]
Merge pull request dotnet/coreclr#8073 from dotnet/enablebinclash
Enable binclash logger
Commit migrated from https://github.com/dotnet/coreclr/commit/
41f042f71c6d70d08813a9d5068b0a1918176a2d
Pat Gavlin [Mon, 14 Nov 2016 23:15:34 +0000 (15:15 -0800)]
Merge pull request dotnet/coreclr#8086 from pgavlin/VSO278523
Admit more dest addresses in block assign value-numbering.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5638a742043e2698a050e7970d4917b5de5bff3
Pat Gavlin [Fri, 11 Nov 2016 18:20:59 +0000 (10:20 -0800)]
Admit more dest addresses in block assign value-numbering.
Internal testing revealed an assertion when computing the value number
for block assignments: the VN framework expected any block assignments
to a tracked lclVar to have a destination address of the form
`(addr (lclVar))` or `(addr (lclFld))`. However, the check that it
uses to determine whether or not a block assignment targets a lclVar
also admits addresses formed by some combination of adds of constants
to these patterns (e.g. `(add (const 4) (add (addr lclVar) (const 4)))`.
This fix admits these additional patterns in value numbering by allowing
`ExtendPtrVN(GenTree*, GenTree*)` to supply `NotAField` to
`ExtendPtrVN(GenTree*, FieldSeqNode*)`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6eded26022145c80bf6309e59313a85d8a09f8d
Michelle McDaniel [Mon, 14 Nov 2016 21:44:06 +0000 (13:44 -0800)]
Add special handling of varargs for x86 debugger
On x86, stack arguments must be accessed via the varargs cookie for
varargs. Since the functions would be identical, this change moves the
code from codegenlinear to codegencommon to fix vararg argument
handling in the debugger.
Fixes VSO 284774.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3941d170a53c5d63c5da35c123f9d22cc62f4616
Bruce Forstall [Mon, 14 Nov 2016 03:17:36 +0000 (19:17 -0800)]
Fix the arg name/number dumping for call args in LIR
Use the arg number in the arg info table. Before this, I saw cases
where the args were named: arg0, arg1, arg1, arg3, instead of:
arg0, arg2, arg1, arg3, for example.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4535df67481edeeefbed21efcaceaf4a504ebcc9
Bruce Forstall [Mon, 14 Nov 2016 21:44:06 +0000 (13:44 -0800)]
Merge pull request dotnet/coreclr#8111 from BruceForstall/FixTestNewlines
Don't generate explicit newlines in SIMD tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
152550bd09144a061dcb1d0675a9859923032aa5
chcosta [Mon, 14 Nov 2016 21:40:51 +0000 (13:40 -0800)]
Merge pull request dotnet/coreclr#8115 from chcosta/updatebuildtools
Update buildtools to version 01008-01
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4a36d27e4ea7ce177af7400b5727f68fcbcb90d
Pat Gavlin [Mon, 14 Nov 2016 21:10:52 +0000 (13:10 -0800)]
Merge pull request dotnet/coreclr#8031 from pgavlin/VSO283795
Do not fold `(x + null)` in certain cases.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8914cb0fb1b512e77343c3006a95dd1b7eef4197
Sivarv [Mon, 14 Nov 2016 19:07:36 +0000 (11:07 -0800)]
Merge pull request dotnet/coreclr#8101 from sivarv/rmwOpt
Generate "inc/dec [mem]" instead of "add/sub [mem], 1" for Read-Modify-Write (RMW) operations.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f227ce8f53882520fba9ad383f5740e5daecc0a
Pat Gavlin [Mon, 14 Nov 2016 19:02:12 +0000 (11:02 -0800)]
Fix test exclusions.
The new regression test should only be disabled for builds that use the
legacy backend.
Commit migrated from https://github.com/dotnet/coreclr/commit/
62f116de0a4752046ab951312b5d242aed16f12d
Rahul Kumar [Mon, 14 Nov 2016 18:17:28 +0000 (10:17 -0800)]
Merge pull request dotnet/coreclr#8100 from rahku/reflection
Expose Assembly::GetFile(s) apis
Commit migrated from https://github.com/dotnet/coreclr/commit/
d67e1627158ff5c973b21faf9fd03ebbb49f4679
Christopher Costa [Mon, 14 Nov 2016 16:40:16 +0000 (08:40 -0800)]
Update buildtools to version 01008-01
Commit migrated from https://github.com/dotnet/coreclr/commit/
b30be6971ce58f87fd15478fc62b0f581cf4cae4
Alexander Radchenko [Mon, 14 Nov 2016 15:58:58 +0000 (22:58 +0700)]
Fixed string Join method
Fixed string Join(string separator, params object[] values) method.
Calling string.Join(",", null, 1, 2, 3); return empty string but should ",1,2,3".
Commit migrated from https://github.com/dotnet/coreclr/commit/
976519d243e28ced430efddbfc932390f3b37528
Gaurav Khanna [Mon, 14 Nov 2016 05:21:07 +0000 (21:21 -0800)]
Merge pull request dotnet/coreclr#8108 from gkhanna79/Arm32Test
Enable WinArm32 P1 Test Build
Commit migrated from https://github.com/dotnet/coreclr/commit/
32fa4911074bf95a30f7fa1828701fb920af91c6
Bruce Forstall [Mon, 14 Nov 2016 03:20:55 +0000 (19:20 -0800)]
Don't generate explicit newlines in SIMD tests
Use Console.WriteLine() instead.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ba0ed89958b2c1185b4dc6aba75598d9b542f90e
Gaurav Khanna [Sun, 13 Nov 2016 23:47:11 +0000 (15:47 -0800)]
Enable WinArm32 P1 Test Build
Commit migrated from https://github.com/dotnet/coreclr/commit/
ec01f8b6cc44b3fb89933dc1008bfb6a0217727c
Andy Ayers [Sun, 13 Nov 2016 22:15:14 +0000 (14:15 -0800)]
Inliner: ensure all statements have an inline context (dotnet/coreclr#8064)
* JIT: Retype fgMorphStmt and related variables
There are quite a few variables typed as `GenTreePtr` that must point
at statements -- for instance `fgMorphStmt`. Retype these as `GenTreeStmt*`.
Cleanup dereferences which no longer require a `gtStmt`.
* Inliner: ensure all statements have an inline context
We would previously allow some statements inserted by the inliner
"between" the caller and callee to have a null inline context. This
lack of context could lead to incomplete or misleading inline trees
if the inserted code included calls. In particular some failed inlines
might not show up in the trees.
Set the context for these inserted statements to be the context for the
call being inlined (thus they logically "belong" to the caller).
Commit migrated from https://github.com/dotnet/coreclr/commit/
445405d84034564a6433074e0f920f74105ba499
Rahul Kumar [Sun, 13 Nov 2016 17:34:58 +0000 (09:34 -0800)]
Add implementation for AssemblyName::EscapedCodeBase (dotnet/coreclr#8072)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b28f557ee79d70a83e299d6c83a2c803139edba2
John Chen [Sun, 13 Nov 2016 00:20:14 +0000 (16:20 -0800)]
Remove conflicting proj files (dotnet/coreclr#8090)
Some test cases have both .ilproj and .csproj files, resulting
in a race condition during build. Removing the .csproj files,
as the MSIL versions appear to be the intended ones.
Commit migrated from https://github.com/dotnet/coreclr/commit/
dfd0e4b4e20d00a02fdd412251f6146a639ae33c
Stephen Toub [Sat, 12 Nov 2016 14:19:33 +0000 (09:19 -0500)]
Merge pull request dotnet/coreclr#8085 from stephentoub/daylight_alloc
Avoid allocations in DateTime.Now
Commit migrated from https://github.com/dotnet/coreclr/commit/
ca6ca4746754fa87aff344c32ed4b004ce8746de
Stephen Toub [Sat, 12 Nov 2016 12:51:08 +0000 (07:51 -0500)]
Avoid allocations in DateTime.Now
Every call to DateTime.Now ends up allocating a DaylightTime as it computes the offset from UtcNow. DaylightTime is just a plain old object that stores two DateTimes and a Timespan. Ideally we could just change it to be a struct, but it's public. Instead, this commit adds an internal DaylightTimeStruct, which is the same as DaylightTime except as a value type, and changes some of the internal uses of DaylightTime to instead use DaylightTime. As a result, DateTime.Now is allocation-free.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2457e2b3831d73ff5178961a62f7a6fcc332eceb
Andy Ayers [Sat, 12 Nov 2016 03:52:24 +0000 (19:52 -0800)]
Inliner: updates to random inlining (dotnet/coreclr#8088)
Cache the random state on the InlineStrategy instead of on the compiler
instance so that the state is reinitialized and private to each jit request.
That way the random policy evaluations made compiling one method won't
alter the evaluations for subsequent methods. This should make it somewhat
easier to do A/B comparisons under jit stress when changing the jit.
Make it possible to enable the RandomPolicy outside of stress. This may
prove useful in various randomized inline performance studies or as
a simple stress mode on its own.
Random state seed is built from an external seed value (via JitStress or
JitInlinePolicyRandom) and an internal seed value (method hash), so that
random sequences potentially differ for each method but are deterministic
across runs and changes to the jit.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7697dec7db3e34239ffa33d8867de12f7176e415
Dmitry-Me [Sat, 12 Nov 2016 00:54:37 +0000 (03:54 +0300)]
Remove redundant statement (dotnet/coreclr#7900)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d93a827a2417662e64d55fea252acd49b5b9ebb
sivarv [Sat, 12 Nov 2016 00:41:16 +0000 (16:41 -0800)]
Generate inc/dec [mem] instead of add/sub [mem], 1 for read-modify-write operations.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8753709778f4282b16647946dfe61cfd8f8414e5
Tarek Mahmoud Sayed [Fri, 11 Nov 2016 23:46:47 +0000 (15:46 -0800)]
Enable the rest if TimeZoneInfo APIs (dotnet/coreclr#8096)
Commit migrated from https://github.com/dotnet/coreclr/commit/
38b1f672caeb8f01aa2970c02c06b4ae7fcf06c4
Rahul Kumar [Fri, 11 Nov 2016 20:10:16 +0000 (12:10 -0800)]
Expose Assembly::GetFile(s) apis
Commit migrated from https://github.com/dotnet/coreclr/commit/
b654a3dd2a8dc0190257dd326d651846cd6ce3b6
Matt Ellis [Fri, 11 Nov 2016 22:20:40 +0000 (14:20 -0800)]
Rename gitmirrorfile
Commit migrated from https://github.com/dotnet/coreclr/commit/
17b820f470b22f0d8b8d5cb91257bac2b0bee5b4
Matt Ellis [Fri, 11 Nov 2016 21:52:11 +0000 (13:52 -0800)]
Merge pull request dotnet/coreclr#8087 from ellismg/selective-mirror-sketch
Update .gitmirror metadata
Commit migrated from https://github.com/dotnet/coreclr/commit/
be1710cde6fe0ad16716560f9c8c6c880a248285
Joseph Tremoulet [Fri, 11 Nov 2016 19:37:45 +0000 (14:37 -0500)]
Merge pull request dotnet/coreclr#8001 from JosephTremoulet/UnrollSimd
Enable unrolling of SIMD_LIMIT loops
Commit migrated from https://github.com/dotnet/coreclr/commit/
5ae721ccb6b3746bb42fbc91e8349fa7f4b064d2
Joseph Tremoulet [Fri, 14 Oct 2016 18:53:52 +0000 (14:53 -0400)]
Enable unrolling of SIMD_LIMIT loops
Since the Vector<T> abstraction has a `Count` that is not a
C#-compile-time constant, it encourages use of iteration to
search/aggregate individual elements using symbolic indexing, which in
turn leads to codegen that spills the vector to memory for each element
access, and performs bounds checks for each access. These loops will have
low trip counts that are jit-compile-time constant, and constant indexing
into Vector<T> allows more efficient register-to-register sequences and
bounds-check elision. This change enables RyuJit's loop unroller when
such a loop is discovered, and increases the size threshold to target
optimizing such loops much more aggressively than the unroller's previous
incarnation.
Add a test with a motivating loop to the Performance/CodeQuality/SIMD
suite.
Closes dotnet/coreclr#7843.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e3e7d1ac2e2949479ff64c3de4b6aebe271d1ed4
Joseph Tremoulet [Thu, 10 Nov 2016 21:37:05 +0000 (16:37 -0500)]
Detect overflow in unroller cost computation
Make sure to avoid trying to unroll cases so large as to overlow the cost.
Commit migrated from https://github.com/dotnet/coreclr/commit/
634e3391953123acd61aa3846b25546b97fe1665
Joseph Tremoulet [Fri, 14 Oct 2016 18:47:20 +0000 (14:47 -0400)]
Allow unrolling loops with multiple branches
Lift both the single-exit restriction and the no-internal-branching
restriction. Share some utilities with the loop cloner to facilitate
this (particularly `CloneBlockState` and `fgUpdateChangedFlowGraph`).
Commit migrated from https://github.com/dotnet/coreclr/commit/
705c3375224b7c6d5ed3a195edcec8e2b7a0e9c9
Joseph Tremoulet [Wed, 19 Oct 2016 18:21:07 +0000 (14:21 -0400)]
Unroll loops in inner-to-outer order
There's no need for fixpoint iteration; the loop indices are a pre-order,
so walking them in reverse order will visit inner loops before outer ones.
Commit migrated from https://github.com/dotnet/coreclr/commit/
56dac6e09a732cf371baae2b0d696efb93861824
Joseph Tremoulet [Fri, 14 Oct 2016 18:31:45 +0000 (14:31 -0400)]
Stop expecting ASG_ operators in loop unroller
Expect instead to see arithmetic nodes that are arguments of separate
assign nodes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4251467f9512baededbdbe86d3fcf6d147833727
Andy Ayers [Fri, 11 Nov 2016 19:24:05 +0000 (11:24 -0800)]
Merge pull request dotnet/coreclr#7788 from AndyAyersMS/InlinePins
Inliner: support inlining of methods with pinned locals
Commit migrated from https://github.com/dotnet/coreclr/commit/
c06646d47bc3ccb1580ee4dfef8cdc1b858e28ae
Matt Ellis [Thu, 10 Nov 2016 01:27:35 +0000 (17:27 -0800)]
Update .gitmirror metadata
We no longer have the need to mirror anything into TFS (since we do all
work in the open now) except for the JIT and SuperPMI which want to
continue to use some validation that we can only do out of TFS.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c9157ea5ebc42da7660380601f6b0d6250fe2f1
Koundinya Veluri [Fri, 11 Nov 2016 10:25:31 +0000 (02:25 -0800)]
Merge pull request dotnet/coreclr#8042 from kouvel/Api
Expose some things for ns2.0
Commit migrated from https://github.com/dotnet/coreclr/commit/
388b1487baa32d9550c88997ba5d3368aeaba8b3
Koundinya Veluri [Mon, 7 Nov 2016 03:25:29 +0000 (19:25 -0800)]
Expose some things for ns2.0
Mostly:
- Exposed flow-related methods on `ExecutionContext`
- Enabled and exposed `SynchronizationContext` wait overriding
Realted issues:
- dotnet/corefxdotnet/coreclr#11638
- dotnet/corefxdotnet/coreclr#11633
- dotnet/corefxdotnet/coreclr#11635
- dotnet/corefxdotnet/coreclr#11636
- dotnet/corefxdotnet/coreclr#13484
Commit migrated from https://github.com/dotnet/coreclr/commit/
9c1550e443a73cd072608ea18f846f16441b4db3
John Chen [Fri, 11 Nov 2016 01:49:02 +0000 (17:49 -0800)]
Save registers xmm8..15 on Mac OSX (dotnet/coreclr#8078)
On x64, JIT can generate code that uses all 16 xmm registers.
However, on Mac OSX, we currently only save 8 of these registers.
Thus after a context save/restore, xmm8 through xmm15 are
corrupted. This commit fixes the code to save all 16 xmm
registers. It resolves issue dotnet/coreclr#2266.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b0dad67bc88bd4a45f59e63c6bf9fd5e7eb8596
Tarek Mahmoud Sayed [Fri, 11 Nov 2016 00:58:28 +0000 (16:58 -0800)]
Enable time zone for netstandard1.7 (dotnet/coreclr#8074)
* Expose and reimplement TimeZone class
The change is exposing the missing TimeZone APIs from corelib so can be useded in netstandard 1.7.
The change here is re-implementing CurrentTimeZone class to be simpler and also to make it work for Linux platforms. we used TimeZoneInfo class to reimplement it and also cleaned up all used internal calls as not needed anymore.
* Small delta fix
* Fix the code according to the review comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3ad5db7bf3209a5b0ea341cee19230d2ba0fef5
Mike McLaughlin [Thu, 10 Nov 2016 23:44:11 +0000 (15:44 -0800)]
SOS: Automatically find a managed thread with an exception on Linux/OSX core dumps (dotnet/coreclr#8075)
SOS: Automatically find a managed thread with an exception on Linux/OSX core dumps
To be used in the debugger tests repo for SOS dump testing on Linux/OSX.
Added the "clrthreads -managedexception" option to switch to the first managed thread
that has thrown an exception.
Issue dotnet/coreclr#6518
Commit migrated from https://github.com/dotnet/coreclr/commit/
77a138907acdd6f51de0200a9148676fad7c3cbd
Pat Gavlin [Thu, 10 Nov 2016 22:58:32 +0000 (14:58 -0800)]
Format the code and disable the regression test.
The regression test currently fails due to issue dotnet/coreclr#8077.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1175931349e82199b7511b911920e16be65d6461
Michelle McDaniel [Thu, 10 Nov 2016 22:52:32 +0000 (14:52 -0800)]
Merge pull request dotnet/coreclr#8056 from adiaaida/updateFormattingJobPatch
Create patches in formatting job
Commit migrated from https://github.com/dotnet/coreclr/commit/
1af2a104b0cce89016d79397fe366e2c70956f52
Dan Moseley [Thu, 10 Nov 2016 22:35:55 +0000 (14:35 -0800)]
README.md is the idiomatic approach for github (dotnet/coreclr#8076)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6a2f104cdaba5b947d518b11357c26522b7b298
Michelle McDaniel [Tue, 8 Nov 2016 21:37:20 +0000 (13:37 -0800)]
Create patches in formatting job
In the formatting job, if there are formatting errors, we will run the
formatter in --fix mode and generate a patch which will be uploaded to
azure storage.
Commit migrated from https://github.com/dotnet/coreclr/commit/
503de5e8dde3d996b06db41c0b46617cebbdee11
Rahul Kumar [Thu, 10 Nov 2016 21:46:29 +0000 (13:46 -0800)]
Merge pull request dotnet/coreclr#8046 from rahku/_resolveAssembly
Expose AppDomain::AssemblyResolve
Commit migrated from https://github.com/dotnet/coreclr/commit/
f76e895a504f4f3a93c519218214d70ce277c4db
Christopher Costa [Thu, 10 Nov 2016 19:20:50 +0000 (11:20 -0800)]
Enable binclash logger
Commit migrated from https://github.com/dotnet/coreclr/commit/
9fd7bc41de9700398fb3eedaae172bebd4aa79e1
Rahul Kumar [Tue, 8 Nov 2016 19:13:33 +0000 (11:13 -0800)]
Expose AppDomain::AssemblyResolve
Commit migrated from https://github.com/dotnet/coreclr/commit/
5812c03f214da72df18b41c478d4b4bb8e1bc4c1
Greg G [Thu, 10 Nov 2016 15:03:24 +0000 (16:03 +0100)]
Update IntrospectionExtensions.cs (dotnet/coreclr#8029)
1. A few tweaks were made to follow the [Coding Style](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md).
2. A `null` check was done after doing a simple cast (`(IReflectableType)type`), but `rcType` cannot be `null` (it could only be `null` if a [`as`](https://msdn.microsoft.com/en-us/library/
cc488006.aspx) cast was done).
Commit migrated from https://github.com/dotnet/coreclr/commit/
55a89556b53feeb6fcaa15ae48305994e690f2e0
Justin Van Patten [Thu, 10 Nov 2016 14:58:33 +0000 (06:58 -0800)]
BinaryReader: Use cached default encoding instance (dotnet/coreclr#8017)
A new instance of UTF8Encoding used to be created every time
BinaryReader.ctor(Stream) was called, which created an instance of
UTF8Encoding that has no preamble. However, BinaryReader does not use
the preamble at all, so it doesn't matter if the encoding has a preamble
or not. Thus, the cached Encoding.UTF8 instance can be used (which has a
preamble).
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b71a36e5fdfe8616271828b1c48cf5fe604d07f
dotnet bot [Thu, 10 Nov 2016 07:52:57 +0000 (23:52 -0800)]
Update CoreClr, CoreFx to beta-24709-03, beta-24710-01, respectively (dotnet/coreclr#7922)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e0622498d99d51f008e59dcc2ea8ec0301689bd8
Justin Van Patten [Thu, 10 Nov 2016 04:08:45 +0000 (20:08 -0800)]
Remove unneeded field from BinaryWriter (dotnet/coreclr#8015)
The field only exists in .NET Framework for serialization compat. It
isn't needed on CoreCLR.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b73e06eca188aac213c8f5b03759305bbf4cb429
Justin Van Patten [Thu, 10 Nov 2016 04:08:00 +0000 (20:08 -0800)]
StreamWriter/BinaryWriter: Use same cached encoding instance (dotnet/coreclr#8018)
StreamWriter lazily allocates and caches a UTF8NoBOM instance, while
BinaryWriter always allocates new instances. Instead, the same cached
instance can be shared between both writers.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e83b1863e1a091fa9b7bbab283c2dace3d289bf
Justin Van Patten [Thu, 10 Nov 2016 04:05:11 +0000 (20:05 -0800)]
Avoid repeated delegate allocations in FileStream.FlushAsync (dotnet/coreclr#8048)
Avoid the `Action<object>` allocation on each invocation of
`FileStream.FlushAsync` on Windows. This change makes the Win32
implementation match Unix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d19d2e7d57deee034650a8cc078c4ad93ce03c8
Sujin Kim [Thu, 10 Nov 2016 04:00:22 +0000 (13:00 +0900)]
ARM-CI : Fix segmentation faults on running tests (dotnet/coreclr#8019)
* ARM-CI : Fix segmentation faults on running tests
To make sure the reason of test failure ramdomly( dotnet/coreclr#6298 ),
We checked segmentation faults occurred from mounted rootfs and the multi thread processing.
So I changed root-fs to the archived root-fs and run tests with --sequential option.
PS. The location of root-fs folder was changed from '/opt' wrote on reverted commit(dotnet/coreclr#7991) to '/mnt' for resolving no space issue.
Commit migrated from https://github.com/dotnet/coreclr/commit/
96c6dd093b4a08b2253b235467f2284a489b2e9c
Bruce Forstall [Thu, 10 Nov 2016 03:58:31 +0000 (19:58 -0800)]
Remove unnecessary newline in WriteLine (dotnet/coreclr#8047)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3a93bfde4e2dc161f6436062ee75c99e101c6541
Alex Perovich [Thu, 10 Nov 2016 03:57:13 +0000 (19:57 -0800)]
Add missing ref emit enum members for ns2.0 (dotnet/coreclr#8062)
Commit migrated from https://github.com/dotnet/coreclr/commit/
570530b69106f4523ead97697e22674e02769643
Jeremy Kuhne [Thu, 10 Nov 2016 03:54:36 +0000 (19:54 -0800)]
Add IntPtr constructors to FileStream (dotnet/coreclr#8063)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e0078c327fd61c346583997cf31781622d355e86
Sivarv [Thu, 10 Nov 2016 03:53:24 +0000 (19:53 -0800)]
Don't turn off compCanUseSSE2 on x86 RyuJIT under jit stress. (dotnet/coreclr#8068)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d5c60807c9182290245c266c4f6daac47d2a4a7
Faizur Rahman [Thu, 10 Nov 2016 03:52:41 +0000 (19:52 -0800)]
Port Marshal.GenerateProgIdForType in CoreCLR (dotnet/coreclr#8070)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4652e02e893095da3b03c6ed390b9852534f7b69
Faizur Rahman [Thu, 10 Nov 2016 02:01:15 +0000 (18:01 -0800)]
Merge pull request dotnet/coreclr#8069 from shrah/master
Return Type.GUID for Marshal.GenerateGuidForType in CoreCLR
Commit migrated from https://github.com/dotnet/coreclr/commit/
0878bdf69669f226a450c9a80236b47300e1a79e
Jan Vorlicek [Thu, 10 Nov 2016 01:28:29 +0000 (17:28 -0800)]
Fix missing exports in mscordaccore.so (dotnet/coreclr#8058)
I have recently added some exports to the mscordaccore.so and it was
found that they were not honored and libsos.so got some unresolved
symbols.
I have found that the issue is that unlike for libcoreclr.so, we
were not asking linker to include the whole PAL and so it has
eliminated those functions due to the fact they were not called
from the PAL itself.
This change fixes it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
387613639c271615abae6c69c3344caedfca13b3
Faizur Rahman [Thu, 10 Nov 2016 01:20:37 +0000 (17:20 -0800)]
Return Type.GUID for Marshal.GenerateGuidForType in CoreCLR
Commit migrated from https://github.com/dotnet/coreclr/commit/
c026bdb8321d453f144b4ffce300c2e90386e9ee
Roman Shchekin [Thu, 10 Nov 2016 00:06:40 +0000 (03:06 +0300)]
Memory growth algorithm improvement in coreconsole (dotnet/coreclr#7870)
* Now Append will work properly if strLen is big (for example 3xm_capacity). And value 1.5 is better for memory growth.
* Correct way of calculating 1.5 (without floating point calculation, thanks mikedn)
* After long discussion we decided that simple and aggressive allocation is better for this case
Commit migrated from https://github.com/dotnet/coreclr/commit/
c637c919adcd0c0d7fcd8818810bcb727408fa51
Andy Ayers [Sat, 22 Oct 2016 01:46:50 +0000 (18:46 -0700)]
Inliner: support inlining of methods with pinned locals
The inliner now can inline a subset of methods with pinned locals --
namely those where the language compiler (eg CSC) can determine that a
try/finally is not necessary to ensure unpinning, and where the jit
likewise an determines that a try/finally is likewise not needed in
the root method.
Generally speaking this allows inlining in cases where the inline method
is fairly simple and does not any contain exception handling, and the
call site is not within a try region.
When inlining methods that have pinned locals and also return a value,
the jit ensures that the return value is spilled to a temp so that the
unpins can be placed just after the inlined method body and won't alter
the return value.
Mark FixedAddressValueType as GCStressIncompatible since the "unfixed"
class static may get re-allocated at the same address. This seems to
happen even without these changes but happens much more frequently with
them.
Closes dotnet/coreclr#7774.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c60e68e51a8a09886df5e085986dae76cd74f974
Andy Ayers [Wed, 9 Nov 2016 23:03:23 +0000 (15:03 -0800)]
Inliner: enable inlining of methods with conditional throws (dotnet/coreclr#8038)
* Inliner: enable inlining of methods with conditional throws
Remove inlining limitation for methods that return values and have
conditional throws. This limitation was most likely a vestige of an
older inlining implementation that did not break trees at inline
call sites.
Also removed the now-unused observation and the `seenConditionalJump`
member variable. Merged ifdef blocks in `impInit`.
Ran full desktop testing, no issues.
Enables a handful of inlines in the various code size suites. For the
most part these slightly increase code size but can often shorten the
non-EH paths in the code.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e76da565c106016d604b95f3bb7eadd24ceaf18a
sandreenko [Wed, 9 Nov 2016 22:49:51 +0000 (14:49 -0800)]
Merge pull request dotnet/coreclr#7981 from sandreenko/fix_vn_in_cse
Don't transform GT_SUB tree outside the global morph phase.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a67530b73c422e0158221dde74f2cb38d2aa8d33
Russ Keldorph [Wed, 9 Nov 2016 21:25:23 +0000 (13:25 -0800)]
Merge pull request dotnet/coreclr#8033 from RussKeldorph/nopopup
Disable GUI dialogs for assertion failures on Windows by default
Commit migrated from https://github.com/dotnet/coreclr/commit/
fbf42ae0d137c23eab92de193f1acde4c564cd58
Eric StJohn [Wed, 9 Nov 2016 20:15:06 +0000 (12:15 -0800)]
Merge pull request dotnet/coreclr#8041 from ericstj/updateBuildTools
Update BuildToolsVersion to 01007-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
19aa4d73339aa84ad0967bd91e2621151e7e93a2
Sivarv [Wed, 9 Nov 2016 18:20:47 +0000 (10:20 -0800)]
Merge pull request dotnet/coreclr#8049 from sivarv/lsraAssertFix
If the very first ref position of an interval has a register assignment of RBM_NONE indicate it could also be a regOptional
Commit migrated from https://github.com/dotnet/coreclr/commit/
a144e0480b274bf85dc9ce557c7f8edff3596556