platform/upstream/coreclr.git
6 years agoMerge pull request #14430 from noahfalk/fix_14428
Noah Falk [Wed, 11 Oct 2017 21:11:11 +0000 (14:11 -0700)]
Merge pull request #14430 from noahfalk/fix_14428

Fix #14428

6 years agoMerge pull request #14424 from noahfalk/fix_14423
Noah Falk [Wed, 11 Oct 2017 21:06:31 +0000 (14:06 -0700)]
Merge pull request #14424 from noahfalk/fix_14423

Fix #14423

6 years agoDelete !FEATURE_IMPLICIT_TLS (#14398)
Jan Kotas [Wed, 11 Oct 2017 20:04:43 +0000 (13:04 -0700)]
Delete !FEATURE_IMPLICIT_TLS (#14398)

Linux and Windows arm64 are using the regular C/C++ thread local statics. This change unifies the remaining Windows architectures to be on the same plan.

6 years agoMerge pull request #14436 from wtgodbe/fixSlashes
William Godbe [Wed, 11 Oct 2017 19:58:03 +0000 (12:58 -0700)]
Merge pull request #14436 from wtgodbe/fixSlashes

Remove double slashes from publish blobs

6 years agoRemove double slashes from publish blobs
wtgodbe [Wed, 11 Oct 2017 18:54:01 +0000 (11:54 -0700)]
Remove double slashes from publish blobs

6 years agoFix #14428
noahfalk [Wed, 11 Oct 2017 09:23:51 +0000 (02:23 -0700)]
Fix #14428

Now using an offset calculation that is correct for all of a method's jitted code versions.

6 years agoFix #14423
noahfalk [Wed, 11 Oct 2017 07:22:53 +0000 (00:22 -0700)]
Fix #14423

The JIT now invokes the debugger's JITComplete callback on every jitting of a method

6 years agoMerge pull request #13795 from wtgodbe/PublishPlayground
William Godbe [Wed, 11 Oct 2017 02:28:53 +0000 (19:28 -0700)]
Merge pull request #13795 from wtgodbe/PublishPlayground

Use new publish mechanism in CoreCLR

6 years agoProof-of-concept of using new Publish infra in coreclr
wtgodbe [Mon, 28 Aug 2017 20:14:52 +0000 (13:14 -0700)]
Proof-of-concept of using new Publish infra in coreclr

6 years agoAdd CompareInfo.Invariant.cs to shared corelib partition
Jan Kotas [Tue, 10 Oct 2017 20:36:08 +0000 (13:36 -0700)]
Add CompareInfo.Invariant.cs to shared corelib partition

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoFix AllocationTick_V3 depending on _V2 to be enabled (#14338)
Tom Deseyn [Tue, 10 Oct 2017 22:13:05 +0000 (00:13 +0200)]
Fix AllocationTick_V3 depending on _V2 to be enabled (#14338)

6 years agoUpdate to 2.0 RTM CLI (#14396)
Jose Perez Rodriguez [Tue, 10 Oct 2017 21:54:18 +0000 (14:54 -0700)]
Update to 2.0 RTM CLI (#14396)

* Update to 2.0 RTM CLI

* PR feedback

6 years agoFixed typo in Optimization Phases Notes Section (#14408)
Chris P [Tue, 10 Oct 2017 21:08:00 +0000 (17:08 -0400)]
Fixed typo in Optimization Phases Notes Section (#14408)

hosted -> hoisted

6 years agodo not spill stack after CEE_NEWARR and CEE_NEWOBJ. (#14401)
Sergey Andreenko [Tue, 10 Oct 2017 20:37:41 +0000 (13:37 -0700)]
do not spill stack after CEE_NEWARR and CEE_NEWOBJ. (#14401)

Fixes coreRT issue with "InitializeArray intrinsic must always be
expanded".

6 years agoMove CompareInfo.cs to shared corelib partition (#14407)
Jan Kotas [Tue, 10 Oct 2017 19:57:03 +0000 (12:57 -0700)]
Move CompareInfo.cs to shared corelib partition (#14407)

6 years agoTurn on source link support (#14399)
Vance Morrison [Tue, 10 Oct 2017 18:59:29 +0000 (11:59 -0700)]
Turn on source link support (#14399)

* Use Portable PDBs and turn on SourceLink

This makes us uniform.   Allows VSCode (which does not suport MSPdbs) use on Windows.

* Allow DebugType to be overridden (on the command line)

* Turn off portable PDB support for now

6 years agoFix case of environment vars
Vance Morrison [Tue, 10 Oct 2017 17:32:18 +0000 (10:32 -0700)]
Fix case of environment vars

The case of the COMPlus_ environment variables matters on Linux.  Fix instructions to be consistent.

6 years agoFixing a Typo in README.md (#14405)
Tom [Tue, 10 Oct 2017 16:21:14 +0000 (18:21 +0200)]
Fixing a Typo in README.md (#14405)

Just deleted one of the two "for"s in the Setting up your GIT Clone of the CoreCLR Repository.

6 years agoJIT: improve type equality opts for generic and prejitted code (#14381)
Andy Ayers [Tue, 10 Oct 2017 02:27:28 +0000 (19:27 -0700)]
JIT: improve type equality opts for generic and prejitted code (#14381)

Handle cases where a `GetType()` call on a generically typed object
feeds into a type equality comparison.

These calls have constraint prefixes. For value classes the constraint
tells us the type and so we can avoid the box and call and just construct
that type directly. For ref classes the type test can usually reduce to
a method table comparison.

Also, handle cases that arise in prejiited code better, by generalizing
how the jit looks for class handles from type construction trees.

Added test cases.

Closes #14304.

6 years agoMerge pull request #14394 from stephentoub/undo_strcomp
Stephen Toub [Tue, 10 Oct 2017 01:45:48 +0000 (21:45 -0400)]
Merge pull request #14394 from stephentoub/undo_strcomp

Undo unnecessary change from DateTime.Parse commit

6 years agoFixing JitBench (#14364)
José Rivero [Tue, 10 Oct 2017 00:03:16 +0000 (17:03 -0700)]
Fixing JitBench (#14364)

- In the lab, the path where the JitBench sources are downloaded is already too long, which eventially causes `dotnet-install.ps1` to fail. Part of the changes are to reduce the PATH where the tests are placed.
- Updated the JitBench version/commit being used. This one is already on 2.1
- Fixing typo on `perf.groovy`
- Increasing the timeout value as JitBench keeps failing on the lab.

6 years agoMerge pull request #14382 from mikedn/dead-opers
Bruce Forstall [Mon, 9 Oct 2017 20:20:11 +0000 (13:20 -0700)]
Merge pull request #14382 from mikedn/dead-opers

Removed unused opers and code

6 years agoFix zap and ready to run disabling (#14389)
Jan Vorlicek [Mon, 9 Oct 2017 20:07:54 +0000 (22:07 +0200)]
Fix zap and ready to run disabling (#14389)

* Fix zap and ready to run disabling

While the COMPlus_ZapDisable and COMPlus_ReadyToRun config settings
can be used to disable using crossgened / ready to run images, loading
IL from such images fails.
This change foxes that.

* Reflect PR feedback

Remove ReadyToRunInfo::IsReadyToRunEnabled from Module::Initialize again
and move the same check in the ReadyToRunInfo::Initialize before we
start checking the PE file properties.

6 years agoMerge pull request #14386 from adityamandaleeka/ryujit_doc_fix
Aditya Mandaleeka [Mon, 9 Oct 2017 18:56:57 +0000 (11:56 -0700)]
Merge pull request #14386 from adityamandaleeka/ryujit_doc_fix

Fix incorrect name of class in RyuJIT overview

6 years agoUndo unnecessary change from DateTime.Parse commit
Stephen Toub [Mon, 9 Oct 2017 18:30:30 +0000 (14:30 -0400)]
Undo unnecessary change from DateTime.Parse commit

This change shouldn't have been included in my DateTime.Parse span change.  It was left-over from some local experimentation.  The change doesn't hurt anything functionally, but it does undo a small optimization; I've not measured whether it's impactful or not, so I'm putting it back the way it was.

6 years ago[GDBJIT] Make gdbjit thread-safe & bug fix (#14390)
Konstantin Baladurin [Mon, 9 Oct 2017 17:21:22 +0000 (20:21 +0300)]
[GDBJIT] Make gdbjit thread-safe & bug fix (#14390)

* [GDBJIT] Fix DW_AT_comp_dir setting

We should use cuPath to set dirPath in NotifyGdb::EmitDebugInfo instead of
DebugString[1].

* [GDBJIT] Make gdbjit thread-safe

NotifyGdb::MethodPrepared method can be called from multiple threads
simultaneously in this case gdbjit will work incorrectly as it uses
global variable without synchronization.

6 years agoParent class of Interval and RegRecord is Referenceable.
Aditya Mandaleeka [Sun, 8 Oct 2017 23:20:13 +0000 (16:20 -0700)]
Parent class of Interval and RegRecord is Referenceable.

6 years agoRemoved unused opers and code
Mike Danes [Sat, 7 Oct 2017 17:17:19 +0000 (20:17 +0300)]
Removed unused opers and code

* GT_DIV_HI and GT_MOD_HI are not used anywhere
* genCodeForBinary doesn't handle GT_MUL_LONG
* OperIsHigh is not used anywhere

6 years agoUpdate CoreFx, PgoData to preview1-25807-01, master-20171007-0052, respectively ...
dotnet-maestro-bot [Sat, 7 Oct 2017 15:52:05 +0000 (10:52 -0500)]
Update CoreFx, PgoData to preview1-25807-01, master-20171007-0052, respectively (#14378)

6 years agoFix numa build break (#14370)
Jan Vorlicek [Sat, 7 Oct 2017 09:56:24 +0000 (11:56 +0200)]
Fix numa build break (#14370)

This change fixes a break in build of coreclr on machines with libnuma
installed. The problem was that the numa header contains a couple of
inlined functions and we were using one of them. That made it to
have a hard reference to a function from the numa library that we
need to be soft so that coreclr can work even on machines without
the libnuma installed.

6 years agoMerge pull request #14353 from BruceForstall/ArmAssertFixes
Bruce Forstall [Sat, 7 Oct 2017 01:42:37 +0000 (18:42 -0700)]
Merge pull request #14353 from BruceForstall/ArmAssertFixes

Fix RyuJIT/arm32 asserts

6 years agoDelete dead code (#14365)
Jan Kotas [Sat, 7 Oct 2017 00:51:29 +0000 (17:51 -0700)]
Delete dead code (#14365)

Delete some dead code related to Windows Phone and code access security

6 years agoMerge pull request #14369 from stephentoub/fix_cont_handling
Stephen Toub [Sat, 7 Oct 2017 00:25:43 +0000 (20:25 -0400)]
Merge pull request #14369 from stephentoub/fix_cont_handling

Fix handling of continuations for captured context

6 years agoFix handling of continuations for captured context
Stephen Toub [Fri, 6 Oct 2017 22:38:00 +0000 (18:38 -0400)]
Fix handling of continuations for captured context

My recent delegate optimization for async methods introduced a race condition that breaks posting back to a captured context.  If the awaited task completes between the time we check IsCompleted and when we try to store the continuation into the Task, we need to queue the continuation for execution, but my change incorrectly queued it to the thread pool rather than to the captured context.

6 years agoMerge pull request #14352 from stephentoub/datetime_span
Stephen Toub [Fri, 6 Oct 2017 22:12:27 +0000 (18:12 -0400)]
Merge pull request #14352 from stephentoub/datetime_span

Add Span-based methods to DateTime{Offset}

6 years agoFix RyuJIT/arm32 asserts
Bruce Forstall [Fri, 6 Oct 2017 05:14:08 +0000 (22:14 -0700)]
Fix RyuJIT/arm32 asserts

Fix #14199: propagate `GTF_EXCEPT` bits from the end of `GT_FIELD_LIST`
lists to the beginning, to avoid "Missing flags on tree" asserts.

Fix #14198: for RyuJIT/arm32, `GT_BITCAST` needs to be a MultiRegOp.
This is required when a varargs function, which includes the tailcall
helper, needs to pass a double in integer registers. We can end up
with `GT_PUTARG_REG/long(GT_BITCAST/long(double tree))`.

Fixed various GenTree node flags dumping issues.

6 years agoMerge pull request #14333 from dotnet-maestro-bot/master-UpdateDependencies
Stephen Toub [Fri, 6 Oct 2017 21:34:04 +0000 (17:34 -0400)]
Merge pull request #14333 from dotnet-maestro-bot/master-UpdateDependencies

Update BuildTools, CoreClr, CoreFx, PgoData to prerelease-02106-01, preview1-25806-01, preview1-25806-02, master-20171006-0051, respectively (master)

6 years agoundef NULL to fix compilation problems on FreeBSD after 08d39dd. (#14341)
Tomas Weinfurt [Fri, 6 Oct 2017 20:30:24 +0000 (13:30 -0700)]
undef NULL to fix compilation problems on FreeBSD after 08d39dd. (#14341)

* undef NULL to fix compilation problems on FreeBSD after 08d39dd.

* remove unneccesary #ifndef NULL

6 years agoFix asserts in Unix build
Stephen Toub [Fri, 6 Oct 2017 20:19:00 +0000 (16:19 -0400)]
Fix asserts in Unix build

6 years agoimpImportCall: make the failed imports obvious. (#14343)
Sergey Andreenko [Fri, 6 Oct 2017 19:37:20 +0000 (12:37 -0700)]
impImportCall: make the failed imports obvious. (#14343)

* impImportCall: make the failed imports obvious.

Delete unnecessary and confusing dependency on callRetType.

* delete unreached code that calls impImportCall

6 years agoReorder checks in CEEInfo::getClassLayout (#14356)
Jan Kotas [Fri, 6 Oct 2017 18:11:35 +0000 (11:11 -0700)]
Reorder checks in CEEInfo::getClassLayout (#14356)

Check for native value type has to be first to handle byref-like native value types correctly.

6 years agoMerge pull request #14329 from sdmaclea/PR-ARM64-ATOMIC-OPS
Brian Sullivan [Fri, 6 Oct 2017 17:59:39 +0000 (10:59 -0700)]
Merge pull request #14329 from sdmaclea/PR-ARM64-ATOMIC-OPS

[Arm64] Implement GT_XADD, GT_XCHG, GT_CMPXCHG ...

6 years agoMerge pull request #14358 from stephentoub/convertspan
Stephen Toub [Fri, 6 Oct 2017 16:34:08 +0000 (12:34 -0400)]
Merge pull request #14358 from stephentoub/convertspan

Add Span-based Convert Base64 methods

6 years agoFix comments per review
Steve MacLean [Fri, 6 Oct 2017 15:25:14 +0000 (11:25 -0400)]
Fix comments per review

6 years agoRemove explicit dependency on libnuma (#14359)
Jan Vorlicek [Fri, 6 Oct 2017 14:35:26 +0000 (16:35 +0200)]
Remove explicit dependency on libnuma (#14359)

Currently, when coreclr is built on machine that has libnuma installed,
it adds libnuma to its dependencies and so it cannot be used on machines
that don't have libnuma installed. But that is not necessary, the
dependency was changed to soft dependency - PAL loads it only if it is
present and falls back to the non-numa behavior if it is not found.
This change removes the hard libnuma dependency.

6 years agoUpdate BuildTools, CoreClr, CoreFx, PgoData to prerelease-02106-01, preview1-25806...
dotnet-maestro-bot [Fri, 6 Oct 2017 14:20:56 +0000 (07:20 -0700)]
Update BuildTools, CoreClr, CoreFx, PgoData to prerelease-02106-01, preview1-25806-01, preview1-25806-02, master-20171006-0051, respectively

6 years agoAdd DateTime{Offset}.TryFormat methods
Stephen Toub [Thu, 5 Oct 2017 23:30:07 +0000 (19:30 -0400)]
Add DateTime{Offset}.TryFormat methods

The existing implementations just format to a StringBuilder and then get the string from that StringBuilder.  For now at least, these TryFormats share the same code, and just copy the StringBuilder to the span instead of using ToString.

6 years agoAdd DateTime{Offset} span-based {Try}Parse{Exact} overloads
Stephen Toub [Thu, 5 Oct 2017 21:47:49 +0000 (17:47 -0400)]
Add DateTime{Offset} span-based {Try}Parse{Exact} overloads

6 years agoAddress perf issues
Stephen Toub [Thu, 5 Oct 2017 21:23:41 +0000 (17:23 -0400)]
Address perf issues

Workaround regressions from the span switch and also fix a few other issues that popped while profiling.

- Specialize Compare{String} methods to take one span and one string
- Ensure frequently called methods get inlined
- Avoid unnecessary writes to a ref
- Avoid unnecessary Math.Pow calls

6 years agoRemove StringBuilder allocations from roundtrip format DateTime parsing
Stephen Toub [Fri, 8 Sep 2017 14:25:01 +0000 (10:25 -0400)]
Remove StringBuilder allocations from roundtrip format DateTime parsing

6 years agoAdd IsValidYear/Day overrides to GregorianCalendar
Stephen Toub [Fri, 8 Sep 2017 13:57:55 +0000 (09:57 -0400)]
Add IsValidYear/Day overrides to GregorianCalendar

The base implementation makes several virtual calls that the derived implementation can avoid.

6 years agoAvoid slicing/extra method call while tokenizing in common case
Stephen Toub [Fri, 8 Sep 2017 14:05:22 +0000 (10:05 -0400)]
Avoid slicing/extra method call while tokenizing in common case

6 years agoMove DateTimeParse to use spans internally
Stephen Toub [Fri, 8 Sep 2017 13:52:05 +0000 (09:52 -0400)]
Move DateTimeParse to use spans internally

So that we can reuse the same implementation for the public span-based APIs.

6 years agoAdd Span-based Convert Base64 methods
Stephen Toub [Fri, 6 Oct 2017 12:21:47 +0000 (08:21 -0400)]
Add Span-based Convert Base64 methods

6 years agoDisable PGO optimization on linux (#14290)
Michelle McDaniel [Fri, 6 Oct 2017 12:15:16 +0000 (05:15 -0700)]
Disable PGO optimization on linux (#14290)

With the update to llvm 3.9, the pgo data is incompatible since it was
generated with llvm 3.6. Currently, both the pgo data generation builds
and the automatic updates of counts are currently down, so pgo data is
not being updated. Until these problems are fixed, disable pgo
optimization for release builds on linux.

6 years ago enable lttng for FreeBSD. (#14342)
Tomas Weinfurt [Fri, 6 Oct 2017 08:43:54 +0000 (01:43 -0700)]
 enable lttng for FreeBSD. (#14342)

*  enable lttng for FreeBSD. it is supported for user space

* unify Linux and FreeBSD branches for lttng. At lest for now, they are identical

6 years agoMerge pull request #14253 from wateret/fix-14251
Bruce Forstall [Fri, 6 Oct 2017 05:31:17 +0000 (22:31 -0700)]
Merge pull request #14253 from wateret/fix-14251

[RyuJIT/armel] Fix regression

6 years agoUpdate Microsoft.NETCore.Native package (dotnet/corert#4646)
Jan Kotas [Tue, 3 Oct 2017 04:28:12 +0000 (21:28 -0700)]
Update Microsoft.NETCore.Native package (dotnet/corert#4646)

Partial port of https://github.com/dotnet/coreclr/pull/10264

Fixes #4640

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoUpdate CentOS 6 and 7 docker images (#14349)
Jan Vorlicek [Fri, 6 Oct 2017 01:12:04 +0000 (03:12 +0200)]
Update CentOS 6 and 7 docker images (#14349)

The images now contains clang 3.9 with PGO support

6 years ago[Arm64] Respond to feedback
Steve MacLean [Thu, 5 Oct 2017 22:10:45 +0000 (18:10 -0400)]
[Arm64] Respond to feedback

6 years agoFix new deadlock possibility in ReaderWriterLockSlim from a recent change (#14337)
Koundinya Veluri [Thu, 5 Oct 2017 19:06:07 +0000 (12:06 -0700)]
Fix new deadlock possibility in ReaderWriterLockSlim from a recent change (#14337)

Fix new deadlock possibility in ReaderWriterLockSlim from a recent change

Fixed the following scenario that would lead to deadlock (rare, but frequently reproducible if code is changed):
- Thread T0 signals the write waiter event or the upgradeable read waiter event to wake a waiter
- There are no threads waiting on the event, but T1 is in WaitOnEvent() after exiting the spin lock and before actually waiting on the event (that is, it's recorded that there is one waiter for the event). It remains in this region for a while, in the repro case it typically gets context-switched out.
- T2 acquires the RW lock in some fashion that blocks T0 or T3 from acquiring the RW lock
- T0 or T3 fails to acquire the RW lock enough times for it to enter WaitOnEvent for the same event as T1
- T0 or T3 resets the event
- T2 releases the RW lock and does not wake a waiter because the reset at the previous step lost a signal but _waiterStates was not updated to reflect that
- T1 and other threads begin waiting on the event, but there's no longer any thread that would wake them

6 years agoJIT: More type equality opts (#14317)
Andy Ayers [Thu, 5 Oct 2017 18:31:58 +0000 (11:31 -0700)]
JIT: More type equality opts (#14317)

* JIT: Wrap some runtime lookups in new node type

Work based on the plan outlined in #14305.

Introduce a new unary node type GT_RUNTIMELOOKUP that wraps existing
runtime lookup trees created in `impLookupToTree` and holds onto the
handle that inspired the lookup.

Note there are other importer paths that create lookups directly that
we might also want to wrap, though wrapping is not a requirement for
correctness.

Keep this node type around through morph, then unwrap and just use
the wrapped node after that.

* JIT: More enhancements to type equality testing

The jit is now able to optimize some type equality checks in shared
method instances where one or both of the types require runtime lookup,
for instance comparing `T` to a value type, or comparing two different
value types `V1<T>` and `V2<T>`.

Add two new jit interface methods, one for testing for type equality and
the other for type casting.

These return Must/MustNot/Maybe results depending on whether or not
the equality or cast can be resolved at jit time.

Implement the equality check. Use this to enhance the type equality opts
in the jit for both direct comparison and the checking done by unbox.any.

6 years agofix gtDispTree (#14326)
Sergey Andreenko [Thu, 5 Oct 2017 18:21:19 +0000 (11:21 -0700)]
fix gtDispTree (#14326)

* fix gtDispTree

It is legal situation when we pass ILNone (for example for local stores:
gtDispChild(tree->gtOp.gtOp1, indentStack, IINone);). In this code we
poped value and didn't push anything back, it ended with the stack
underflow.

6 years ago[RyuJIT/armel] Fix regression
Hanjoung Lee [Fri, 29 Sep 2017 09:50:16 +0000 (18:50 +0900)]
[RyuJIT/armel] Fix regression

Fix calling a function passing double-type stack arguments.

Fix #14251

6 years ago[SOS] Fix address types inconsistency (#14188)
Konstantin Baladurin [Thu, 5 Oct 2017 10:07:31 +0000 (13:07 +0300)]
[SOS] Fix address types inconsistency (#14188)

GetObjFieldOffset function expects that cdaObj and cdaMT arguments
have CLRDATA_ADDRESS type (sign-extended) but in some cases we
use TADDR instead of CLRDATA_ADDRESS that isn't sign-extended.

Due to it some SOS commands (for example DumpRuntimeTypes) don't
work on x86 and ARM32.

6 years ago[x86/Linux][SOS] Fix clrstack command of lldb sosplugin on x86 (#13973)
Konstantin Baladurin [Thu, 5 Oct 2017 08:31:44 +0000 (11:31 +0300)]
[x86/Linux][SOS] Fix clrstack command of lldb sosplugin on x86 (#13973)

* [x86/Linux][SOS] Add support for x86 in GetContextFromFrame

It's need for 'clrstack -f' command of SOS plugin on x86.

* [x86/Linux] Fix RtlpGetFunctionEndAddress function

We should use PTR_UNWIND_INFO instead of PUNWIND_INFO for pointer to
UNWIND_INFO structure because it's pointer from other process and
we need to use DAC to read data using it.

* [x86/Linux][SOS] Define DEBUG_STACK_CONTEXT for x86

It's needed for 'clrstack -f' command in libsosplugin.

* [x86/Linux] Fix undefined references in libmscordbi.so on x86

Asm block like following:
__asm fnsave currentFPUState

where currentFPUState is structure works with MSVC but leads to
undefined reference currentFPUState in the binary with other
compilers. So rewrite such asm blocks for them.

This patch fixes error "Unable to load 'libmscordbi.so'" during
execution of 'clrstack -f' command of SOS plugin on x86.

* [x86/Linux] Fix calling convention inconsistency

WINAPI and STDAPI are defined as __cdecl but in some cases functions
with these attributes are called using stdcall calling convention.

It leads to crashes during execution of 'clrstack -i' command of
SOS plugin on x86.

6 years agoFix condition flags reuse optimization (#14323)
mikedn [Thu, 5 Oct 2017 05:04:26 +0000 (08:04 +0300)]
Fix condition flags reuse optimization (#14323)

This optimization is not valid for unsigned LT/LE/GT/GE relops. Using the Carry flag this way indicates that the operation overflowed, not that the result is less than 0, that's impossible for unsigned integers.

This is also not valid for signed LT/LE/GT/GE relops due to integer overflow.

6 years agofgDebugCheckFlags should use OperMayThrow for all nodes. (#14330)
Sergey Andreenko [Thu, 5 Oct 2017 04:34:26 +0000 (21:34 -0700)]
fgDebugCheckFlags should use OperMayThrow for all nodes. (#14330)

GT_CATCH_ARG should not be marled as MayThrow.

6 years agoTweaks for arm/arm64 altjit CI jobs (#14306)
Bruce Forstall [Wed, 4 Oct 2017 23:29:46 +0000 (16:29 -0700)]
Tweaks for arm/arm64 altjit CI jobs (#14306)

1. Make trigger phrase for default job include "Build And Test". Otherwise,
triggering a stress mode also causes the default job to be triggered.
2. Change the SetStressModes.bat creation command to be a single Jenkins
executed command, not multiple separate commands.
3. To aid debugging, display the resulting SetStressModes.bat script so it
gets captured in the run output log.

6 years ago[Arm64] Implement GT_XADD, GT_XCHG, GT_CMPXCHG ...
Steve MacLean [Tue, 3 Oct 2017 18:23:57 +0000 (14:23 -0400)]
[Arm64] Implement GT_XADD, GT_XCHG, GT_CMPXCHG ...

6 years agoMerge pull request #14328 from crummel/cmakeDocUpdate
Chris Rummel [Wed, 4 Oct 2017 22:02:48 +0000 (17:02 -0500)]
Merge pull request #14328 from crummel/cmakeDocUpdate

Update official version of CMake.

6 years agoMerge pull request #14315 from adiaaida/addPerfPipeline
Michelle McDaniel [Wed, 4 Oct 2017 21:50:47 +0000 (14:50 -0700)]
Merge pull request #14315 from adiaaida/addPerfPipeline

Change name of perf-pipelinejobs to perf_pipelinejobs

6 years agoUpdate official version of CMake.
Chris Rummel [Wed, 4 Oct 2017 21:43:10 +0000 (16:43 -0500)]
Update official version of CMake.

6 years agoMerge pull request #14307 from fiigii/removeavxflag
Bruce Forstall [Wed, 4 Oct 2017 21:09:03 +0000 (14:09 -0700)]
Merge pull request #14307 from fiigii/removeavxflag

[RyuJIT] Remove FEATURE_AVX_SUPPORT flag

6 years agoMerge pull request #14294 from sdmaclea/PR-ARM64-EMIT-Exclusives
Brian Sullivan [Wed, 4 Oct 2017 20:52:18 +0000 (13:52 -0700)]
Merge pull request #14294 from sdmaclea/PR-ARM64-EMIT-Exclusives

[Arm64] Add LD/ST exclusive emitters

6 years agoMerge pull request #14318 from sdmaclea/PR-Fix-jump-bind-typo
Brian Sullivan [Wed, 4 Oct 2017 20:51:50 +0000 (13:51 -0700)]
Merge pull request #14318 from sdmaclea/PR-Fix-jump-bind-typo

[Arm64] Fix emitJumpDistBind typo

6 years agoMerge pull request #14293 from sdmaclea/PR-ARM64-SMUL-DIS
Brian Sullivan [Wed, 4 Oct 2017 20:51:10 +0000 (13:51 -0700)]
Merge pull request #14293 from sdmaclea/PR-ARM64-SMUL-DIS

[Arm64] Fix smul[lh] disassembly

6 years agoMove String.Searching.cs to shared CoreLib partition (dotnet/corert#4673)
Jan Kotas [Wed, 4 Oct 2017 15:39:18 +0000 (08:39 -0700)]
Move String.Searching.cs to shared CoreLib partition (dotnet/corert#4673)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoMerge pull request #14325 from dotnet-bot/from-tfs
Brian Sullivan [Wed, 4 Oct 2017 19:18:02 +0000 (12:18 -0700)]
Merge pull request #14325 from dotnet-bot/from-tfs

Merge changes from TFS

6 years agoAllow X86 Hardware intrinsics for non-Legacy 32-bit x86
Brian Sullivan [Wed, 4 Oct 2017 17:15:26 +0000 (10:15 -0700)]
Allow X86 Hardware intrinsics for non-Legacy 32-bit x86
Unit tests exisist for this functionality on x86 CoreCLR

[tfs-changeset: 1677287]

6 years ago[Arm64] Fix emitJumpDistBind typo
Steve MacLean [Sat, 23 Sep 2017 05:10:20 +0000 (01:10 -0400)]
[Arm64] Fix emitJumpDistBind typo

6 years ago[Arm64] Fix IF_LS_3D emitter
Steve MacLean [Tue, 3 Oct 2017 20:23:35 +0000 (16:23 -0400)]
[Arm64] Fix IF_LS_3D emitter

6 years agoMerge pull request dotnet/corert#4663 from dotnet/nmirror
Jan Kotas [Tue, 3 Oct 2017 23:25:20 +0000 (16:25 -0700)]
Merge pull request dotnet/corert#4663 from dotnet/nmirror

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoMerge pull request #14298 from stephentoub/stringconcat_char
Stephen Toub [Wed, 4 Oct 2017 02:14:26 +0000 (22:14 -0400)]
Merge pull request #14298 from stephentoub/stringconcat_char

Special-case T==char in string.Concat(IEnumerable<T>)

6 years agoMake CancellationTokenRegistration.Token public (#14310)
Stephen Toub [Wed, 4 Oct 2017 02:13:53 +0000 (22:13 -0400)]
Make CancellationTokenRegistration.Token public (#14310)

6 years agoFix broken ARM64 build (#14313)
Jan Vorlicek [Wed, 4 Oct 2017 01:35:12 +0000 (03:35 +0200)]
Fix broken ARM64 build (#14313)

The std::max was being passed arguments of different types (int and DWORD).

6 years agoremove FEATURE_AVX_SUPPORT flag
Fei Peng [Tue, 3 Oct 2017 23:37:56 +0000 (16:37 -0700)]
remove FEATURE_AVX_SUPPORT flag

6 years agoFew build changes to support Freebsd (#14121)
Tomas Weinfurt [Tue, 3 Oct 2017 23:42:14 +0000 (16:42 -0700)]
Few build changes to support Freebsd (#14121)

* also look for python27

* add more locations to search for lldb.h so it just work on FreeBSD

* add adm64 to ARCH selection. This is mostly cosmetic to avoild warning on FreeBSD

* add support for -osgroup=XXX - this is mostly for conistency. -OSGroup=FreeBSD is similar to freebsdmscorlib in build.cmd

* fix typo adm->amd

* add back fi removed by mistake

* add __HostDistroRid for FreeBSD

* adress fedback from review: make python lookup consistent - starting with most specific version. uddate warning message about lldb.h and remove composite flag

* feedback from review: type and small change on OSGroup syntax

* few more minor fixes

6 years agoChange name of perf-pipelinejobs to perf_pipelinejobs
Michelle McDaniel [Tue, 3 Oct 2017 22:55:38 +0000 (15:55 -0700)]
Change name of perf-pipelinejobs to perf_pipelinejobs

6 years agoUpdate Buildtools and Roslyn (#14228)
Jose Perez Rodriguez [Tue, 3 Oct 2017 22:21:52 +0000 (15:21 -0700)]
Update Buildtools and Roslyn (#14228)

* Update Buildtools and Roslyn

* Fixing importing of the roslyn files on msbuild 14.0

* Correctly looking for the latest VS Installation

6 years agoFix for x86 JIT build break
Brian Sullivan [Tue, 3 Oct 2017 21:58:17 +0000 (14:58 -0700)]
Fix for x86 JIT build break

[tfs-changeset: 1677224]

6 years agoMerge pull request #14312 from adiaaida/addPerfPipeline
Michelle McDaniel [Tue, 3 Oct 2017 21:53:56 +0000 (14:53 -0700)]
Merge pull request #14312 from adiaaida/addPerfPipeline

Add empty perf pipeline job

6 years agoMerge pull request #14295 from BruceForstall/FixArm64FastTailcallGSCookie
Bruce Forstall [Tue, 3 Oct 2017 21:06:59 +0000 (14:06 -0700)]
Merge pull request #14295 from BruceForstall/FixArm64FastTailcallGSCookie

Put JIT64 compat assert under `_TARGET_AMD64_` ifdef

6 years agoAdd empty perf pipeline job
Michelle McDaniel [Tue, 3 Oct 2017 21:00:41 +0000 (14:00 -0700)]
Add empty perf pipeline job

This is step one of adding the pipeline job for performance runs. In
this change, we add perf-pipelinejobs.groovy, which defines what Jenkins
will see in the UI. perf-pipeline.groovy is basically an empty job, so
we can test the actual perf-pipeline work after this is checked in,
which is step two.

6 years agoOptimize Memory<T> to ReadOnlyMemory<T> cast (#14309)
Stephen Toub [Tue, 3 Oct 2017 20:59:31 +0000 (16:59 -0400)]
Optimize Memory<T> to ReadOnlyMemory<T> cast (#14309)

They have the same layout; we can just use Unsafe.As.  In a microbenchmark that just repeatedly reads from a `Memory<byte>` field and writes it to a `ReadOnlyMemory<byte>` field, this doubles throughput.

6 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).

6 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.

6 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>
6 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

6 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