* Clean `assertionprop.cpp`.
* Clean `codegencommon.cpp`.:
* Clean `codegenlinear.cpp`.
* Clean `compiler.cpp`.
* Clean `earlyprop.cpp`.
* Clean `gschecks.cpp`.
* Clean 'lclvars.cpp`.
* Clean `jiteh.cpp`.
* Clean `liveness.cpp`.
* Clean `hashbv.cpp`.
* Clean `gcinfo.cpp`.
* Clean `optimizer.cpp`.
noway_assert(tree && op1 && tree->OperIs(GT_ASG) && (op1->gtOper == GT_LCL_VAR) &&
(op1->gtLclVarCommon.gtLclNum == lclNum));
- /* TODO-Review: BB_UNITY_WEIGHT is not the correct block weight */
- unsigned blockWeight = BB_UNITY_WEIGHT;
-
/* Assign the old expression into the new temp */
GenTree* newAsgn = gtNewTempAssign(copyLclNum, tree->gtOp.gtOp2);
{
unsigned lclNum = op1->gtLclVarCommon.gtLclNum;
noway_assert(lclNum < lvaCount);
- LclVarDsc* lclVar = &lvaTable[lclNum];
// If the local variable is not in SSA then bail
if (!lvaInSsa(lclNum))
return index;
}
- optAssertionKind complementaryAssertionKind =
- (inputAssertion->assertionKind == OAK_EQUAL) ? OAK_NOT_EQUAL : OAK_EQUAL;
for (AssertionIndex index = 1; index <= optAssertionCount; ++index)
{
// Make sure assertion kinds are complementary and op1, op2 kinds match.
return nullptr;
}
- GenTree* newTree = tree;
- GenTree* sideEffList = nullptr;
+ GenTree* newTree = tree;
switch (vnStore->TypeOfVN(vnCns))
{
case TYP_FLOAT:
return nullptr;
}
- unsigned lclNum = op1->gtLclVarCommon.gtLclNum;
-
#ifdef DEBUG
bool vnBased = false;
AssertionIndex index = NO_ASSERTION_INDEX;
ASSERT_TP* mJumpDestOut;
ASSERT_TP* mJumpDestGen;
- Compiler* m_pCompiler;
BitVecTraits* apTraits;
public:
, preMergeJumpDestOut(BitVecOps::UninitVal())
, mJumpDestOut(jumpDestOut)
, mJumpDestGen(jumpDestGen)
- , m_pCompiler(pCompiler)
, apTraits(pCompiler->apTraits)
{
}
if (compiler->opts.dmpHex)
{
size_t consSize = getEmitter()->emitDataSize();
- size_t infoSize = compiler->compInfoBlkSize;
fprintf(dmpf, "Generated code for %s:\n", compiler->info.compFullName);
fprintf(dmpf, "\n");
fprintf(dmpf, " Const at %p [%04X bytes]\n", dspPtr(consPtr), consSize);
}
#ifdef JIT32_GCENCODER
+ size_t infoSize = compiler->compInfoBlkSize;
if (infoSize)
fprintf(dmpf, " Info at %p [%04X bytes]\n", dspPtr(infoPtr), infoSize);
#endif // JIT32_GCENCODER
#else // !define(_TARGET_ARM_)
- regNumber rZero1 = REG_ZR;
- rAddr = initReg;
- *pInitRegZeroed = false;
+ rAddr = initReg;
+ *pInitRegZeroed = false;
#endif // !defined(_TARGET_ARM_)
{
return;
}
- regNumber treeReg = genConsumeReg(node);
+ genConsumeReg(node);
genCopyRegIfNeeded(node, needReg);
}
for (unsigned i = 0; i < regCount; ++i)
{
- var_types type = retTypeDesc->GetReturnRegType(i);
- regNumber fromReg = call->GetRegNumByIdx(i);
- regNumber toReg = copy->GetRegNumByIdx(i);
+ var_types type = retTypeDesc->GetReturnRegType(i);
+ regNumber toReg = copy->GetRegNumByIdx(i);
if (toReg != REG_NA)
{
bool dumpIRBlockHeaders = false;
bool dumpIRExit = false;
LPCWSTR dumpIRPhase = nullptr;
- LPCWSTR dumpIRFormat = nullptr;
if (!altJitConfig || opts.altJit)
{
void codeGeneratorCodeSizeBeg()
{
}
-/*****************************************************************************/
-
-/*****************************************************************************
- *
- * If any temporary tables are smaller than 'genMinSize2free' we won't bother
- * freeing them.
- */
-
-const size_t genMinSize2free = 64;
-
-/*****************************************************************************/
/*****************************************************************************
*
return;
}
- bool extraInfo = (JitConfig.JitEECallTimingInfo() != 0);
double totTime_ms = 0.0;
fprintf(f, "JIT Compilation time report:\n");
const char* extraHdr1 = "";
const char* extraHdr2 = "";
#if MEASURE_CLRAPI_CALLS
+ bool extraInfo = (JitConfig.JitEECallTimingInfo() != 0);
if (extraInfo)
{
extraHdr1 = " CLRs/meth % in CLR";
assert(_countof(PhaseNames) == PHASE_NUMBER_OF);
for (int i = 0; i < PHASE_NUMBER_OF; i++)
{
- double phase_tot_ms = (((double)m_total.m_cyclesByPhase[i]) / countsPerSec) * 1000.0;
- double phase_max_ms = (((double)m_maximum.m_cyclesByPhase[i]) / countsPerSec) * 1000.0;
- double phase_tot_pct = 100.0 * phase_tot_ms / totTime_ms;
+ double phase_tot_ms = (((double)m_total.m_cyclesByPhase[i]) / countsPerSec) * 1000.0;
+ double phase_max_ms = (((double)m_maximum.m_cyclesByPhase[i]) / countsPerSec) * 1000.0;
#if MEASURE_CLRAPI_CALLS
// Skip showing CLR API call info if we didn't collect any
void cTreeIR(Compiler* comp, GenTree* tree)
{
- bool foldLeafs = comp->dumpIRNoLeafs;
- bool foldIndirs = comp->dumpIRDataflow;
- bool foldLists = comp->dumpIRNoLists;
- bool dataflowView = comp->dumpIRDataflow;
- bool dumpTypes = comp->dumpIRTypes;
- bool dumpValnums = comp->dumpIRValnums;
- bool noStmts = comp->dumpIRNoStmts;
- genTreeOps op = tree->OperGet();
- unsigned childCount = tree->NumChildren();
+ genTreeOps op = tree->OperGet();
+ unsigned childCount = tree->NumChildren();
GenTree* child;
// Recurse and dump trees that this node depends on.
GenTree* comma = check->gtGetParent(nullptr);
if ((comma != nullptr) && comma->OperIs(GT_COMMA) && (comma->gtGetOp1() == check))
{
- GenTree* next = check->gtNext;
optRemoveRangeCheck(comma, compCurStmt);
// Both `tree` and `check` have been removed from the statement.
// 'tree' was replaced with 'nop' or side effect list under 'comma'.
GCInfo::WriteBarrierForm GCInfo::gcWriteBarrierFormFromTargetAddress(GenTree* tgtAddr)
{
- GCInfo::WriteBarrierForm result = GCInfo::WBF_BarrierUnknown; // Default case, we have no information.
-
// If we store through an int to a GC_REF field, we'll assume that needs to use a checked barriers.
if (tgtAddr->TypeGet() == TYP_I_IMPL)
{
GenTree* tree = *pTree;
ShadowParamVarInfo* shadowVarInfo = pState->comp->gsShadowVarInfo;
assert(shadowVarInfo);
- bool fIsBlk = false;
unsigned lclNum;
assert(!pState->isAssignSrc || pState->lvAssignDef != (unsigned)-1);
void hashBv::hbvFree()
{
- Compiler* comp = this->compiler;
-
int hts = hashtable_size();
for (int i = 0; i < hts; i++)
{
}
else if (oldSize > newSize)
{
- int shrinkFactor = oldSize / newSize;
-
// shrink multiple lists into one list
// more efficient ways to do this but...
// if the lists are long, you shouldn't be shrinking.
bool hashBv::anySet()
{
- int result = 0;
-
int hts = this->hashtable_size();
for (int hashNum = 0; hashNum < hts; hashNum++)
{
hashBvNode* o = other->nodeArr[h];
while (o)
{
- hashBvNode* next = o->next;
// figure out what dst list this goes to
int hash = getHashForIndex(o->baseIndex, hts);
int dstIndex = (hash - h) >> other->log2_hashSize;
template <typename Action>
bool hashBv::MultiTraverseRHSBigger(hashBv* other)
{
- int hts = this->hashtable_size();
int ots = other->hashtable_size();
bool result = Action::DefaultResult();
for (int hashNum = 0; hashNum < hts; hashNum++)
{
- int destination = getHashForIndex(BITS_PER_NODE * hashNum, this->hashtable_size());
-
hashBvNode** pa = &this->nodeArr[hashNum];
hashBvNode** pb = &other->nodeArr[hashNum];
hashBvNode* b = *pb;
template <class Action>
bool hashBv::MultiTraverse(hashBv* other)
{
- bool result = false;
-
assert(this->numNodes == this->getNodeCount());
Action::PreAction(this, other);
while (otherNode)
{
// printf("otherNode is True...\n");
- hashBvNode* next = *splicePoint;
-
this->numNodes++;
if (freeList)
assert(begBlk != nullptr);
assert(endBlk != nullptr);
- EHblkDsc* ehDsc = ehGetDsc(finallyIndex);
-
#if FEATURE_EH_CALLFINALLY_THUNKS
bool inTryRegion;
unsigned callFinallyRegionIndex = ehGetCallFinallyRegionIndex(finallyIndex, &inTryRegion);
}
}
#else // !FEATURE_EH_CALLFINALLY_THUNKS
- *begBlk = ehDsc->ebdTryBeg;
- *endBlk = ehDsc->ebdTryLast->bbNext;
+ EHblkDsc* ehDsc = ehGetDsc(finallyIndex);
+ *begBlk = ehDsc->ebdTryBeg;
+ *endBlk = ehDsc->ebdTryLast->bbNext;
#endif // !FEATURE_EH_CALLFINALLY_THUNKS
}
const unsigned argSigLen = info.compMethodInfo->args.numArgs;
+#ifdef _TARGET_ARM_
regMaskTP doubleAlignMask = RBM_NONE;
+#endif // _TARGET_ARM_
+
for (unsigned i = 0; i < argSigLen;
i++, varDscInfo->varNum++, varDscInfo->varDsc++, argLst = info.compCompHnd->getArgNext(argLst))
{
}
// For ARM, ARM64, and AMD64 varargs, all arguments go in integer registers
- var_types argType = mangleVarArgsType(varDsc->TypeGet());
+ var_types argType = mangleVarArgsType(varDsc->TypeGet());
+
+#ifdef _TARGET_ARM_
var_types origArgType = argType;
+#endif // TARGET_ARM
+
// ARM softfp calling convention should affect only the floating point arguments.
// Otherwise there appear too many surplus pre-spills and other memory operations
// with the associated locations .
return false;
}
- COMP_HANDLE compHandl = compiler->info.compCompHnd;
-
// Do not promote if the single field is not aligned at its natural boundary within
// the struct field.
CORINFO_FIELD_HANDLE innerFieldHndl = compHandle->getFieldInClass(fieldInfo.fldTypeHnd, 0);
}
// Set the type and associated info if we haven't already set it.
- var_types structType = varDsc->lvType;
if (varDsc->lvType == TYP_UNDEF)
{
varDsc->lvType = TYP_STRUCT;
VarSetOps::DiffD(this, initVars, block->bbLiveIn);
/* Add statements initializing the vars, if there are any to initialize */
- unsigned blockWeight = block->getBBWeight(this);
VarSetOps::Iter iter(this, initVars);
unsigned varIndex = 0;
initRange.InsertBefore(nullptr, zero, store);
#if !defined(_TARGET_64BIT_)
+ unsigned blockWeight = block->getBBWeight(this);
DecomposeLongs::DecomposeRange(this, blockWeight, initRange);
#endif // !defined(_TARGET_64BIT_)
m_pLowering->LowerRange(block, initRange);
noway_assert(bndsChkTree->OperIsBoundsCheck());
- GenTreeBoundsChk* bndsChk = tree->gtOp.gtOp1->AsBoundsChk();
-
#ifdef DEBUG
if (verbose)
{