platform/upstream/coreclr.git
6 years agoFix bugs from trying to get transitions for untracked slots when it's not supposed to
Amy Yu [Fri, 15 Jun 2018 20:00:15 +0000 (13:00 -0700)]
Fix bugs from trying to get transitions for untracked slots when it's not supposed to

6 years agoAdjust method comment
Amy Yu [Fri, 15 Jun 2018 18:40:54 +0000 (11:40 -0700)]
Adjust method comment

6 years agoMake gcInfoTypes global instead of passed as param
Amy Yu [Fri, 15 Jun 2018 01:20:57 +0000 (18:20 -0700)]
Make gcInfoTypes global instead of passed as param

6 years agoFixed some bugs with gc transitions
Amy Yu [Fri, 15 Jun 2018 00:34:47 +0000 (17:34 -0700)]
Fixed some bugs with gc transitions

6 years agoGet gc slot liveness code offset
Amy Yu [Thu, 14 Jun 2018 22:37:35 +0000 (15:37 -0700)]
Get gc slot liveness code offset

6 years agoMerge pull request #18326 from acmyu/gc
Amy [Fri, 8 Jun 2018 19:14:11 +0000 (12:14 -0700)]
Merge pull request #18326 from acmyu/gc

R2RDump - GcInfo and slot table

