summaryrefslogtreecommitdiff
path: root/src/jit/importer.cpp
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2019-01-09 11:07:20 -0800
committerGitHub <noreply@github.com>2019-01-09 11:07:20 -0800
commit867d7c93ea9dbabfc7262e747ecb3823983606e3 (patch)
tree7cfaa97f495d2ca2a75fca47901d2802bb096d6a /src/jit/importer.cpp
parent03e2c029f7bbd36e06bcad3822b1dd3866772170 (diff)
parent4b68c59aa18e0af3c770e1bdf22993a252d19a46 (diff)
downloadcoreclr-867d7c93ea9dbabfc7262e747ecb3823983606e3.tar.gz
coreclr-867d7c93ea9dbabfc7262e747ecb3823983606e3.tar.bz2
coreclr-867d7c93ea9dbabfc7262e747ecb3823983606e3.zip
Merge pull request #20772 from mikedn/ir-cleanup
Some IR cleanup
Diffstat (limited to 'src/jit/importer.cpp')
-rw-r--r--src/jit/importer.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp
index 76844307f7..47ed202e1b 100644
--- a/src/jit/importer.cpp
+++ b/src/jit/importer.cpp
@@ -11481,7 +11481,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
/* Create the assignment node */
- op2 = gtNewLclvNode(lclNum, lclTyp, opcodeOffs + sz + 1);
+ op2 = gtNewLclvNode(lclNum, lclTyp DEBUGARG(opcodeOffs + sz + 1));
/* If the local is aliased or pinned, we need to spill calls and
indirections from the stack. */
@@ -11597,7 +11597,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
ADRVAR:
- op1 = gtNewLclvNode(lclNum, lvaGetActualType(lclNum), opcodeOffs + sz + 1);
+ op1 = gtNewLclvNode(lclNum, lvaGetActualType(lclNum) DEBUGARG(opcodeOffs + sz + 1));
_PUSH_ADRVAR:
assert(op1->gtOper == GT_LCL_VAR);
@@ -11653,7 +11653,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
assertImp(0 < numArgs);
assert(lvaTable[lvaVarargsHandleArg].lvAddrExposed);
lclNum = lvaVarargsHandleArg;
- op1 = gtNewLclvNode(lclNum, TYP_I_IMPL, opcodeOffs + sz + 1);
+ op1 = gtNewLclvNode(lclNum, TYP_I_IMPL DEBUGARG(opcodeOffs + sz + 1));
op1 = gtNewOperNode(GT_ADDR, TYP_BYREF, op1);
impPushOnStack(op1, tiRetVal);
break;
@@ -12447,7 +12447,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
}
}
-#if SMALL_TREE_NODES
if (callNode)
{
/* These operators can later be transformed into 'GT_CALL' */
@@ -12469,7 +12468,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
op1 = new (this, GT_CALL) GenTreeOp(oper, type, op1, op2 DEBUGARG(/*largeNode*/ true));
}
else
-#endif // SMALL_TREE_NODES
{
op1 = gtNewOperNode(oper, type, op1, op2);
}
@@ -13188,13 +13186,11 @@ void Compiler::impImportBlockCode(BasicBlock* block)
// Work is evidently required, add cast node
else
{
-#if SMALL_TREE_NODES
if (callNode)
{
op1 = gtNewCastNodeL(type, op1, uns, lclTyp);
}
else
-#endif // SMALL_TREE_NODES
{
op1 = gtNewCastNode(type, op1, uns, lclTyp);
}
@@ -16325,7 +16321,7 @@ void Compiler::impLoadVar(unsigned lclNum, IL_OFFSET offset, typeInfo tiRetVal)
lclTyp = lvaGetActualType(lclNum);
}
- impPushVar(gtNewLclvNode(lclNum, lclTyp, offset), tiRetVal);
+ impPushVar(gtNewLclvNode(lclNum, lclTyp DEBUGARG(offset)), tiRetVal);
}
// Load an argument on the operand stack
@@ -16888,7 +16884,7 @@ bool Compiler::impReturnInstruction(BasicBlock* block, int prefixFlags, OPCODE&
else if (info.compRetBuffArg != BAD_VAR_NUM)
{
// Assign value to return buff (first param)
- GenTree* retBuffAddr = gtNewLclvNode(info.compRetBuffArg, TYP_BYREF, impCurStmtOffs);
+ GenTree* retBuffAddr = gtNewLclvNode(info.compRetBuffArg, TYP_BYREF DEBUGARG(impCurStmtOffs));
op2 = impAssignStructPtr(retBuffAddr, op2, retClsHnd, (unsigned)CHECK_SPILL_ALL);
impAppendTree(op2, (unsigned)CHECK_SPILL_NONE, impCurStmtOffs);
@@ -18877,7 +18873,7 @@ void Compiler::impInlineRecordArgInfo(InlineInfo* pInlineInfo,
inlCurArgInfo->argIsLclVar = true;
/* Remember the "original" argument number */
- curArgVal->gtLclVar.gtLclILoffs = argNum;
+ INDEBUG(curArgVal->gtLclVar.gtLclILoffs = argNum;)
}
if ((curArgVal->OperKind() & GTK_CONST) ||
@@ -19539,7 +19535,7 @@ GenTree* Compiler::impInlineFetchArg(unsigned lclNum, InlArgInfo* inlArgInfo, In
}
// Create a new lcl var node - remember the argument lclNum
- op1 = gtNewLclvNode(op1->gtLclVarCommon.gtLclNum, newTyp, op1->gtLclVar.gtLclILoffs);
+ op1 = gtNewLclvNode(op1->gtLclVarCommon.gtLclNum, newTyp DEBUGARG(op1->gtLclVar.gtLclILoffs));
}
}
else if (argInfo.argIsByRefToStructLocal && !argInfo.argHasStargOp)
@@ -19652,7 +19648,7 @@ GenTree* Compiler::impInlineFetchArg(unsigned lclNum, InlArgInfo* inlArgInfo, In
!argInfo.argHasCallerLocalRef)
{
/* Get a *LARGE* LCL_VAR node */
- op1 = gtNewLclLNode(tmpNum, genActualType(lclTyp), lclNum);
+ op1 = gtNewLclLNode(tmpNum, genActualType(lclTyp) DEBUGARG(lclNum));
/* Record op1 as the very first use of this argument.
If there are no further uses of the arg, we may be