summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Andreenko <seandree@microsoft.com>2017-10-24 23:30:35 -0700
committerGitHub <noreply@github.com>2017-10-24 23:30:35 -0700
commit980def6282c9c64d38a218c3f37093d130222458 (patch)
tree6d9e62ca2f8ad63b4dc1bbd6d8fba14394b0c8b5 /src
parent4b21e0d7eef05ec9842c032e7d813f2a45a418f1 (diff)
downloadcoreclr-980def6282c9c64d38a218c3f37093d130222458.tar.gz
coreclr-980def6282c9c64d38a218c3f37093d130222458.tar.bz2
coreclr-980def6282c9c64d38a218c3f37093d130222458.zip
delete unused local variables from jit sources (#14679)
Diffstat (limited to 'src')
-rw-r--r--src/jit/ee_il_dll.cpp2
-rw-r--r--src/jit/eeinterface.cpp2
-rw-r--r--src/jit/emit.cpp5
-rw-r--r--src/jit/flowgraph.cpp1
-rw-r--r--src/jit/gentree.cpp11
-rw-r--r--src/jit/hashbv.cpp1
-rw-r--r--src/jit/importer.cpp3
-rw-r--r--src/jit/liveness.cpp1
-rw-r--r--src/jit/lower.cpp1
-rw-r--r--src/jit/lsra.cpp2
-rw-r--r--src/jit/lsraxarch.cpp9
-rw-r--r--src/jit/morph.cpp36
-rw-r--r--src/jit/optcse.cpp3
-rw-r--r--src/jit/optimizer.cpp1
-rw-r--r--src/jit/utils.cpp1
15 files changed, 21 insertions, 58 deletions
diff --git a/src/jit/ee_il_dll.cpp b/src/jit/ee_il_dll.cpp
index 822a2b9286..73e6cd6459 100644
--- a/src/jit/ee_il_dll.cpp
+++ b/src/jit/ee_il_dll.cpp
@@ -327,8 +327,6 @@ void CILJit::clearCache(void)
*/
BOOL CILJit::isCacheCleanupRequired(void)
{
- BOOL doCleanup;
-
if (g_realJitCompiler != nullptr)
{
if (g_realJitCompiler->isCacheCleanupRequired())
diff --git a/src/jit/eeinterface.cpp b/src/jit/eeinterface.cpp
index d8db947f02..5783037f22 100644
--- a/src/jit/eeinterface.cpp
+++ b/src/jit/eeinterface.cpp
@@ -103,8 +103,6 @@ const char* Compiler::eeGetMethodFullName(CORINFO_METHOD_HANDLE hnd)
/* figure out the signature */
- EXCEPTION_POINTERS exceptionPointers;
-
PAL_TRY(FilterSuperPMIExceptionsParam_eeinterface*, pParam, &param)
{
unsigned i;
diff --git a/src/jit/emit.cpp b/src/jit/emit.cpp
index 31ef44d529..f9f3d855c9 100644
--- a/src/jit/emit.cpp
+++ b/src/jit/emit.cpp
@@ -1521,10 +1521,6 @@ void emitter::emitEndProlog()
{
assert(emitComp->compGeneratingProlog);
- size_t prolSz;
-
- insGroup* tempIG;
-
emitNoGCIG = false;
/* Save the prolog IG if non-empty or if only one block */
@@ -7194,7 +7190,6 @@ const char* emitter::emitOffsetToLabel(unsigned offs)
char* retbuf;
insGroup* ig;
- UNATIVE_OFFSET of;
UNATIVE_OFFSET nextof = 0;
for (ig = emitIGlist; ig != nullptr; ig = ig->igNext)
diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp
index 9efd95bd1e..18ef525fd3 100644
--- a/src/jit/flowgraph.cpp
+++ b/src/jit/flowgraph.cpp
@@ -21539,7 +21539,6 @@ void Compiler::fgDebugCheckNodeLinks(BasicBlock* block, GenTree* node)
if (tree->OperIsUnary() && tree->gtOp.gtOp1)
{
- GenTreePtr lclVarTree;
expectedPrevTree = tree->gtOp.gtOp1;
}
else if (tree->OperIsBinary() && tree->gtOp.gtOp1)
diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp
index 04e0c9cd89..4cd4221bdd 100644
--- a/src/jit/gentree.cpp
+++ b/src/jit/gentree.cpp
@@ -3088,8 +3088,7 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
/* Is this a FP value? */
- bool isflt = varTypeIsFloating(tree->TypeGet());
- unsigned FPlvlSave;
+ bool isflt = varTypeIsFloating(tree->TypeGet());
/* Figure out what kind of a node we have */
@@ -3103,8 +3102,6 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
int costEx;
int costSz;
- bool bRngChk;
-
#ifdef DEBUG
costEx = -1;
costSz = -1;
@@ -3943,7 +3940,6 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
(op2->gtOp.gtOp1->gtOper == GT_MUL &&
op2->gtOp.gtOp1->gtOp.gtOp1->gtOper == GT_NOP))
{
- // assert(bRngChk);
op2->gtFlags |= GTF_ADDRMODE_NO_CSE;
if (op2->gtOp.gtOp1->gtOper == GT_MUL)
{
@@ -4609,7 +4605,7 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
if (tree->gtCall.gtCallArgs)
{
#if FEATURE_STACK_FP_X87
- FPlvlSave = codeGen->genGetFPstkLevel();
+ unsigned FPlvlSave = codeGen->genGetFPstkLevel();
#endif // FEATURE_STACK_FP_X87
const bool isListCallArgs = true;
const bool callArgsInRegs = false;
@@ -4633,7 +4629,7 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
if (tree->gtCall.gtCallLateArgs)
{
#if FEATURE_STACK_FP_X87
- FPlvlSave = codeGen->genGetFPstkLevel();
+ unsigned FPlvlSave = codeGen->genGetFPstkLevel();
#endif // FEATURE_STACK_FP_X87
const bool isListCallArgs = true;
const bool callArgsInRegs = true;
@@ -10988,7 +10984,6 @@ void Compiler::gtDispChild(GenTreePtr child,
__in_opt const char* msg, /* = nullptr */
bool topOnly) /* = false */
{
- IndentInfo info;
indentStack->Push(arcType);
gtDispTree(child, indentStack, msg, topOnly);
indentStack->Pop();
diff --git a/src/jit/hashbv.cpp b/src/jit/hashbv.cpp
index fa06ec7b1e..db8dda1a7b 100644
--- a/src/jit/hashbv.cpp
+++ b/src/jit/hashbv.cpp
@@ -549,7 +549,6 @@ void hashBv::Resize(int newSize)
int oldSizeLog2 = log2_hashSize;
int log2_newSize = genLog2((unsigned)newSize);
- int size;
hashBvNode** newNodes = this->getNewVector(newSize);
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp
index 6429978a10..58273691de 100644
--- a/src/jit/importer.cpp
+++ b/src/jit/importer.cpp
@@ -876,7 +876,6 @@ GenTreeArgList* Compiler::impPopList(unsigned count, CORINFO_SIG_INFO* sig, GenT
CORINFO_CLASS_HANDLE argClass;
CORINFO_CLASS_HANDLE argRealClass;
GenTreeArgList* args;
- unsigned sigSize;
for (args = treeList, count = sig->numArgs; count > 0; args = args->Rest(), count--)
{
@@ -5771,7 +5770,6 @@ void Compiler::impImportNewObjArray(CORINFO_RESOLVED_TOKEN* pResolvedToken, CORI
if (!opts.IsReadyToRun() || IsTargetAbi(CORINFO_CORERT_ABI))
{
- LclVarDsc* newObjArrayArgsVar;
// Reuse the temp used to pass the array dimensions to avoid bloating
// the stack frame in case there are multiple calls to multi-dim array
@@ -10354,7 +10352,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
int val;
CORINFO_SIG_INFO sig;
- unsigned flags;
IL_OFFSET jmpAddr;
bool ovfl, unordered, callNode;
bool ldstruct;
diff --git a/src/jit/liveness.cpp b/src/jit/liveness.cpp
index 028fdc9dfa..3f4d3a18ca 100644
--- a/src/jit/liveness.cpp
+++ b/src/jit/liveness.cpp
@@ -1935,7 +1935,6 @@ void Compiler::fgComputeLife(VARSET_TP& life,
bool* pStmtInfoDirty DEBUGARG(bool* treeModf))
{
GenTreePtr tree;
- unsigned lclNum;
// Don't kill vars in scope
VARSET_TP keepAliveVars(VarSetOps::Union(this, volatileVars, compCurBB->bbScope));
diff --git a/src/jit/lower.cpp b/src/jit/lower.cpp
index b37cf373f9..d818088b25 100644
--- a/src/jit/lower.cpp
+++ b/src/jit/lower.cpp
@@ -5296,7 +5296,6 @@ bool Lowering::IndirsAreEquivalent(GenTreePtr candidate, GenTreePtr storeInd)
pTreeB = pTreeB->gtSkipReloadOrCopy();
genTreeOps oper;
- unsigned kind;
if (pTreeA->OperGet() != pTreeB->OperGet())
{
diff --git a/src/jit/lsra.cpp b/src/jit/lsra.cpp
index c2258f0646..b9d475b811 100644
--- a/src/jit/lsra.cpp
+++ b/src/jit/lsra.cpp
@@ -11459,8 +11459,6 @@ void TreeNodeInfo::dump(LinearScan* lsra)
void LinearScan::lsraDumpIntervals(const char* msg)
{
- Interval* interval;
-
printf("\nLinear scan intervals %s:\n", msg);
for (auto& interval : intervals)
{
diff --git a/src/jit/lsraxarch.cpp b/src/jit/lsraxarch.cpp
index 53aebe00bf..6203afb744 100644
--- a/src/jit/lsraxarch.cpp
+++ b/src/jit/lsraxarch.cpp
@@ -137,9 +137,6 @@ void LinearScan::TreeNodeInfoInit(GenTree* tree)
SetContainsAVXFlags(varTypeIsFloating(tree->TypeGet()));
switch (tree->OperGet())
{
- GenTree* op1;
- GenTree* op2;
-
default:
TreeNodeInfoInitSimple(tree);
break;
@@ -456,10 +453,12 @@ void LinearScan::TreeNodeInfoInit(GenTree* tree)
break;
case GT_LOCKADD:
- op2 = tree->gtOp.gtOp2;
+ {
+ GenTreePtr op2 = tree->gtOp.gtOp2;
info->srcCount = op2->isContained() ? 1 : 2;
assert(info->dstCount == (tree->TypeGet() == TYP_VOID) ? 0 : 1);
- break;
+ }
+ break;
case GT_PUTARG_REG:
TreeNodeInfoInitPutArgReg(tree->AsUnOp());
diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp
index 42c5a2a164..73e07ff422 100644
--- a/src/jit/morph.cpp
+++ b/src/jit/morph.cpp
@@ -4735,8 +4735,6 @@ void Compiler::fgMorphSystemVStructArgs(GenTreeCall* call, bool hasStructArgumen
//
void Compiler::fgMorphMultiregStructArgs(GenTreeCall* call)
{
- GenTreePtr args;
- GenTreePtr argx;
bool foundStructArg = false;
unsigned initialFlags = call->gtFlags;
unsigned flagsSummary = 0;
@@ -4757,7 +4755,7 @@ void Compiler::fgMorphMultiregStructArgs(GenTreeCall* call)
#endif // !UNIX_AMD64_ABI
#endif
- for (args = call->gtCallArgs; args != nullptr; args = args->gtOp.gtOp2)
+ for (GenTreePtr args = call->gtCallArgs; args != nullptr; args = args->gtOp.gtOp2)
{
// For late arguments the arg tree that is overridden is in the gtCallLateArgs list.
// For such late args the gtCallArgList contains the setup arg node (evaluating the arg.)
@@ -12471,14 +12469,11 @@ DONE_MORPHING_CHILDREN:
* Perform the required oper-specific postorder morphing
*/
- GenTreePtr temp;
- GenTreePtr cns1, cns2;
- GenTreePtr thenNode;
- GenTreePtr elseNode;
- size_t ival1, ival2;
- GenTreePtr lclVarTree;
- GenTreeLclVarCommon* lclVarCmnTree;
- FieldSeqNode* fieldSeq = nullptr;
+ GenTreePtr temp;
+ GenTreePtr cns1, cns2;
+ size_t ival1, ival2;
+ GenTreePtr lclVarTree;
+ FieldSeqNode* fieldSeq = nullptr;
switch (oper)
{
@@ -13080,7 +13075,7 @@ DONE_MORPHING_CHILDREN:
#ifdef LEGACY_BACKEND
case GT_QMARK:
-
+ {
/* If op1 is a comma throw node then we won't be keeping op2 */
if (fgIsCommaThrow(op1))
{
@@ -13090,8 +13085,8 @@ DONE_MORPHING_CHILDREN:
/* Get hold of the two branches */
noway_assert(op2->OperGet() == GT_COLON);
- elseNode = op2->AsColon()->ElseNode();
- thenNode = op2->AsColon()->ThenNode();
+ GenTreePtr thenNode = op2->AsColon()->ThenNode();
+ GenTreePtr elseNode = op2->AsColon()->ElseNode();
/* Try to hoist assignments out of qmark colon constructs.
ie. replace (cond?(x=a):(x=b)) with (x=(cond?a:b)). */
@@ -13197,9 +13192,9 @@ DONE_MORPHING_CHILDREN:
}
}
#endif // !_TARGET_ARM_
-
- break; // end case GT_QMARK
-#endif // LEGACY_BACKEND
+ }
+ break; // end case GT_QMARK
+#endif // LEGACY_BACKEND
case GT_MUL:
@@ -16698,9 +16693,7 @@ void Compiler::fgMorphBlocks()
}
#endif
- /* Process all statement trees in the basic block */
-
- GenTreePtr tree;
+/* Process all statement trees in the basic block */
#ifndef LEGACY_BACKEND
fgMorphStmts(block, &lnot, &loadw);
@@ -16709,7 +16702,7 @@ void Compiler::fgMorphBlocks()
if (mult && (opts.compFlags & CLFLG_TREETRANS) && !opts.compDbgCode && !opts.MinOpts())
{
- for (tree = block->bbTreeList; tree; tree = tree->gtNext)
+ for (GenTreePtr tree = block->bbTreeList; tree; tree = tree->gtNext)
{
assert(tree->gtOper == GT_STMT);
GenTreePtr last = tree->gtStmt.gtStmtExpr;
@@ -19581,7 +19574,6 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, GenTreePtr
setLclRelatedToSIMDIntrinsic(localDst);
}
- GenTree* simdStructAddr;
if (simdStructNode->TypeGet() == TYP_BYREF)
{
assert(simdStructNode->OperIsLocal());
diff --git a/src/jit/optcse.cpp b/src/jit/optcse.cpp
index bcb5a4c2a8..7c42852cec 100644
--- a/src/jit/optcse.cpp
+++ b/src/jit/optcse.cpp
@@ -871,9 +871,6 @@ void Compiler::optValnumCSE_InitDataFlow()
{
for (BasicBlock* block = fgFirstBB; block; block = block->bbNext)
{
- GenTreePtr stmt;
- GenTreePtr tree;
-
/* Initialize the blocks's bbCseIn set */
bool init_to_zero = false;
diff --git a/src/jit/optimizer.cpp b/src/jit/optimizer.cpp
index 77b201fc7f..04285916ff 100644
--- a/src/jit/optimizer.cpp
+++ b/src/jit/optimizer.cpp
@@ -6503,7 +6503,6 @@ void Compiler::optHoistThisLoop(unsigned lnum, LoopHoistContext* hoistCtxt)
BasicBlock* head = pLoopDsc->lpHead;
BasicBlock* tail = pLoopDsc->lpBottom;
BasicBlock* lbeg = pLoopDsc->lpEntry;
- BasicBlock* block;
// We must have a do-while loop
if ((pLoopDsc->lpFlags & LPFLG_DO_WHILE) == 0)
diff --git a/src/jit/utils.cpp b/src/jit/utils.cpp
index 4e061fa15e..a72de57d57 100644
--- a/src/jit/utils.cpp
+++ b/src/jit/utils.cpp
@@ -2113,7 +2113,6 @@ T GetSignedMagic(T denom, int* shift /*out*/)
UT q2;
UT t;
T result_magic;
- int result_shift;
int iters = 0;
absDenom = abs(denom);