6 years agoWorkaround for compiler.hpp (1848) - Assertion failed 'lvRefCnt' (#18292)
Sergey Andreenko [Fri, 8 Jun 2018 17:30:43 +0000 (10:30 -0700)]
Workaround for  compiler.hpp (1848) - Assertion failed 'lvRefCnt' (#18292)

* add test

* clean fgRemoveStmt a bit

* fix the issue (more like a workaround).

6 years agoDisable failing CoreFx tests on Windows/arm and Linux/arm (#18347)
Egor Chesakov [Fri, 8 Jun 2018 16:32:32 +0000 (09:32 -0700)]
Disable failing CoreFx tests on Windows/arm and Linux/arm (#18347)

* System.Dynamic.Runtime.Tests on Windows/arm and Linux/arm

* System.Linq.Expressions.Tests on Windows/arm (JitStress=2)

* System.Runtime.Numerics.Tests on Windows/arm (JitStress=1/JitStress=2)

6 years agoJIT: Fix bug in finally cloning caused by unsound callfinally reordering (#18348)
Andy Ayers [Fri, 8 Jun 2018 06:16:56 +0000 (23:16 -0700)]
JIT: Fix bug in finally cloning caused by unsound callfinally reordering (#18348)

We need to make sure that if we reorder a callfinally during finally cloning
that the callfinally is actually the one being targeted by the last block in
the try range.

Closes #18332. Linked issue has some more detailed notes.

6 years agoFixed and optimized Decimal.GetHashCode (#18288)
Pent Ploompuu [Fri, 8 Jun 2018 00:47:44 +0000 (03:47 +0300)]
Fixed and optimized Decimal.GetHashCode (#18288)

6 years agoAdd missing #ifdef.
Brian Robbins [Thu, 7 Jun 2018 20:44:49 +0000 (13:44 -0700)]
Add missing #ifdef.

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoInterop Copy tests now all return 101 during fail rather than crash (#18310)
Aaron Robinson [Fri, 8 Jun 2018 00:23:08 +0000 (17:23 -0700)]
Interop Copy tests now all return 101 during fail rather than crash (#18310)

* Interop Copy tests now all return 101 during fail rather than crash

* Remove unused Assert APIs

6 years agoMerge pull request #18354 from sdmaclea/PR-eventsourcetrace
Bruce Forstall [Fri, 8 Jun 2018 00:03:30 +0000 (17:03 -0700)]
Merge pull request #18354 from sdmaclea/PR-eventsourcetrace

Mark eventsourcetrace GCStressIncompatible

6 years agoMerge pull request #18340 from mikedn/ins-desc
Bruce Forstall [Thu, 7 Jun 2018 23:58:03 +0000 (16:58 -0700)]
Merge pull request #18340 from mikedn/ins-desc

Increase instrDesc::_idIns width on XARCH

6 years agoMerge pull request #18356 from CarolEidt/Fix_GT_START_NONGC
Carol Eidt [Thu, 7 Jun 2018 23:53:45 +0000 (16:53 -0700)]
Merge pull request #18356 from CarolEidt/Fix_GT_START_NONGC

GT_START_NONGC has no kill set

6 years agoGcInfo belongs to method, not runtime function
Amy Yu [Thu, 7 Jun 2018 23:38:10 +0000 (16:38 -0700)]
GcInfo belongs to method, not runtime function

6 years agoSkip old time zones adjustments with offsets higher than 14h (#18305)
Krzysztof Wicher [Thu, 7 Jun 2018 22:55:54 +0000 (15:55 -0700)]
Skip old time zones adjustments with offsets higher than 14h (#18305)

* Skip old time zones with offsets higher than 14h

* apply offline feedback

* fix braces

6 years agoGT_START_NONGC has no kill set
Carol Eidt [Thu, 7 Jun 2018 20:58:22 +0000 (13:58 -0700)]
GT_START_NONGC has no kill set

It was mistakenly added to the `GT_PROF_HOOK` case in the recent LSRA changes.

6 years agoMark eventsourcetrace GCStressIncompatible
Steve MacLean [Thu, 7 Jun 2018 20:31:10 +0000 (16:31 -0400)]
Mark eventsourcetrace GCStressIncompatible

6 years agoAllow ILCodeVersion to fallback to default IL (#18322)
Noah Falk [Thu, 7 Jun 2018 19:53:08 +0000 (12:53 -0700)]
Allow ILCodeVersion to fallback to default IL (#18322)

For compat with profilers that used our APIs in unexpected ways we can allow
the ILCodeVersion to fallback to the default IL code when no IL was explicitly
given.

6 years agoMoves CurrentSystemTimeZone, ICastable, RegistryView and RegistryValueKind to shared...
Maryam Ariyan [Thu, 7 Jun 2018 19:40:40 +0000 (12:40 -0700)]
Moves CurrentSystemTimeZone, ICastable, RegistryView and RegistryValueKind to shared (#18337)

* Moves CurrentSystemTimeZone to shared completely

* Moves ICastable to shared

* Moves RegistryView and RegistryValueKind to shared

* Moves ICastableHelpers to its own file

6 years agoForce short date pattern to use yyyy on Linux (#18316)
Tarek Mahmoud Sayed [Thu, 7 Jun 2018 18:01:26 +0000 (11:01 -0700)]
Force short date pattern to use yyyy on Linux (#18316)

* Force short date pattern to use yyyy on Linux

The default pattern we get is using yy which causes the years  to be displayed  as 2 digits. This is not acceptable for many users. The fix here is to force 4-digit year as a default and still keep the original pattern which has 2-digits year in the optional list

* Address the review feedback

6 years agoRemove dead case from string.Compare (#18345)
Stephen Toub [Thu, 7 Jun 2018 17:24:11 +0000 (13:24 -0400)]
Remove dead case from string.Compare (#18345)

6 years agoGuard Windows code under PLATFORM_WINDOWS (#18344)
Marek Safar [Thu, 7 Jun 2018 17:07:47 +0000 (10:07 -0700)]
Guard Windows code under PLATFORM_WINDOWS (#18344)

6 years agoIncrease instrDesc::_idIns width on XARCH
Mike Danes [Thu, 7 Jun 2018 15:17:04 +0000 (18:17 +0300)]
Increase instrDesc::_idIns width on XARCH

XARCH exceeded the 512 instruction limit but it still has room for instruction formats (only 77 at the moment) so a bit was taken from _idInsFmt.

Also, cleaned up some tiny while instrDesc traces while trying to fix "Space taken up to here:" kind of comments.

6 years agoFixed a couple of comments about ArgumentException on timeout parameters (#18335)
Alfred Myers [Thu, 7 Jun 2018 07:06:45 +0000 (04:06 -0300)]
Fixed a couple of comments about ArgumentException on timeout parameters (#18335)

6 years agoRemove a dead branch from __DTString (#18334)
Stephen Toub [Thu, 7 Jun 2018 07:06:09 +0000 (03:06 -0400)]
Remove a dead branch from __DTString (#18334)

All call sites to the ctor validate that the DateTimeFormatInfo has been created.

6 years agoDelete FormatterConverter from CoreLib (#18336)
Stephen Toub [Thu, 7 Jun 2018 07:04:30 +0000 (03:04 -0400)]
Delete FormatterConverter from CoreLib (#18336)

It's not used in the library.  The type is implemented/exposed from corefx.

6 years agoCross-bitness support in JitInterface (#18329)
Egor Chesakov [Thu, 7 Jun 2018 06:49:48 +0000 (23:49 -0700)]
Cross-bitness support in JitInterface (#18329)

* Replace sizeof(tailCallType) / sizeof(tailCallType[0]) with _countof(tailCallType)

* Remove TransparentProxyObject and RealProxyObject

* InlinedCallFrame::GetEEInfo should not be used for R2R compilation

* Hardcode constants used in CEEInfo::getEEInfo

* Thread fields should not be used for R2R compilation

* Zero pEEInfoOut->inlinedCallFrameInfo when compiling R2R code

* Rename OFFSETOF__PtrArray__m_Array to avoid compilation conflicts with asmconstants

* Add assertions enabled in every non-crossbitness scenario

* Define and use CROSSBITNESS_COMPILE macro

6 years agoFix ARM cast codegen (#18063)
mikedn [Thu, 7 Jun 2018 05:18:59 +0000 (08:18 +0300)]
Fix ARM cast codegen (#18063)

* Fix ARM cast codegen

ARM cast codegen is rather convoluted and sometimes does the wrong thing by applying GTF_UNSIGNED to the destination type even though this flag is only about the source type.

* Add more conversion tests

These tests are intended to support casts with contained operands. They're also useful to catch issues caused by load nodes having small types and generally improve test coverage for casts.

6 years agoAdding containment support for more x86 hardware intrinsics (#18297)
Tanner Gooding [Thu, 7 Jun 2018 01:24:04 +0000 (18:24 -0700)]
Adding containment support for more x86 hardware intrinsics (#18297)

* Adding containment support to one-operand scalar HWIntrinsics (x86)

* Adding containment support to two-operand imm HWIntrinsics (x86)

* Adding containment support to three-operand imm HWIntrinsics (x86)

* Updating hwintrinsiccodegenxarch to properly mask Sse41.Insert for TYP_FLOAT

* Updating the Sse41.Insert tests for TYP_FLOAT

* Adding containment support for Sse2.CompareLessThan and BlendVariable (Sse41/Avx/Avx2)

* Fixing `genHWIntrinsic_R_RM_I` to call `emitIns_SIMD_R_R_I`, rather than `emitIns_R_R_I`

* Updating emitOutputSV to not modify the code for IF_RWR_RRD_SRD_CNS

* Cleaning up some of the emitxarch code.

* Moving roundps and roundpd into the IsDstSrcImm check

6 years agoRefactoring gcInfo, added verbose option to cli
Amy Yu [Wed, 6 Jun 2018 23:57:33 +0000 (16:57 -0700)]
Refactoring gcInfo, added verbose option to cli

6 years agoFix error cause by merge
Amy Yu [Wed, 6 Jun 2018 22:05:46 +0000 (15:05 -0700)]
Fix error cause by merge

6 years agoFix unwindInfo bug caused by missing alignmentPad, dump raw byes of unwindInfo and...
Amy Yu [Wed, 6 Jun 2018 21:42:16 +0000 (14:42 -0700)]
Fix unwindInfo bug caused by missing alignmentPad, dump raw byes of unwindInfo and gcInfo

6 years agoUse single variable for multiple tabs
Amy Yu [Wed, 6 Jun 2018 17:56:06 +0000 (10:56 -0700)]
Use single variable for multiple tabs

6 years agoRead slot table, dump GcInfo
Amy Yu [Wed, 6 Jun 2018 17:38:57 +0000 (10:38 -0700)]
Read slot table, dump GcInfo

6 years agoExtract other fields from gcinfo
Amy Yu [Tue, 5 Jun 2018 19:11:11 +0000 (12:11 -0700)]
Extract other fields from gcinfo

6 years agoExtract gcinfo header, return kind and code length. Use code length as size of the...
Amy Yu [Mon, 4 Jun 2018 23:01:13 +0000 (16:01 -0700)]
Extract gcinfo header, return kind and code length. Use code length as size of the runtime function

6 years agoExtract gcinfo from image
Amy Yu [Sat, 2 Jun 2018 00:04:48 +0000 (17:04 -0700)]
Extract gcinfo from image

6 years agoAvoid passing R2RReader to R2RMethod and RuntimeFunction constructors
Amy Yu [Mon, 4 Jun 2018 23:59:42 +0000 (16:59 -0700)]
Avoid passing R2RReader to R2RMethod and RuntimeFunction constructors

6 years agoUse typeDef.Namespace to get full namespace, move to separate function
Amy Yu [Mon, 4 Jun 2018 20:49:13 +0000 (13:49 -0700)]
Use typeDef.Namespace to get full namespace, move to separate function

6 years agoR2RDump - Unwind Info (#18248)
Amy [Wed, 6 Jun 2018 21:19:56 +0000 (14:19 -0700)]
R2RDump - Unwind Info (#18248)

* Extract unwind info from image

* Use typeDef.Namespace to get full namespace, move to separate function

* Avoid passing R2RReader to R2RMethod and RuntimeFunction constructors

* Dump unwind info

* Changes to unwindInfo output format

6 years agoFix issue in Compiler::impImportStaticFieldAccess (#18328)
Jan Vorlicek [Wed, 6 Jun 2018 20:39:47 +0000 (22:39 +0200)]
Fix issue in Compiler::impImportStaticFieldAccess (#18328)

When CORINFO_FIELD_STATIC_SHARED_STATIC_HELPER accessor is being processed for
structs, the method creates a GT_IND node instead of GT_OBJ node. For structs
that can be normalized to a specific type (like TYP_SIMD8), it causes an assert
in Compiler::impNormStructVal in the switch case for GT_IND.

This change modifies the node creation to work the same way as in the default
case for accessors, creating GT_OBJ for structs and GT_IND otherwise.

6 years agoJIT: implement assembly name dissassembly filtering (#18306)
Andy Ayers [Wed, 6 Jun 2018 19:37:09 +0000 (12:37 -0700)]
JIT: implement assembly name dissassembly filtering (#18306)

Add `COMPlus_JitDisasmAssemblies` to specify a whitelist of assemblies
whose methods will be disassembled (also filters out order, EH, GC, and
unwind info dumps too).

Intended use is for PMI asm diffing. Since PMI runs in process, current
disassembly will dissassemble various methods in PMI itself as well
as framework methods that did not get prejitted.

With this new config option we can restrict disassembly to just the assemblies
that we're processing via PMI.

6 years agoMoves FastResourceComparer and TaskAwaiter to shared (#18283)
Maryam Ariyan [Wed, 6 Jun 2018 17:15:19 +0000 (10:15 -0700)]
Moves FastResourceComparer and TaskAwaiter to shared (#18283)

* Reduces diff in BinaryReader

* Moves FastResourceComparer to shared

* Reduces diff in FileBasedResourceGroveler

* Minor comment diff in ManifestBasedResourceGroveler

* Reducing diff by removing extra blank lines in ResourceReader

* Reduces diff by renaming private fields in AssemblyName

* String to string and Object to object in AssemblyName

* Reduces diff in TaskAwaiter

* Moves TaskAwaiter to shared

* Apply code review feedback

* Fixes failure in corert

* Revert Renaming fields in AssemblyName

6 years agoIncrease timeout and log the result for some WaitAny tests that expect AbandonedMutex...
Koundinya Veluri [Wed, 6 Jun 2018 17:09:29 +0000 (10:09 -0700)]
Increase timeout and log the result for some WaitAny tests that expect AbandonedMutexException (#18312)

Follow-up to https://github.com/dotnet/coreclr/pull/13298, missed a few cases.

6 years agoAdd instructions for making idl file changes (#18188)
Noah Falk [Wed, 6 Jun 2018 03:40:12 +0000 (20:40 -0700)]
Add instructions for making idl file changes (#18188)

6 years agoMerge pull request #18313 from dotnet-bot/from-tfs
Brian Sullivan [Wed, 6 Jun 2018 00:58:21 +0000 (17:58 -0700)]
Merge pull request #18313 from dotnet-bot/from-tfs

Merge changes from TFS

6 years agoMerge pull request #18303 from mikedn/lockadd4
Carol Eidt [Wed, 6 Jun 2018 00:31:31 +0000 (17:31 -0700)]
Merge pull request #18303 from mikedn/lockadd4

Use the actual type of LOCKADD's data operand

6 years agoFix a warning as error issue that causes a build break on the Desktop CLR
Brian Sullivan [Tue, 5 Jun 2018 22:11:08 +0000 (15:11 -0700)]
Fix a warning as error issue that causes a build break on the Desktop CLR

[tfs-changeset: 1702868]

6 years agoUse sysconf(_SC_NPROCESSORS_CONF) instead of sysconf(_SC_NPROCESSORS_ONLN) in PAL...
Egor Chesakov [Tue, 5 Jun 2018 18:38:56 +0000 (11:38 -0700)]
Use sysconf(_SC_NPROCESSORS_CONF) instead of sysconf(_SC_NPROCESSORS_ONLN) in PAL and GC ONLY on ARM and ARM64 (#18289)

6 years agoFixed typos on readme (#18304)
Alfred Myers [Tue, 5 Jun 2018 18:23:36 +0000 (15:23 -0300)]
Fixed typos on readme (#18304)

6 years agoUse the actual type of LOCKADD's data operand
Mike Danes [Tue, 5 Jun 2018 16:29:22 +0000 (19:29 +0300)]
Use the actual type of LOCKADD's data operand

The data operand can theoretically be a small int so we need to use its actual type to determine instruction size.

In practice this issue does not seem to happen as the importer is pretty insistent in spilling interlocked arguments to lclvars that have the proper type. Even when the data argument is already a small int lclvar (e.g. short method argument) this still doesn't cause problems because there's a cast between the method argument and LOCKADD.

6 years agoUpdate SDK used to build jitutils to 2.1 RC (#18290)
Andy Ayers [Tue, 5 Jun 2018 14:52:35 +0000 (07:52 -0700)]
Update SDK used to build jitutils to 2.1 RC (#18290)

In anticipation of taking a dependence on netcoreapp2.1 for the
forthcoming PMI work from jitutils.

Also make sure to shut down build servers before cleaning up the SDK.

6 years agoUse WChar instead of char (#18294)
Luqun Lou [Tue, 5 Jun 2018 13:40:34 +0000 (06:40 -0700)]
Use WChar instead of char (#18294)

6 years agoJIT: tolerate byref/nint return type mismatches during inlining (#18274)
Andy Ayers [Mon, 4 Jun 2018 23:02:01 +0000 (16:02 -0700)]
JIT: tolerate byref/nint return type mismatches during inlining (#18274)

Have the jit tolerate byref/nint return type mismatches for inlines
same way that it tolerates them for ret instructions.

Fixes #18270.

6 years agoAdding function headers to the 'emitIns_SIMD_*' methods and clarifying comments on...
Tanner Gooding [Sun, 3 Jun 2018 03:53:03 +0000 (20:53 -0700)]
Adding function headers to the 'emitIns_SIMD_*' methods and clarifying comments on related code.

6 years agoUpdating the x86 HWIntrinsics to support containment for most one-operand intrinsics.
Tanner Gooding [Sun, 3 Jun 2018 03:41:06 +0000 (20:41 -0700)]
Updating the x86 HWIntrinsics to support containment for most one-operand intrinsics.

6 years agoFixing up ContainCheckHWIntrinsic to use intrinsicId and to switch on the category...
Tanner Gooding [Sun, 3 Jun 2018 01:55:51 +0000 (18:55 -0700)]
Fixing up ContainCheckHWIntrinsic to use intrinsicId and to switch on the category for 1/3 arg intrinsics

6 years agoFixing the name of the paramters in the emitIns_SIMD_* methods.
Tanner Gooding [Sun, 3 Jun 2018 01:53:20 +0000 (18:53 -0700)]
Fixing the name of the paramters in the emitIns_SIMD_* methods.

6 years agoMerge pull request #18267 from mikedn/lockadd3
Carol Eidt [Mon, 4 Jun 2018 21:57:09 +0000 (14:57 -0700)]
Merge pull request #18267 from mikedn/lockadd3

Cleanup LOCKADD handling

6 years agoMake Encoding.Unicode.GetString faster on 64-bit platforms (#18263)
Jan Kotas [Mon, 4 Jun 2018 20:09:29 +0000 (13:09 -0700)]
Make Encoding.Unicode.GetString faster on 64-bit platforms (#18263)

UnicodeEncoding was taking fast path only when both source and destination were 8-byte aligned. It was not
the case for Unicode.GetString.

The fix is to just check the source alignment as fast path precondition, and use unaligned write for destination.

Also removed alternative fast path that is not needed anymore, tweaked local variable assignments for better
register allocation, and fixed performance issue introduced by recent big endian portability fix.

6 years agoR2RDump - Dump AvailableTypes section contents (#18227)
Amy [Mon, 4 Jun 2018 18:40:58 +0000 (11:40 -0700)]
R2RDump - Dump AvailableTypes section contents (#18227)

* Move R2RReader constructor to separate functions, parse READYTORUN_SECTION_AVAILABLE_TYPES

* Fix bug from merging, output formatting changes

* Rename availableTypes variables, save availableTypes as string instead of tuple

6 years agoCleanup LOCKADD handling
Mike Danes [Sun, 3 Jun 2018 21:50:17 +0000 (00:50 +0300)]
Cleanup LOCKADD handling

LOCKADD nodes are generated rather early and there's no reason for that:
* The CORINFO_INTRINSIC_InterlockedAdd32/64 intrinsics are not actually used. Even if they would be used we can still import them as XADD nodes and rely on lowering to generate LOCKADD when needed.
* gtExtractSideEffList transforms XADD into LOCKADD but this can be done in lowering. LOCKADD is an XARCH specific optimization after all.

Additionally:
* Avoid the need for special handling in LSRA by making GT_LOCKADD a "no value" oper.
* Split LOCKADD codegen from XADD/XCHG codegen, attempting to use the same code for all 3 just makes things more complex.
* The address is always in a register so there's no real need to create an indir node on the fly, the relevant emitter functions can be called directly.

The last point above is actually a CQ issue - we always generate `add [reg], imm`, more complex address modes are not used. Unfortunately this problem starts early, when the importer spills the address to a local variable. If that ever gets fixed then we'll could probably generate a contained LEA in lowering.

6 years agoFixed a couple of comments on TimeSpan.SecondsPerTick and Thread.SleepInternal (...
Alfred Myers [Mon, 4 Jun 2018 18:01:50 +0000 (15:01 -0300)]
Fixed a couple of comments on TimeSpan.SecondsPerTick and Thread.SleepInternal (#18276)

* Fixed comment for TimeSpan.SecondsPerTick

* Fixed comment on Thread.SleepInternal

6 years agoOptimise HtmlEncode to produce less garbage
Benjamin Hodgson [Mon, 19 Feb 2018 14:20:05 +0000 (14:20 +0000)]
Optimise HtmlEncode to produce less garbage

do the same optimisation for HtmlDecode

remove now-unneeded reference

Add tests for new ValueStringBuilder methods

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoFlow EventSources to EventPipe on Windows (#18217)
Brian Robbins [Mon, 4 Jun 2018 17:26:53 +0000 (10:26 -0700)]
Flow EventSources to EventPipe on Windows (#18217)

6 years agoWork in VM towards cross-bitness crossgen (#18245)
Egor Chesakov [Mon, 4 Jun 2018 17:08:22 +0000 (10:08 -0700)]
Work in VM towards cross-bitness crossgen (#18245)

* Replace sizeof expressions with target-specific constants:

* sizeof(ObjHeader) -> OBJHEADER_SIZE
* sizeof(Object) -> OBJECT_SIZE
* ObjSizeOf(Object) -> OBJECT_BASESIZE
* sizeof(ArrayBase) -> ARRAYBASE_SIZE
* ObjSizeOf(ArrayBase) -> ARRAYBASE_BASESIZE

* Remove ObjSizeOf macro

* Use OBJECT_SIZE in ArrayBase::GetBoundsOffset

* Cast ppObj to CORCOMPILE_GCREFMAP_TOKENS* before dereferencing in FakePromote

* LOG2_PTRSIZE should depend on _TARGET_64BIT_

6 years agoFix error during compilation with /permissive- (#18272)
Andrey Kurdyumov [Mon, 4 Jun 2018 16:24:37 +0000 (22:24 +0600)]
Fix error during compilation with /permissive- (#18272)

6 years agoBe more aggressive with Partial NGen (#18240)
Michelle McDaniel [Mon, 4 Jun 2018 16:06:09 +0000 (09:06 -0700)]
Be more aggressive with Partial NGen (#18240)

* Be more aggressive with partial ngen

In partial ngen, we only compile those methods that both have profile
data and have the ReadMethodCode flag set in the profile flags. That
means that we miss some functions that do have counts, which affects the
performance of assemblies crossgened with partial ngen. This change
makes partial ngen more aggressive by, in the cold path, first checking
to see if we already considered this method in the hot section, which
means that it has profile data, and only rejecting those methods that
were not already considered.

6 years agoMerge pull request #18264 from luqunl/18192
Carol Eidt [Mon, 4 Jun 2018 15:27:39 +0000 (08:27 -0700)]
Merge pull request #18264 from luqunl/18192

Set GTF_RELOP_QMARK in gtNewQmarkNode

6 years agoFix build break (#18278) (#18279)
Russ Keldorph [Mon, 4 Jun 2018 15:11:18 +0000 (08:11 -0700)]
Fix build break (#18278) (#18279)

6 years agoDelete unused file (#18271)
Jan Kotas [Mon, 4 Jun 2018 05:12:21 +0000 (22:12 -0700)]
Delete unused file (#18271)

6 years agoTypo (#18266)
John Doe [Sun, 3 Jun 2018 22:07:51 +0000 (15:07 -0700)]
Typo (#18266)

* addres -> address

* depedant -> dependent

* gaurantee -> guarantee

* gaurantees -> guarantees

* lable -> label

* lazieness -> laziness

* lcoation -> location

* enquing -> enqueuing

* enregsitered -> enregistered

* ensurin -> ensuring

6 years agoWarnings cleanup (#18260)
Robin Sue [Sun, 3 Jun 2018 18:12:26 +0000 (20:12 +0200)]
Warnings cleanup (#18260)

* Cleanup all disabled warnings that do not trigger

* Fix warning about line continuation in single line comment

* Eliminiate all unreferenced local variables and reenable warning

6 years agoSet GTF_RELOP_QMARK in gtNewQmarkNode
luqunl [Sun, 3 Jun 2018 16:51:50 +0000 (09:51 -0700)]
Set GTF_RELOP_QMARK in gtNewQmarkNode

6 years agoTypo (#18261)
John Doe [Sun, 3 Jun 2018 02:03:47 +0000 (19:03 -0700)]
Typo (#18261)

* accomodate -> accommodate

* accross -> across

* adddress -> address

* bookeeping -> bookkeeping

* arbitary -> arbitrary

* calulating -> calculating

* fromClas -> fromClass

* comand -> command

* comming -> coming

* comparisions -> comparisons

* configuiration -> configuration

* contraints -> constraints

* datastructures -> data structures

* defintely -> definitely

* defered -> deferred

* diassemble -> disassemble

* Emptry -> Empty

* everytime -> every time

* fragmetation -> fragmentation

* instaces -> instances

* interpretting -> interpreting

* intialize -> initialize

* loction -> location

6 years agoTry to fix issues with Unicode on big endian OSes (#18254)
Calvin [Sun, 3 Jun 2018 02:03:12 +0000 (23:03 -0300)]
Try to fix issues with Unicode on big endian OSes (#18254)

Mono had some patches in their fork of referencesource to resolve
issues on big endian. Essentially, compile-time endianness handling
is no good for big endian platforms, because they have to consume a
Monolite intended for all platforms in order to bootstrap. So then,
all big endian platforms are now consuming a bootstrap tarball made
on little endian systems, and bad things happen as a result.

This makes it so that endianness is checked at runtime by using
System.BitConverter.IsLittleEndian, not by a compiler definition.

This integrates mono/mono@1f9b218 and mono/mono@92cec46, which won't
apply cleanly to current CoreFX.

mono/mono#8679 may get fixed by this, but as the comments say,
there could be more patches missing. This just integrates the
patches known to me on UnicodeEncoding and UTF8Encoding.

6 years agoCleanup and remove unused parameters from genCreateAddrMode (#18258)
Robin Sue [Sat, 2 Jun 2018 22:40:54 +0000 (00:40 +0200)]
Cleanup and remove unused parameters from genCreateAddrMode (#18258)

* Cleanup and remove unused parameters from genCreateAddrMode, fixes #18177

6 years agoEnable tailcall_v4\smallFrame\smallFrame (#18246)
Sergey Andreenko [Sat, 2 Jun 2018 22:40:13 +0000 (15:40 -0700)]
Enable tailcall_v4\smallFrame\smallFrame (#18246)

* the bad il was removed

PR #11316  removed the bad IL sequences from this test.

* reenable for linux

6 years agoMerge BCryptGenRandom.cs (#18233)
Marco Rossignoli [Sat, 2 Jun 2018 21:57:59 +0000 (23:57 +0200)]
Merge BCryptGenRandom.cs (#18233)

6 years agoFixing some flags that were queried incorrectly.
Tanner Gooding [Sat, 2 Jun 2018 19:15:26 +0000 (12:15 -0700)]
Fixing some flags that were queried incorrectly.

6 years agoApplying the formatting patch.
Tanner Gooding [Sat, 2 Jun 2018 18:34:14 +0000 (11:34 -0700)]
Applying the formatting patch.

6 years agoUpdating the x86 HWIntrinsics to query flags via explicit methods.
Tanner Gooding [Sat, 2 Jun 2018 18:19:57 +0000 (11:19 -0700)]
Updating the x86 HWIntrinsics to query flags via explicit methods.

6 years agoMoving more methods to be static methods on HWIntrinsicInfo
Tanner Gooding [Sat, 2 Jun 2018 17:44:17 +0000 (10:44 -0700)]
Moving more methods to be static methods on HWIntrinsicInfo

6 years agoMoving the simdSizeOfHWIntrinsic and numArgsOfHWIntrinsic methods to be static method...
Tanner Gooding [Sat, 2 Jun 2018 16:49:04 +0000 (09:49 -0700)]
Moving the simdSizeOfHWIntrinsic and numArgsOfHWIntrinsic methods to be static methods on HWIntrinsicInfo

6 years agoMoving various x86 HWIntrinsicInfo lookup methods to be static methods on HWIntrinsicInfo
Tanner Gooding [Sat, 2 Jun 2018 16:29:47 +0000 (09:29 -0700)]
Moving various x86 HWIntrinsicInfo lookup methods to be static methods on HWIntrinsicInfo

6 years agoMoving the x86 lookupHWIntrinsic and lookupHWIntrinsicISA methods to be static method...
Tanner Gooding [Sat, 2 Jun 2018 16:07:31 +0000 (09:07 -0700)]
Moving the x86 lookupHWIntrinsic and lookupHWIntrinsicISA methods to be static methods on HWIntrinsicInfo

6 years agoMoving the getHWIntrinsicInfo and getHWIntrinsicName methods to be static methods...
Tanner Gooding [Sat, 2 Jun 2018 15:29:36 +0000 (08:29 -0700)]
Moving the getHWIntrinsicInfo and getHWIntrinsicName methods to be static methods on HWIntrinsicInfo

6 years agoMoving the xarch HWIntrtinsicInfo type into its own header file.
Tanner Gooding [Sat, 2 Jun 2018 15:02:29 +0000 (08:02 -0700)]
Moving the xarch HWIntrtinsicInfo type into its own header file.

6 years agoJIT: Eliminate RegTracker (#18179) (#18230)
Andrew Au [Sat, 2 Jun 2018 19:49:28 +0000 (12:49 -0700)]
JIT: Eliminate RegTracker (#18179) (#18230)

* Replace regTracker.rsTrackRegTrash with regSet.verifyRegUsed

* Replace regTracker.rsTrackRegCopy with regSet.verifyRegUsed

* Replace regTracker.rsTrackRegIntCns with regSet.verifyRegUsed

* Replace regTracker.rsTrashRegSet with regSet.verifyRegistersUsed

* Move verifyReg* method implementation from header file to implementation file

* Replace regTracker.rsTrackRegLclVar with regSet.verifyRegistersUsed

* Eliminate RegTracker

* Fixed the funclet prolog special case

* Experiment - Changing the verification code to actually set the mask

* Adding function headers

* Removed a few trailing spaces

6 years agoImplement corefx/#16619 Add FormattableString.CurrentCulture (#18253)
Mikhail Shilkov [Sat, 2 Jun 2018 17:34:04 +0000 (19:34 +0200)]
Implement corefx/#16619 Add FormattableString.CurrentCulture (#18253)

6 years agoEnable Alpine cross build for arm and arm64 (#18234)
Jan Vorlicek [Sat, 2 Jun 2018 08:23:10 +0000 (10:23 +0200)]
Enable Alpine cross build for arm and arm64 (#18234)

* Enable Alpine cross build for arm and arm64

This change enables cross build and rootfs creation for
Alpine Linux ARM / ARM64 targets.

Besides that, I've cleaned up the toolchain.cmake and got rid
of the explicit specification of GCC version specific include
and lib folders for all targets except of Tizen. Clang is able
to figure that out on its own the same way as it does when doing
regular non-cross builds, but it needed one more option for that.

I've also fixed a bug in the `add_compile_param` macro that caused
ignoring of parameters in cases where another parameter that was
a substring of the one being added was already present. So for example
if an option `-L${CMAKE_SYSROOT}/usr/lib/gcc` was already added,
attempt to add option `-L${CMAKE_SYSROOT}/usr/lib` would do nothing.

* Fix to  make it work with cmake 2.8 too

The older cmake that is still in use on Ubuntu 14.04 doesn't have
support for specifying sysroot and target via cmake variables.
So I've replaced those by explicit setting of the compiler / linker
options instead.

6 years agoJIT: fix issue with zero-length stackalloc (#18183)
Andy Ayers [Sat, 2 Jun 2018 07:25:23 +0000 (00:25 -0700)]
JIT: fix issue with zero-length stackalloc (#18183)

Defer calling `setNeedsGSSecurityCookie` until we know for sure that
the jit won't do the zero-length stackalloc optimization.

Closes #18176.

6 years agoAdding more NoContainment flags to the x86 hwintrinsic list
Tanner Gooding [Fri, 1 Jun 2018 15:59:23 +0000 (08:59 -0700)]
Adding more NoContainment flags to the x86 hwintrinsic list

6 years agoUpdating the x86 hwintrinsic code to better check for containment support.
Tanner Gooding [Fri, 1 Jun 2018 15:47:52 +0000 (08:47 -0700)]
Updating the x86 hwintrinsic code to better check for containment support.

6 years agoReduce race risk in MutexWaitOne2::PosTest4() (#18195)
Steve MacLean [Sat, 2 Jun 2018 02:04:39 +0000 (22:04 -0400)]
Reduce race risk in MutexWaitOne2::PosTest4() (#18195)

6 years agoMerge pull request #18059 from helloguo/fix18039
Carol Eidt [Fri, 1 Jun 2018 23:56:59 +0000 (16:56 -0700)]
Merge pull request #18059 from helloguo/fix18039

Fix issue18039: Add SSE2 intrinsic MoveScalar for type long and ulong

6 years ago[arm64] Disable `a % b = a & (b - 1);` optimization. (#18206)
Sergey Andreenko [Fri, 1 Jun 2018 23:19:18 +0000 (16:19 -0700)]
[arm64] Disable `a % b = a & (b - 1);` optimization. (#18206)

* Disable `a % b = a & (b - 1);` optimization on arm64

Morph can't relay on Lower optimization that it can't guarantee.

* improve checks in lower

We do not expect MOD/UMOD for integer/long types in lower for arm64.

6 years agoUpdating the HWIntrinsic codegen to ensure ival always fits in a byte.
Tanner Gooding [Fri, 1 Jun 2018 14:08:02 +0000 (07:08 -0700)]
Updating the HWIntrinsic codegen to ensure ival always fits in a byte.