summaryrefslogtreecommitdiff
path: root/src/jit
AgeCommit message (Collapse)AuthorFilesLines
2019-04-16Arm64 vector ABI (#23675)Carol Eidt24-371/+570
* Support for Arm64 Vector ABI Extend HFA support to support vectors as well as floating point types. This requires that the JIT recognize vector types even during crossgen, so that the ABI is supported consistently. Also, fix and re-enable the disabled Arm64 Simd tests. Fix #16022
2019-04-16Merge pull request #24009 from sandreenko/fixLsraBlockEpochCheckSergey Andreenko2-7/+21
Fix lsraBlockEpoch check.
2019-04-15Fix an issue with literal 0xFFFFFFFFFFFFF000LL being treated as unsigned ↵Egor Chesakov2-5/+9
long long int (#24011)
2019-04-15Fix lsraBlockEpoch check.Sergey Andreenko2-7/+21
2019-04-13Fix ARM's genPutArgStk codegen (#23867)mikedn1-2/+30
* Fix ARM's genPutArgStk codegen When the OBJ node wraps a LCL_VAR node the code uses the type information (struct size, GC layout) from LclVarDsc. This is not always correct because the OBJ may actually have a different struct type due to type reinterpretation (e.g. Unsafe.As<X, Y>). * Fix genPutArgStk comment
2019-04-13Merge pull request #23948 from BruceForstall/Fix23920Bruce Forstall6-10/+34
Update maximum allowed arm prolog size
2019-04-12Merge pull request #23935 from BruceForstall/FixArm64LargeOutgoingWithLocallocBruce Forstall1-6/+9
Fix arm64 localloc with large outgoing argument space
2019-04-12Fix x86 stack probing (#23881)Bruce Forstall4-78/+247
* Fix x86 stack probing On x86, structs are passed by value on the stack. We copy structs to the stack in various ways, but one way is to first subtract the size of the struct and then use a "rep movsb" instruction. If the struct we are passing is sufficiently large, this can cause us to miss the stack guard page. So, introduce stack probes for these struct copies. It turns out the stack pointer after prolog probing can be sitting near the very end of the guard page (one `STACK_ALIGN` slot before the end, which allows a "call" instruction which pushes its return address to touch the guard page with the return address push). We don't want to probe with every argument push, though. So change the prolog probing to insert an "extra" touch at the final SP location if the previous touch was "too far" away, leaving at least some buffer zone for un-probed SP adjustments. I chose this to be the size of the largest SIMD register, which also can get copied to the argument stack with a "SUB;MOV" sequence. Added several test case variations showing different large stack probe situations. Fixes #23796 * Increase the argument size probe buffer * Formatting
2019-04-12[master] Update dependencies from dotnet/corefx (#23893)dotnet-maestro[bot]4-96/+93
* Update dependencies from https://github.com/dotnet/corefx build 20190411.2 - Microsoft.NETCore.Platforms - 3.0.0-preview5.19211.2 - Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview5.19211.2 * Update dependencies from https://github.com/dotnet/corefx build 20190411.22 - Microsoft.NETCore.Platforms - 3.0.0-preview5.19211.22 - Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview5.19211.22 * Removing renamed HWIntrinsic APIs from S.P.Corelib * Updating the hwintrinsiclistxarch to match the new intrinsic API names * Updating the HWIntrinsic generated tests to use the new API names
2019-04-12Display the arm instruction sizeBruce Forstall4-7/+29
When dumping an arm instruction, and when we don't have the actual code bytes (such as during code generation, as opposed to emission), display the (current) instruction size, either 2 bytes (2B), 4 bytes (4B), or 6 bytes (6B).
2019-04-12Update maximum allowed arm prolog sizeBruce Forstall2-3/+5
Change #23715 changed the localloc stack probe loop to load a negative constant instead of zero to start the probing loop. This increased the size of the probing loop, and hence the size of the maximum prolog, by 4 bytes. Bump the assert on the maximum size to match. Note that as the comment says, the maximum size there is not actually a maximum (it was originally), it is just to alert us when the maximum generated prolog size has gone up. Fixes #23920
2019-04-12Don't Free UpperVector (#23889)Carol Eidt2-23/+28
* Don't Free UpperVector UpperVector regs are freed at their time of use, and shouldn't be freed when the last RefPosition is encountered. Also, we need to specify all 3 operands for vinsertf128 Fix #23861 Fix #23904 Fix #23804
2019-04-12Fix arm64 localloc with large outgoing argument spaceBruce Forstall1-6/+9
With a large outgoing argument space, we were attempting to generate un-encodable ADD and SUB instructions. Call an existing helper instead that uses the reserved register when needed to load large constants into a register.
2019-04-12JIT: update byref null check logic to handle field chains (#23850)Andy Ayers1-9/+22
The jit was not properly accumulating offsets when figuring out if a byref should be null checked. Use a non-null MorphAddressContext as indication that GT_FIELD and GT_IND nodes are actually part of an ongoing address computation. During field morphing propagate the current address context to the child node, instead of starting a new one. Fixes #23791.
2019-04-11JIT: fix assert when there are mixed types in Enum.HasFlags optimization ↵Andy Ayers1-7/+18
(#23902) In some cases the pre-boxed nodes may differ in type. Bail if they don't have the same stack type, then compute the result using the stack type. Extended the hasflags test with a case that shows this issue. Closes #23847
2019-04-10Merge pull request #23876 from briansull/jit-dumpBrian Sullivan3-48/+86
Improved JitDump
2019-04-10jit-formatBrian Sullivan2-11/+14
2019-04-10Improved JitDumpBrian Sullivan3-42/+77
- Prints the bbNatLoopNum when dumping the BasicBlocks - Refactor the GenTree node dump to use gtDispCommonEndLine: // Utility function that prints the following node information // 1: The associated zero field sequence (if any) // 2. The register assigned to this node (if any) // 2. The value number assigned (if any) // 3. A newline character
2019-04-10Update the comment.Sergey Andreenko1-4/+1
2019-04-10Change optExtractSideEffList to optExtractSideEffList.Sergey Andreenko2-60/+37
2019-04-10Fix newlines for ilegal trees in `gtDispTree`.Sergey Andreenko1-2/+2
2019-04-09Delete the asignment that was added as a workaround.Sergey Andreenko1-9/+6
2019-04-09Clarify some unsupported cases in `optVNConstantPropOnTree`.Sergey Andreenko1-10/+15
2019-04-09Clean optVNConstantPropOnTree.Sergey Andreenko1-65/+41
Create a new tree with const val and attach side-effects to it. Extract common code and delete returns in the of the switch.
2019-04-09Destroy the old tree in `optAssertionProp_Update`.Sergey Andreenko1-0/+2
Currently compiletion will fail with an assert because of `optPrepareTreeForReplacement`.
2019-04-09Delete condition that was previously checked with noway_assert.Sergey Andreenko1-22/+10
2019-04-08Merge pull request #23739 from briansull/struct-cseBrian Sullivan1-11/+21
Block the hoisting of TYP_STRUCT rvalues in loop hoisting
2019-04-08Merge pull request #23752 from adityamandaleeka/arm64_clrwwAditya Mandaleeka1-4/+3
Enable CLR write watch for ARM64 Windows
2019-04-08Block the hoisting of TYP_STRUCT rvalues in loop hoistingBrian Sullivan1-11/+21
Added test case GitHub_23739.cs
2019-04-05WIP Fix ARM32/ARM64 large frame stack probingBruce Forstall6-53/+79
2019-04-05Merge pull request #23728 from briansull/FixConstByrefBrian Sullivan3-23/+24
Fix for Issue #23538
2019-04-05Update the JIT to recognize the IsSupported property for all HWIntrinsics ↵Tanner Gooding7-109/+116
(#23751) * Moving some JITDUMP calls into Compiler::lookupNamedIntrinsic * Marking the IsSupported methods as Intrinsic for all HWIntrinsic ISAs * Updating the hwintrinsic importation to more generally handle IsSupported and ThrowPNSE * Applying formatting patch. * Adding using System.Runtime.CompilerServices to the various x86 PlatformNotSupported HWIntrinsic files
2019-04-05Change the backing storage for Byref constants in ValueNumber-ing to use size_t.Brian Sullivan3-23/+24
Fixes #23538
2019-04-04Improve Upper Vector Save/Restore (#23344)Carol Eidt8-233/+561
Improve Upper Vector Save/Restore In order to avoid saving and restore the upper half of large vectors around every call even if they are not used, separately model the upper half of large vector lclVars, and track whether the large vector lclVar is partially-spilled, in which case its upper half resides in its upper half Interval's location. Fix #18144
2019-04-04Handle local struct pointer arithmetic (#23704)Carol Eidt1-13/+5
The assert introduced in #23570 was overly aggressive, and didn't account for the fact that pointer arithmetic can exist in the IL, not just introduced by morph. Fix #23693
2019-04-03Fix GitHub23672 (#23674)Fei Peng1-2/+0
2019-04-03Fix Arm64 intrinsic lookup (#23673)Carol Eidt2-1/+19
Fix #23669
2019-04-03Merge pull request #23671 from BruceForstall/ImproveJitFunctionTraceOutputBruce Forstall1-2/+2
Improve COMPlus_JitFunctionTrace
2019-04-02Updating the HWIntrinsic x86 codegen to handle indir nodes. (#23629)Tanner Gooding2-85/+130
* Updating the SimpleBinOpTest.template to cover some additional containment scenarios * Regenerating the x86 HWIntrinsic tests from their templates * Updating the HWIntrinsic x86 codegen to handle indir nodes.
2019-04-02Fix spill check for struct lclVars (#23570)Carol Eidt1-4/+29
* Fix spill check for struct lclVars With the 1st class struct changes, the `SPILL_APPEND` check for the case of an assignment to a lclVar needs to handle block ops as well as lclVar lhs. Fix #23545
2019-04-02Improve COMPlus_JitFunctionTraceBruce Forstall1-2/+2
Indicated if the generated function was generated by altjit. This helps when there is code generated by both altjit and non-altjit.
2019-04-02JIT: prolog zeroing accounting changes (#23498)Andy Ayers1-13/+42
Stop double-counting some locals when computing how many slots need to be zeroed in the prolog. Bump threshold for rep stosb style init from 16 bytes to 32 bytes on x64.
2019-04-01Match BOX idioms early in the importer (#23550)Jan Kotas2-18/+123
2019-04-01LSRA cleanup (#23617)Carol Eidt3-75/+120
* LSRA cleanup These are zero-diff changes. Some cleanup, some in preparation for improvemetns to save/restore of upper vectors.
2019-03-30Fix ARM64 isFullyImplementedIsa (#23590)Fei Peng1-0/+4
2019-03-29A new way of tracking variables (#23373)Brian Bohe16-225/+1620
* Defining VariableLiveRange class * Adding some typedefs to avoid rewriting * Defining VariableLiveDescriptor class * Initializing VariableLiveRange structures before BasicBlock code is being generated * Getting a siVarLoc for variable homes from a given LclVarDsc and stack level * Defining VariableLiveKeeper class * Reporting VariableLiveRanges on changes of variable livenesss or variable homes * Adding USING_VARIABLE_LIVE_RANGE flag to enable disable VariableLiveRange * Send VariableLiveRanges to debugger * Reporting variable homes on prolog * Wrong argument * Miss to change variable homes count before sending them to debugger * Adding dumper of VariableLiveRanges for each blocks and end of code generation * Close all open VaribleLiveRanges on last BasicBlock * Changing order of properties initialization on VariableLiveRange constructor * Type error on assignation * Rephrasing comments, moving dumps and fixing typos * Changing const VARSET_TP* for VARSET_VALARG_TP on args * Variable home was variable location in VariableLiveRange context * Rephrase and rename of VariableLiveKeeper properties * Missing some renames * Adding const where BasicBlock should not be modified * siBeginBlock and siInit have support for debug code for VariableLiveRange and siScope info * Adding USING_VARIABLE_LIVE_RANGE flags on methods definition. * Variable home -> variable location * Renaming and rephrasing names and uses of VariableLiveRange * Moving LiveRangeDumper ctor to class declation * Removing destructors Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Removing blank spaces and reordering functions inside class definition Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Miss to increment the index after refactoring * Logic for keeping the last BasicBlock end IL offset is shared between siScope and VariableLiverange for debug code * Missing to print on debug the last block VariableLiveRanges * Avoid updating VariableLiveRange when unspilling and dying at the same assembly instruction * Rephrasing #ifs and #ifdefs * Calling VariableLiveKeeper in one line * Avoid copying siVarLoc on genSetScopeInfo * Removing unused args from eeSetLVinfo * Changing VariableLiveKeeper ctor * Typo Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Updating VariableLiveDescriptor ctor Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Error on first argument Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Changing reference for pointer Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Renaming assembly offset -> native offset * removing unnecesary comments and asserts Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Update VariableLiveRange dump message Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Moving VariableLiveRanges classes inside VariableLiveKeeper * Wrong flag name * Adding documentation about how we track variables for debug info Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Adding opened issues to doc file Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Changing dump tittle Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Renaming VariableLiveKeeper property Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Update documentation Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Updating comments on flags Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Setting Scope Info as default way of tracking variables for debug info Signed-off-by: Brian Bohe <brianbohe@gmail.com>
2019-03-29Fix HW intrinsic containment bugs (#23558)Carol Eidt1-19/+27
* Fix HW intrinsic containment bugs For the Fma case (#23430), fix the handling of contained 3-operand HW intrinsic nodes. For the Bmi case (#23534), fix a bad assert placement, and re-enable the Bmi tests. Fix #23530 Fix #23534 * Add guard for Fma test
2019-03-29Merge pull request #23533 from briansull/Issue_23441Brian Sullivan1-1/+1
Fix for issue 23411
2019-03-29Use GenTreeStmt* where it is implied. (#22963)Sergey Andreenko30-912/+755
* Extract `impAppendStmt` and `impExtractLastStmt`. * Delete `BEG_STMTS` fake stmt. Use new functions to keep the list updated. * Retype `impTreeList` and `impTreeLast` as statements. Rename `impTreeList` and `impTreeLast` to show that they are statements. * Fix fields that have to be stmt. * Start using GenTreeStmt. Change `optVNAssertionPropCurStmt` to use GenTreeStmt. Replace `GenTree* stmt = block->bbTreeList` with `GenTreeStmt* stmt = block->firstStmt()`. Save results of `FirstNonPhiDef` as `GenTreeStmt`. * Replace do-while with for loop. * Change type inside VNAssertionPropVisitorInfo. * Delete unused args fron `optVNConstantPropOnTree`. * Update fields to be stmt. Update optVNConstantPropCurStmt to use Stmt. Change `lvDefStmt` to stmt. Update LoopCloning structs. Update `optDebugLogLoopCloning`. Make `compCurStmt` a statement. Update declaration name in `BuildNode`. * Clean simple cpp files. Clean valuenum. Clean ssabuilder. Clean simd. Clean optcse. Clean loopcloning. Clean copyprop. Clean optimizer part1. * Start cleaning importer, morph, flowgraph, gentree. * Continue clean functons. Clean assertionprop. Clean morph. Clean gentree. Clean flowgraph. Clean compiler. Clean rangecheck. Clean indirectcalltransofrmer. Clean others. * Create some temp stmt. * Delete unnecessary noway_assert and casts. * Init `impStmtList` and `impLastStmt` in release. * Response review 1.
2019-03-29Simplify and unify Vector64/128/256 platform-agnostic intrinsic handling ↵Fei Peng11-416/+206
(#23028) * Simplify and unify Vector64/128/256 platform-agnostic intrinsic handling * Removed unsupported ISAs