platform/upstream/coreclr.git
7 years agoFix IsSafeToContained. (#14268)
Sergey Andreenko [Tue, 3 Oct 2017 20:38:02 +0000 (13:38 -0700)]
Fix IsSafeToContained. (#14268)

When AliasSet adds a node, it should also add all its nodes that are
executed inside it (marked as contained).

7 years agoJIT: run type equality optimizations earlier (#14244)
Andy Ayers [Tue, 3 Oct 2017 20:29:00 +0000 (13:29 -0700)]
JIT: run type equality optimizations earlier (#14244)

Refactor the type equality optimizations embedded in morph so that they can
also be invoked earlier, in particular, during importation. This allows the
importer to short-circut importing blocks that are provably unreachable. For
instance in generic methods with type specialization (via equality) the jit
will now selectively import just the applicable regions of the method. In some
cases this means the jit may avoid importing EH regions and so remove EH from
a specialized method all together.

Also, generalize the handle compare pattern to look through the handle indirs
that can arise when prejitting.

Running the type opts early also improves jit throughput a little.

Mark the embedded handle indirs as nonfaulting. Would also like to mark
them as invariant, but CSE gets overly enthusiastic and we see bad diffs.

7 years agoEnable CLR Thread Pool via a MSBuild flag (default enabled on Unix)
t-jekor [Wed, 5 Jul 2017 17:44:15 +0000 (10:44 -0700)]
Enable CLR Thread Pool via a MSBuild flag (default enabled on Unix)

This PR completes, adds tests for, and enables the CLR Thread Pool on Unix. It also adds Windows implementations for the low level primitives used in the CLR Thread Pool.

The thread pool is enabled by setting the MSBuild property FeaturePortableThreadPool to true, which is the default on Unix.

Supersedes #4039.
Rebased and squashed replacement for original PR #4124.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoFix build with latest Xcode on OSX (#14282)
Jan Vorlicek [Tue, 3 Oct 2017 20:09:43 +0000 (22:09 +0200)]
Fix build with latest Xcode on OSX (#14282)

* Fix build with latest Xcode on OSX

The latest Xcode 9 cannot successfully build CoreCLR PAL. There are
several issues. First, it complains that min / max macros cannot be defined
in C++ code, since they would collide with the std::min and std::max
functions. Second, some of the headers that PAL includes pull in declarations
of several template classes that we explicitly define in PAL and also
the new operator declaration.

To fix that, I have undefined the min and max macros for PAL and replaced
their usage by the std::min / max functions. I have also removed the manual
declaration of the colliding template classes and new operator and added
inclusion of the proper C++ headers instead.

The PAL was including non-pal safemath.h and to make this change compatible
with it, I have added definition of USE_STL that makes safemath.h include
type_trait from STL instead of our local trimmed copy.

I have also removed some dead code that I have discovered during the process.

Fixes #14279

* Fix build on ARM32 and very recent GLIBCXX

7 years agoMerge pull request #14292 from sdmaclea/PR-ARM64-Unreached
Carol Eidt [Tue, 3 Oct 2017 19:24:49 +0000 (12:24 -0700)]
Merge pull request #14292 from sdmaclea/PR-ARM64-Unreached

[Arm64] Fix TODO-Cleanup add unreached

7 years agoMerge pull request #14027 from mikedn/simd-eq-opt
Carol Eidt [Tue, 3 Oct 2017 19:07:20 +0000 (12:07 -0700)]
Merge pull request #14027 from mikedn/simd-eq-opt

Simplify some relop/jtrue related optimizations

7 years ago[SOS] Use addresses without sign extension in lldb plugin (#14009)
Konstantin Baladurin [Tue, 3 Oct 2017 18:28:06 +0000 (21:28 +0300)]
[SOS] Use addresses without sign extension in lldb plugin (#14009)

lldb doesn't expect sign-extended addresses so we need to convert
them before using with lldb API.

This patch allows to use SOS plugin for core files in lldb on 32-bit
platforms and also fixes output of the 'clrstack -f' command.

7 years ago[x86/Linux] Fix regdisplay initialization in case of WIN64EXCEPTIONS (#14296)
Konstantin Baladurin [Tue, 3 Oct 2017 11:08:06 +0000 (14:08 +0300)]
[x86/Linux] Fix regdisplay initialization in case of WIN64EXCEPTIONS (#14296)

Method Debugger::IsThreadAtSafePlaceWorker for x86 sets values only
for ControlPC and PCTAddr fields of REGDISPLAY but there is assert
in StackFrameIterator::Init that checks that field pCurrentContext
is not NULL if WIN64EXCEPTIONS is defined.

This patch uses FillRegDisplay function to correctly initialize
regdisplay in case of WIN64EXCEPTIONS.

7 years agodelete the old workaround. (#14288)
Sergey Andreenko [Tue, 3 Oct 2017 02:09:01 +0000 (19:09 -0700)]
delete the old workaround. (#14288)

gcc is not supported.

7 years agoMerge pull request #14220 from wateret/ryu-arm-bitcast-cleanup
Bruce Forstall [Mon, 2 Oct 2017 23:29:45 +0000 (16:29 -0700)]
Merge pull request #14220 from wateret/ryu-arm-bitcast-cleanup

[RyuJIT/arm32] Code cleanup

7 years ago[Arm64] Fix TODO-Cleanup add unreached
Steve MacLean [Mon, 2 Oct 2017 22:41:07 +0000 (18:41 -0400)]
[Arm64] Fix TODO-Cleanup add unreached

7 years agoImprove runtest.sh concurrency (#14036)
Hanjoung Lee [Mon, 2 Oct 2017 23:22:48 +0000 (08:22 +0900)]
Improve runtest.sh concurrency (#14036)

* Imporove runtest.sh concurrency

`runtest.sh` runs next tests immediately after any of child processes is done

* Fix runtest.sh getting number of processors

For linux, check if `nproc` or `getconf` exists
when getting number of processors.

* Add tests that fail with OOM to unsupported list

Add several tests that consumes a lot of memory to unsupported test list(arm32).
This change is temporary until we properly handle these test with memory issue.

7 years agoMerge pull request #14274 from fiigii/vexencoding
Carol Eidt [Mon, 2 Oct 2017 20:44:10 +0000 (13:44 -0700)]
Merge pull request #14274 from fiigii/vexencoding

[RyuJIT] Fix VEX.vvvv for cvtss2sd and cvtsd2ss

7 years agoFix a jump over variable initialization (#14286)
Sean Gillespie [Mon, 2 Oct 2017 20:27:31 +0000 (13:27 -0700)]
Fix a jump over variable initialization (#14286)

7 years agoMerge pull request #14181 from ViktorHofer/MutexCodeCleanup
Viktor Hofer [Mon, 2 Oct 2017 19:54:19 +0000 (21:54 +0200)]
Merge pull request #14181 from ViktorHofer/MutexCodeCleanup

Mutex code cleanup and removal of unused types

7 years agoWorkaround GetSystemTimePreciseAsFileTime inaccuracies (#14283)
Stephen Toub [Mon, 2 Oct 2017 19:17:58 +0000 (15:17 -0400)]
Workaround GetSystemTimePreciseAsFileTime inaccuracies (#14283)

* Workaround GetSystemTimePreciseAsFileTime inaccuracies

On misconfigured systems, GetSystemTimePreciseAsFileTime may drift quickly from GetSystemTimeAsFileTime.  We want to use the former, though.  As a workaround/heuristic, when checking whether we have GetSystemTimePreciseAsFileTime, invoke both and ensure they're "close", falling back to GetSystemTimeAsFileTime if it seems like the precise variant has run away.

* Update comment

7 years agoSmall bug fixes on "perf.groovy" (#14259)
José Rivero [Mon, 2 Oct 2017 16:53:20 +0000 (09:53 -0700)]
Small bug fixes on "perf.groovy" (#14259)

- `submission-metadata` option is `--user-email`, not `--user`
- We need to escape user input. On batch, " -> ""

7 years agoThe !DumpArray sos command emits invalid DML for array elements (#13855)
tvass83 [Mon, 2 Oct 2017 13:27:48 +0000 (15:27 +0200)]
The !DumpArray sos command emits invalid DML for array elements (#13855)

Element Methodtable is reported correctly but for individual elements, the generated DML uses the MT of the array, not the element, thus giving incorrect results
Only value types are affected

0:007> !DumpArray /d 02b16574
Name:        WindowsFormsApplication2_SOS_bug.Test[]
MethodTable: 011c82ec
EEClass:     011c8290
Size:        412(0x19c) bytes
Array:       Rank 1, Number of elements 100, Type VALUETYPE
Element Methodtable: 011c824c
[0] 02b1657c => here is the problem

7 years agoMove JCMP transform to LowerJTrue
Mike Danes [Sun, 1 Oct 2017 10:53:42 +0000 (13:53 +0300)]
Move JCMP transform to LowerJTrue

Unlike many other relop transforms we do this one is only triggerred by the presence of a conditional branch (JTRUE) so it makes more sense to do it when lowering JTRUE nodes, avoids unnecessary calls to TryGetUse.

7 years agoExtend flag reuse optimization to all relops
Mike Danes [Fri, 29 Sep 2017 21:34:07 +0000 (00:34 +0300)]
Extend flag reuse optimization to all relops

7 years agoReimplement compare flags reuse using SETCC/JCC
Mike Danes [Sun, 17 Sep 2017 21:26:58 +0000 (00:26 +0300)]
Reimplement compare flags reuse using SETCC/JCC

7 years agoSimplify SIMD EQ/NE optimization
Mike Danes [Sun, 17 Sep 2017 09:49:10 +0000 (12:49 +0300)]
Simplify SIMD EQ/NE optimization

7 years agoAdding a patch to fix coreclr build for VS 15.5 (using older SDKs). (#14272)
Ahson Ahmed Khan [Sat, 30 Sep 2017 01:56:42 +0000 (18:56 -0700)]
Adding a patch to fix coreclr build for VS 15.5 (using older SDKs). (#14272)

7 years agoFix VEX.vvvv for cvtss2sd and cvtsd2ss
Fei Peng [Sat, 30 Sep 2017 00:35:34 +0000 (17:35 -0700)]
Fix VEX.vvvv for cvtss2sd and cvtsd2ss

7 years agoStompWriteBarrier initialization path refactoring (#14105)
Sergey [Fri, 29 Sep 2017 23:16:44 +0000 (02:16 +0300)]
StompWriteBarrier initialization path refactoring (#14105)

* refactored arm, arm64, amd64 and x86 to signal about icache flush and ee restarts

* refactored gc init stage to stomp write barrier (hence flush icache) only once

* review fixes, care taken of icache invalidation during StompResize

* fixed heap boundaries initialization bug introduced after refactoring gc.cpp

* stylistic review fixe

* global variable rename

* global variable rename once more

7 years agoUpdate build clang/llvm/lldb 3.9 (#14096)
Mike McLaughlin [Fri, 29 Sep 2017 22:54:48 +0000 (15:54 -0700)]
Update build clang/llvm/lldb 3.9 (#14096)

Update build scripts, docs and build pipeline docker images to clang/llvm/lldb 3.9

7 years agoFix spelling errors (#14218)
Borislav Ivanov [Fri, 29 Sep 2017 22:52:46 +0000 (01:52 +0300)]
Fix spelling errors (#14218)

Fix some spelling errors and capitalization.

7 years agoAdd info on loading core dumps in lldb. (#13955)
Mike McLaughlin [Fri, 29 Sep 2017 22:50:10 +0000 (15:50 -0700)]
Add info on loading core dumps in lldb. (#13955)

7 years agoEnable hardware intrinsic in debug and reflection
Fei Peng [Sun, 24 Sep 2017 17:54:56 +0000 (10:54 -0700)]
Enable hardware intrinsic in debug and reflection

7 years agoImplement IsSuppoored for all ISA classes
Fei Peng [Fri, 15 Sep 2017 20:01:13 +0000 (13:01 -0700)]
Implement IsSuppoored for all ISA classes

7 years agoMerge pull request #14265 from MattGal/build_def_updates
Matt Galbraith [Fri, 29 Sep 2017 20:54:11 +0000 (13:54 -0700)]
Merge pull request #14265 from MattGal/build_def_updates

Build definition publishing behavior tweaks

7 years agoBuild definition publishing behavior tweaks
Matt Galbraith [Fri, 29 Sep 2017 20:04:55 +0000 (13:04 -0700)]
Build definition publishing behavior tweaks

7 years ago[RyuJIT/ARM32] hotfix for a regression (#14252)
Hyung-Kyu Choi [Fri, 29 Sep 2017 19:01:16 +0000 (04:01 +0900)]
[RyuJIT/ARM32] hotfix for a regression (#14252)

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years ago[x86/Linux] Fix CopyREGDISPLAY for WIN64EXCEPTIONS (#14254)
Konstantin Baladurin [Fri, 29 Sep 2017 17:15:35 +0000 (20:15 +0300)]
[x86/Linux] Fix CopyREGDISPLAY for WIN64EXCEPTIONS (#14254)

When WIN64EXCEPTIONS is defined, fields pCurrentContextPointers,
pCallerContextPointers, pCurrentContext and pCallerContext of the
REGDISPLAY are used. So we need to fix their values after coping.

7 years ago[x86/Linux][SOS] Fix DumpStack command output on x86 (#14189)
Konstantin Baladurin [Fri, 29 Sep 2017 14:03:17 +0000 (17:03 +0300)]
[x86/Linux][SOS] Fix DumpStack command output on x86 (#14189)

On x86 DumpStack command doesn't print symbol information for
caller and callee. This patch fixes it and make output the same
as on AMD64.

7 years agoAllow cross machine re-crossgen (#14241)
Steve MacLean [Fri, 29 Sep 2017 12:10:32 +0000 (08:10 -0400)]
Allow cross machine re-crossgen (#14241)

7 years ago[x86/Linux] Fix assert in HelperMethodFrame::UpdateRegDisplay (#14235)
Konstantin Baladurin [Fri, 29 Sep 2017 08:08:01 +0000 (11:08 +0300)]
[x86/Linux] Fix assert in HelperMethodFrame::UpdateRegDisplay (#14235)

In some cases during execution of the SOS command 'clrstack -i'
portability assert in HelperMethodFrame::UpdateRegDisplay occurs.
This patch removes this assert and adds corresponding implementation.

7 years agoFixing Retain to return MemoryHandle with correct PinnedPointer (#14248)
Ahson Ahmed Khan [Fri, 29 Sep 2017 03:05:35 +0000 (20:05 -0700)]
Fixing Retain to return MemoryHandle with correct PinnedPointer (#14248)

* Fixing Retain to return MemoryHandle with correct PinnedPointer.

* Make MemoryHandle AddOffset internal.

7 years agoMerge pull request #14247 from rartemev/issue_13420
Roman Artemev [Fri, 29 Sep 2017 02:30:36 +0000 (19:30 -0700)]
Merge pull request #14247 from rartemev/issue_13420

Fixed difference between produced code in CHK and REL modes

7 years agoAdded CopyToAsync overload using default buffer size (#14219)
Kristian Hellang [Fri, 29 Sep 2017 01:12:24 +0000 (03:12 +0200)]
Added CopyToAsync overload using default buffer size (#14219)

* Added CopyToAsync overload using default buffer size

* Address feedback

* Added comment about overrides and argument validation

* Renamed helper method to GetCopyBufferSize

To convey that this method should only be used for
getting a buffer size to be passed to CopyTo{Async}.

7 years agoFixed differenece between produced code in CHK and REL modes
Roman Artemev [Fri, 29 Sep 2017 00:22:08 +0000 (17:22 -0700)]
Fixed differenece between produced code in CHK and REL modes

7 years agoignore GT_ARGPLACE before gtUseNum check. (#14233)
Sergey Andreenko [Thu, 28 Sep 2017 23:16:06 +0000 (16:16 -0700)]
ignore GT_ARGPLACE before gtUseNum check. (#14233)

7 years agoAdd the capability to force JIT options on the SPMI command line. (#14209)
Sergey Andreenko [Thu, 28 Sep 2017 17:37:15 +0000 (10:37 -0700)]
Add the capability to force JIT options on the SPMI command line. (#14209)

expand the grammar for jit{,2}option to -jitoption [force] key=value

7 years ago[x86/Linux] Fix typo in SetDebuggerREGDISPLAYFromREGDISPLAY (#14221)
Konstantin Baladurin [Thu, 28 Sep 2017 16:26:39 +0000 (19:26 +0300)]
[x86/Linux] Fix typo in SetDebuggerREGDISPLAYFromREGDISPLAY (#14221)

Fix typo in SetDebuggerREGDISPLAYFromREGDISPLAY: Esi -> Eax.

7 years agoMerge pull request #14225 from fiigii/falsedependency
Carol Eidt [Thu, 28 Sep 2017 16:00:16 +0000 (09:00 -0700)]
Merge pull request #14225 from fiigii/falsedependency

[RyuJIT] Fix bad VEX encoding to avoid false register dependency

7 years agoJIT: have gtClone handle long constants (#14201)
Andy Ayers [Thu, 28 Sep 2017 14:56:24 +0000 (07:56 -0700)]
JIT: have gtClone handle long constants (#14201)

The `Enum.HasFlag` opt needs to clone the enum values, and they
can be long constants. Make sure `gtClone` handles this case.

Closes #14149.

7 years agoMerge pull request #14232 from BruceForstall/Fix14196
Bruce Forstall [Thu, 28 Sep 2017 05:16:27 +0000 (22:16 -0700)]
Merge pull request #14232 from BruceForstall/Fix14196

Fix issue with HFA altjit api

7 years agofix bad VEX.vvvv to avoid false register dependency
Fei Peng [Wed, 27 Sep 2017 17:33:18 +0000 (10:33 -0700)]
fix bad VEX.vvvv to avoid false register dependency

7 years agoMerge pull request #14192 from sdmaclea/PR-ARM64-JCMP
Brian Sullivan [Thu, 28 Sep 2017 00:28:42 +0000 (17:28 -0700)]
Merge pull request #14192 from sdmaclea/PR-ARM64-JCMP

[Arm64] Add GT_JCMP node

7 years ago[RyuJIT/arm32] Code cleanup
Hanjoung Lee [Wed, 27 Sep 2017 11:04:03 +0000 (20:04 +0900)]
[RyuJIT/arm32] Code cleanup

- Add an assertion for double type arg regs for armel
- Merge two if statements that have same body

7 years agoMerge pull request #14231 from fiigii/fixintrinsic
Viktor Hofer [Wed, 27 Sep 2017 23:10:40 +0000 (01:10 +0200)]
Merge pull request #14231 from fiigii/fixintrinsic

fix bugs from #14164

7 years agoMerge pull request #14234 from dotnet/ConditionLoc
William Godbe [Wed, 27 Sep 2017 23:07:07 +0000 (16:07 -0700)]
Merge pull request #14234 from dotnet/ConditionLoc

Move Condition location in dotnet-trusted-publish

7 years agoMove Condition location in dotnet-trusted-publish
William Godbe [Wed, 27 Sep 2017 23:03:35 +0000 (16:03 -0700)]
Move Condition location in dotnet-trusted-publish

7 years agonit pr feedback
Viktor Hofer [Wed, 27 Sep 2017 22:52:49 +0000 (00:52 +0200)]
nit pr feedback

7 years agoFix issue with HFA altjit api
Bruce Forstall [Wed, 27 Sep 2017 21:42:04 +0000 (14:42 -0700)]
Fix issue with HFA altjit api

One case in the Interop\ArrayMarshalling\ByValArray\MarshalArrayByValTest\MarshalArrayByValTest.cmd
test marshals an array of strings as members of a struct. The !FEATURE_HFA
code for IsHFA() needs to check for value type before calling CheckForHFA(),
which will assert if it is not a value type.

Fixes #14196.

7 years ago[Arm64] Respond to feedback
Steve MacLean [Wed, 27 Sep 2017 21:16:51 +0000 (17:16 -0400)]
[Arm64] Respond to feedback

7 years agofix bug from #14164
Fei Peng [Wed, 27 Sep 2017 21:28:07 +0000 (14:28 -0700)]
fix bug from #14164

7 years agoAdding {RO}Memory<T> debugger view (#14130)
Ahson Ahmed Khan [Wed, 27 Sep 2017 21:21:28 +0000 (14:21 -0700)]
Adding {RO}Memory<T> debugger view (#14130)

* Adding memory debugger view and fixing ToArray impl.

* Addressing PR feedback and adding span debugger display string.

* Adding link to specific VSTS instance.

* Removing redundant info in comments.

7 years agoMerge pull request #14230 from dotnet/CondInjection
William Godbe [Wed, 27 Sep 2017 21:14:40 +0000 (14:14 -0700)]
Merge pull request #14230 from dotnet/CondInjection

Condition Injection on SignType

7 years agoCondition Injection on SignType
William Godbe [Wed, 27 Sep 2017 21:13:27 +0000 (14:13 -0700)]
Condition Injection on SignType

7 years agoMerge pull request #14229 from dotnet/PB_Fix
William Godbe [Wed, 27 Sep 2017 20:44:39 +0000 (13:44 -0700)]
Merge pull request #14229 from dotnet/PB_Fix

Change PB_ConfigurationGroup to ConfigurationGroup

7 years agoUpdate DotNet-Trusted-Publish.json
William Godbe [Wed, 27 Sep 2017 20:44:07 +0000 (13:44 -0700)]
Update DotNet-Trusted-Publish.json

7 years agoFix modf and fmod casing for consistency
Jan Kotas [Tue, 26 Sep 2017 00:17:20 +0000 (17:17 -0700)]
Fix modf and fmod casing for consistency

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years ago[Jit] fix DevDiv_499435 (#14179)
Sergey Andreenko [Wed, 27 Sep 2017 19:00:33 +0000 (12:00 -0700)]
[Jit] fix DevDiv_499435 (#14179)

fix DevDiv_499435

7 years agoMerge pull request #14226 from dotnet/SymbolPkgInject
William Godbe [Wed, 27 Sep 2017 18:26:16 +0000 (11:26 -0700)]
Merge pull request #14226 from dotnet/SymbolPkgInject

Conditionally Inject signed symbol packages on SignType

7 years agoConditionally Inject signed symbol packages on SignType
William Godbe [Wed, 27 Sep 2017 18:12:04 +0000 (11:12 -0700)]
Conditionally Inject signed symbol packages on SignType

7 years ago[ARM64/Unix] Enable FEATURE_EVENT_TRACE (#14176)
Steve MacLean [Wed, 27 Sep 2017 17:38:05 +0000 (13:38 -0400)]
[ARM64/Unix] Enable FEATURE_EVENT_TRACE (#14176)

* [ARM64/Unix] Enable FEATURE_EVENT_TRACE

* [Arm64] Remove _PlatformDoesNotSupportEventTrace

7 years agoAdditional parameter validation for StartNoGCRegion (#14088)
Sean Gillespie [Wed, 27 Sep 2017 17:17:38 +0000 (10:17 -0700)]
Additional parameter validation for StartNoGCRegion (#14088)

* Additional parameter validation for StartNoGCRegion

* Fix the clang build by moving some defs before the first goto

* Guard against size_t overflow when scaling allocation budgets

* Move some parameter validation for managed code, throw better exceptions on parameter validation errors

* Remove stray comma

* Address code review feedback - unify code branches that branch to the failure case. Also keep data types as uint64_t as long as possible to avoid size_t overflow

* Fix the clang build

* Code review feedback:
 1. Remove useless asserts
 2. Remove a dead code path
 3. Add a LocalGC TODO to comment

7 years agoMerge pull request #13897 from hseok-oh/ryujit/ftc_arg_count
Jarret Shook [Wed, 27 Sep 2017 17:13:48 +0000 (10:13 -0700)]
Merge pull request #13897 from hseok-oh/ryujit/ftc_arg_count

Argument register & stack size calculation for fast tail call

7 years ago[Arm64] Add JCMP comments per review
Steve MacLean [Wed, 27 Sep 2017 16:41:52 +0000 (12:41 -0400)]
[Arm64] Add JCMP comments per review

7 years ago[Arm64] Fix JCMP lsra binding
Steve MacLean [Tue, 26 Sep 2017 23:31:18 +0000 (19:31 -0400)]
[Arm64] Fix JCMP lsra binding

7 years agoMerge pull request #14207 from CarolEidt/Fix14028
Carol Eidt [Wed, 27 Sep 2017 15:49:42 +0000 (08:49 -0700)]
Merge pull request #14207 from CarolEidt/Fix14028

Handle GT_SIMD in GenTree::Compare

7 years agoMerge pull request #14090 from BredPet/interface_dispatch_cell
Bruce Forstall [Wed, 27 Sep 2017 15:46:19 +0000 (08:46 -0700)]
Merge pull request #14090 from BredPet/interface_dispatch_cell

ARM32: fix interface dispatch cell address transfer

7 years agoJIT: devirtualization support for EqualityComparer<T>.Default (#14125)
Andy Ayers [Wed, 27 Sep 2017 14:15:04 +0000 (07:15 -0700)]
JIT: devirtualization support for EqualityComparer<T>.Default (#14125)

Mark `EqualityComparer<T>.Default`'s getter as `[Intrinsic]` so
the jit knows there is something special about it. Extend the jit's
named intrinsic recognizer to recognize this method.

Add a new jit interface method to determine the exact type returned
by `EqualityComparer<T>.Default`, given `T`. Compute the return type by
mirroring the logic used in the actual implementation. Bail out when
`T` is not final as those cases won't simplify down much and lead to
code bloat.

Invoke this interface method when trying to devirtualize calls where
the 'this' object in the call comes from `EqualityComparer<T>.Default`.

The devirtualized methods can then be inlined. Since the specific comparer
`Equal` and `GetHashCode` methods look more complicated in IL than they
really are, mark them with AggressiveInlining attributes.

If devirtualization and inlining happen, it is quite likely that the value
of the comparer object itself is not used in the body of the comparer. This
value comes from a static field cache on the comparer helper.

When the comparer value is ignored, the jit removes the field access since it
is non-faulting. It also removes the the class init helper that is there to
ensure that the (no-longer accessed) field is properly initialized. This helper
has relatively high overhead even in the fast case where the class has been
initialized aready.

Add a perf test.

Closes #6688.

7 years ago[GDBJIT] Provide full file names in generated DWARF (#14172)
Igor Kulaychuk [Wed, 27 Sep 2017 13:32:39 +0000 (16:32 +0300)]
[GDBJIT] Provide full file names in generated DWARF (#14172)

* Fix compile unit info

Provide full path to source in SequencePoints for GDBJIT
Use source file and directory path for compile unit info in DWARF instead of module name.

* Add a class for building Directory Table and File Table

* Fix code inconsistencies and add comments

7 years agoMerge pull request #14214 from stephentoub/quwi_preferlocal
Stephen Toub [Wed, 27 Sep 2017 12:32:54 +0000 (08:32 -0400)]
Merge pull request #14214 from stephentoub/quwi_preferlocal

Add ThreadPool.QueueUserWorkItem(..., bool preferLocal)

7 years agoARM32: fix interface dispatch cell address transfer
Petr Bred [Wed, 20 Sep 2017 17:52:05 +0000 (20:52 +0300)]
ARM32: fix interface dispatch cell address transfer

Signed-off-by: Petr Bred <bredpetr@gmail.com>
7 years agoUse FCDECL2_VI instead of FCDECL_VV (#14215)
Jonghyun Park [Wed, 27 Sep 2017 08:55:30 +0000 (17:55 +0900)]
Use FCDECL2_VI instead of FCDECL_VV (#14215)

7 years agoPermit to disable FEATURE_EVENT_TRACE on Tizen (#14217)
Jonghyun Park [Wed, 27 Sep 2017 08:54:51 +0000 (17:54 +0900)]
Permit to disable FEATURE_EVENT_TRACE on Tizen (#14217)

7 years agoRemove useless variable
Hyeongseok Oh [Wed, 20 Sep 2017 06:22:09 +0000 (15:22 +0900)]
Remove useless variable

Remove compArgRegCount and compFlatArgRegCount in Info struct

7 years agoFix typo
Hyeongseok Oh [Tue, 12 Sep 2017 00:47:37 +0000 (09:47 +0900)]
Fix typo

Fix typo in lclvars.cpp and register_arg_convention.h

7 years agoEnhancement caller register & stack calculation for fast tail call
Hyeongseok Oh [Mon, 11 Sep 2017 11:21:05 +0000 (20:21 +0900)]
Enhancement caller register & stack calculation for fast tail call

Save caller register count & stack size using argument varDsc initialization
It remove duplicate calculation for register count
and add stack size count in varDsc initialization

7 years ago[RyuJIT/ARM32] Fast tail call: Init LSRA to use R12 to save jump target (#14184)
Hyeongseok Oh [Wed, 27 Sep 2017 04:20:06 +0000 (13:20 +0900)]
[RyuJIT/ARM32] Fast tail call: Init LSRA to use R12 to save jump target (#14184)

* [RyuJIT/ARM32] Fast tail call: use R12 to save jump target

To save jump target of fast tail call on ARM32, we use r12.

* Use pre-defined mask and fix comment

Use pre-defined mask: RBM_R12
fix comment: mov pc -> br

7 years agoAdd ThreadPool.QueueUserWorkItem(..., bool preferLocal)
Stephen Toub [Wed, 27 Sep 2017 03:10:46 +0000 (23:10 -0400)]
Add ThreadPool.QueueUserWorkItem(..., bool preferLocal)

7 years agoMerge pull request #14178 from stephentoub/async_avoid_delegate
Stephen Toub [Wed, 27 Sep 2017 02:39:38 +0000 (22:39 -0400)]
Merge pull request #14178 from stephentoub/async_avoid_delegate

Avoid async method delegate allocation

7 years agoMerge pull request #14197 from rartemev/fixed_test_build_restore
Roman Artemev [Wed, 27 Sep 2017 02:25:13 +0000 (19:25 -0700)]
Merge pull request #14197 from rartemev/fixed_test_build_restore

Fixed Linux test build

7 years agoHandle GT_SIMD in GenTree::Compare
Carol Eidt [Wed, 27 Sep 2017 00:19:35 +0000 (17:19 -0700)]
Handle GT_SIMD in GenTree::Compare

Fix #14028

7 years agoAdd SetThreadIdealProcessorEx PAL API (#13606)
Xiangyang (Mark) Guo [Wed, 27 Sep 2017 00:11:55 +0000 (17:11 -0700)]
Add SetThreadIdealProcessorEx PAL API (#13606)

* add SetThreadIdealProcessorEx PAL API

* fix lpPreviousIdealProcessor

7 years agoUpdate linux-performance-tracing.md (#14194)
Brian Robbins [Tue, 26 Sep 2017 23:47:12 +0000 (16:47 -0700)]
Update linux-performance-tracing.md (#14194)

Add documentation on how to resolve framework symbols on Linux performance traces.

7 years agoMutex code cleanup and removal of unused types
Viktor Hofer [Tue, 26 Sep 2017 00:02:01 +0000 (02:02 +0200)]
Mutex code cleanup and removal of unused types

7 years agoEnable event tracing for Tizen. (#14137)
Dmitri-Botcharnikov [Tue, 26 Sep 2017 22:57:20 +0000 (01:57 +0300)]
Enable event tracing for Tizen. (#14137)

7 years agoFix for a special CoreRT helper CORINFO_HELP_JIT_PINVOKE_BEGIN (#14147)
Sergey Andreenko [Tue, 26 Sep 2017 22:35:01 +0000 (15:35 -0700)]
Fix for a special CoreRT helper CORINFO_HELP_JIT_PINVOKE_BEGIN (#14147)

7 years agoMerge pull request #14202 from wtgodbe/SigningDisableInstall
William Godbe [Tue, 26 Sep 2017 22:25:20 +0000 (15:25 -0700)]
Merge pull request #14202 from wtgodbe/SigningDisableInstall

Install signing plugin with Real signing

7 years agoInstall signing plugin with Real signing
wtgodbe [Tue, 26 Sep 2017 22:25:02 +0000 (15:25 -0700)]
Install signing plugin with Real signing

7 years ago[Arm64] Fix GT_JCMP lsra
Steve MacLean [Tue, 26 Sep 2017 21:04:24 +0000 (17:04 -0400)]
[Arm64] Fix GT_JCMP lsra

7 years agoReplace Contract.Assumes and Contract.Assert with Debug.Assert/Debug.Fail (#14136)
Dan Moseley [Tue, 26 Sep 2017 21:19:16 +0000 (14:19 -0700)]
Replace Contract.Assumes and Contract.Assert with Debug.Assert/Debug.Fail (#14136)

* Remove use of Contract.Assert and Contract.Assumes in favor of Debug.xx

* Remove dead IA64 blocks

* Remove use of Contract.Requires in favor of Debug.Assert

* Remove Contract.EndContractBlock()

* Dead comments

* Straggler EndcontractBlock

* Remove all Contract.Ensures

* Remove [Pure] attribute and using statements

* Remove using statements for M.D.Contracts.Internal.Contract

* Rmove CA suppressions for Contracts

* Remove M.D.Contracts.Internal stub

* Comments and extra using

* Revert accidentallly removed #if

* Unix build

* Merge Math*

* Fix assert not updated since desktop

* Asserts add no value: remove

* Avoid infinite recursion in StringBuilder assert

* Remove asserts that should be public parameter validation

* Fix comment

* Remove blank line after open curly

7 years agoFixed Linux test build
Roman Art [Sat, 23 Sep 2017 00:09:42 +0000 (17:09 -0700)]
Fixed Linux test build

7 years agoMerge pull request #14195 from wtgodbe/SignType
William Godbe [Tue, 26 Sep 2017 21:06:06 +0000 (14:06 -0700)]
Merge pull request #14195 from wtgodbe/SignType

Use Real signType to install plugin

7 years agoUse Real signType to install plugin
wtgodbe [Tue, 26 Sep 2017 21:04:57 +0000 (14:04 -0700)]
Use Real signType to install plugin

7 years agoMerge pull request #14193 from wtgodbe/SigningInfra
William Godbe [Tue, 26 Sep 2017 20:34:37 +0000 (13:34 -0700)]
Merge pull request #14193 from wtgodbe/SigningInfra

Update publish infra to parameterize PB_SignType