summaryrefslogtreecommitdiff
path: root/src/jit/treelifeupdater.cpp
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2018-05-22 13:50:38 -0700
committerGitHub <noreply@github.com>2018-05-22 13:50:38 -0700
commit7153e441ef21e9bb5e022229c0808b964b9199e0 (patch)
tree6fe6ff629b7784e528322cb9ab6f922478ca4fc1 /src/jit/treelifeupdater.cpp
parent32ab54d345a4ab2eb572fe3ba061b6e0d1b31088 (diff)
downloadcoreclr-7153e441ef21e9bb5e022229c0808b964b9199e0.tar.gz
coreclr-7153e441ef21e9bb5e022229c0808b964b9199e0.tar.bz2
coreclr-7153e441ef21e9bb5e022229c0808b964b9199e0.zip
Remove JIT LEGACY_BACKEND code (#18064)
Remove JIT LEGACY_BACKEND code All code related to the LEGACY_BACKEND JIT is removed. This includes all code related to x87 floating-point code generation. Almost 50,000 lines of code have been removed. Remove legacyjit/legacynonjit directories Remove reg pairs Remove tiny instruction descriptors Remove compCanUseSSE2 (it's always true) Remove unused FEATURE_FP_REGALLOC
Diffstat (limited to 'src/jit/treelifeupdater.cpp')
-rw-r--r--src/jit/treelifeupdater.cpp76
1 files changed, 3 insertions, 73 deletions
diff --git a/src/jit/treelifeupdater.cpp b/src/jit/treelifeupdater.cpp
index 6cefb8ae4d..1bd3b7cda2 100644
--- a/src/jit/treelifeupdater.cpp
+++ b/src/jit/treelifeupdater.cpp
@@ -58,29 +58,6 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree)
// The ADDR might occur in a context where the address it contributes is eventually
// dereferenced, so we can't say that this is not a use or def.
}
-#if 0
- // TODO-ARM64-Bug?: These asserts don't seem right for ARM64: I don't understand why we have to assert
- // two consecutive lclvars (in execution order) can only be observed if the first one is a struct field.
- // It seems to me this is code only applicable to the legacy JIT and not RyuJIT (and therefore why it was
- // ifdef'ed out for AMD64).
- else if (!varDsc->lvIsStructField)
- {
- GenTree* prevTree;
- for (prevTree = tree->gtPrev;
- prevTree != NULL && prevTree != compCurLifeTree;
- prevTree = prevTree->gtPrev)
- {
- if ((prevTree->gtOper == GT_LCL_VAR) || (prevTree->gtOper == GT_REG_VAR))
- {
- LclVarDsc * prevVarDsc = compiler->lvaTable + prevTree->gtLclVarCommon.gtLclNum;
-
- // These are the only things for which this method MUST be called
- assert(prevVarDsc->lvIsStructField);
- }
- }
- assert(prevTree == compCurLifeTree);
- }
-#endif // 0
}
#endif // !_TARGET_AMD64_
#endif // DEBUG
@@ -99,16 +76,12 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree)
// if it's "x <op>=..." then variable "x" must have had a previous, original, site to be born.
bool isBorn = ((tree->gtFlags & GTF_VAR_DEF) != 0 && (tree->gtFlags & GTF_VAR_USEASG) == 0);
bool isDying = ((tree->gtFlags & GTF_VAR_DEATH) != 0);
-#ifndef LEGACY_BACKEND
- bool spill = ((tree->gtFlags & GTF_SPILL) != 0);
-#endif // !LEGACY_BACKEND
+ bool spill = ((tree->gtFlags & GTF_SPILL) != 0);
-#ifndef LEGACY_BACKEND
- // For RyuJIT backend, since all tracked vars are register candidates, but not all are in registers at all times,
+ // Since all tracked vars are register candidates, but not all are in registers at all times,
// we maintain two separate sets of variables - the total set of variables that are either
// born or dying here, and the subset of those that are on the stack
VarSetOps::ClearD(compiler, stackVarDeltaSet);
-#endif // !LEGACY_BACKEND
if (isBorn || isDying)
{
@@ -122,26 +95,18 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree)
VarSetOps::AddElemD(compiler, varDeltaSet, varDsc->lvVarIndex);
if (ForCodeGen)
{
-#ifndef LEGACY_BACKEND
if (isBorn && varDsc->lvIsRegCandidate() && tree->gtHasReg())
{
compiler->codeGen->genUpdateVarReg(varDsc, tree);
}
-#endif // !LEGACY_BACKEND
- if (varDsc->lvIsInReg()
-#ifndef LEGACY_BACKEND
- && tree->gtRegNum != REG_NA
-#endif // !LEGACY_BACKEND
- )
+ if (varDsc->lvIsInReg() && tree->gtRegNum != REG_NA)
{
compiler->codeGen->genUpdateRegLife(varDsc, isBorn, isDying DEBUGARG(tree));
}
-#ifndef LEGACY_BACKEND
else
{
VarSetOps::AddElemD(compiler, stackVarDeltaSet, varDsc->lvVarIndex);
}
-#endif // !LEGACY_BACKEND
}
}
else if (varDsc->lvPromoted)
@@ -174,40 +139,32 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree)
// test in this, the common case, where we have no deadTrackedFieldVars.
if (fldVarDsc->lvIsInReg())
{
-#ifndef LEGACY_BACKEND
if (isBorn)
{
compiler->codeGen->genUpdateVarReg(fldVarDsc, tree);
}
-#endif // !LEGACY_BACKEND
compiler->codeGen->genUpdateRegLife(fldVarDsc, isBorn, isDying DEBUGARG(tree));
}
-#ifndef LEGACY_BACKEND
else
{
VarSetOps::AddElemD(compiler, stackVarDeltaSet, fldVarIndex);
}
-#endif // !LEGACY_BACKEND
}
}
else if (ForCodeGen && VarSetOps::IsMember(compiler, varDeltaSet, fldVarIndex))
{
if (compiler->lvaTable[i].lvIsInReg())
{
-#ifndef LEGACY_BACKEND
if (isBorn)
{
compiler->codeGen->genUpdateVarReg(fldVarDsc, tree);
}
-#endif // !LEGACY_BACKEND
compiler->codeGen->genUpdateRegLife(fldVarDsc, isBorn, isDying DEBUGARG(tree));
}
-#ifndef LEGACY_BACKEND
else
{
VarSetOps::AddElemD(compiler, stackVarDeltaSet, fldVarIndex);
}
-#endif // !LEGACY_BACKEND
}
}
}
@@ -253,8 +210,6 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree)
if (ForCodeGen)
{
-#ifndef LEGACY_BACKEND
-
// Only add vars to the gcInfo.gcVarPtrSetCur if they are currently on stack, since the
// gcInfo.gcTrkStkPtrLcls
// includes all TRACKED vars that EVER live on the stack (i.e. are not always in a register).
@@ -289,34 +244,10 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree)
#endif // DEBUG
}
-#else // LEGACY_BACKEND
-
-#ifdef DEBUG
- if (compiler->verbose)
- {
- VarSetOps::Assign(compiler, gcVarPtrSetNew, newLife);
- VarSetOps::IntersectionD(compiler, gcVarPtrSetNew, compiler->codeGen->gcInfo.gcTrkStkPtrLcls);
- if (!VarSetOps::Equal(compiler, compiler->codeGen->gcInfo.gcVarPtrSetCur, gcVarPtrSetNew))
- {
- printf("\t\t\t\t\t\t\tGCvars: ");
- dumpConvertedVarSet(compiler, compiler->codeGen->gcInfo.gcVarPtrSetCur);
- printf(" => ");
- dumpConvertedVarSet(compiler, gcVarPtrSetNew);
- printf("\n");
- }
- }
-#endif // DEBUG
- VarSetOps::Assign(compiler, compiler->codeGen->gcInfo.gcVarPtrSetCur,
- compiler->codeGen->gcInfo.gcTrkStkPtrLcls);
- VarSetOps::IntersectionD(compiler, compiler->codeGen->gcInfo.gcVarPtrSetCur, newLife);
-
-#endif // LEGACY_BACKEND
-
compiler->codeGen->siUpdate();
}
}
-#ifndef LEGACY_BACKEND
if (ForCodeGen && spill)
{
assert(!varDsc->lvPromoted);
@@ -335,7 +266,6 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree)
}
}
}
-#endif // !LEGACY_BACKEND
}
//------------------------------------------------------------------------