platform/upstream/coreclr.git
6 years agoFix lclVar move node type inserted in lsra phase
Hyeongseok Oh [Thu, 10 Aug 2017 01:55:51 +0000 (10:55 +0900)]
Fix lclVar move node type inserted in lsra phase

When we try to insert lclVal move node (load, store) on lsra phase,
fix type as TYP_INT when size is smaller than TYP_INT

6 years agoLinkBench: Enable Roslyn
Swaroop Sridhar [Fri, 26 May 2017 02:55:32 +0000 (19:55 -0700)]
LinkBench: Enable Roslyn

This change enables Roslyn runs as part of ILLink.

Roslyn was previously disabled because .Net CLI didnt use the latest
Roslyn compilers. Now that this issue is fixed, we re-enable Roslyn.
The different .Net versions necessary to run the benchmarks are
all downloaded, and the benchmarks are built using them.

6 years agoMerge pull request #13151 from briansull/dump-fixes
Brian Sullivan [Wed, 2 Aug 2017 00:35:50 +0000 (17:35 -0700)]
Merge pull request #13151 from briansull/dump-fixes

Minor fixes for JitDumps

6 years ago[Arm64/Unix] Add OfficialBuildRID linux-arm64 (#12372)
Steve MacLean [Wed, 2 Aug 2017 00:24:51 +0000 (20:24 -0400)]
[Arm64/Unix] Add OfficialBuildRID linux-arm64 (#12372)

* [Arm64/Unix] Add OfficialBuildRID linux-arm64

* [Arm64/Unix] Fix nuget package build

6 years agoGC Prefer CompareExchange
Steve MacLean [Thu, 6 Jul 2017 23:59:49 +0000 (23:59 +0000)]
GC Prefer CompareExchange

6 years agoGC Reduce unnecessary work
Steve MacLean [Thu, 6 Jul 2017 23:58:36 +0000 (23:58 +0000)]
GC Reduce unnecessary work

Simplify cache alignment
Remove unecessary barriers
Remove unnecessary Interlocked::Decrement
Remove unused join variables

6 years agoMerge pull request #12856 from briansull/method-referenced-ibcdata
Brian Sullivan [Tue, 1 Aug 2017 22:28:16 +0000 (15:28 -0700)]
Merge pull request #12856 from briansull/method-referenced-ibcdata

Record references to all of the hot methods specified by the IBC profile data

6 years agoMerge pull request #13109 from mikedn/range-alloc
Bruce Forstall [Tue, 1 Aug 2017 21:12:46 +0000 (14:12 -0700)]
Merge pull request #13109 from mikedn/range-alloc

Remove unnecessary allocations from RangeCheck

6 years agoMerge pull request #12929 from mikedn/cast-cmp-test
Bruce Forstall [Tue, 1 Aug 2017 20:39:47 +0000 (13:39 -0700)]
Merge pull request #12929 from mikedn/cast-cmp-test

Use "test reg, reg" instead of "cmp reg, 0" for cast overflow checks

6 years agoRefactor emitter::emitInsMov (#12905)
mikedn [Tue, 1 Aug 2017 20:38:12 +0000 (23:38 +0300)]
Refactor emitter::emitInsMov (#12905)

* Split emitter::emitInsMov into separate functions

None of this function's callers need it to figure out what kind of "mov" to emit, the callers already know what they need and they should call the appropiate function.

Copy & paste code, no actual changes.

* Pass the destination register to emitInsLoadInd

This way it can be used for contained indirs where the destination register is set on the parent node.

* Cleanup emitInsLoadInd/emitInsStoreInd/emitInsStoreLcl

6 years agoFix build errors when TRACK_SYNC is defined (#13122)
Jonghyun Park [Tue, 1 Aug 2017 20:33:50 +0000 (05:33 +0900)]
Fix build errors when TRACK_SYNC is defined (#13122)

* Fix build errors when TRACK_SYNC is defined

* Remove unnecessary default constructor

6 years agoMerge pull request #12926 from mikedn/dead-cast-code
Bruce Forstall [Tue, 1 Aug 2017 20:32:41 +0000 (13:32 -0700)]
Merge pull request #12926 from mikedn/dead-cast-code

Delete dead code from genIntToIntCast

6 years agoMerge pull request #13125 from sdmaclea/PR-POISON
Bruce Forstall [Tue, 1 Aug 2017 20:19:22 +0000 (13:19 -0700)]
Merge pull request #13125 from sdmaclea/PR-POISON

[Arm64] Implement Poison()

6 years agoMerge pull request #13134 from BruceForstall/Fix12911
Bruce Forstall [Tue, 1 Aug 2017 20:15:19 +0000 (13:15 -0700)]
Merge pull request #13134 from BruceForstall/Fix12911

Handle unspilling part of a multi-use reg with FREE_REG

6 years agoMerge pull request #13147 from jashook/fix_desktop_build_break
Brian Sullivan [Tue, 1 Aug 2017 18:45:45 +0000 (11:45 -0700)]
Merge pull request #13147 from jashook/fix_desktop_build_break

Fix Desktop build break in regset.cpp

6 years agoMerge branch 'master' into dump-fixes
Brian Sullivan [Tue, 1 Aug 2017 18:23:39 +0000 (11:23 -0700)]
Merge branch 'master' into dump-fixes

6 years agoMinor fixes for JitDumps
Brian Sullivan [Tue, 1 Aug 2017 18:20:53 +0000 (11:20 -0700)]
Minor fixes for JitDumps
- Remove extra ']' in rsMarkRegUsed and rsMarkArgRegUsedByPromotedFieldArg
- removed incorrect newline splits in rsMarkPairUsed
- Check if rsUsedAddr[] is null before calling printTreeID
- Check if spillAddr is null before calling printTreeID

6 years agoMerge pull request #13130 from markwilkie/CROSS-Doc
Mark Wilkie [Tue, 1 Aug 2017 18:20:22 +0000 (11:20 -0700)]
Merge pull request #13130 from markwilkie/CROSS-Doc

Added CROSS guidance

6 years agoMerge pull request #13142 from hseok-oh/ryujit/fix_12627
Bruce Forstall [Tue, 1 Aug 2017 18:07:57 +0000 (11:07 -0700)]
Merge pull request #13142 from hseok-oh/ryujit/fix_12627

[RyuJIT/ARM32] Tailcall: passing struct argument

6 years agoMerge pull request #13002 from sdmaclea/PR-ARM64-resolveEntryPoint
Brian Sullivan [Tue, 1 Aug 2017 18:03:25 +0000 (11:03 -0700)]
Merge pull request #13002 from sdmaclea/PR-ARM64-resolveEntryPoint

[Arm64] Fix ResolveStub tokenHash lookup

6 years agoMerge pull request #13138 from hseok-oh/ryujit/nyi_zr
Bruce Forstall [Tue, 1 Aug 2017 17:54:58 +0000 (10:54 -0700)]
Merge pull request #13138 from hseok-oh/ryujit/nyi_zr

[RyuJIT/ARM32] Remove NYI: using zero register

6 years agosmall updates....
Mark Wilkie [Tue, 1 Aug 2017 17:45:52 +0000 (10:45 -0700)]
small updates....

6 years agoMerge pull request #13144 from parjong/fix/INTERPRETER_build
Bruce Forstall [Tue, 1 Aug 2017 17:29:04 +0000 (10:29 -0700)]
Merge pull request #13144 from parjong/fix/INTERPRETER_build

Fix FEATURE_INTERPRETER build

6 years agoUpdated guidance based on PR feedback
Mark Wilkie [Tue, 1 Aug 2017 17:18:16 +0000 (10:18 -0700)]
Updated guidance based on PR feedback

6 years ago[Arm64] Adjust alignment for 128 byte cache line (#12801)
Steve MacLean [Tue, 1 Aug 2017 17:11:55 +0000 (13:11 -0400)]
[Arm64] Adjust alignment for 128 byte cache line (#12801)

6 years agoFix Desktop build break in regset.cpp
jashook [Tue, 1 Aug 2017 16:35:29 +0000 (09:35 -0700)]
Fix Desktop build break in regset.cpp

6 years agoMerge pull request #12947 from pgavlin/GH12919
Pat Gavlin [Tue, 1 Aug 2017 15:53:58 +0000 (08:53 -0700)]
Merge pull request #12947 from pgavlin/GH12919

Lock arg registers when generating a `JMP` on ARM/Legacy.

6 years agoFix FEATURE_INTERPRETER build error
Jonghyun Park [Tue, 1 Aug 2017 13:04:24 +0000 (22:04 +0900)]
Fix FEATURE_INTERPRETER build error

6 years ago[RyuJIT/ARM32] Tailcall: passing struct argument
Hyeongseok Oh [Tue, 1 Aug 2017 08:42:56 +0000 (17:42 +0900)]
[RyuJIT/ARM32] Tailcall: passing struct argument

Fix bug in tailcall(jmp) to pass struct argument
Remove NYI for HFA struct passing

6 years agoFormat code.
Pat Gavlin [Tue, 1 Aug 2017 04:41:37 +0000 (21:41 -0700)]
Format code.

6 years ago[RyuJIT/ARM32] Remove NYI: using zero register
Hyeongseok Oh [Tue, 1 Aug 2017 01:44:51 +0000 (10:44 +0900)]
[RyuJIT/ARM32] Remove NYI: using zero register

We can remove NYI to using zero register to assign constant zero argument.
There is no zero register on ARM32. (src/jit/registerarm32.h)
So we can change the NYI to unreached() assertion.

6 years agoHandle unspilling part of a multi-use reg with FREE_REG
Bruce Forstall [Tue, 1 Aug 2017 00:28:04 +0000 (17:28 -0700)]
Handle unspilling part of a multi-use reg with FREE_REG

If rsUnspillOneReg() is called with willKeepNewReg==FREE_REG
(indicating the unspilled value will be free on return),
and the reg to unspill is multi-use, then we were releasing the
underlying temp incorrectly, since the temp still contains the
other multi-use spilled values, which will be subsequently
unspilled.

This occurred in a very large, JitStressRegs=1/JitStress=1 test case.

Fixes #12911

6 years agoMerge pull request #13132 from rartemev/legbnd_fix_misprint
Roman Artemev [Tue, 1 Aug 2017 00:16:37 +0000 (17:16 -0700)]
Merge pull request #13132 from rartemev/legbnd_fix_misprint

Fixed misprint in legacy backend that led to assert failure

6 years agoMerge pull request #13096 from hseok-oh/ryujit/remove_nyi_promote
Bruce Forstall [Mon, 31 Jul 2017 22:43:05 +0000 (15:43 -0700)]
Merge pull request #13096 from hseok-oh/ryujit/remove_nyi_promote

[RyuJIT/ARM32] Remove NYI: promoted struct argument

6 years agoLock all ABI arg registers when generating a GS check on ARM/Legacy.
Pat Gavlin [Mon, 31 Jul 2017 22:38:54 +0000 (15:38 -0700)]
Lock all ABI arg registers when generating a GS check on ARM/Legacy.

These registers may otherwise be overwritten by code that is generated
between the JMP/tail call and the epilog (e.g. GS cookie checks).

Fixes #12919.

6 years agoFixed misprint in legacy backend that led to assert failure
Roman Artemev [Mon, 31 Jul 2017 21:53:57 +0000 (14:53 -0700)]
Fixed misprint in legacy backend that led to assert failure

6 years agoMerge pull request #13103 from pgavlin/GH12910
Pat Gavlin [Mon, 31 Jul 2017 21:44:29 +0000 (14:44 -0700)]
Merge pull request #13103 from pgavlin/GH12910

Only lock unlocked registers in `rsUnspillRegPair`.

6 years agoAdd benchmarks mandelbrot and fannkuch (#12933)
Victor "Nate" Graf [Mon, 31 Jul 2017 20:34:53 +0000 (13:34 -0700)]
Add benchmarks mandelbrot and fannkuch (#12933)

* Add benchmarks mandelbrot and fannkuch

Adding mandelbrot and fankuch-redux from Benchmarks Game to
complete the representation of benchmarks from this list
http://benchmarksgame.alioth.debian.org/u64q/csharp.html

* Update source acknolegments and edit return codes

* Add checksums to verify benchmark runs

This commit adds checksums, which are pre-computed for each input
case, to verify that the fannkuch and mandelbrot benchmarks
actualy compute the desired function

* Revert version bump

* Remove XunitPerfHarness from Main

* Remove an unnecessary line

* Add iterations to fannkuch to inscrease runtime

6 years agoJIT: Fix value type box optimization (#13016)
Andy Ayers [Mon, 31 Jul 2017 20:01:01 +0000 (13:01 -0700)]
JIT: Fix value type box optimization (#13016)

Boxing a value type produces a non-null result. If the result of the box is
only used to feed a compare against null, the jit tries to optimize the box
away entirely since the result of the comparison is known. Such idiomatic
expressions arise fairly often in generics instantiated over value types.

In the current implementation the box expands into two parts. The first is
an upstream statement to allocate a boxed object and assign a reference to
the boxed object to a local var known as the "box temp". The second is an
expression tree whose value is the box temp that also contains an an
encapsulated copy from the value being boxed to the payload section of the
boxed object. The box node also contains a pointer back to the first
statement (more on this later).

In the examples being discussed here this second tree is a child of a compare
node whose other child is a null pointer. When the optimization fires, the
upstream allocation statement is located via the pointer in the box node and
removed, and the entire compare is replaced with a constant 0 or 1 as
appropriate. Unfortunately the encapsulated copy in the box subtree may
include side effects that should be preserved, and so this transformation is
unsafe.

Note that the copy subtree as a whole will always contain side effects, since
the copy is storing values into the heap, and that copy now will not happen.
But the side effects that happen when producing the value to box must remain.

In the initial example from #12949 the side effects in question were
introduced by the jit's optimizer to capure a CSE definition. #13016 gives
several other examples where the side effects are present in the initial user
code. For instance the value being boxed might come from an array, in which
case the encapsulated copy in the box expression tree would contain the array
null check and bounds check. So removing the entire tree can alter behavior.

This fix attempts to carefully preserve the important side effects by
reworking how a box is imported. The copy is now moved out from under the box
into a second upstream statement. The box itself is then just a trivial
side-effect-free reference to the box temp. To ensure proper ordering of side
effects the jit spills the evaluation stack before appending the copy
statement.

When the optimization fires the jit removes the upstream heap allocation
as before, as well as the now-trivial compare tree. It analyzes the source
side of the upstream copy. If it is side effect free, the copy is removed
entirely. If not, the jit modifies the copy into a minimal load of the
boxed value, and this load should reproduce the necessary side effects.

The optimization is only performed when the tree shape of the copy matches
expected patterns.

There are some expected cases where the tree won't match, for instance if the
optimization is invoked while the jit is inlining. Because this optimization
runs at several points the jit can catch these cases once inlining completes.
There is one case that is not handled that could be -- if the assignment part
of the copy is itself a subtree of a comma. This doesn't happen often.

The optimization is now also extended to handle the case where the comparision
operation is `cgt.un`. This doesn't catch any new cases but causes the
optimization to happen earlier, typically during importation, which should
reduce jit time slightly.

Generally the split of the box into two upstream statements reduces code size,
especially when the box expression is incorporated into a larger tree -- for
example a call. However in some cases where the value being boxed comes from
an array, preserving the array bounds check now causes loop cloning to kick
in and increase code size. Hence the overall size impact on the jit-diff set is
essentially zero.

Added a number of new test cases showing the variety of situations that must
be handled and the need to spill before appending the copy statement.

Fixes #12949.

6 years agoAdd documents about JIT optimization planning
Joseph Tremoulet [Thu, 20 Jul 2017 17:28:53 +0000 (13:28 -0400)]
Add documents about JIT optimization planning

This change adds two documents:

 - JitOptimizerPlanningGuide.md discusses how we can/do/should go about
   identifying, prioritizing, and validating optimization improvement
   opportunities, as well as several ideas for how we might improve the
   process.
 - JitOptimizerTodoAssessment.md lists several potential optimization
   improvements that always come up in planning discussions, with brief
   notes about each, to capture current thinking.

6 years agoMerge pull request #13111 from dotnet-maestro-bot/master-UpdateDependencies
Stephen Toub [Mon, 31 Jul 2017 18:48:55 +0000 (14:48 -0400)]
Merge pull request #13111 from dotnet-maestro-bot/master-UpdateDependencies

Update CoreClr, CoreFx to preview2-25531-02, preview2-25531-01, respectively (master)

6 years ago[ARM/Linux] Set R2R_INDIRECT_PARAM before R2R call (#12952)
Jonghyun Park [Mon, 31 Jul 2017 18:17:47 +0000 (03:17 +0900)]
[ARM/Linux] Set R2R_INDIRECT_PARAM before R2R call (#12952)

* Set R2R_INDIRECT_PARAM before R2R call

* Revise code formatting

* Preserve R2R_INDIRECT_PARAM across R2R call

* Fix format error

* Attempt to fix x86/Windows build error

* 2nd attempt to fix x86/Windows build error

* Revise RA to reserve R2R_INDIRECT_PARAM reg

* Fix format error

6 years ago[Arm64] Implement Poison()
Steve MacLean, Qualcomm Datacenter Technologies Inc [Mon, 31 Jul 2017 16:24:27 +0000 (12:24 -0400)]
[Arm64] Implement Poison()

Fixes #13117

6 years agoAdded CROSS guidance
Mark Wilkie [Mon, 31 Jul 2017 16:43:10 +0000 (09:43 -0700)]
Added CROSS guidance

6 years agoMerge pull request #13116 from parjong/fix/x86_stklv_on_temp_block
Bruce Forstall [Mon, 31 Jul 2017 16:12:49 +0000 (09:12 -0700)]
Merge pull request #13116 from parjong/fix/x86_stklv_on_temp_block

[x86/Linux] Set proper stack level for temp label BB

6 years agoImplement Type.IsByRefLike for CoreCLR (#13123)
Atsushi Kanamori [Mon, 31 Jul 2017 15:28:04 +0000 (08:28 -0700)]
Implement Type.IsByRefLike for CoreCLR (#13123)

Since this already exists in CoreRT and the
virtual method will get propagated to CoreCLR,
we might as well make it work here before an IsByRefLike
check finds its way into shared code and starts
throwing NotSupportedExceptions on CoreCLR.

6 years agoUpdate CoreClr, CoreFx to preview2-25531-02, preview2-25531-01, respectively
dotnet-maestro-bot [Mon, 31 Jul 2017 12:49:16 +0000 (05:49 -0700)]
Update CoreClr, CoreFx to preview2-25531-02, preview2-25531-01, respectively

6 years agoEnable RHEL6 and CentOS 6 RID detection in build (#13101)
Jan Vorlicek [Mon, 31 Jul 2017 09:51:13 +0000 (11:51 +0200)]
Enable RHEL6 and CentOS 6 RID detection in build (#13101)

This change adds RHEL6 and CentOS 6 RID detection to build.sh.
These distros don't have the /etc/os-release file and so
we need to use another source - the /etc/redhat-release file

6 years ago Fill freed loader heap chunk with non-zero value (#12731)
Jonghyun Park [Mon, 31 Jul 2017 07:48:16 +0000 (16:48 +0900)]
 Fill freed loader heap chunk with non-zero value (#12731)

* Add FEATURE_LOADER_HEAP_GUARD feature

* Invoke memset only for reclaimed regions

* Enable FEATURE_LOADER_HEAP_GUARD by default

* Insert trap inside UMEntryThunk::Terminate

* Make all exectuable heaps not to zero-initialize itself

Use fZeroInit (instead of fMakeRelazed)

* Add comment

* Revert unnecessary changes

* Add and use 'Poison' method to insert a trap

* Do NOT invoke FlushInstructionCache

* Update comment

* Add comment on ARM Poisoning instruction

* Use X86_INSTR_INT3 instead of 0xCC

6 years agoSet proper stack level for temp label BB
Jonghyun Park [Mon, 31 Jul 2017 02:27:58 +0000 (11:27 +0900)]
Set proper stack level for temp label BB

6 years agoMerge pull request dotnet/corert#4242 from dotnet/nmirror
Michal Strehovský [Fri, 28 Jul 2017 16:41:38 +0000 (09:41 -0700)]
Merge pull request dotnet/corert#4242 from dotnet/nmirror

Merge master to nmirror

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoRemove extra qualification in member function declaration (#13104)
Xiang Fan [Sun, 30 Jul 2017 16:18:23 +0000 (09:18 -0700)]
Remove extra qualification in member function declaration (#13104)

Fix issues mentioned in https://github.com/dotnet/coreclr/issues/12799

6 years agoFix bug converting BBJ_CALLFINALLY block to BBJ_THROW on ARM32 (#13094)
Bruce Forstall [Sat, 29 Jul 2017 18:46:42 +0000 (11:46 -0700)]
Fix bug converting BBJ_CALLFINALLY block to BBJ_THROW on ARM32 (#13094)

* Fix bug converting BBJ_CALLFINALLY block to BBJ_THROW on ARM32

On ARM32, the target block of a return from a finally (aka, the
"continuation") is marked by a bit, `BBF_FINALLY_TARGET`, that is
used to generate proper code to ensure correct unwinding behavior.
This bit is set in the importer, and maintained through to codegen.
We assert if we attempt to delete a block with this bit. Thus, various
code that deletes dead code needs to call fgClearFinallyTargetBit()
to keep the bit updated.

This bug is a case where very early in morph, a BBJ_CALLFINALLY
block is converted to a BBJ_THROW. We should be able to just call
fgClearFinallyTargetBit(), but that function depends on the predecessor
lists, which in this case, haven't yet been built. So, instead, clear
the bits everywhere, and then recompute them at the end of morph.
This is similar to what is done with the various try/finally
optimizations done at the beginning of morph.

(It's an open question about whether we could avoid setting the bits
at all until just before codegen.)

Fixes VSO468731

No diffs in desktop altjit asm diffs.

* Formatting

6 years agoMerge pull request #12890 from dotnet-maestro-bot/master-UpdateDependencies
Stephen Toub [Sat, 29 Jul 2017 16:49:02 +0000 (12:49 -0400)]
Merge pull request #12890 from dotnet-maestro-bot/master-UpdateDependencies

Update CoreClr, CoreFx to preview2-25529-02, preview2-25529-02, respectively (master)

6 years agoUpdate CoreClr, CoreFx to preview2-25529-02, preview2-25529-02, respectively
dotnet-maestro-bot [Sat, 29 Jul 2017 13:27:03 +0000 (06:27 -0700)]
Update CoreClr, CoreFx to preview2-25529-02, preview2-25529-02, respectively

6 years agoRemove unnecessary allocations from RangeCheck
Mike Danes [Sat, 29 Jul 2017 10:36:25 +0000 (13:36 +0300)]
Remove unnecessary allocations from RangeCheck

There's no need to collect PHI arg ranges in a list and then merge them all. Merging can be done as arg ranges are computed.

6 years agoFix typo in comment (#13089)
James Singleton [Sat, 29 Jul 2017 05:47:24 +0000 (06:47 +0100)]
Fix typo in comment (#13089)

integeter -> integer

6 years agoFormat code.
Pat Gavlin [Sat, 29 Jul 2017 03:10:14 +0000 (20:10 -0700)]
Format code.

6 years agoOptimize for idle WorkStealingQueueList (#13007)
Steve MacLean [Sat, 29 Jul 2017 02:08:01 +0000 (22:08 -0400)]
Optimize for idle WorkStealingQueueList (#13007)

When WorkStealingQueue is empty there is an O(N^2)
penalty for searching the empty queues.  Avoid by
stashing global emptiness

6 years agoMerge pull request #13079 from CarolEidt/RyuJITTutorial
Carol Eidt [Fri, 28 Jul 2017 23:32:54 +0000 (16:32 -0700)]
Merge pull request #13079 from CarolEidt/RyuJITTutorial

RyuJIT Tutorial

6 years agoRyuJIT Tutorial
Carol Eidt [Thu, 27 Jul 2017 06:48:10 +0000 (23:48 -0700)]
RyuJIT Tutorial

This is an initial translation of the slides presented at the PLDI 2016
RyuJIT Tutorial into markdown.
The IR dumps need to be updated to reflect IR changes since the tutorial was given.

6 years agoOnly lock unlocked registers in `rsUnspillRegPair`.
Pat Gavlin [Fri, 28 Jul 2017 18:42:16 +0000 (11:42 -0700)]
Only lock unlocked registers in `rsUnspillRegPair`.

`rsUnspillRegPair` needs to lock the hi/lo part of the reg pair when
unspilling the lo/hi part in order to ensure that the two parts of the
pair do not end up in the same register. However, the register to be
locked may already be locked if it is a multi-use register. In this case
`rsUnspillRegPair` does not need to re-lock the register.

Fixes #12910.

6 years agoMerge pull request #13075 from stephentoub/string_span_ctor
Stephen Toub [Fri, 28 Jul 2017 22:10:13 +0000 (18:10 -0400)]
Merge pull request #13075 from stephentoub/string_span_ctor

Add new String(ReadOnlySpan<char>) ctor

6 years agoMerge pull request #13095 from pgavlin/VSO469217
Pat Gavlin [Fri, 28 Jul 2017 18:32:17 +0000 (11:32 -0700)]
Merge pull request #13095 from pgavlin/VSO469217

Rerun reg predict on ARM if codegen temps increase the frame size.

6 years agoPR feedback.
Pat Gavlin [Fri, 28 Jul 2017 16:06:41 +0000 (09:06 -0700)]
PR feedback.

6 years agoAdd String(ReadOnlySpan<char>) ctor
Stephen Toub [Fri, 28 Jul 2017 16:00:09 +0000 (12:00 -0400)]
Add String(ReadOnlySpan<char>) ctor

6 years agoAdd generic encoding support to metasig
Jan Kotas [Fri, 28 Jul 2017 15:53:01 +0000 (11:53 -0400)]
Add generic encoding support to metasig

6 years agoFix tier0 flag on default code versions (#13098)
Noah Falk [Fri, 28 Jul 2017 09:26:42 +0000 (02:26 -0700)]
Fix tier0 flag on default code versions (#13098)

Fixes github issue 13019.

6 years ago[RyuJIT/ARM32] Remove NYI: promoted struct argument
Hyeongseok Oh [Fri, 28 Jul 2017 01:41:59 +0000 (10:41 +0900)]
[RyuJIT/ARM32] Remove NYI: promoted struct argument

We can remove NYI for promoted struct argument on codegen phase.
On morphing phase, argument assignment for promoted struct will be changed to assignment on tmpvar struct.
And this tmpvar is not promoted. So we change this NYI to assertion check.

6 years agoMerge pull request #13087 from pgavlin/FixGetTargetOfCallARM
Pat Gavlin [Fri, 28 Jul 2017 00:41:56 +0000 (17:41 -0700)]
Merge pull request #13087 from pgavlin/FixGetTargetOfCallARM

Fix `getTargetOfCall` for ARM.

6 years agoRerun reg predict on ARM if codegen temps increase the frame size.
Pat Gavlin [Thu, 27 Jul 2017 22:48:48 +0000 (15:48 -0700)]
Rerun reg predict on ARM if codegen temps increase the frame size.

When compiling for ARM, we need to reserve an additional register if the
frame size exceeds a particular watermark. We currently evaluate whether
or not we need to reserve this register in two places: first before
register prediction and then again during register prediction but after
allocating registers for lclVars. The latter evalutation is used to
check whether or not we can remove the register reservation if the frame
size shrinks due to lclVar register allocation. Unfortunately, its
frame size estimate does not include codegen temps, so we can end up
undoing the register reservation in a frame that requires the reserved
register once the number of temps is estimated.

This change adds an additional check to the register predictor after
temp estimation has occurred and reruns prediction if the frame size has
increased and now requires a register reservation that it did not
beforehand.

Fixes VSO 469217.

6 years agoFix Alpine build (#13052)
Jan Vorlicek [Thu, 27 Jul 2017 22:18:31 +0000 (00:18 +0200)]
Fix Alpine build (#13052)

This change fixes CoreCLR build on Alpine Linux

6 years agoMerge pull request #13032 from jashook/add_arm_stress_scenarios
Jarret Shook [Thu, 27 Jul 2017 19:48:40 +0000 (12:48 -0700)]
Merge pull request #13032 from jashook/add_arm_stress_scenarios

Add arm legacy backend stress jobs

6 years agoMerge pull request #13043 from davmason/profiler_r2r
David Mason [Thu, 27 Jul 2017 19:46:56 +0000 (12:46 -0700)]
Merge pull request #13043 from davmason/profiler_r2r

don't use r2r images when the profiler requests that ngen images are disabled

6 years agoFix `getTargetOfCall` for ARM.
Pat Gavlin [Thu, 27 Jul 2017 19:32:07 +0000 (12:32 -0700)]
Fix `getTargetOfCall` for ARM.

If the instruction we're decoding is not a call, don't attempt to decode
it as if it were an x86 instruction. Instead, just return 0 as on ARM64.

6 years agogcconcurrent config should be obtained from g_pConfig which takes env vars/reg values...
Maoni Stephens [Thu, 27 Jul 2017 19:26:15 +0000 (12:26 -0700)]
gcconcurrent config should be obtained from g_pConfig which takes env vars/reg values into consideration as well (#13078)

6 years agoAdd new Span-based virtual sync Read/Write Stream methods (#13058)
Stephen Toub [Thu, 27 Jul 2017 17:20:48 +0000 (13:20 -0400)]
Add new Span-based virtual sync Read/Write Stream methods (#13058)

* Add virtual Stream.Read/Write Span-based APIs

* Override Span-based Read/Write on MemoryStream

* Override Span-based Read/Write on UnmanagedMemoryStream

* Address PR feedback

6 years agoAdd arm legacy backend stress jobs
jashook [Tue, 25 Jul 2017 21:40:46 +0000 (14:40 -0700)]
Add arm legacy backend stress jobs

6 years agoMerge pull request #13077 from wateret/fix-runtest
Bruce Forstall [Thu, 27 Jul 2017 15:56:37 +0000 (08:56 -0700)]
Merge pull request #13077 from wateret/fix-runtest

Fix print message in runtest.sh

6 years agoFix print message in runtest.sh
Hanjoung Lee [Thu, 27 Jul 2017 05:04:43 +0000 (14:04 +0900)]
Fix print message in runtest.sh

6 years agoMerge pull request #13072 from pgavlin/VSO468730
Pat Gavlin [Thu, 27 Jul 2017 01:35:26 +0000 (18:35 -0700)]
Merge pull request #13072 from pgavlin/VSO468730

Disable folding in genCreateAddrMode under LB-specific circumstances.

6 years agoPR feedback.
Pat Gavlin [Thu, 27 Jul 2017 00:39:54 +0000 (17:39 -0700)]
PR feedback.

6 years agoDisable folding in genCreateAddrMode under LB-specific circumstances.
Pat Gavlin [Wed, 26 Jul 2017 22:54:16 +0000 (15:54 -0700)]
Disable folding in genCreateAddrMode under LB-specific circumstances.

If we are calling this function during emit with `fold = true`, then disable
folding iff the value to be used as the index is already in a register.
Not doing so can cause entire address modes to be folded away, which
leads to asserts and potential SBCG.

Fixes VSO 468730.

6 years agoThese 2 places should be size_t, not int 'cause on 64-bit they can be > int's in...
Maoni Stephens [Wed, 26 Jul 2017 20:23:20 +0000 (13:23 -0700)]
These 2 places should be size_t, not int 'cause on 64-bit they can be > int's in which we have a problem casting them to int's. (#13047)

6 years agocode review feedback
David Mason [Wed, 26 Jul 2017 19:44:15 +0000 (12:44 -0700)]
code review feedback

6 years agoRemove catch filter on Assembly.GetForwardedTypes() (#13054)
Atsushi Kanamori [Wed, 26 Jul 2017 17:39:10 +0000 (10:39 -0700)]
Remove catch filter on Assembly.GetForwardedTypes() (#13054)

To be more consistent with Assembly.GetTypes()

Also removed left over "unsafe" keyword that's
no longer needed.

6 years agoMerge pull request #13045 from pgavlin/GitHub12907
Pat Gavlin [Wed, 26 Jul 2017 16:57:17 +0000 (09:57 -0700)]
Merge pull request #13045 from pgavlin/GitHub12907

Only set flags on a cpBlk source if it is an indir.

6 years ago[Arm64] Enable CPUGroupInfo (#12766)
Steve MacLean [Wed, 26 Jul 2017 16:18:25 +0000 (12:18 -0400)]
[Arm64] Enable CPUGroupInfo (#12766)

6 years agoMerge pull request #13050 from sjsinju/OperIsBinary
Bruce Forstall [Wed, 26 Jul 2017 15:49:02 +0000 (08:49 -0700)]
Merge pull request #13050 from sjsinju/OperIsBinary

[RyuJIT/ARM32] Add GT_PUTARG_SPLIT case on TryGetUse()

6 years agoMerge pull request #13039 from pgavlin/VSO469602
Pat Gavlin [Wed, 26 Jul 2017 13:56:03 +0000 (06:56 -0700)]
Merge pull request #13039 from pgavlin/VSO469602

Admit additional `ADD` patterns in `GenTree:IsFieldAddr`.

6 years agoImplement Assembly.GetForwardedTypes() on CoreCLR (#13001)
Atsushi Kanamori [Wed, 26 Jul 2017 13:28:15 +0000 (06:28 -0700)]
Implement Assembly.GetForwardedTypes() on CoreCLR (#13001)

Fixes https://github.com/dotnet/coreclr/issues/12391

Original approval and specs at
https://github.com/dotnet/corefx/issues/19789

6 years agoAdd GT_PUTARG_SPLIT case on TryGetUse()
sjsujinkim [Wed, 26 Jul 2017 07:36:16 +0000 (16:36 +0900)]
Add GT_PUTARG_SPLIT case on TryGetUse()

6 years agoMerge pull request #13044 from pgavlin/VSO469600
Pat Gavlin [Wed, 26 Jul 2017 04:04:23 +0000 (21:04 -0700)]
Merge pull request #13044 from pgavlin/VSO469600

Do not get the GC layout for small structs in legacy backend.

6 years agoMerge pull request #13040 from pgavlin/VSO469624
Pat Gavlin [Wed, 26 Jul 2017 03:10:23 +0000 (20:10 -0700)]
Merge pull request #13040 from pgavlin/VSO469624

Set `BBF_RUN_RARELY` for a scratch first BB if called count is 0.

6 years agoMerge pull request #13036 from rartemev/tests_build_fix_rest
Roman Artemev [Wed, 26 Jul 2017 02:11:47 +0000 (19:11 -0700)]
Merge pull request #13036 from rartemev/tests_build_fix_rest

Made possible to build all tests on Linux as well.

6 years agoOnly set flags on a cpBlk source if it is an indir.
Pat Gavlin [Wed, 26 Jul 2017 02:02:50 +0000 (19:02 -0700)]
Only set flags on a cpBlk source if it is an indir.

Just what it says on the tin.

Fixes #12907.

6 years agoFormat code.
Pat Gavlin [Wed, 26 Jul 2017 01:45:30 +0000 (18:45 -0700)]
Format code.

6 years agoDo not get the GC layout for small structs in legacy backend.
Pat Gavlin [Wed, 26 Jul 2017 01:15:40 +0000 (18:15 -0700)]
Do not get the GC layout for small structs in legacy backend.

Such structs are too small to contain any GC pointers. Synthesize a GC
layout with a single slot of `TYPE_GC_NONE`.

Fixes VSO 469600.

6 years agoMerge pull request #13035 from pgavlin/VSO468732
Pat Gavlin [Wed, 26 Jul 2017 01:05:20 +0000 (18:05 -0700)]
Merge pull request #13035 from pgavlin/VSO468732

Treat byref-typed uses of int-typed lclVars as type int in LB.

6 years agodon't use r2r images when the profiler requests that ngen images are disabled
David Mason [Tue, 25 Jul 2017 22:56:42 +0000 (15:56 -0700)]
don't use r2r images when the profiler requests that ngen images are disabled