summaryrefslogtreecommitdiff
path: root/src/jit
AgeCommit message (Collapse)AuthorFilesLines
2016-12-22ARM: A step towards the RyuJIT/ARM32 backend.Mikhail Skvortcov8-137/+1697
2016-12-21Use Pabsd/pabsw/pabsb instructions for Abs SIMD intrinsic on SSE4 and above ↵sivarv5-10/+60
targets.
2016-12-21Merge pull request #8697 from sivarv/lockAddFixSivarv1-1/+26
Fix GT_LOCKADD register specification.
2016-12-20Fix GT_LOCKADD register specification.sivarv1-1/+26
2016-12-20Merge pull request #8693 from JosephTremoulet/ValueNumberFieldJoseph Tremoulet1-4/+3
Use field type value-numbering local field stores
2016-12-20Use field type value-numbering local field storesJoseph Tremoulet1-4/+3
Method `VNPairApplySelectorsAssign` takes the type of the value being assigned, so when processing a store to a field of a local struct, pass the type of the field rather than the type of the local; failure to do so was blocking propagation of the value number to subsequent loads of the same field due to the type mismatch.
2016-12-19Merge pull request #8674 from AndyAyersMS/BiggerBlockFlagAndy Ayers4-21/+20
Widen basic block flag field to 64 bits
2016-12-18Remove Read/WriteProcessMemory from PAL. (#8655)Mike McLaughlin1-0/+4
Ifdef more unused code that uses ReadProcessMemory. Move the current memory probing in the transport to PAL_ProbeMemory. Add PAL_ProbeMemory to dac PAL exports. PAL_ProbeMemory may be changed to use write/read on a pipe to validate the memory as soon as we make it perform as well as the current code. Remove ReadProcessMemory tests and add PAL_ProbeMemory pal tests.
2016-12-17Widen basic block flag field to 64 bitsAndy Ayers4-21/+20
Flag field is currently full, and I need at least one more bit to identify the start of a cloned finally. Widen to 64 bits and update a few uses. Also removed an unused copy.
2016-12-15Merge pull request #8642 from CarolEidt/Fix359736Carol Eidt1-0/+8
Correctly sequence fgMorphModToSubMulDiv
2016-12-15Merge pull request #8207 from CarolEidt/StreamlineResolutionCarol Eidt2-61/+198
Streamline LSRA resolution
2016-12-15Merge pull request #8329 from litian2025/Fix_SIMDScalarMoveEncodingSivarv2-17/+19
Fix SIMD Scalar Move Encoding: VEX.L should be 0
2016-12-14Fix SIMD Scalar Move Encoding: VEX.L should be 0Li Tian2-17/+19
For SIMD Scalar Move instructions such as vmovlpd, vmovlps, vmovhps, vmovhps and vmovss on AVX system, JIT should ensure that those instructions are encoded with VEX.L=0, because encoding them with VEX.L=1 may encounter unpredictable behavior across different processor generations. The reason of VEX.L is encoded with 1 is because JIT calls compiler->getSIMDVectorType() which returns EA_32BYTE, and it is been passed into emitter AddVexPrefix() which ends up encoded VEX.L=1, the fix is to pass target type and base type for those instructions to ensure that VEX.L=0 at emitter AddVexPrefix() Fix #8328
2016-12-14Correctly sequence fgMorphModToSubMulDivCarol Eidt1-0/+8
This method was creating a temp, but the final result was a GT_SUB with a use of the temp as its op1, and it was not setting GTF_REVERSE_OPS. This led to a liveness assert in LSRA.
2016-12-14Fix ref count adjustment in `fgMorphBlockStmt`.Pat Gavlin1-6/+6
LclVar ref counts must be incremented before attempting to remove the morphed statement, since doing so decrements ref counts (and thus requires refcounts to be conservatively correct). Fixes VSO 359734.
2016-12-14Merge pull request #8601 from pgavlin/gh7963Pat Gavlin7-45/+84
Fix consume-order checking in codegen.
2016-12-14Add support for R2R ldvirtftn helpers (#8608)Michal Strehovský1-5/+17
The codegen for the non-readytorun path (used on CoreCLR) requires the runtime to support general purpose virtual method resolution based on a method handle. CoreRT doesn't have such helpers.
2016-12-13Merge pull request #8617 from hqueue/arm/test20161210/IsContainableImmedBruce Forstall1-1/+67
Ryujit/ARM32 Initial Lowering::IsContainableImmed for ARM
2016-12-13Fix the ARM32 build.Pat Gavlin1-2/+2
2016-12-13Fix consume-order checking in codegen.Pat Gavlin6-43/+82
The switch to LIR invalidated the correspondence between a node's sequence number and the order in which it must be consumed with respect to other nodes. This in turn made the consume-order checks during code generation incorrect. This change introduces a new field, `gtUseNum`, that is used during code generation to check the order in which nodes are consumed. Re-enabling these checks revealed a bug in code generation for locked instructions on x86, which were consuming their operands out-of-order; this change also contains a fix for that bug. Fixes #7963.
2016-12-13Fix incorrect compare narrowing in TreeNodeInfoInitCmpMike Danes1-27/+26
TreeNodeInfoInitCmp attempts to eliminate the cast from `cmp(cast<ubyte>(x), icon)` by narrowing the compare to ubyte. This should only happen if the constant fits in a byte so it can be narrowed too, otherwise codegen produces an int sized compare. (or a byte sized compare with a truncated constant if we try to use GTF_RELOP_SMALL).
2016-12-13Ryujit/ARM32 Initial Lowering::IsContainableImmed for ARMHyung-Kyu Choi1-1/+67
Initial implementation of IsContainableImmed for ARM. Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
2016-12-12Merge pull request #8520 from hqueue/arm/test20161208/lowercastCarol Eidt1-2/+68
Ryujit/ARM32: Implement Lowering::LowerCast for ARM
2016-12-13Ryujit/ARM32 Implement Lowering::LowerCast for ARMHyung-Kyu Choi1-2/+68
Simple integer to interger type conversion is passed. Add comment for LowreCast with C++ comment style. Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
2016-12-12Merge pull request #8532 from sivarv/fixedRegFixSivarv1-43/+39
Fix to issue 8286.
2016-12-12Merge pull request #8541 from briansull/vso-287671Brian Sullivan1-0/+2
Fix missing flags on GT_DYN_BLK node
2016-12-10Fix typo in clang-format directive and reformat end of flowgraph.cpp (#8573)Andy Ayers1-845/+822
Last 4K or so lines of flowgraph.cpp were not being formatted because the clang-format on directive had a typo. Fix the typo and reformat the latter part of the file.
2016-12-09Fix to issue 8286.sivarv1-43/+39
2016-12-09Merge pull request #8544 from sivarv/moveRegFixSivarv1-7/+8
Fix to issue 8287.
2016-12-08Fix to issue 8287.sivarv1-7/+8
2016-12-08Merge pull request #8539 from sandreenko/fix-unix-unwind-infosandreenko1-1/+14
Fix unix unwind info
2016-12-08Merge pull request #8537 from pgavlin/VSO299202Pat Gavlin1-1/+45
Disable special put args for LIMIT_CALLER on x86.
2016-12-08Merge pull request #8543 from pgavlin/VSO299207Pat Gavlin1-3/+2
Correct an assertion in LSRA.
2016-12-08Fix unix unwind infoSergey Andreenko1-1/+14
Windows uses offset from stack pointer, when unix has to use offset from caninical frame address,
2016-12-09Remove sscanf and sprintf usage (#8508)Jan Vorlicek5-10/+13
* Remove sscanf * Remove sprintf
2016-12-08Correct an assertion in LSRA.Pat Gavlin1-3/+2
`verifyFinalAllocation` asserts that if a non-BB interval RefPosition that is either spilled or is the interval's last use does not have a register, then that ref position must be marked `AllocateIfProfitable`. However, this situation can also arise in at least one other situation: an unused parameter will have at least one ref position that may not be allocated to a register. This change corrects the assertion to check `RefPosition::RequiresRegister` rather than `RefPosition::AllocateIfProfitable`. Fixes VSO 299207.
2016-12-08The fix is to set the GTF_EXCEPT and GTF_GLOB_REF for every GT_DYN_BLK node ↵Brian Sullivan1-0/+2
that we create. We typically don't have any information about the address supplied to a GT_DYN_BLK so we should conservatively allow that it can either be a null pointer or could point into the GC heap.
2016-12-08Disable special put args for LIMIT_CALLER on x86.Pat Gavlin1-1/+45
On x86, `LSRA_LIMIT_CALLER` is too restrictive to allow the use of special put args: this stress mode leaves only three registers allocatable--eax, ecx, and edx--of which the latter two are also used for the first two integral arguments to a call. This can leave us with too few registers to succesfully allocate in situations like the following: t1026 = lclVar ref V52 tmp35 u:3 REG NA <l:$3a1, c:$98d> /--* t1026 ref t1352 = * putarg_reg ref REG NA t342 = lclVar int V14 loc6 u:4 REG NA $50c t343 = const int 1 REG NA $41 /--* t342 int +--* t343 int t344 = * + int REG NA $495 t345 = lclVar int V04 arg4 u:2 REG NA $100 /--* t344 int +--* t345 int t346 = * % int REG NA $496 /--* t346 int t1353 = * putarg_reg int REG NA t1354 = lclVar ref V52 tmp35 (last use) REG NA /--* t1354 ref t1355 = * lea(b+0) byref REG NA Here, the first `putarg_reg` would normally be considered a special put arg, which would remove `ecx` from the set of allocatable registers, leaving only `eax` and `edx`. The allocator will then fail to allocate a register for the def of `t345` if arg4 is not a register candidate: the corresponding ref position will be constrained to { `ecx`, `ebx`, `esi`, `edi` }, which `LSRA_LIMIT_CALLER` will further constrain to `ecx`, which will not be available due to the special put arg.
2016-12-08Remove an unused local variableHyung-Kyu Choi1-1/+0
In lowerxarch.cpp, local variable srcUns is defined but not used at Lowering::LowerCast(GenTree* tree). Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
2016-12-07Merge pull request #8509 from dotnet-bot/from-tfsBrian Sullivan1-3/+3
Merge changes from TFS
2016-12-07Merge pull request #8505 from pgavlin/VSO297215Pat Gavlin1-18/+15
Use a left-leaning comma tree when morphing a stelem.ref helper.
2016-12-07Enable POGO build and link for CodegenMirrorBrian Sullivan1-3/+3
[tfs-changeset: 1640669]
2016-12-07Merge pull request #8482 from CarolEidt/Fix8220Carol Eidt4-21/+77
Use only lower floats for Vector3 dot and equality
2016-12-07Merge pull request #8488 from sivarv/upperSaveSivarv1-7/+24
Fix to issue 8356.
2016-12-07Use a left-leaning comma tree when morphing a stelem.ref helper.Pat Gavlin1-18/+15
fgMorphCall may change a call to the stelem.ref helper that is storing a null value into a simple store. This transformation needs to construct a comma tree to hold the argument setup nodes present on the call if any exist. Originally this tree was constructed in right-leaning fashion (i.e. the first comma node was the root of the tree and each successive comma node was the RHS of its parent). Unfortunately, this construction did not automatically propagate the flags of a comma node's children to the comma node, since not all of each comma node's actual children were available at the time it was constructed. Constructing the tree in left-leaning fashion (i.e. the first comma node is the left-most child and the final comma node is the root of the tree) allows the flag propagation to be performed correctly by constrution. Fixes VSO 297215.
2016-12-07Merge pull request #8503 from pgavlin/VSO289704Pat Gavlin1-5/+8
Remove a use of `gtGetOp` in earlyprop.
2016-12-07Remove a use of `gtGetOp` in earlyprop.Pat Gavlin1-5/+8
Instead, use `GenTreeIndir::Addr`, as some indirections are not simple operators. Fixes VSO 289704.
2016-12-07Use only lower floats for Vector3 dot and equalityCarol Eidt4-21/+77
For both dot product and comparisons that produce a boolean result, we need to use only the lower 3 floats. The bug was exposed by a case where the result of a call was being used in one of these operations without being stored to a local (which would have caused the upper bits to be cleared). Fix #8220
2016-12-06Streamline LSRA resolutionCarol Eidt2-61/+198
Only do resolution when required, and only for variables that may need it.
2016-12-06Fix to issue 8356.sivarv1-7/+24