Carol Eidt [Wed, 21 Sep 2016 18:12:45 +0000 (11:12 -0700)]
Fix Arm64 codegen to use GT_FIELD_LIST
In dotnet/coreclr#7252 changing GT_LIST to GT_FIELD_LIST when passing struct fields,
I omitted some required changes to codegenarm64.cpp. This caused the
crossgen of System.Private.CoreLib.dll to fail.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c26da4558d0ce18e265a460f7a857e13fa019364
John Chen [Wed, 21 Sep 2016 13:50:03 +0000 (06:50 -0700)]
Fix CrossGen error reporting when input is missing (dotnet/coreclr#7287)
Currently, running "crossgen foo.dll" when foo.dll does not exist produces
a misleading error message "The image being compiled is not a .NET assembly".
The reason is CrossGen ignores the actual error code reported during
initial asssembly load and verification, and always reports the error as
NGEN_E_FILE_NOT_ASSEMBLY. This change removes that logic, since the original
error code is much more likely to be useful.
Commit migrated from https://github.com/dotnet/coreclr/commit/
96f474c67e83b178c3a27afc1540953948610c73
Hugh Bellamy [Wed, 21 Sep 2016 13:48:08 +0000 (14:48 +0100)]
If out some dead code in System.Array for FEATURE_CORECLR (dotnet/coreclr#7288)
Commit migrated from https://github.com/dotnet/coreclr/commit/
eb98e3dd66f374be44f523099084e45163de5143
Peter Kukol [Wed, 21 Sep 2016 01:59:34 +0000 (18:59 -0700)]
Clean up GenTree node size dumping code. (dotnet/coreclr#7278)
Clean up GenTreeXxxx struct size dump; fix 32-bit build when MEASURE_NODE_SIZE is enabled.
Commit migrated from https://github.com/dotnet/coreclr/commit/
171962f54145236ab354f64961b2174f404d605f
Joseph Tremoulet [Wed, 21 Sep 2016 00:49:23 +0000 (20:49 -0400)]
Merge pull request dotnet/coreclr#7280 from JosephTremoulet/BoundsCheckDisable
Respect JitNoRangeChks flag in RyuJit
Commit migrated from https://github.com/dotnet/coreclr/commit/
389474470052273a67942da042a2476f0cab7deb
Carol Eidt [Tue, 20 Sep 2016 23:41:35 +0000 (16:41 -0700)]
Merge pull request dotnet/coreclr#7252 from CarolEidt/x86GtObj
Support GT_OBJ for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
425e8b4ab686478e40cf4c7e720200bd58a56584
Mike McLaughlin [Tue, 20 Sep 2016 22:22:33 +0000 (15:22 -0700)]
Fix launch timing issue in dbgshim found in VS. (dotnet/coreclr#7279)
Issue dotnet/coreclr#7274.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f29eee4896d490f88e06865916d5821d0fad935a
Joseph Tremoulet [Tue, 20 Sep 2016 20:09:32 +0000 (16:09 -0400)]
Respect JitNoRangeChks flag in RyuJit
Honor this config flag by having assertion prop treat all bounds check
nodes as redundant when it is set.
Also change the flag's lookup options to `REGUTIL_default` to match the
rest of the jit-focused flags.
Note that support for this flag is conditional on having the preprocessor
flag `FEATURE_ENABLE_NO_RANGE_CHECKS` defined, which requires a custom
build with line 199 of inc/switches.h un-commented (or with compile flags
altered to include `-DFEATURE_ENABLE_NO_RANGE_CHECKS`) -- the purpose of
the flag is to facilitate experiments to estimate the cumulative cost of
bounds checking in various workloads.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0aebfbef08a28b28dbf687d7f49cbc8369ea441a
Carol Eidt [Sat, 10 Sep 2016 15:24:51 +0000 (08:24 -0700)]
Support GT_OBJ for x86
Add support for GT_OBJ for x86, and allow them to be transformed into a list
of fields (in morph) if it is a promoted struct. Add a new list type for
this (GT_FIELD_LIST) with the type and offset, and use it for the multireg
arg passing as well for consistency.
Also refactor fgMorphArgs so that there is a positive check for reMorphing,
rather than relying on gtCallLateArgs, which can be null if there are no
register args.
In codegenxarch, modify the struct passing (genPutStructArgStk) to work for
both the x64/ux and x86 case, including the option of pushing fields onto
the stack.
Eliminate the redundant INS_movs_ptr, and replace with the pre-existing
INS_movsp.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e550cf35bd5ff8e7eefcb1a605219f71a3672d83
Davis Goodin [Tue, 20 Sep 2016 18:03:36 +0000 (13:03 -0500)]
Upgrade CLI, buildtools for RTM shared framework. (dotnet/coreclr#7045)
Commit migrated from https://github.com/dotnet/coreclr/commit/
610c0b1cd28b5624f718b739d2eea4c0a44f5adb
kchoi [Tue, 20 Sep 2016 15:23:11 +0000 (08:23 -0700)]
mute EH failures exposed by LTO (dotnet/coreclr#7267)
It does this by using a no-inline, no-opt function that takes in
the volatile pointer and performing operation that generates h/w
exception. The function has a runtime check on the volatile pointer to
pretend to throw (but never does), which fools the C++ runtime into
handling the h/w exception.
Commit migrated from https://github.com/dotnet/coreclr/commit/
276618176c9101ce475ea2b56115a67c436fa53b
Vance Morrison [Tue, 20 Sep 2016 15:10:56 +0000 (08:10 -0700)]
Merge pull request dotnet/coreclr#7268 from vancem/master
Fix Bad NGEN Pdbs for ReadyToRun images
Commit migrated from https://github.com/dotnet/coreclr/commit/
b7605f846dbfcebbd60143fa061c4b435f443cbf
Rama krishnan Raghupathy [Tue, 20 Sep 2016 05:35:49 +0000 (22:35 -0700)]
Merge pull request dotnet/coreclr#7181 from ramarag/CompilerServices
Adding Compiler services APIs
Commit migrated from https://github.com/dotnet/coreclr/commit/
53b124af8ab69316223f05d05fba30e069aa0503
Mike McLaughlin [Tue, 20 Sep 2016 01:47:25 +0000 (18:47 -0700)]
Create long-named DAC and SOS DLLs for Windows. (dotnet/coreclr#7265)
Issue dotnet/coreclr#5869
Commit migrated from https://github.com/dotnet/coreclr/commit/
b5bf14ff8d2d87fdbac0ae63cedf1ac835d07148
Rama Krishnan Raghupathy [Thu, 15 Sep 2016 20:45:04 +0000 (13:45 -0700)]
Fix GC Stress testing on non windows platforms
Commit migrated from https://github.com/dotnet/coreclr/commit/
9a236ce1619e8c3df173fbff55ff7184bb76de22
Rama Krishnan Raghupathy [Thu, 15 Sep 2016 00:03:11 +0000 (17:03 -0700)]
test FixedAddressValueType and RuntimeWrappedException
Commit migrated from https://github.com/dotnet/coreclr/commit/
a3d93afa96c7bf488347d139c5f0affb0517674c
Vance Morrison [Mon, 19 Sep 2016 23:18:38 +0000 (16:18 -0700)]
FixBadReadyToRunPdb.9-19-16
Commit migrated from https://github.com/dotnet/coreclr/commit/
f67a32fbcaf47b9072acbe1638beb8d61842b5dd
Pat Gavlin [Mon, 19 Sep 2016 23:14:04 +0000 (16:14 -0700)]
Merge pull request dotnet/coreclr#7232 from pgavlin/gh4186
Implement indirect VSD calls for x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
573cbeb2c0a729168147cb7e61f47fa40bd60b55
Peter Kukol [Mon, 19 Sep 2016 22:44:22 +0000 (16:44 -0600)]
Add option for showing GT_xxx operator counts. (dotnet/coreclr#7262)
Commit migrated from https://github.com/dotnet/coreclr/commit/
30e6ae225a113d2e286dbd868bba38c786bf141b
Pat Gavlin [Mon, 19 Sep 2016 20:56:30 +0000 (13:56 -0700)]
Fix a bug in LIR::Use::ReplaceWith.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9e75337a08253a92154c40349dd6860e4f39faba
Dan Moseley [Mon, 19 Sep 2016 20:56:59 +0000 (13:56 -0700)]
Expose missing public field on Debugger (dotnet/coreclr#7258)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c4fcfff56c826813fe04daae2ae73104859b9352
Dan Moseley [Mon, 19 Sep 2016 18:16:37 +0000 (11:16 -0700)]
Fill out SecurityException with stubs (dotnet/coreclr#7250)
Commit migrated from https://github.com/dotnet/coreclr/commit/
88e230b20d6c784a5f2d28150815f0647e94cbdf
Swaroop Sridhar [Mon, 19 Sep 2016 16:02:42 +0000 (09:02 -0700)]
Merge pull request dotnet/coreclr#7237 from swaroop-sridhar/gc86legacy
X86 GcEncode: Support V1 and V2 encodings
Commit migrated from https://github.com/dotnet/coreclr/commit/
217ba4dbe16d17d8174e8edb24134abd36bc0a3c
Pat Gavlin [Sat, 17 Sep 2016 01:35:38 +0000 (18:35 -0700)]
Mark GT_IND nodes that represent VSD targets.
The operand to such a node must be materialized into a register on
certain platforms. This change defines a new IND-specific flag,
GTF_IND_VSD_TGT, and uses that flag to indicate that a particular
GT_IND node represents a VSD target. This flag is then observed by
lowering on the necessary platforms in order to short circuit the
logic that attempts to make the GT_IND's operand contained.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0188c07e524986bd6f8587e57f37f97e3143bb0e
Swaroop Sridhar [Fri, 16 Sep 2016 21:32:06 +0000 (14:32 -0700)]
X86 GcEncode: Support V1 and V2 encodings
The RYU+LegacyBackend Desktop JIT for X86 is still on V1.
So, permit both V1 and V2 encodings in gcencode.cpp.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e7ece6191343268042ca0af8d2df512cbfea771c
Bart J.F. De Smet [Mon, 19 Sep 2016 01:11:37 +0000 (18:11 -0700)]
Exposing Type.GetTypeFromHandleUnsafe from model.xml (dotnet/coreclr#7249)
Exposing Type.GetTypeFromHandleUnsafe from model.xml
Commit migrated from https://github.com/dotnet/coreclr/commit/
20ddf732a11b8159a8860f38fcba5f01f3ca1280
Justin Van Patten [Sun, 18 Sep 2016 22:36:33 +0000 (15:36 -0700)]
Version: Make fields readonly and delete duplicate code (dotnet/coreclr#7246)
Change `Version`'s fields to `readonly` to better guarantee its
immutability, and remove duplicate code.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8e39803b560e3533e9af04209b098e2b59936781
kvochko [Sun, 18 Sep 2016 06:04:18 +0000 (10:04 +0400)]
Prevent source line info from being released (dotnet/coreclr#7222)
Commit migrated from https://github.com/dotnet/coreclr/commit/
32f0f9721afb584b4a14d69135bea7ddc129f755
Rama Krishnan Raghupathy [Thu, 15 Sep 2016 02:55:54 +0000 (19:55 -0700)]
Exposing IUnknownConstantAttribute
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee5111494705036e725ed155c53567da2d40d33b
Rama Krishnan Raghupathy [Wed, 14 Sep 2016 02:21:58 +0000 (19:21 -0700)]
Exposing Remaining CompilerServices Apis in mscorlib
Commit migrated from https://github.com/dotnet/coreclr/commit/
561ce4a5324c5f388bcc7ed32ad8418ec3e5453b
Rama Krishnan Raghupathy [Wed, 14 Sep 2016 00:46:07 +0000 (17:46 -0700)]
Exposing ExecuteCodeWithGuaranteedCleanup in mscorlib
Commit migrated from https://github.com/dotnet/coreclr/commit/
76d11caf74540017e6d5106ddb5d01031d10abd5
Rama Krishnan Raghupathy [Tue, 13 Sep 2016 23:34:56 +0000 (16:34 -0700)]
Exposing RunModuleConstructor in mscorlib
Commit migrated from https://github.com/dotnet/coreclr/commit/
275221738920f4c70ff8af13d25c24ce50dcc187
Eric Mellino [Sat, 17 Sep 2016 00:05:43 +0000 (17:05 -0700)]
Merge pull request dotnet/coreclr#7238 from dotnet/mellinoe-patch-1
Add an Ubuntu 16.10 badge to README.md
Commit migrated from https://github.com/dotnet/coreclr/commit/
81e42b628ab83f892324b4147e0e4bfdfb18c874
Pat Gavlin [Fri, 16 Sep 2016 22:44:47 +0000 (15:44 -0700)]
Address PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2bb7e9ae5d7e991ec37345ef4befce738fa5996d
Michelle McDaniel [Fri, 16 Sep 2016 22:23:28 +0000 (15:23 -0700)]
Merge pull request dotnet/coreclr#7169 from adiaaida/shiftCnsInt
Add optimization for shift by CNS_INT
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee2bfa8a2dc33afcb574f09dffe0baf52e68f58b
Eric Mellino [Fri, 16 Sep 2016 21:38:12 +0000 (14:38 -0700)]
Merge pull request dotnet/coreclr#7233 from mellinoe/ubuntu1610-ci
Add Ubuntu 16.10 to CI
Commit migrated from https://github.com/dotnet/coreclr/commit/
291baa671e6a8828ed82b02fd4f7c9009ec61ca6
Sepideh Khoshnood [Fri, 16 Sep 2016 20:12:56 +0000 (13:12 -0700)]
Add few System.Reflection APIs (dotnet/coreclr#7193)
* Add few remaining exposable System.Reflection APIs
Commit migrated from https://github.com/dotnet/coreclr/commit/
84c777a7dc1d0c237fec2ca49757a269e721c413
Michelle McDaniel [Fri, 9 Sep 2016 17:44:03 +0000 (10:44 -0700)]
Add optimization for shift by CNS_INT
This change adds support for shifting by a GT_CNS_INT without going
through a helper. If the shiftOp is a GT_CNS_INT we do several
transformations based on the shift amount:
If the shift amount is 0, the shift is a nop, so we just put together the
hi and lo ops as a GT_LONG.
If the shift amount is < 32, we generate a shl/shld pattern, a shr/shrd
pattern or a sar/shrd pattern, depending on the oper. The first operand of
the shrd/shld is a GT_LONG, which we crack in codegen, using it
essentially as two int operands, rather than creating a tri op GenTree
node (essentially so that we can have 3 operands, instead of the normal
two).
If the shift amount is 32, it differs between shifting left and shifting
right. For GT_LSH, we move the loOp into the hiResult and set the loResult
to 0. For GT_RSZ, we move the hiOp into the loResult, and set the hiResult
to 0. For GT_RSH, we move the hiOp into the loResult, and set the hiResult
to a 31 bit signed shift of the hiOp to sign extend.
If the shift amount is less than 64, but larger than 32: for GT_LSH, the
hiResult is a shift of the loOp by shift amount - 32 (the move from lo into hi is
the 32 bit shift). We set the loResult to 0. For GT_RSH and GT_RSZ, the
loResult is a right shift (signed for GT_RSH) of the hiOp by shift amount
- 32. The hiResult is 0 for GT_RSZ, and a 31 bit signed shift of hiOp1 for
GT_RSH.
If the shift amount is >= 64, we set both hiResult and loResult to 0 for
GT_LSH and GT_RSZ, and do a sign extend shift to set hiResult and loResult
to the sign of the original hiOp for GT_RSH.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c5e53363fd7ae7228764a006de1b1f158e64a16
Eric Mellino [Fri, 16 Sep 2016 19:11:29 +0000 (12:11 -0700)]
Add Ubuntu 16.10 to CI
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3875aadd615c12f55cfd969905d996ec20c587c
Pat Gavlin [Mon, 12 Sep 2016 21:23:29 +0000 (14:23 -0700)]
Implement indirect VSD calls for x86.
Indirect VSD calls on x86 require not only that the address of the
VSD indirection cell is passed to the stub in EAX, but also that the
call instruction is
a) preceeded by a 3-byte NOP, and
b) exactly `call [eax]`.
On x64, these types of calls only require that the indirection cell
address is passed in R11 (i.e. they do not require the generation of
a specific call instruction encoding). The RyuJIT IR is therefore
able to represent such calls succinctly as something like:
t72 = lclVar ref V04 loc1 u:3 (last use) $240
/--* t72 ref
t295 = * putarg_reg ref
t202 = lclVar long V09 tmp4 u:4 $382
/--* t202 long
t296 = * putarg_reg long
t106 = lclVar long V09 tmp4 u:4 (last use) $382
/--* t106 long
t297 = * indir long
/--* t295 ref this in rcx
+--* t296 long arg1 in r11
+--* t297 long calli tgt
t107 = * call ind stub ref $24a
In this form, the address of the indirection cell is in the lclVar
`tmp4`, which is then used by both a `putarg_reg` to move the
argument into R11 and by the indirection that generates the call
target. Because there are a relatively large number of registers on
x64, this works out nicely: the address of the indirection cell is
frequently allocated to R11, few extraneous copies are required,
and the code generator produces `call [r11]` for the call instruction.
Unfortunately, the situation is not so straightforward on x86: not
only must code generator must both pass the address of the indirection
cell in EAX and produce the specific call form mentioned earlier,
but there are also far fewer available registers. As a result, the
address of the indirection cell is infrequently allocated to EAX and
(barring an implicit understanding in the code generator that a
previous putarg_reg has placed the address of the indirection cell
into EAX) requires a redundant `mov eax, ...` before the call.
Ideally, we would be able to store the address of the indirection cell
to a local with a very short lifetime and pre-allocate that local to
EAX, but the IR does not have that capability, and adding it now
seems to be prohibitively expensive. Instead, this change omits the
`putarg_reg` used to put the the indirection cell address into the
required register on other platforms and simply uses the `calli tgt`
operand to the call to represent both the non-standard argument and
the call target:
t40 = lclVar ref V04 loc1 u:3 $1c0
/--* t40 ref
t280 = * putarg_reg ref
t70 = lclVar int V06 loc3 u:4 (last use) $2c1
/--* t70 int
t281 = * indir int
/--* t280 ref this in ecx
+--* t281 int calli tgt
t71 = * call ind stub ref $1c6
Lowering then marks the indirection as contained and sets the
destination candidates for its operand to EAX.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7d8a4a7dbd9ce5b2981d7c9632ac108b2dcef93
Rama Krishnan Raghupathy [Wed, 14 Sep 2016 22:57:36 +0000 (15:57 -0700)]
Enable Building Libraries for ilproj
Commit migrated from https://github.com/dotnet/coreclr/commit/
3e10b7622f5c7f80eab018e085b1328e35038fc7
Peter Kukol [Fri, 16 Sep 2016 05:59:05 +0000 (23:59 -0600)]
Option for reporting GenTree operator bashing stats (dotnet/coreclr#7152)
* Add option (off by default) to report GenTree operator bashing stats.
Commit migrated from https://github.com/dotnet/coreclr/commit/
832a7498bf7aff89a70800c5f02517866f93dc1f
Wes Haggard [Fri, 16 Sep 2016 03:16:01 +0000 (20:16 -0700)]
Merge pull request dotnet/coreclr#7212 from joperezr/FixmscorlibRef
Remove unwanted String.Split methods from Reference assembly
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf98629e268931b87f676dba12a5f23e78b28767
Pat Gavlin [Fri, 16 Sep 2016 02:11:30 +0000 (19:11 -0700)]
Merge pull request dotnet/coreclr#7170 from pgavlin/gh7144
Refactor call arg table updates.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fa87917dc43f0c82bc2a2c62359e88f27b633477
Sivarv [Fri, 16 Sep 2016 00:55:43 +0000 (17:55 -0700)]
Merge pull request dotnet/coreclr#7194 from sivarv/jitstressregs1or8Fix
Fix to issues dotnet/coreclr#7167, 7094 and 7143
Commit migrated from https://github.com/dotnet/coreclr/commit/
52f4340ddc04161924204a5c548b85a707600bac
Aditya Mandaleeka [Thu, 15 Sep 2016 23:56:26 +0000 (16:56 -0700)]
Minor fix in GC section of BOTR
Commit migrated from https://github.com/dotnet/coreclr/commit/
654c2d3cc45d918506be17306b8f1e3314f4771f
Pat Gavlin [Tue, 13 Sep 2016 20:42:14 +0000 (13:42 -0700)]
Refactor call arg table updates.
When a call argument is replaced by a new node, the corresponding entry
in the call's argument table must be replaced. Managing this replacement
was a bit ad-hoc: there were a (small) number of places throughout the
compiler that needed to do so, and each determined whether or not to
call the udpate method (`fgFixupArgTabEntryPtr`) independently. The
update method has been removed and its functionality replaced with a
new method, `GenTree::ReplaceOperand`, which will update the call
argument table iff the replaced node is a call argument.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ebb1d54583d0ebc03235e78e51f3026fbb7e4d3
Jose Perez Rodriguez [Thu, 15 Sep 2016 23:19:50 +0000 (16:19 -0700)]
Adding new Split members with defaults
Commit migrated from https://github.com/dotnet/coreclr/commit/
90de022879851cbc1f30f82c70f1e4f8bcc51223
sivarv [Thu, 15 Sep 2016 18:30:48 +0000 (11:30 -0700)]
Fix LSRA stress modes not to constrain candidates to below the
required limit.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90850acdc2e8292b0fc49ef62c4a7cbb2323b2d7
Gaurav Khanna [Thu, 15 Sep 2016 22:40:27 +0000 (15:40 -0700)]
Merge pull request dotnet/coreclr#7213 from dotnet/revert-7123-WinArm32CI
Revert "Enable Win32Arm CI support"
Commit migrated from https://github.com/dotnet/coreclr/commit/
e5a1ef3975c47ee8ba1cb99aff7440e224e0dfb0
Gaurav Khanna [Thu, 15 Sep 2016 22:30:32 +0000 (15:30 -0700)]
Revert "Enable Win32Arm CI support"
Commit migrated from https://github.com/dotnet/coreclr/commit/
fa825792a78b1e52a797f9ecf938fe86a6ba8cb3
Jose Perez Rodriguez [Thu, 15 Sep 2016 21:49:47 +0000 (14:49 -0700)]
Remove unwanted String.Split methods from Reference assembly
Commit migrated from https://github.com/dotnet/coreclr/commit/
9b116a74b222a2ffb14528f65b400fdafda71a53
Joseph Tremoulet [Thu, 15 Sep 2016 20:32:13 +0000 (16:32 -0400)]
Merge pull request dotnet/coreclr#7159 from JosephTremoulet/HelperHoist
Recognize mod-free helper calls in loop hoisting
Commit migrated from https://github.com/dotnet/coreclr/commit/
393b0a8262e5e4f1fed27494af3aac8778616d4c
Sean Gillespie [Thu, 15 Sep 2016 20:05:03 +0000 (13:05 -0700)]
Update the GC from CoreRT (dotnet/coreclr#7207)
Commit migrated from https://github.com/dotnet/coreclr/commit/
797ce534ce9d4b7452896af9f2b9a35b1575d0ee
Gaurav Khanna [Thu, 15 Sep 2016 18:08:27 +0000 (11:08 -0700)]
Merge pull request dotnet/coreclr#7123 from gkhanna79/WinArm32CI
Enable Win32Arm CI support
Commit migrated from https://github.com/dotnet/coreclr/commit/
eebf26a9889cb03b6a6b77e705e394b59cd36364
Joseph Tremoulet [Thu, 25 Aug 2016 17:45:20 +0000 (13:45 -0400)]
Recognize mod-free helper calls in loop hoisting
Update the code in `optHoistLoopExprsForTree` that identifies exprs with
memory side-effects to recognize helper calls that don't mutate the heap;
this allows hoisting invariant exprs past such helper calls.
Fixes dotnet/coreclr#6901.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7ccdf9f2b17fcf3510228df109994336e95993d5
Joseph Tremoulet [Thu, 15 Sep 2016 17:48:20 +0000 (13:48 -0400)]
Merge pull request dotnet/coreclr#7162 from JosephTremoulet/VolatileTest
Add missing volatile annotation to test
Commit migrated from https://github.com/dotnet/coreclr/commit/
25e7be4af3eadaa65951e7ceeb34323ca76574cf
Joseph Tremoulet [Tue, 13 Sep 2016 17:01:15 +0000 (13:01 -0400)]
Harden test against JIT optimizations
Declare static field `finalizerCompletedOnce` volatile -- this test has a
side-effect-free busy-loop which checks that static variable for a change it
expects a finalizer to make to it; this static field must be volatile to
ensure the jit doesn't hoist the load from the loop.
Call GC.KeepAlive on the objects constructed in the various allocation
loops in this test, to make sure that the entire allocation isn't
optimized away.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6b070c69585761996778fa5228b07d0be26be57
Joseph Tremoulet [Thu, 15 Sep 2016 15:37:43 +0000 (11:37 -0400)]
Merge pull request dotnet/coreclr#7201 from JosephTremoulet/MscVer
Update _MSC_FULL_VER check for constexpr handling
Commit migrated from https://github.com/dotnet/coreclr/commit/
a4bdd3b33762d07be30f207eb66be934ccd2ffb4
Gaurav Khanna [Thu, 15 Sep 2016 14:36:06 +0000 (07:36 -0700)]
Merge pull request dotnet/coreclr#7179 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx, External to beta-24515-02, beta-24514-06, beta-24514-00, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
90642a97e81cc8a3d0617c3819fd4a55539d501a
Joseph Tremoulet [Thu, 15 Sep 2016 01:08:04 +0000 (21:08 -0400)]
Update _MSC_FULL_VER check for constexpr handling
Previously the code was comparing against
190024210 (VS2015 Update 3).
Update it to instead compare against
190024315, the last pre-release build
before C++14 constexpr support got added; this fixes compilation using
pre-release MSVC compilers between 24210 and 24315.
Fixes dotnet/coreclr#6642.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f2d55c602fb386172a8dcc62d1eaf9654bb0a0f8
James Ko [Thu, 15 Sep 2016 11:37:41 +0000 (07:37 -0400)]
Override CopyTo in MemoryStream (dotnet/coreclr#7131)
* Cache some virtual method calls in Stream.ValidateCopyToArguments
* Add override of Stream.CopyTo to MemoryStream
Commit migrated from https://github.com/dotnet/coreclr/commit/
a62af3e824095dc11263f040705623f2e216165c
dotnet-bot [Thu, 15 Sep 2016 08:13:44 +0000 (08:13 +0000)]
Update CoreClr, CoreFx, External to beta-24515-02, beta-24514-06, beta-24514-00, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
d8a58699a327da7b1a93d92cf7a7ed16f987272f
Justin Van Patten [Thu, 15 Sep 2016 00:48:51 +0000 (17:48 -0700)]
Minor String.Split cleanup to align more closely with CoreRT (dotnet/coreclr#7185)
Commit migrated from https://github.com/dotnet/coreclr/commit/
73b8112865f9b4a0aa7576cb5bf2747a08cfb652
Pat Gavlin [Wed, 14 Sep 2016 23:40:41 +0000 (16:40 -0700)]
Merge pull request dotnet/coreclr#7189 from pgavlin/x86-cmp-long
Implement long compare lowering for x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c929358d7d46997f7e5e14042f88c03ddc4e53b7
Carol Eidt [Wed, 14 Sep 2016 23:37:33 +0000 (16:37 -0700)]
Merge pull request dotnet/coreclr#7188 from CarolEidt/Fix7160
Allow GT_OBJ for Arm64
Commit migrated from https://github.com/dotnet/coreclr/commit/
7fbc418b6cc41bed70f749bac47f18d6d82fd187
Vance Morrison [Wed, 14 Sep 2016 22:45:58 +0000 (15:45 -0700)]
Merge pull request dotnet/coreclr#6892 from jamesqo/list-optimizations
Copy directly to the internal buffer in List.InsertRange
Commit migrated from https://github.com/dotnet/coreclr/commit/
abfc08fb2d3b282202472e2a5d5dad42984a226a
Pat Gavlin [Wed, 14 Sep 2016 21:22:52 +0000 (14:22 -0700)]
Address more PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9667abeeabc847914933915a8a153ef27d49ec7c
Pat Gavlin [Wed, 14 Sep 2016 20:18:06 +0000 (13:18 -0700)]
Address PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1288ca5b05d84dee01b1612d93cb1a04ecc2c727
Swaroop Sridhar [Wed, 14 Sep 2016 19:26:20 +0000 (12:26 -0700)]
Merge pull request dotnet/coreclr#6974 from swaroop-sridhar/gc86
Implement GcInfo v2 for X86
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4b86dd41399be6c6863a49aff4086557a20ef2a
Michelle McDaniel [Wed, 14 Sep 2016 18:20:01 +0000 (11:20 -0700)]
Merge pull request dotnet/coreclr#7187 from adiaaida/rotate
Remove NYI for x86 long rotate
Commit migrated from https://github.com/dotnet/coreclr/commit/
fb4574cfd73af5eb123c0f8f06ba1f7bb54130cc
SaeHie Park [Wed, 14 Sep 2016 18:00:54 +0000 (03:00 +0900)]
ARM/Linux: Add codename xenial (dotnet/coreclr#7158)
Add Ubuntu 16.04 code name Xenial to cross rootfs option
Commit migrated from https://github.com/dotnet/coreclr/commit/
d5acaa816698ce80cc8f234b88a4b13199b2296e
Pat Gavlin [Wed, 14 Sep 2016 02:32:57 +0000 (19:32 -0700)]
Introduce GT_JCC.
This node represents a jump that is conditional upon the value stored in
the target's condition code register. It is only valid in the backend.
No formal modeling of the CCR is performed, so its use must be
constrained such that instructions that def the CCR are not inserted
between the JCC node and the node that it expected to def the CCR.
This is currently only used when lowering compares of long-typed
values for x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4351a27c18a88c50c0e701975d9a58f5ade57e78
Mike Danes [Thu, 8 Sep 2016 11:54:14 +0000 (14:54 +0300)]
Implement long compare lowering for x86.
Comparisons between long-typed values on x86 require at least two and
at most three separate branches: one or two to compare the high 32
bits and one to compare the low 32 bits. In essence, each long
compare introduces two additional basic blocks into the flow graph,
but these blocks were not reified until code generation. Furthermore,
code generation of a long comparison used by a JTRUE was deferred
until the JTRUE itself without marking the inputs to the compare as
live at the JTRUE. Taken together, these representational issues
caused bugs like the one seen in the the following assembly:
33DB xor ebx, ebx
BE03000000 mov esi, 3
33FF xor edi, edi
8B75F0 mov esi, dword ptr [ebp-10H] ; these 2 are reloads inserted by LSRA
8B7DEC mov edi, dword ptr [ebp-14H] ; between the compare and the branch
3BDF cmp ebx, edi
72D6 jb SHORT G_M51005_IG03
7704 ja SHORT G_M51005_IG04
3BC6 cmp eax, esi
72D0 jb SHORT G_M51005_IG03
The reloads that LSRA has inserted have killed the registers assigned
to the inputs to the compare, thus causing the compare instructions
to read unexpected values (GH dotnet/coreclr#7038).
Although a number of alternatives were discussed, the best solution
seems to be to expose the control flow via the flow graph rather than
leaving it until code generation; this commit implements that approach.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4dc7c44f3e466067b73f7f28c0b69a7878b4ca20
Swaroop Sridhar [Mon, 22 Aug 2016 22:06:44 +0000 (15:06 -0700)]
Implement GcInfo v2 for X86
This commit includes the following changes:
1) Thread GcInfo version through X86 specific APIs
2) Add ReturnKind and ReversePinvokeOffset fields to InfoHdr structure
GcInfo v1 and v2 use the same InfoHdr structures, because:
InfoHdrSmall: ReturnKind is encoded within previously unused bits.
InfoHdr: revPInvokeOffset will never be written to the image,
since ReversePinvokeOffset==INVALID_REV_PINVOKE_OFFSET for V1.
3) Update the Pre-computed header table to include bits for the above
[The default setting of ReturnKind=RT_Scalar is used for all entries in the table.
Optimizing this table based in most frequent usage scenarios is to be done separately]
4) Change the GC encoder/decoder to handle the above two fields
5) Use the ReturnKind in the GCInfo from thread-suspension code.
GcInfo version is changed for CoreCLR X86 only, not for Desktop JIT
Fixes dotnet/coreclr#4379
Commit migrated from https://github.com/dotnet/coreclr/commit/
4871121dbb7d1ee3282f9beb950cd73fb4f8a95b
Michelle McDaniel [Wed, 14 Sep 2016 16:39:16 +0000 (09:39 -0700)]
Remove NYI for x86 long rotate
For x86 rotate a long by a variable amount, we will just default to what
legacy backend does, which ultimately will generate two helper calls. In
the future, we may want to write a helper function for rotate for these
cases to eliminate one of the helper calls.
Commit migrated from https://github.com/dotnet/coreclr/commit/
48c853d0e2ba23e5ceb34b4081697dc80cbfd579
Jan Vorlicek [Wed, 14 Sep 2016 14:59:28 +0000 (16:59 +0200)]
Fix Unix issue with string address below 64kB (dotnet/coreclr#7183)
This change fixes a problem that has started to occur in the ARM32 Linux CI
tests. A string located below 64KB in the address space is passed to the
StringObject::StringInitCharHelper and the code throws an exception since
on Windows, values below 64kB represent atoms and not strings.
This check should not be done for FEATURE_PAL though.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4436701ea538c5ce15861eed3ee9ed57528ce032
Kyungwoo Lee [Wed, 14 Sep 2016 14:54:59 +0000 (08:54 -0600)]
Merge pull request dotnet/coreclr#7012 from kyulee1/fix6844
X86: Fix inline assertion
Commit migrated from https://github.com/dotnet/coreclr/commit/
f627ae79cf4828dadbb7ad3a99061e9721934fc9
Justin Van Patten [Wed, 14 Sep 2016 13:55:39 +0000 (06:55 -0700)]
Update new String.Split methods to use optional params (dotnet/coreclr#7175)
The new `Split(string)` overload broke source compat with uses of
`Split(null)`, which is documented to split based on white space,
because it makes the call ambiguous between `Split(char[])` and
`Split(string)`.
To maintain source compatibilty, `Split(string)` has been removed,
leaving just the overloads with `StringSplitOptions` parameters, which
are now optional. Making `StringSplitOptions` optional allows calls
to `Split(string)` while maintaining source compat with calls to
`Split(null)` which still binds to `Split(char[])` in C#, VB, and F#.
The new `Split(char)` overloads get the same changes for consistency
with `Split(string)`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
28a41c5bbfa9889f080f75d18af463135264d76f
Swaroop Sridhar [Wed, 14 Sep 2016 08:06:08 +0000 (01:06 -0700)]
Use the correct HijackHelper for X86 FP (dotnet/coreclr#7182)
On X86, the helper OnHijackFPTripThread must be used for hijacking
methods returning a float value.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e8824a7956801154cbadf167be2f2e55f833670f
Carol Eidt [Tue, 13 Sep 2016 23:56:41 +0000 (16:56 -0700)]
Allow GT_OBJ for Arm64
GT_OBJ is used on Arm64 for struct passing, but was inadvertently flagged
as an illegal node in Lowering.
Fix dotnet/coreclr#7160
Commit migrated from https://github.com/dotnet/coreclr/commit/
1accf7ebbe677adc0558fdbd78c356454c14dcee
smile21prc [Tue, 13 Sep 2016 23:47:15 +0000 (16:47 -0700)]
Merge pull request dotnet/coreclr#7177 from smile21prc/coreclr-perf
Extend the coreclr Windows perf run result lifetime
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2ffcb58c64c9c5ff2cd21740349799c0c43b370
Smile Wei [Tue, 13 Sep 2016 23:21:13 +0000 (16:21 -0700)]
For perf, we need to keep the run results longer for analysis.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8a681fb6659e7e7e32afebe39df690e77d95e1be
dotnet bot [Tue, 13 Sep 2016 22:33:31 +0000 (15:33 -0700)]
Update CoreClr, CoreFx, External to beta-24513-04, beta-24513-02, beta-24513-00, respectively (dotnet/coreclr#7006)
Commit migrated from https://github.com/dotnet/coreclr/commit/
26aa35e2e8fc640ccb399592e50fefd20a06e073
Kyungwoo Lee [Wed, 31 Aug 2016 21:18:31 +0000 (14:18 -0700)]
X86: Fix inline assertion
Inline assertion occurred since we didn't bail out the inline fail case
early.
During the test, I got another assertion about debug flag where dotnet/coreclr#7173 is
filed with x86 legacy back-end.
With x86 ryujit back-end, there is an infinite loop from dotnet/coreclr#7038.
Fixes dotnet/coreclr#6844
Commit migrated from https://github.com/dotnet/coreclr/commit/
f47f831dda9d309b7451035a6d40aac4cb044dc2
Bruce Forstall [Tue, 13 Sep 2016 21:18:12 +0000 (14:18 -0700)]
Merge pull request dotnet/coreclr#7164 from BruceForstall/FixTestExclusions
Add issue comments to excluded tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
52b9596fe6c6523ff2adb70ddb0c782e2581508b
smile21prc [Tue, 13 Sep 2016 21:14:12 +0000 (14:14 -0700)]
Merge pull request dotnet/coreclr#7172 from smile21prc/coreclr-perf
Enable archive for coreclr perf Linux runs, and fix a few bugs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5585afe45c170de53c9a261979926c992544b0e9
Smile Wei [Thu, 8 Sep 2016 19:25:54 +0000 (12:25 -0700)]
List all generated perf .xml files.
Commit migrated from https://github.com/dotnet/coreclr/commit/
626c27756429923fa96ca49e05ca2a1862acef37
Michelle McDaniel [Tue, 13 Sep 2016 20:36:51 +0000 (13:36 -0700)]
Merge pull request dotnet/coreclr#7166 from adiaaida/removeNYIs
Remove unnecessary NYIs in Decompose
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ba19ec8b4c14c1e12bf1e3b8d8077029358a494
Michelle McDaniel [Tue, 13 Sep 2016 18:21:37 +0000 (11:21 -0700)]
Remove unnecessary NYIs in Decompose
GT_DIV, GT_MOD, GT_UDIV, GT_ROL, GT_ROR, and GT_MULHI will never make it
to decompose, so remove the case statements for those operations. They
will fall through to the default case, which noway_asserts that we haven't
gotten to decompose with an oper that we don't recognize.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c1ec8c648d305217d45eb29ff0d1d64cf9e34d0c
Sivarv [Tue, 13 Sep 2016 17:55:51 +0000 (10:55 -0700)]
Merge pull request dotnet/coreclr#7145 from sivarv/JitStressRegs8Fix
Fix to dotnet/coreclr#7091 - Assert failure 'currentInterval && (currentInterval->isLocalVar || currentRefPosition->isFixedRegRef || currentInterval->hasConflictingDefUse)'
Commit migrated from https://github.com/dotnet/coreclr/commit/
5cd7154f1f7cf5cdbf918c5923ffc70a1ecf4bb3
Bruce Forstall [Tue, 13 Sep 2016 17:34:46 +0000 (10:34 -0700)]
Add issue comments to excluded tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f8b7e60cee89f71605e2648c8ec761cf5ee7d2c
Justin Van Patten [Tue, 13 Sep 2016 17:25:13 +0000 (10:25 -0700)]
Add Array.Reverse<T> (dotnet/coreclr#7132)
* Add Array.Reverse<T>
Add generic `Reverse<T>` methods to `Array`.
* Change List<T>.Reverse to use Array.Reverse<T>
Implement `List<T>.Reverse` using `Array.Reverse<T>`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b33e7563569135c5040958fd97b74b96607db3d6
Stephen Toub [Tue, 13 Sep 2016 16:36:44 +0000 (12:36 -0400)]
Remove a field from the CopyToAsync async state machine (dotnet/coreclr#7157)
The compiler is lifting the local ```bytesRead``` into a field on the async state machine, even though its value need not be preserved across any await.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6f399b187eb286b2b682fe9efaad531495770638
Dmitri-Botcharnikov [Tue, 13 Sep 2016 16:25:33 +0000 (20:25 +0400)]
Enable Debian Jessie for ARM rootfs build (dotnet/coreclr#7140)
Commit migrated from https://github.com/dotnet/coreclr/commit/
143198ec2e0735320a4bfedf391c2f647b586725
chrisaut [Tue, 13 Sep 2016 14:58:06 +0000 (21:58 +0700)]
Replace % inside loop of Random ctor (dotnet/coreclr#7156)
Commit migrated from https://github.com/dotnet/coreclr/commit/
73ce68fd483595410e0d04d5a134e74998acc3b9
Mike McLaughlin [Tue, 13 Sep 2016 12:48:27 +0000 (05:48 -0700)]
Fix funceval for enregistered value types arguments. (dotnet/coreclr#7149)
Issue dotnet/coreclr#7115.
MethodDescCallSide.CallTargetWorker used by funceval needed to deal with
enregistered 16 byte value types arguments not just return values.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c3a7ed0dcc7a58eaaaee2fa5d5900bb0efb4694a
Jan Kotas [Tue, 13 Sep 2016 10:42:29 +0000 (03:42 -0700)]
Merge pull request dotnet/coreclr#7153 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
849da1bdf828256624dac634eefe8590e48f0c26
Bruce Forstall [Tue, 13 Sep 2016 05:47:50 +0000 (22:47 -0700)]
Fix uninitialized local build break
[tfs-changeset: 1626936]
Commit migrated from https://github.com/dotnet/coreclr/commit/
4f3fdcf297ffc9e3db2f8ff60528fef0a1339a95
Bruce Forstall [Tue, 13 Sep 2016 05:26:47 +0000 (22:26 -0700)]
Merge pull request dotnet/coreclr#7130 from BruceForstall/Fix7086
RyuJIT x86: Implement GS cookie check for functions with tailcall
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2f01b80155c18e9559456c5d3d06f9d53144da9