summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyeongseok Oh <hseok82.oh@samsung.com>2017-06-05 12:28:14 +0900
committerHyeongseok Oh <hseok82.oh@samsung.com>2017-06-05 13:55:20 +0900
commitf24b7f044873c1baa7f397874b47fe2a08361b69 (patch)
tree9fe9d6dedd1e016cdb7d52cbc93e3f137bd17615
parent72e1404db6e53ba31d05939f8f946f457f9f60e1 (diff)
downloadcoreclr-f24b7f044873c1baa7f397874b47fe2a08361b69.tar.gz
coreclr-f24b7f044873c1baa7f397874b47fe2a08361b69.tar.bz2
coreclr-f24b7f044873c1baa7f397874b47fe2a08361b69.zip
Revert and remove isReMorph argument
- Revert commit that is removing nextSlotNum update in remorphing phase - Remove isReMorph argument in SplitArg by using argsComplete
-rw-r--r--src/jit/compiler.h6
-rw-r--r--src/jit/morph.cpp29
2 files changed, 7 insertions, 28 deletions
diff --git a/src/jit/compiler.h b/src/jit/compiler.h
index 5a107fc972..d4388628c6 100644
--- a/src/jit/compiler.h
+++ b/src/jit/compiler.h
@@ -1339,15 +1339,13 @@ public:
unsigned numSlots,
unsigned alignment FEATURE_UNIX_AMD64_STRUCT_PASSING_ONLY_ARG(const bool isStruct));
-#ifdef DEBUG
- void RemorphReset();
-#endif
+ void RemorphReset();
fgArgTabEntryPtr RemorphRegArg(
unsigned argNum, GenTreePtr node, GenTreePtr parent, regNumber regNum, unsigned numRegs, unsigned alignment);
void RemorphStkArg(unsigned argNum, GenTreePtr node, GenTreePtr parent, unsigned numSlots, unsigned alignment);
- void SplitArg(unsigned argNum, unsigned numRegs, unsigned numSlots, bool isReMorph);
+ void SplitArg(unsigned argNum, unsigned numRegs, unsigned numSlots);
void EvalToTmp(unsigned argNum, unsigned tmpNum, GenTreePtr newNode);
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index 4623708849..c2f62242d5 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -1207,12 +1207,10 @@ fgArgTabEntryPtr fgArgInfo::AddStkArg(unsigned argNum,
return curArgTabEntry;
}
-#ifdef DEBUG
void fgArgInfo::RemorphReset()
{
nextSlotNum = INIT_ARG_STACK_SLOT;
}
-#endif
fgArgTabEntry* fgArgInfo::RemorphRegArg(
unsigned argNum, GenTreePtr node, GenTreePtr parent, regNumber regNum, unsigned numRegs, unsigned alignment)
@@ -1368,12 +1366,10 @@ void fgArgInfo::RemorphStkArg(
curArgTabEntry->node = node;
#endif
-#ifdef DEBUG
nextSlotNum += numSlots;
-#endif
}
-void fgArgInfo::SplitArg(unsigned argNum, unsigned numRegs, unsigned numSlots, bool isReMorph)
+void fgArgInfo::SplitArg(unsigned argNum, unsigned numRegs, unsigned numSlots)
{
fgArgTabEntryPtr curArgTabEntry = nullptr;
assert(argNum < argCount);
@@ -1389,22 +1385,19 @@ void fgArgInfo::SplitArg(unsigned argNum, unsigned numRegs, unsigned numSlots, b
assert(numRegs > 0);
assert(numSlots > 0);
- if (isReMorph)
+ if (argsComplete)
{
assert(curArgTabEntry->isSplit == true);
assert(curArgTabEntry->numRegs == numRegs);
assert(curArgTabEntry->numSlots == numSlots);
-#ifdef DEBUG
- nextSlotNum += numSlots;
-#endif
}
else
{
curArgTabEntry->isSplit = true;
curArgTabEntry->numRegs = numRegs;
curArgTabEntry->numSlots = numSlots;
- nextSlotNum += numSlots;
}
+ nextSlotNum += numSlots;
}
void fgArgInfo::EvalToTmp(unsigned argNum, unsigned tmpNum, GenTreePtr newNode)
@@ -2831,9 +2824,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
fgPtrArgCntCur -= callStkLevel;
}
assert(call->fgArgInfo != nullptr);
-#ifdef DEBUG
call->fgArgInfo->RemorphReset();
-#endif
numArgs = call->fgArgInfo->ArgCount();
}
@@ -4128,12 +4119,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
assert(varTypeIsStruct(argx));
unsigned numRegsPartial = size - (fltArgRegNum - MAX_FLOAT_REG_ARG);
assert((unsigned char)numRegsPartial == numRegsPartial);
-#ifndef DEBUG
- if (!reMorphing)
-#endif
- {
- call->fgArgInfo->SplitArg(argIndex, numRegsPartial, size - numRegsPartial, reMorphing);
- }
+ call->fgArgInfo->SplitArg(argIndex, numRegsPartial, size - numRegsPartial);
fltArgRegNum = MAX_FLOAT_REG_ARG;
}
#endif // _TARGET_ARM_
@@ -4166,12 +4152,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
(argx->gtOper == GT_COMMA && (args->gtFlags & GTF_ASG)));
unsigned numRegsPartial = size - (intArgRegNum - MAX_REG_ARG);
assert((unsigned char)numRegsPartial == numRegsPartial);
-#ifndef DEBUG
- if (!reMorphing)
-#endif
- {
- call->fgArgInfo->SplitArg(argIndex, numRegsPartial, size - numRegsPartial, reMorphing);
- }
+ call->fgArgInfo->SplitArg(argIndex, numRegsPartial, size - numRegsPartial);
intArgRegNum = MAX_REG_ARG;
fgPtrArgCntCur += size - numRegsPartial;
}