platform/upstream/coreclr.git
6 years agoMerge pull request #13250 from JosephTremoulet/CaptureHead
Joseph Tremoulet [Mon, 7 Aug 2017 23:07:21 +0000 (19:07 -0400)]
Merge pull request #13250 from JosephTremoulet/CaptureHead

Stop rejecting loops with backward exits

6 years agoSwaping the order of how scenarios are run. (#13255)
José Rivero [Mon, 7 Aug 2017 21:57:10 +0000 (14:57 -0700)]
Swaping the order of how scenarios are run. (#13255)

- Currently ILLink scenario is broken and the x64 scenario leg does not run JitBench
  By swaping the scenario it will let JitBench run while ILLink is being fixed.

6 years agoMerge pull request #13236 from briansull/arm-issue
Brian Sullivan [Mon, 7 Aug 2017 21:09:12 +0000 (14:09 -0700)]
Merge pull request #13236 from briansull/arm-issue

Updated fix for issue #13093

6 years agoFix Region DisplayName (#13249)
Tarek Mahmoud Sayed [Mon, 7 Aug 2017 19:48:39 +0000 (12:48 -0700)]
Fix Region DisplayName (#13249)

This change fix the logic when getting the display name from the OS and when we use the native name instead

6 years agoCleanup code access security from the unmanaged runtime (#13241)
Jan Kotas [Mon, 7 Aug 2017 19:16:45 +0000 (12:16 -0700)]
Cleanup code access security from the unmanaged runtime (#13241)

6 years agoStop rejecting loops with backward exits
Joseph Tremoulet [Mon, 7 Aug 2017 18:11:39 +0000 (11:11 -0700)]
Stop rejecting loops with backward exits

Remove some convoluted code from `optFindNaturalLoops` that has the effect
of rejecting loops with exits that are (lexically) backwards branches.
The comments in the removed code indicate that the intent was to identify
loops which include blocks lexically before `top`, but since `top` is
defined as `head->bbNext`, any such loop was doomed to be rejected by the
code (also being removed) that rejects a loop that "captures head".

When a loop does have a branch back to a block prior to `top`, the
subsequent code that identifies loop exits will identify it as such, and
the subsequent code that rejects predecessors other than `head` of loop
blocks ensures that the backwards branch truly was an exit.

This change still leaves `top` and `first` as separate concepts in the
loop table, to allow for subsequently improvements to loop detection to
identify such loops, though today they're always the same block.

6 years agoRemoved the legacy JIT32 assert regarding 4-byte alignment inArenaAllocator::allocate...
Brian Sullivan [Fri, 4 Aug 2017 21:39:05 +0000 (14:39 -0700)]
Removed the legacy JIT32 assert regarding 4-byte alignment inArenaAllocator::allocateMemory
Immediately after this assert we roundUp to an pointer size allocation amount.

Stopped using two implementation of ArenaAllocator::allocateMemory
Instead we add ifdef DEBUG parts to the common version
Move the implementation of ArenaAllocator::allocateMemory to the header file

Fixed a couple of allocations in assertionprop to use CMF_AssertionProp so that we correctly
attribute which phase uses the memory being allocated.
Added range check for the array writes in Compiler::optMapComplementary

Removed the AlignUp to 4-byte in operator new and new[] in compiler.hpp

6 years agofix callsignalhandlerwrapper(arm) (#13114)
chunseoklee [Mon, 7 Aug 2017 17:51:02 +0000 (02:51 +0900)]
fix callsignalhandlerwrapper(arm) (#13114)

issue: #13099
1. add unwind information
2. add free_stack

6 years agoUpdate CoreClr, CoreFx to preview2-25607-01, preview2-25607-02, respectively (#13133)
dotnet-maestro-bot [Mon, 7 Aug 2017 17:48:01 +0000 (10:48 -0700)]
Update CoreClr, CoreFx to preview2-25607-01, preview2-25607-02, respectively (#13133)

6 years agoUse attribute names without namespaces in a few places (#13248)
dotnet bot [Mon, 7 Aug 2017 17:47:05 +0000 (10:47 -0700)]
Use attribute names without namespaces in a few places (#13248)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoReduce size of array enumerators for x86 (#13157)
James Ko [Mon, 7 Aug 2017 16:55:51 +0000 (12:55 -0400)]
Reduce size of array enumerators for x86 (#13157)

6 years agoUse placement new to initialize ELF Header (instead of memcpy) (#13218)
Jonghyun Park [Mon, 7 Aug 2017 16:27:16 +0000 (01:27 +0900)]
Use placement new to initialize ELF Header (instead of memcpy) (#13218)

6 years agoEnable string format tests on Linux. (#13191)
Jim Ma [Mon, 7 Aug 2017 16:25:25 +0000 (04:25 +1200)]
Enable string format tests on Linux. (#13191)

Modified string format tests so that it can be supported on Linux.

Fix #11655

6 years agoUpdate buildtools to 2.0.0-prerelease-01903-01. (#13228)
Davis Goodin [Mon, 7 Aug 2017 15:00:42 +0000 (10:00 -0500)]
Update buildtools to 2.0.0-prerelease-01903-01. (#13228)

6 years agoMove files to shared partition (#13244)
Jan Kotas [Mon, 7 Aug 2017 12:56:05 +0000 (05:56 -0700)]
Move files to shared partition (#13244)

6 years agoUpdate linux-instructions.md (#13246)
Sergio Schvezov [Mon, 7 Aug 2017 12:55:34 +0000 (09:55 -0300)]
Update linux-instructions.md (#13246)

On Ubuntu a configuration failure occurs when running `cmake` through `build.sh` on `corefx` asking to install `libkrb5-dev` or its equivalent.

6 years agoMerge pull request #13227 from BruceForstall/Revert13186
Pat Gavlin [Sat, 5 Aug 2017 02:00:48 +0000 (19:00 -0700)]
Merge pull request #13227 from BruceForstall/Revert13186

Revert "Fixes issue #13093"

6 years agotypo (dotnet/corert#4274)
github-john-doe [Fri, 4 Aug 2017 22:12:03 +0000 (15:12 -0700)]
typo (dotnet/corert#4274)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agotypo (#13229)
github-john-doe [Fri, 4 Aug 2017 22:50:47 +0000 (15:50 -0700)]
typo (#13229)

6 years agoalign the segment size to power of 2 and perf fix on getting the seg mapping table...
Maoni Stephens [Fri, 4 Aug 2017 19:55:58 +0000 (12:55 -0700)]
align the segment size to power of 2 and perf fix on getting the seg mapping table indices (#13076)

seg size fixes

6 years agoRevert "Fixes issue #13093"
Bruce Forstall [Fri, 4 Aug 2017 14:13:59 +0000 (07:13 -0700)]
Revert "Fixes issue #13093"

This reverts commit 0d390cceb7ab0c8a271afce315fe4456211fdc6c.

6 years agoMerge pull request #13197 from BredPet/master
Bruce Forstall [Fri, 4 Aug 2017 14:03:22 +0000 (07:03 -0700)]
Merge pull request #13197 from BredPet/master

ARM32: fix switch jump table generation bug

6 years agoMerge pull request dotnet/corert#4271 from dotnet/nmirror
Michal Strehovský [Fri, 4 Aug 2017 04:20:50 +0000 (21:20 -0700)]
Merge pull request dotnet/corert#4271 from dotnet/nmirror

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoARM32: fix switch jump table generation bug
Petr Bred [Thu, 3 Aug 2017 15:23:53 +0000 (18:23 +0300)]
ARM32: fix switch jump table generation bug
- force using an inlined jumping instead switch table generation
- see https://github.com/dotnet/coreclr/issues/13194

Signed-off-by: Petr Bred <bredpetr@gmail.com>
6 years agoMerge pull request #13143 from shimingsg/v-shige/add-nogc
Shiming Ge [Fri, 4 Aug 2017 06:18:01 +0000 (14:18 +0800)]
Merge pull request #13143 from shimingsg/v-shige/add-nogc

Add NoGC test to coreclr

6 years agoMerge pull request #13186 from briansull/alloc-align-fixes
Brian Sullivan [Fri, 4 Aug 2017 00:21:19 +0000 (17:21 -0700)]
Merge pull request #13186 from briansull/alloc-align-fixes

Fixes issue #13093

6 years agoFixes issue #13093
Brian Sullivan [Thu, 3 Aug 2017 01:48:48 +0000 (18:48 -0700)]
Fixes issue #13093

Removed the legacy JIT32 assert regarding 4-byte alignment inArenaAllocator::allocateMemory
Immediately after this assert we roundUp to an pointer size allocation amount.

Fixed a couple of allocations in assertionprop to use CMF_AssertionProp so that we correctly
attribute which phase uses the memory being allocated.
Added range check for the array writes in Compiler::optMapComplementary

Removed the now unnecessary AlignUp to 4-byte in operator new and new[] in compiler.hpp

6 years agoDrop the first iteration value of JitBench. (#13211)
José Rivero [Thu, 3 Aug 2017 21:59:47 +0000 (14:59 -0700)]
Drop the first iteration value of JitBench. (#13211)

6 years agotypo (#13196)
github-john-doe [Thu, 3 Aug 2017 20:37:11 +0000 (13:37 -0700)]
typo (#13196)

* typo

* typo

6 years agoMerge pull request #13145 from hqueue/arm/ryujit/issue_13118
Carol Eidt [Thu, 3 Aug 2017 15:16:05 +0000 (08:16 -0700)]
Merge pull request #13145 from hqueue/arm/ryujit/issue_13118

[Ryujit/ARM32] Update allocateBusyReg() in LSRA for ARM32

6 years agoMerge pull request #13166 from YongseopKim/ryujit/arm32/add_handling_secure_delegate_inv
Bruce Forstall [Thu, 3 Aug 2017 15:06:10 +0000 (08:06 -0700)]
Merge pull request #13166 from YongseopKim/ryujit/arm32/add_handling_secure_delegate_inv

[RyuJIT/ARM32] Adds code to handle SecureDelegateInvoke

6 years ago[RyuJIT/ARM32] Adds code to handle SecureDelegateInvoke
Yongseop Kim [Wed, 2 Aug 2017 12:04:47 +0000 (21:04 +0900)]
[RyuJIT/ARM32] Adds code to handle SecureDelegateInvoke

- Adds code to handle SecureDelegateInvoke on morph phase like legacy's handling.
- Set R4 to proper addr for indirect call of vsd
- This is like legacy's doing from #6500.
- Fix #12993

6 years agoApply review feedback
Hyung-Kyu Choi [Thu, 3 Aug 2017 02:24:38 +0000 (11:24 +0900)]
Apply review feedback

- Sink a local variable into the innermost block
- Fix format for if-else statement by adding braces

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoMerge pull request #13154 from christianscheuer/fix-readme
Stephen Toub [Thu, 3 Aug 2017 01:55:58 +0000 (21:55 -0400)]
Merge pull request #13154 from christianscheuer/fix-readme

Fix reference to System.Threading.Thread class in README.md

6 years agoMerge pull request #13182 from adiaaida/addMinOptsTP
Michelle McDaniel [Thu, 3 Aug 2017 00:25:00 +0000 (17:25 -0700)]
Merge pull request #13182 from adiaaida/addMinOptsTP

Add JitMinOpts throughput jobs

6 years agoAdd JitMinOpts throughput jobs
Michelle McDaniel [Wed, 2 Aug 2017 23:29:37 +0000 (16:29 -0700)]
Add JitMinOpts throughput jobs

This change adds an opt_level throughput option so that we can run
throughput jobs in minopts mode. This also adds jobs to the lab for min
opts runs

6 years agoJIT: refactor logic for removing box upstream side effects (#13169)
Andy Ayers [Wed, 2 Aug 2017 22:46:56 +0000 (15:46 -0700)]
JIT: refactor logic for removing box upstream side effects (#13169)

Introduce a new method `gtTryRemoveBoxUpstreamEffects` to capture
the logic for cleaning up after a dead value type box into a utility.
Call this from `gtFoldExprSpecial` and now also from the inliner when
it finds a dead box argument.

Also remove the useless `fgExpandInline` field and associated
`fgIsInlining` method, as the jit never set the field to true.

No diffs from the refactoring. The inliner case kicks in in 3 places
in the test tree.

Closes #13136.

6 years agoAdd JitBench scenario testing. (#11400)
José Rivero [Wed, 2 Aug 2017 21:58:46 +0000 (14:58 -0700)]
Add JitBench scenario testing. (#11400)

6 years agoMerge pull request #13158 from parjong/fix/INTERPERTER_GDBJIT_Conflict
Noah Falk [Wed, 2 Aug 2017 21:06:21 +0000 (14:06 -0700)]
Merge pull request #13158 from parjong/fix/INTERPERTER_GDBJIT_Conflict

Resolve FEATURE_GDBJIT/FEATURE_INTERPRETER conflict

6 years agoMerge pull request #13155 from CarolEidt/UModTreeNodeInfo
Carol Eidt [Wed, 2 Aug 2017 18:31:13 +0000 (11:31 -0700)]
Merge pull request #13155 from CarolEidt/UModTreeNodeInfo

Set Register Requirements for Mod/Div

6 years agoMerge pull request #13128 from JosephTremoulet/Mulshift
Joseph Tremoulet [Wed, 2 Aug 2017 18:28:40 +0000 (14:28 -0400)]
Merge pull request #13128 from JosephTremoulet/Mulshift

Emit power-of-two constant multiply as shift

6 years agoMerge pull request #11456 from CarolEidt/EHWriteThruDoc
Russell C Hadley [Wed, 2 Aug 2017 17:29:19 +0000 (10:29 -0700)]
Merge pull request #11456 from CarolEidt/EHWriteThruDoc

Add an alternate algorithm done during LSRA

6 years ago[Arm64] GetLargestOnDieCacheSize (#13071)
Steve MacLean [Wed, 2 Aug 2017 10:48:14 +0000 (06:48 -0400)]
[Arm64] GetLargestOnDieCacheSize (#13071)

Look for cache info in /sys/.../cache/index*/size

If that fails estimate cache size based on processor count

6 years ago[RyuJIT/ARM32] Update allocateBusyReg() with a helper for ARM32
Hyung-Kyu Choi [Wed, 2 Aug 2017 10:06:04 +0000 (19:06 +0900)]
[RyuJIT/ARM32] Update allocateBusyReg() with a helper for ARM32

- Add a helper `isRegInUse()`
- Update `allocateBusyReg()` using `isRegInUse()` for ARM32

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years ago[RyuJIT/ARM32] Unassign a double register properly in allocateBusyReg()
Hyung-Kyu Choi [Wed, 2 Aug 2017 09:35:53 +0000 (18:35 +0900)]
[RyuJIT/ARM32] Unassign a double register properly in allocateBusyReg()

- Introduce a helper, `unassignDoublePhysReg()` for ARM32
- Update `allocateBusyReg()` for ARM32 using `unassignDoublePhysReg()`

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoRemove unused extern declarations (#13159)
Jonghyun Park [Wed, 2 Aug 2017 09:20:44 +0000 (18:20 +0900)]
Remove unused extern declarations (#13159)

6 years ago[RyuJIT/ARM32] Update allocateBusy() to test spill candiates with new helpers
Hyung-Kyu Choi [Wed, 2 Aug 2017 08:39:25 +0000 (17:39 +0900)]
[RyuJIT/ARM32] Update allocateBusy() to test spill candiates with new helpers

- Introduce a helper `canSpillReg` for all targets
- Introduce a helper `canSpillDoubleReg` for ARM32
- Remove a obsolute helper `canSpillThisReg`
- Update allocateBusy() to test spill candiates with new helpers

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoPAL enable Thread affinity support (#12936)
Steve MacLean [Wed, 2 Aug 2017 08:37:37 +0000 (04:37 -0400)]
PAL enable Thread affinity support (#12936)

6 years ago[RyuJIT/ARM32] Helpers to check and test assigned intervals for a register
Hyung-Kyu Choi [Wed, 2 Aug 2017 06:47:10 +0000 (15:47 +0900)]
[RyuJIT/ARM32] Helpers to check and test assigned intervals for a register

- Add two helper functions, i.e. `checkActiveInterval` and `checkActiveIntervals`
- Remove one helper function. `checkReferenceAt()`
- Simplify `allocateBusyReg()` by using helpers

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoUse 'udf 0xff' instead of 'bkpt 0xbe' as a poison (#13152)
Jonghyun Park [Wed, 2 Aug 2017 05:11:26 +0000 (14:11 +0900)]
Use 'udf 0xff' instead of 'bkpt 0xbe' as a poison (#13152)

6 years agoApply review feedback
Hyung-Kyu Choi [Wed, 2 Aug 2017 04:28:12 +0000 (13:28 +0900)]
Apply review feedback

- Use simpler condition and add an assertion
- Fix typo

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoEnable build of crosscomponent for armel (#11066)
Hyung-Kyu Choi [Wed, 2 Aug 2017 03:40:34 +0000 (12:40 +0900)]
Enable build of crosscomponent for armel (#11066)

* Enable build of crosscomponent for armel

Enable build of crosscomponent for armel in addition to arm

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
* Fix typo

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
6 years agoResolve FEATURE_GDBJIT/FEATURE_INTERPRETER conflict
Jonghyun Park [Wed, 2 Aug 2017 03:05:34 +0000 (12:05 +0900)]
Resolve FEATURE_GDBJIT/FEATURE_INTERPRETER conflict

6 years agoSet Register Requirements for Mod/Div
Carol Eidt [Wed, 2 Aug 2017 01:19:36 +0000 (18:19 -0700)]
Set Register Requirements for Mod/Div

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 agoFix reference to System.Threading.Thread class
Christian Scheuer [Wed, 2 Aug 2017 00:30:32 +0000 (02:30 +0200)]
Fix reference to System.Threading.Thread class

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 agoEmit power-of-two constant multiply as shift
Joseph Tremoulet [Mon, 31 Jul 2017 20:37:51 +0000 (16:37 -0400)]
Emit power-of-two constant multiply as shift

Most of these get translated to shifts at Morph, but adding a failsafe
here next to the transform for 3/5/9->LEA ensures we won't have these in
the emitted code when they (re-)appear in later phases.

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 ago[Ryujit/ARM32] Update allocateBusyReg() in LSRA for ARM32
Hyung-Kyu Choi [Tue, 1 Aug 2017 12:44:55 +0000 (21:44 +0900)]
[Ryujit/ARM32] Update allocateBusyReg() in LSRA for ARM32

- Add two helper functions. `canSpillThisReg()` and `checkReferenceAt()`
- Update allocateBusyReg() to spill and allocate a double register properly

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
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 agoAdd NoGC test to coreclr
Shiming Ge (Pactera Technologies) [Tue, 1 Aug 2017 11:59:42 +0000 (04:59 -0700)]
Add NoGC test to coreclr

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