diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2016-09-10 08:24:51 -0700 |
---|---|---|
committer | Carol Eidt <carol.eidt@microsoft.com> | 2016-09-20 14:20:52 -0700 |
commit | e550cf35bd5ff8e7eefcb1a605219f71a3672d83 (patch) | |
tree | aa931fc667fc8ce4a8085eb132576fbd82f90080 /src/jit/lsra.cpp | |
parent | 53b124af8ab69316223f05d05fba30e069aa0503 (diff) | |
download | coreclr-e550cf35bd5ff8e7eefcb1a605219f71a3672d83.tar.gz coreclr-e550cf35bd5ff8e7eefcb1a605219f71a3672d83.tar.bz2 coreclr-e550cf35bd5ff8e7eefcb1a605219f71a3672d83.zip |
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.
Diffstat (limited to 'src/jit/lsra.cpp')
-rw-r--r-- | src/jit/lsra.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp index 1aef9b5c82..fa774b4196 100644 --- a/src/jit/lsra.cpp +++ b/src/jit/lsra.cpp @@ -3313,7 +3313,7 @@ static int ComputeOperandDstCount(GenTree* operand) operand->OperIsCompare()); return 0; } - else if (!operand->OperIsAggregate() && (operand->OperIsStore() || operand->TypeGet() == TYP_VOID)) + else if (!operand->OperIsFieldListHead() && (operand->OperIsStore() || operand->TypeGet() == TYP_VOID)) { // Stores and void-typed operands may be encountered when processing call nodes, which contain // pointers to argument setup stores. @@ -3321,7 +3321,7 @@ static int ComputeOperandDstCount(GenTree* operand) } else { - // If an aggregate or non-void-typed operand is not an unsued value and does not have source registers, + // If a field list or non-void-typed operand is not an unused value and does not have source registers, // that argument is contained within its parent and produces `sum(operand_dst_count)` registers. int dstCount = 0; for (GenTree* op : operand->Operands()) @@ -3368,9 +3368,11 @@ void LinearScan::buildRefPositionsForNode(GenTree* tree, assert(!isRegPairType(tree->TypeGet())); #endif // _TARGET_ARM_ - // The LIR traversal doesn't visit non-aggregate GT_LIST or GT_ARGPLACE nodes + // The LIR traversal doesn't visit GT_LIST or GT_ARGPLACE nodes assert(tree->OperGet() != GT_ARGPLACE); - assert((tree->OperGet() != GT_LIST) || tree->AsArgList()->IsAggregate()); + assert(tree->OperGet() != GT_LIST); + // The LIR traversal visits only the first node in a GT_FIELD_LIST. + assert((tree->OperGet() != GT_FIELD_LIST) || tree->AsFieldList()->IsFieldListHead()); // These nodes are eliminated by the Rationalizer. if (tree->OperGet() == GT_CLS_VAR) @@ -3959,7 +3961,7 @@ void LinearScan::buildRefPositionsForNode(GenTree* tree, #endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE bool isContainedNode = - !noAdd && consume == 0 && produce == 0 && (tree->OperIsAggregate() || (tree->TypeGet() != TYP_VOID && !tree->OperIsStore())); + !noAdd && consume == 0 && produce == 0 && (tree->OperIsFieldListHead() || ((tree->TypeGet() != TYP_VOID) && !tree->OperIsStore())); if (isContainedNode) { // Contained nodes map to the concatenated lists of their operands. |