platform/upstream/coreclr.git
7 years agoAdd a flag to build.{sh,cmd} to disable PGO.
Pat Gavlin [Wed, 28 Jun 2017 17:37:51 +0000 (10:37 -0700)]
Add a flag to build.{sh,cmd} to disable PGO.

This is helpful when performing JIT throughput measurements.

7 years agoCleanup some instances of project.json from the repo (#12484)
Adeel Mujahid [Wed, 28 Jun 2017 15:02:16 +0000 (18:02 +0300)]
Cleanup some instances of project.json from the repo (#12484)

* Replace ScriptGenerator project.json with csproj

* Update project.json occurrences in docs
Fix few typos.

* Remove project.json comments

7 years agoFix remove in list (#12497)
Kyungwoo Lee [Wed, 28 Jun 2017 15:00:27 +0000 (08:00 -0700)]
Fix remove in list (#12497)

`remove` uses `erase` to delete the entry in list.
Since `erase` returns the next iterator, the iterator shouldn't be increased
when the entry is found and deleted.

7 years agoRemove disabled tests for Marshal.IsComObject(null) (#12359)
Hugh Bellamy [Wed, 28 Jun 2017 14:59:15 +0000 (21:59 +0700)]
Remove disabled tests for Marshal.IsComObject(null) (#12359)

7 years agoPartially remove relocations from Class section of NGEN-ed images (#11962)
Ruben Ayrapetyan [Wed, 28 Jun 2017 06:16:01 +0000 (09:16 +0300)]
Partially remove relocations from Class section of NGEN-ed images (#11962)

* Remove relocations for ParamTypeDesc::m_TemplateMT.

* Remove relocations for LayoutEEClass::m_LayoutInfo.m_pFieldMarshalers.

* Prepare RelativeFixupPointer.

* Remove relocations for FieldMarshaler::m_pFD and FieldMarshaler_*::m_*.

7 years agoRemove unused declaration (#12501)
Jonghyun Park [Wed, 28 Jun 2017 06:12:51 +0000 (15:12 +0900)]
Remove unused declaration (#12501)

7 years agospmi add R2R field to getFieldInfo (#12498)
Sergey Andreenko [Wed, 28 Jun 2017 00:06:59 +0000 (17:06 -0700)]
spmi add R2R field to getFieldInfo (#12498)

7 years agoFix JIT_NewArr1 8-byte alignment for ELEMENT_TYPE_R8 on x86.
Ruben Ayrapetyan [Tue, 27 Jun 2017 16:22:07 +0000 (19:22 +0300)]
Fix JIT_NewArr1 8-byte alignment for ELEMENT_TYPE_R8 on x86.

7 years agoFix rough edges after CLI update (dotnet/corert#3983)
Jan Kotas [Tue, 27 Jun 2017 00:10:12 +0000 (17:10 -0700)]
Fix rough edges after CLI update (dotnet/corert#3983)

* Move build-restore.cmd back to build-managed

buildpipeline needs to be updated to make this split

* Cleanup dir.props/dir.targets

* Add back VS clues

* Reformat whitespaces to match VS convention

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoFix bad range check in TextInfo.IndexOfStringOrdinalIgnoreCase (#12478)
Atsushi Kanamori [Tue, 27 Jun 2017 18:51:28 +0000 (11:51 -0700)]
Fix bad range check in TextInfo.IndexOfStringOrdinalIgnoreCase (#12478)

Breaks:

   int idx = "\uabcd".IndexOf("", 1, StringComparison.OrdinalIgnoreCase);

should return 1, returns -1 instead.

(propagated fix from CoreRT)

7 years agoImplement JIT_NewArr1_R2R as R2R wrapper for JIT_NewArr1 to support both MethodTable...
Ruben Ayrapetyan [Tue, 27 Jun 2017 18:31:03 +0000 (21:31 +0300)]
Implement JIT_NewArr1_R2R as R2R wrapper for JIT_NewArr1 to support both MethodTable-based and TypeDesc-based helpers. (#12475)

Related issue: #12463

7 years agoMerge pull request #12473 from hqueue/arm/ryujit/lsra_use_helper
Carol Eidt [Tue, 27 Jun 2017 14:36:56 +0000 (07:36 -0700)]
Merge pull request #12473 from hqueue/arm/ryujit/lsra_use_helper

[RyuJIT/ARM32][WIP] Update LSRA with helpers

7 years ago[Linux][GDB-JIT] Fix memory leak (#12452)
Konstantin Baladurin [Tue, 27 Jun 2017 14:19:31 +0000 (17:19 +0300)]
[Linux][GDB-JIT] Fix memory leak (#12452)

Use NewArrayHolder for pVars in LocalsInfo class

7 years ago[RyuJIT/ARM32] Update LSRA with new helper
Hyung-Kyu Choi [Tue, 27 Jun 2017 11:24:34 +0000 (20:24 +0900)]
[RyuJIT/ARM32] Update LSRA with new helper

- Introduce updatePreviousInterval()
- Update LSRA with helper

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agosupport spmi collection for r2r calls. (#12343)
Sergey Andreenko [Tue, 27 Jun 2017 06:00:59 +0000 (23:00 -0700)]
support spmi collection for r2r calls. (#12343)

* CreateAgnostic_CORINFO_SIG_INFO

Also you pSig_Index always when it is index in the buffer map,
as we do for sigInst_classInst_Index for example.

* spmi Restore_CORINFO_RESOLVED_TOKENout

delete another duplicate.

* SpmiDumpHelper

* spmi cleaning: GetFunctionEntryPoint and GetAddressOfPInvokeTarget

* support GetReadyToRunHelper and GetReadyToRunDelegateCtorHelper in spmi.

* Fix typo that annoys desktop build.

* spmi GetReadyToRunDelegateCtorHelper

* spmi: use agnostic type for GetReadyToRunDelegateCtorHelper value.

* spmi dump Agnostic_CORINFO_LOOKUP

add stubLookup to dmpGetCallInfo

* clean dmpGetMethodSig and dmpGetTailCallCopyArgsThunk

7 years ago[RyuJIT/ARM32] Use helper for LSRA
Hyung-Kyu Choi [Tue, 27 Jun 2017 05:48:33 +0000 (14:48 +0900)]
[RyuJIT/ARM32] Use helper for LSRA

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agoMerge pull request #12460 from pgavlin/SinglePassRationalize
Pat Gavlin [Tue, 27 Jun 2017 05:34:53 +0000 (22:34 -0700)]
Merge pull request #12460 from pgavlin/SinglePassRationalize

Rephrase rationalize as a single IR walk.

7 years agoFormat code.
Pat Gavlin [Tue, 27 Jun 2017 03:32:53 +0000 (20:32 -0700)]
Format code.

7 years agoMerge pull request #12423 from CarolEidt/ContainDoNotEnreg
Carol Eidt [Tue, 27 Jun 2017 00:25:55 +0000 (17:25 -0700)]
Merge pull request #12423 from CarolEidt/ContainDoNotEnreg

Mark lvDoNotEnregister lclVars as contained

7 years agoMerge pull request #12457 from pgavlin/RewriteIntrinsicsRefactor
Pat Gavlin [Mon, 26 Jun 2017 23:16:27 +0000 (16:16 -0700)]
Merge pull request #12457 from pgavlin/RewriteIntrinsicsRefactor

Refactor the rationalizer's instrinsic rewriter.

7 years agoRephrase rationalize as a single IR walk.
Pat Gavlin [Mon, 26 Jun 2017 21:56:09 +0000 (14:56 -0700)]
Rephrase rationalize as a single IR walk.

This walk performs both pre- and post-order visits. The pre-order visit
is responsible for rewriting intrinsics as user calls where necessary;
the post-order visit is resonsible for converting HIR nodes into LIR
nodes.

7 years agoUse LIR utilities in the intrinsic rewriter.
Pat Gavlin [Mon, 26 Jun 2017 21:40:15 +0000 (14:40 -0700)]
Use LIR utilities in the intrinsic rewriter.

This simplifies the code a bit and prepares it for some changes to
perform single-pass rationalization.

7 years agoMerge pull request #12440 from pgavlin/MaintainIsUnusedValue
Pat Gavlin [Mon, 26 Jun 2017 22:31:06 +0000 (15:31 -0700)]
Merge pull request #12440 from pgavlin/MaintainIsUnusedValue

Maintain `LIR::IsUnusedValue` in the backend.

7 years agoUpdate a header comment.
Pat Gavlin [Mon, 26 Jun 2017 22:30:15 +0000 (15:30 -0700)]
Update a header comment.

7 years agoFormat code and address PR feedback.
Pat Gavlin [Mon, 26 Jun 2017 21:43:27 +0000 (14:43 -0700)]
Format code and address PR feedback.

7 years agoReplace array type handle with method table in arguments of array allocation helpers...
Ruben Ayrapetyan [Mon, 26 Jun 2017 21:18:19 +0000 (00:18 +0300)]
Replace array type handle with method table in arguments of array allocation helpers (#12369)

* Remove direct usage of type handle in JIT_NewArr1, with except of retrieving template method table.

* Assert that array type descriptor is loaded when array object's method table is set.

* Pass template method tables instead of array type descriptors to array allocation helpers.

7 years agoRefactor the rationalizer's instrinsic rewriter.
Pat Gavlin [Mon, 26 Jun 2017 19:58:42 +0000 (12:58 -0700)]
Refactor the rationalizer's instrinsic rewriter.

Change its two constituent static methods into instance methods.

7 years agoMerge pull request #12441 from pgavlin/TryGetUseInline
Pat Gavlin [Mon, 26 Jun 2017 15:52:31 +0000 (08:52 -0700)]
Merge pull request #12441 from pgavlin/TryGetUseInline

Avoid the use edge iterator in `TryGetUse`.

7 years agoMerge pull request dotnet/corert#3969 from dotnet/nmirror
Jan Kotas [Fri, 23 Jun 2017 01:43:00 +0000 (18:43 -0700)]
Merge pull request dotnet/corert#3969 from dotnet/nmirror

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoFormat code.
Pat Gavlin [Sat, 24 Jun 2017 21:09:29 +0000 (14:09 -0700)]
Format code.

7 years agoReturn early in `TryGetUse` for unused nodes.
Pat Gavlin [Wed, 21 Jun 2017 17:24:27 +0000 (10:24 -0700)]
Return early in `TryGetUse` for unused nodes.

Now that `IsUnusedValue` is maintained during the first half of the
backend, `TryGetUse` can terminate early if it is set.

Note that this may return false negatives if the `IsUnusedValue` flag is
incorrectly set, but remains correct if said flag is incorrectly
cleared.

7 years agoRemove an IR walk during lowering.
Pat Gavlin [Sat, 24 Jun 2017 00:41:06 +0000 (17:41 -0700)]
Remove an IR walk during lowering.

Now that the `IsUnusedValue` flag is maintained by decomposition and
lowering, it does not need to be recalculated before LSRA.

7 years agoMaintain `LIR::IsUnusedValue` in the backend.
Pat Gavlin [Wed, 21 Jun 2017 01:22:45 +0000 (18:22 -0700)]
Maintain `LIR::IsUnusedValue` in the backend.

This flag indicates whether or not the SDSU temp produced by a node is
ever read. This information is needed by the register allocator, but is
also useful in other parts of the compiler (for example, `TryGetUse` can
return immediately if this flag is set). Setting this flag properly in
rationalize and maintaining it through decomposition and lowering allows
us to remove an IR walk immediately prior to LSRA.

7 years agoMerge pull request #12439 from pgavlin/SkipDecomp
Pat Gavlin [Sat, 24 Jun 2017 21:06:48 +0000 (14:06 -0700)]
Merge pull request #12439 from pgavlin/SkipDecomp

Update compLongUsed in rationalize.

7 years ago[CoreRT armel] fix for PINVOKE calls in CoreRT (#12373)
sergey ignatov [Sat, 24 Jun 2017 15:57:59 +0000 (18:57 +0300)]
[CoreRT armel] fix for PINVOKE calls in CoreRT (#12373)

7 years agoAvoid the use edge iterator in `TryGetUse`.
Pat Gavlin [Fri, 23 Jun 2017 22:31:47 +0000 (15:31 -0700)]
Avoid the use edge iterator in `TryGetUse`.

`TryGetUse` does not require the ordering semantics provided by the use
edge iterator. Replace use edge iteration with manual inspection of each
node type.

7 years agoUpdate compLongUsed in rationalize.
Pat Gavlin [Fri, 23 Jun 2017 16:26:42 +0000 (09:26 -0700)]
Update compLongUsed in rationalize.

This allows us to skip decompisition if long-typed values are not used by a method.

7 years agoMark lvDoNotEnregister lclVars as contained
Carol Eidt [Fri, 23 Jun 2017 21:54:27 +0000 (14:54 -0700)]
Mark lvDoNotEnregister lclVars as contained

Even if a lclVar is tracked, it may not be a register candidate. When determining whether a lclVar should be contained or RegOptional, take that into account.
In the interest of making this as accurate as possible, mark lclVars early as lvDoNotEnregister when they meet criteria that will later disqualify them from a register.

7 years agoUpdate Windows parameter name for Normalize/IsNormalized with invalid form (#12430)
Hugh Bellamy [Fri, 23 Jun 2017 22:23:50 +0000 (05:23 +0700)]
Update Windows parameter name for Normalize/IsNormalized with invalid form (#12430)

7 years ago# This is a combination of 2 commits.
Carol Eidt [Thu, 22 Jun 2017 18:43:57 +0000 (11:43 -0700)]
# This is a combination of 2 commits.
# The first commit's message is:

Mark lvDoNotEnregister lclVars as contained

Even if a lclVar is tracked, it may not be a register candidate. When determining whether a lclVar should be contained or RegOptional, take that into account.
In the interest of making this as accurate as possible, mark lclVars early as lvDoNotEnregister when they meet criteria that will later disqualify them from a register.

# This is the commit message #2:

Formatting

7 years agoAdd ELF program and section headers to core dump. (#12425)
Mike McLaughlin [Fri, 23 Jun 2017 22:02:36 +0000 (15:02 -0700)]
Add ELF program and section headers to core dump. (#12425)

Add ELF program and section headers to core dump.

Issue #12341

This allows the build id for the modules be extracted properly.

Add .eh_frame, .eh_frame_hdr and some other important sections to core dump.

Add managed module names to core dump so the symbol acquisition
tool can get symbol store keys for them.

Add the non memory/file backed memory regions to core dump so debuggers
like lldb can check if an address is "code" or not. Unwinding doesn't
work when there isn't a module/.so file present.

7 years ago[Local GC] Remove a number of inclusions of handle table private headers from the...
Sean Gillespie [Fri, 23 Jun 2017 21:48:41 +0000 (14:48 -0700)]
[Local GC] Remove a number of inclusions of handle table private headers from the VM (#12389)

* Remove inclusions of private handle table headers from the VM

* Add TraceRefCountedHandles to the GC handle table interface

* Fix the Unix build

* Move ValidatePinnedObject to marshalnative.h

7 years agoFix JitMinOptsTrackGCrefs for legacy x86 back-end (#12416)
Bruce Forstall [Fri, 23 Jun 2017 21:26:56 +0000 (14:26 -0700)]
Fix JitMinOptsTrackGCrefs for legacy x86 back-end (#12416)

Addresses #12415

7 years agoMerge pull request #12424 from wtgodbe/ArmRunsPipeline
William Godbe [Fri, 23 Jun 2017 19:20:56 +0000 (12:20 -0700)]
Merge pull request #12424 from wtgodbe/ArmRunsPipeline

Enable ARM test runs in Helix

7 years agoFix systemMask on Linux (#12387)
Xiangyang (Mark) Guo [Fri, 23 Jun 2017 00:39:41 +0000 (17:39 -0700)]
Fix systemMask on Linux (#12387)

* fix systemMask

* code refactor

7 years agoSpmi third cleaning (#12418)
Sergey Andreenko [Thu, 22 Jun 2017 23:41:21 +0000 (16:41 -0700)]
Spmi third cleaning (#12418)

* CreateAgnostic_CORINFO_SIG_INFO
Also you pSig_Index always when it is index in the buffer map,
as we do for sigInst_classInst_Index for example.
* spmi Restore_CORINFO_RESOLVED_TOKENout
delete another duplicate.

* SpmiDumpHelper

7 years agoMerge pull request #12409 from dotnet-bot/from-tfs
Bruce Forstall [Thu, 22 Jun 2017 23:06:24 +0000 (16:06 -0700)]
Merge pull request #12409 from dotnet-bot/from-tfs

Merge changes from TFS

7 years agoMerge pull request #12417 from sjsinju/fix_3bytes_struct
Bruce Forstall [Thu, 22 Jun 2017 21:24:23 +0000 (14:24 -0700)]
Merge pull request #12417 from sjsinju/fix_3bytes_struct

[RyuJIT/ARM32] Change the 3bytes struct to int on morph phase.

7 years agoEnable ARM test runs in Helix
wtgodbe [Thu, 22 Jun 2017 18:59:49 +0000 (11:59 -0700)]
Enable ARM test runs in Helix

7 years agoMerge pull request #12413 from wtgodbe/ArmRuns
William Godbe [Thu, 22 Jun 2017 18:55:26 +0000 (11:55 -0700)]
Merge pull request #12413 from wtgodbe/ArmRuns

First step for enabling ARM test runs

7 years agoMerge pull request #12422 from CarolEidt/lvaSetClassDiffable
Carol Eidt [Thu, 22 Jun 2017 18:35:34 +0000 (11:35 -0700)]
Merge pull request #12422 from CarolEidt/lvaSetClassDiffable

Make lvaSetClass dump diffable

7 years agoMake lvaSetClass dump diffable
Carol Eidt [Thu, 22 Jun 2017 17:35:36 +0000 (10:35 -0700)]
Make lvaSetClass dump diffable

7 years agoUpdate attribute-value in security build definition. (#12419)
Ravi Eda [Thu, 22 Jun 2017 17:19:59 +0000 (12:19 -0500)]
Update attribute-value in security build definition. (#12419)

7 years ago[RyuJIT/ARM32] Change the 3bytes struct to int on morph phase.
sjsujinkim [Thu, 22 Jun 2017 01:52:59 +0000 (10:52 +0900)]
[RyuJIT/ARM32] Change the 3bytes struct to int on morph phase.

It is necessary that the 3bytes struct which is a local var to int on morph phase.

Related Issue : #12290 (Assertion failed 'emitTypeSizes[TypeGet(type)] > 0')

7 years agoAdd String.Contains overload with StringComparison (#12400)
Yuri Vanin [Thu, 22 Jun 2017 04:57:25 +0000 (21:57 -0700)]
Add String.Contains overload with StringComparison (#12400)

Staging change of System.Private.CoreLib for CoreFX #20846

7 years agoSpmi second cleaning (#12402)
Sergey Andreenko [Wed, 21 Jun 2017 23:20:37 +0000 (16:20 -0700)]
Spmi second cleaning (#12402)

* don't init zero-init struct with nulls.

* Clean spmi code for GetTokenTypeAsHandle and GetCastingHelper

* Clean spmi GetVarArgsHandle and CanGetVarArgsHandle

* Clean GetCookieForPInvokeCalliSig and CanGetCookieForPInvokeCalliSig

* clean spmi GetNewHelper

* clean spmi GetArgType

* clean spmi GetArgClassValue

7 years agoFirst step for enabling ARM test runs
wtgodbe [Wed, 21 Jun 2017 22:57:10 +0000 (15:57 -0700)]
First step for enabling ARM test runs

7 years agoMerge pull request #12404 from adiaaida/changeLinuxTPAssemblies
Michelle McDaniel [Wed, 21 Jun 2017 21:34:27 +0000 (14:34 -0700)]
Merge pull request #12404 from adiaaida/changeLinuxTPAssemblies

Align Linux TP benchmarks with Windows TP benchmarks

7 years agoFix arm64 build break
Bruce Forstall [Wed, 21 Jun 2017 19:26:56 +0000 (12:26 -0700)]
Fix arm64 build break

[tfs-changeset: 1662444]

7 years agoNeed to pass handle to SeekCore (#12399)
Jeremy Kuhne [Wed, 21 Jun 2017 18:51:36 +0000 (11:51 -0700)]
Need to pass handle to SeekCore (#12399)

We're not setting the member field until the end of construction.

7 years agoFix event, semaphore, mutex create/open to request the maximum allowe… (#12381)
Koundinya Veluri [Wed, 21 Jun 2017 18:07:01 +0000 (11:07 -0700)]
Fix event, semaphore, mutex create/open to request the maximum allowe… (#12381)

Fix event, semaphore, mutex create/open to request the maximum allowed access

Functional fix for #11306
- Ported dotnet/corert@78fae17f5434839a8720603973ff53f27e27f916 to CoreCLR, see that commit for details on the hang during mutex creation that is also fixed by this change.
- Replaced all uses of the *_ALL_ACCESS flags relevant to events, semaphores, and mutexes

7 years agoMerge pull request #12395 from erozenfeld/fgMorphRecognizeBoxNullable
Eugene Rozenfeld [Wed, 21 Jun 2017 17:52:47 +0000 (10:52 -0700)]
Merge pull request #12395 from erozenfeld/fgMorphRecognizeBoxNullable

Fix for a bug in fgMorphRecognizeBoxNullable.

7 years agoProvision CodeBase and NotificationAlias variables -CoreCLR (#12403)
Ravi Eda [Wed, 21 Jun 2017 17:18:46 +0000 (12:18 -0500)]
Provision CodeBase and NotificationAlias variables -CoreCLR (#12403)

* Security build JSONs.

* Provision CodeBase and NotificationAlias variables.

7 years agoAlign Linux TP benchmarks with Windows TP benchmarks
Michelle McDaniel [Wed, 21 Jun 2017 16:55:43 +0000 (09:55 -0700)]
Align Linux TP benchmarks with Windows TP benchmarks

On Windows, we download a set of assemblies that we have uploaded to
MyGet. On Linux, we were building corefx each run to get the benchmarks.
This change updates Linux to pull down the same benchmarks Windows uses,
using curl to grab the nuget package from MyGet.

Note: after this commit, we will have data for fewer assemblies on
Linux, but we will now have the same set for both Windows and Linux.
Some data in Benchview may be affected.

7 years agoMerge pull request #12379 from dotnet-maestro-bot/master-UpdateDependencies
Wes Haggard [Wed, 21 Jun 2017 16:19:46 +0000 (09:19 -0700)]
Merge pull request #12379 from dotnet-maestro-bot/master-UpdateDependencies

Update CoreClr, CoreFx to preview1-25421-01, preview1-25421-02, respectively (master)

7 years agoMerge pull request #12164 from hqueue/arm/ryujit/lsra_12078_live_in
Carol Eidt [Wed, 21 Jun 2017 14:46:23 +0000 (07:46 -0700)]
Merge pull request #12164 from hqueue/arm/ryujit/lsra_12078_live_in

[RyuJIT/ARM32] Unassign double register properly at BB entry

7 years agoMerge pull request #12358 from jyoungyun/ryujit/assersion_failed_info_numslots_is_1
Carol Eidt [Wed, 21 Jun 2017 14:43:37 +0000 (07:43 -0700)]
Merge pull request #12358 from jyoungyun/ryujit/assersion_failed_info_numslots_is_1

[RyuJIT/ARM32] Assign 2 numslots to gtLsraInfo.srcCount in TYP_DOUBLE

7 years agoUpdate CoreClr, CoreFx to preview1-25421-01, preview1-25421-02, respectively
dotnet-maestro-bot [Wed, 21 Jun 2017 13:38:07 +0000 (13:38 +0000)]
Update CoreClr, CoreFx to preview1-25421-01, preview1-25421-02, respectively

7 years agoPlease include this line to enable build (#12382)
Richard L. Jackson [Wed, 21 Jun 2017 09:33:20 +0000 (11:33 +0200)]
Please include this line to enable build (#12382)

find_path(LLDB_H "lldb/API/LLDB.h" PATHS "/usr/lib/llvm-4.0/include")

7 years agoSpmi source code cleaning (#12378)
Sergey Andreenko [Wed, 21 Jun 2017 07:27:08 +0000 (00:27 -0700)]
Spmi source code cleaning (#12378)

* fix pointer names in CORINFO_RESOLVED_TOKENin

* Remove exceptionCode from Agnostic_CORINFO_RESOLVED_TOKENout

The target if to do Agnostic_CORINFO_RESOLVED_TOKEN =
Agnostic_CORINFO_RESOLVED_TOKENin + Agnostic_CORINFO_RESOLVED_TOKENout

* Agnostic_CORINFO_RESOLVED_TOKEN = Agnostic_CORINFO_RESOLVED_TOKENin + Agnostic_CORINFO_RESOLVED_TOKENout

* spmi cleaning for ResolvedToken.

It is only the first part of changes. I am trying to delete as many code
as I can, because for now it is bad pain to make changes in this files.

7 years agoFix for a bug in fgMorphRecognizeBoxNullable.
Eugene Rozenfeld [Tue, 20 Jun 2017 23:46:02 +0000 (16:46 -0700)]
Fix for a bug in fgMorphRecognizeBoxNullable.

fgMorphRecognizeBoxNullable doesn't work correctly when called during re-morphing. In particular it can't handle late args in the call to CORINFO_HELP_BOX_NULLABLE. The test case results in several asserts (the first one in lsra) followed by an infinite loop in the jit.

The reason the optimization is not performed during global morph is that only patterns with GT_EQ and GT_NE are handled. Some versions of csc generate

...
ldnull
cgt.un
ret

for

this C# line

null != this.value

so we get GT_GT instead.

The fix has two parts:

1. Don't attempt to perform the optimization when called during re-morph and the struct parameter is a late arg.
2. Call fgMorphRecognizeBoxNullable for GT_GT nodes with GTF_UNSIGNED set. This allows the optimization to fire during global morph.

7 years agoEnable and use updateAssginedInterval() for all targets
Hyung-Kyu Choi [Wed, 21 Jun 2017 03:06:19 +0000 (12:06 +0900)]
Enable and use updateAssginedInterval() for all targets

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agoUpdate trusted RHEL build Dockertag to support LTO (#12396)
Daniel Podder [Wed, 21 Jun 2017 02:39:49 +0000 (19:39 -0700)]
Update trusted RHEL build Dockertag to support LTO (#12396)

The new RHEL image was generated using the same Dockerfile as the
previous, but has LLVM recompiled with gold support enabled, which is
required to do a build with -flto (a prerequisite for PGO).

7 years agoIntroduce LinearScan::isAssignedToInterval()
Hyung-Kyu Choi [Wed, 21 Jun 2017 02:21:45 +0000 (11:21 +0900)]
Introduce LinearScan::isAssignedToInterval()

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agoFix typo and formatting issues
Jiyoung Yun [Wed, 21 Jun 2017 02:09:14 +0000 (11:09 +0900)]
Fix typo and formatting issues

7 years ago[RyuJIT/ARM32] Avoid assersion for double arguments
Jiyoung Yun [Tue, 20 Jun 2017 09:43:44 +0000 (18:43 +0900)]
[RyuJIT/ARM32] Avoid assersion for double arguments

Double arguments in ARM32 uses 2 slots and it isn't a multi-reg struct.
In this case, it should avoid an assersion that checks if the slot is 1.

7 years ago[RyuJIT/ARM32] Assign 1 srcCount in TYP_DOUBLE
Jiyoung Yun [Mon, 19 Jun 2017 07:32:17 +0000 (16:32 +0900)]
[RyuJIT/ARM32] Assign 1 srcCount in TYP_DOUBLE

Even though TYP_DOUBLE uses 2 numSlots, we consume 1 srcCount in TYP_DOUBLE

7 years agoAssign 2 numslots to gtLsraInfo.srcCount in TYP_DOUBLE
Jiyoung Yun [Fri, 16 Jun 2017 02:52:35 +0000 (11:52 +0900)]
Assign 2 numslots to gtLsraInfo.srcCount in TYP_DOUBLE

7 years ago[RyuJIT/ARM32] Use helper to update RegRecord
Hyung-Kyu Choi [Tue, 20 Jun 2017 11:03:32 +0000 (20:03 +0900)]
[RyuJIT/ARM32] Use helper to update RegRecord

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years ago[RyuJIT/ARM32] Clear assigned interval of double register
Hyung-Kyu Choi [Thu, 8 Jun 2017 10:21:35 +0000 (19:21 +0900)]
[RyuJIT/ARM32] Clear assigned interval of double register

Clear assigned interval of double register properly

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years ago[RyuJIT/ARM32] Unassign double register properly at BB entry
Hyung-Kyu Choi [Thu, 8 Jun 2017 09:33:12 +0000 (18:33 +0900)]
[RyuJIT/ARM32] Unassign double register properly at BB entry

When updating var locations at basic block entry, we should
unassign double register properly for TYP_DOUBLE interval.

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agoStub Environment from registry apis inside app-containers. (CoreCLR) (#12390)
Atsushi Kanamori [Tue, 20 Jun 2017 23:44:56 +0000 (16:44 -0700)]
Stub Environment from registry apis inside app-containers. (CoreCLR) (#12390)

We're not going to get exemptions for these inside appcontainers
so we'll change them to behave as they do on Unix (present
an empty reg key that eats writes requests.)

7 years agoUpdate building documentation for osx/macOS (#12366)
Tomas Weinfurt [Tue, 20 Jun 2017 23:05:20 +0000 (16:05 -0700)]
Update building documentation for osx/macOS (#12366)

* Update osx-instructions.md

add 10.12 Sierra as minimal needed version and add some more notes for pkg-config add reference to clean.sh

7 years ago[Local GC] Move handle creation/deletion profiler callbacks out of the GC (#12314)
Sean Gillespie [Tue, 20 Jun 2017 22:24:05 +0000 (15:24 -0700)]
[Local GC] Move handle creation/deletion profiler callbacks out of the GC (#12314)

* [Local GC] Move handle creation and handle destruction profiler
callbacks out of the GC

* Remove dead code

* Move some handle-related code out of gcheaputilities.cpp and into gchandleutilities.cpp

* Address code review feedback, remove some more dead code and add some style fixes

* Refactor handle creation and destruction helpers to go through a common function

7 years ago[RyuJIT/ARM32] Implement storing multi-reg/HFA return value at caller (#12294)
Hyung-Kyu Choi [Tue, 20 Jun 2017 21:09:22 +0000 (06:09 +0900)]
[RyuJIT/ARM32] Implement storing multi-reg/HFA return value at caller (#12294)

* [RyuJIT/ARM32] Initial implementation of multi-reg return

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
* [RyuJIT/ARM32] Update multi-reg return for ARM32

- Update comment
- Remove wrong implementation
- Handle HFA struct correctly by consitering type

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
* Update comments for GetABIReturnReg() and GetABIReturnRegs()

- Remove and update obsolete comment
- Fix format

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agoMerge pull request #11629 from pentp/Math-perf
Eric Mellino [Tue, 20 Jun 2017 17:02:02 +0000 (13:02 -0400)]
Merge pull request #11629 from pentp/Math-perf

Optimized Math.Sign

7 years agoUpdate CI to follow up corefx changes (#12384)
Hyung-Kyu Choi [Tue, 20 Jun 2017 16:21:13 +0000 (01:21 +0900)]
Update CI to follow up corefx changes (#12384)

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years ago.clang format from jit (#12377)
Sergey Andreenko [Tue, 20 Jun 2017 05:40:25 +0000 (22:40 -0700)]
.clang format from jit (#12377)

7 years agoMerge pull request #12313 from kyulee1/st
Carol Eidt [Mon, 19 Jun 2017 23:10:53 +0000 (16:10 -0700)]
Merge pull request #12313 from kyulee1/st

Remove static for function pointer

7 years agoDon't close passed in FileStream handles in constructor (#12253)
Jeremy Kuhne [Mon, 19 Jun 2017 22:31:01 +0000 (15:31 -0700)]
Don't close passed in FileStream handles in constructor (#12253)

* Don't close passed in FileStream handles in constructor

As the finalizer will run when throwing we need to be
careful to make sure we don't put the passed-in handle
in the member field until we're sure we've succeeeded.

Additionally we need to make sure any wrapping SafeHandle
we create on a passed in IntPtr isn't collected.

* Move platform specific assertion and add comment.

* Comment- fix mistake in CanSeekCore

7 years agoFixing CompareInfo AssemblyMode.Full serialization between Core <--> Desktop (#12365)
Viktor Hofer [Mon, 19 Jun 2017 20:59:38 +0000 (22:59 +0200)]
Fixing CompareInfo AssemblyMode.Full serialization between Core <--> Desktop (#12365)

* Fixing CompareInfo AssemblyMode.Full serialization

* Adding reason why culture field is introduced

7 years agoMerge pull request #12055 from mikedn/lower-long-relops
Pat Gavlin [Mon, 19 Jun 2017 20:10:49 +0000 (13:10 -0700)]
Merge pull request #12055 from mikedn/lower-long-relops

[WIP] Simplify long relop lowering

7 years agoILLink Performance Tests: Enable MusicStore
Swaroop Sridhar [Wed, 24 May 2017 00:19:15 +0000 (17:19 -0700)]
ILLink Performance Tests: Enable MusicStore

Enable the Musicstore tests, since the failure in JitBench is
now fixed.

7 years ago[RyuJIT/ARM32] Update LinearScan::resolveLocalRef() for ARM32 (#12194)
Hyung-Kyu Choi [Mon, 19 Jun 2017 17:47:37 +0000 (02:47 +0900)]
[RyuJIT/ARM32] Update LinearScan::resolveLocalRef() for ARM32 (#12194)

Update LinearScan::resolveLocalRef()
- Always update two float register consisting a double register
- Use helper function for ARM32 double register
- Use stronger assertion condition

Introduce updateAssignedInterval() to update assigned interval
of ARM32 register considering register type.

7 years agoMerge pull request #12364 from adiaaida/removeSudoThroughput
Michelle McDaniel [Mon, 19 Jun 2017 16:16:01 +0000 (09:16 -0700)]
Merge pull request #12364 from adiaaida/removeSudoThroughput

Remove sudo from throughput run

7 years agoUpdate CoreClr, CoreFx to preview1-25419-02, preview1-25419-02, respectively (#12342)
dotnet-maestro-bot [Mon, 19 Jun 2017 15:51:33 +0000 (08:51 -0700)]
Update CoreClr, CoreFx to preview1-25419-02, preview1-25419-02, respectively (#12342)

7 years agoRemove sudo from throughput run
Michelle McDaniel [Mon, 19 Jun 2017 15:24:22 +0000 (08:24 -0700)]
Remove sudo from throughput run

Sudo is not necessary for running throughput testing, so remove sudo so
we don't run into requests for passwords if the ubuntu machines are not
set up correctly.

7 years agoCleanup most code in StringBuilder (#10156)
James Ko [Sun, 18 Jun 2017 13:53:45 +0000 (09:53 -0400)]
Cleanup most code in StringBuilder (#10156)

* Cleanup most code in StringBuilder

* Respond to PR feedback

* Document StringBuilder's fields

* VerifyClassInvariant -> AssertInvariants

* Fix always-true assert

* Respond to PR feedback from @stephentoub

7 years agoMerge pull request #12335 from mikedn/assert-prop-alloc
Pat Gavlin [Sun, 18 Jun 2017 02:43:46 +0000 (19:43 -0700)]
Merge pull request #12335 from mikedn/assert-prop-alloc

Remove unnecessary bitvec allocation in assertion prop

7 years agoFurther improve perf of Char.IsWhiteSpace (#12353)
Stephen Toub [Sun, 18 Jun 2017 01:40:38 +0000 (21:40 -0400)]
Further improve perf of Char.IsWhiteSpace (#12353)

IsWhiteSpaceLatin1 is not being inlined.  By changing a range check done with two comparison operations to instead be done with a subtraction and a single comparison, the code is shortened to not only be less expensive but also then get inlined into IsWhiteSpace and then further into String.IsNullOrWhiteSpace.  The net result is a measurable throughput improvement for IsNullOrWhiteSpace.