本文整理汇总了C++中JITDUMP函数的典型用法代码示例。如果您正苦于以下问题:C++ JITDUMP函数的具体用法?C++ JITDUMP怎么用?C++ JITDUMP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了JITDUMP函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
void RegSet::SetLockedRegFloat(GenTree * tree, bool bValue)
{
regNumber reg = tree->gtRegNum;
var_types type = tree->TypeGet(); assert(varTypeIsFloating(type));
regMaskTP regMask = genRegMaskFloat(reg, tree->TypeGet());
if (bValue)
{
JITDUMP("locking register %s\n", getRegNameFloat(reg, type));
assert((rsGetMaskUsed() & regMask) == regMask);
assert((rsGetMaskLock() & regMask) == 0);
rsSetMaskLock( (rsGetMaskLock() | regMask) );
}
else
{
JITDUMP("unlocking register %s\n", getRegNameFloat(reg, type));
assert((rsGetMaskUsed() & regMask) == regMask);
assert((rsGetMaskLock() & regMask) == regMask);
rsSetMaskLock( (rsGetMaskLock() & ~regMask) );
}
}
示例2: assert
//------------------------------------------------------------------------
// LowerCast: Lower GT_CAST(srcType, DstType) nodes.
//
// Arguments:
// tree - GT_CAST node to be lowered
//
// Return Value:
// None.
//
// Notes:
// Casts from float/double to a smaller int type are transformed as follows:
// GT_CAST(float/double, byte) = GT_CAST(GT_CAST(float/double, int32), byte)
// GT_CAST(float/double, sbyte) = GT_CAST(GT_CAST(float/double, int32), sbyte)
// GT_CAST(float/double, int16) = GT_CAST(GT_CAST(double/double, int32), int16)
// GT_CAST(float/double, uint16) = GT_CAST(GT_CAST(double/double, int32), uint16)
//
// Note that for the overflow conversions we still depend on helper calls and
// don't expect to see them here.
// i) GT_CAST(float/double, int type with overflow detection)
//
void Lowering::LowerCast(GenTree* tree)
{
assert(tree->OperGet() == GT_CAST);
JITDUMP("LowerCast for: ");
DISPNODE(tree);
JITDUMP("\n");
GenTree* op1 = tree->gtOp.gtOp1;
var_types dstType = tree->CastToType();
var_types srcType = genActualType(op1->TypeGet());
var_types tmpType = TYP_UNDEF;
if (varTypeIsFloating(srcType))
{
noway_assert(!tree->gtOverflow());
assert(!varTypeIsSmall(dstType)); // fgMorphCast creates intermediate casts when converting from float to small
// int.
}
assert(!varTypeIsSmall(srcType));
if (tmpType != TYP_UNDEF)
{
GenTree* tmp = comp->gtNewCastNode(tmpType, op1, tree->IsUnsigned(), tmpType);
tmp->gtFlags |= (tree->gtFlags & (GTF_OVERFLOW | GTF_EXCEPT));
tree->gtFlags &= ~GTF_UNSIGNED;
tree->gtOp.gtOp1 = tmp;
BlockRange().InsertAfter(op1, tmp);
}
// Now determine if we have operands that should be contained.
ContainCheckCast(tree->AsCast());
}
示例3: siEndScope
void CodeGen::siEndScope(unsigned varNum)
{
for (siScope* scope = siOpenScopeList.scNext; scope; scope = scope->scNext)
{
if (scope->scVarNum == varNum)
{
siEndScope(scope);
return;
}
}
JITDUMP("siEndScope: Failed to end scope for V%02u\n", varNum);
// At this point, we probably have a bad LocalVarTab
if (compiler->opts.compDbgCode)
{
JITDUMP("...checking var tab validity\n");
// Note the following assert is saying that we expect
// the VM supplied info to be invalid...
assert(!siVerifyLocalVarTab());
compiler->opts.compScopeInfo = false;
}
}
示例4: assert
bool RangeCheck::IsBinOpMonotonicallyIncreasing(GenTreeOp* binop)
{
assert(binop->OperIs(GT_ADD));
GenTree* op1 = binop->gtGetOp1();
GenTree* op2 = binop->gtGetOp2();
JITDUMP("[RangeCheck::IsBinOpMonotonicallyIncreasing] [%06d], [%06d]\n", Compiler::dspTreeID(op1),
Compiler::dspTreeID(op2));
// Check if we have a var + const.
if (op2->OperGet() == GT_LCL_VAR)
{
jitstd::swap(op1, op2);
}
if (op1->OperGet() != GT_LCL_VAR)
{
JITDUMP("Not monotonic because op1 is not lclVar.\n");
return false;
}
switch (op2->OperGet())
{
case GT_LCL_VAR:
// When adding two local variables, we also must ensure that any constant is non-negative.
return IsMonotonicallyIncreasing(op1, true) && IsMonotonicallyIncreasing(op2, true);
case GT_CNS_INT:
return (op2->AsIntConCommon()->IconValue() >= 0) && IsMonotonicallyIncreasing(op1, false);
default:
JITDUMP("Not monotonic because expression is not recognized.\n");
return false;
}
}
示例5: JITDUMP
bool RangeCheck::IsBinOpMonotonicallyIncreasing(GenTreePtr op1, GenTreePtr op2, genTreeOps oper, SearchPath* path)
{
JITDUMP("[RangeCheck::IsBinOpMonotonicallyIncreasing] %p, %p\n", dspPtr(op1), dspPtr(op2));
// Check if we have a var + const.
if (op2->OperGet() == GT_LCL_VAR)
{
jitstd::swap(op1, op2);
}
if (op1->OperGet() != GT_LCL_VAR)
{
JITDUMP("Not monotonic because op1 is not lclVar.\n");
return false;
}
switch (op2->OperGet())
{
case GT_LCL_VAR:
return IsMonotonicallyIncreasing(op1, path) &&
IsMonotonicallyIncreasing(op2, path);
case GT_CNS_INT:
return oper == GT_ADD && op2->AsIntConCommon()->IconValue() >= 0 &&
IsMonotonicallyIncreasing(op1, path);
default:
JITDUMP("Not monotonic because expression is not recognized.\n");
return false;
}
}
示例6: assert
void Rationalizer::RewriteAddress(LIR::Use& use)
{
assert(use.IsInitialized());
GenTreeUnOp* address = use.Def()->AsUnOp();
assert(address->OperGet() == GT_ADDR);
GenTree* location = address->gtGetOp1();
genTreeOps locationOp = location->OperGet();
if (location->IsLocal())
{
// We are changing the child from GT_LCL_VAR TO GT_LCL_VAR_ADDR.
// Therefore gtType of the child needs to be changed to a TYP_BYREF
#ifdef DEBUG
if (locationOp == GT_LCL_VAR)
{
JITDUMP("Rewriting GT_ADDR(GT_LCL_VAR) to GT_LCL_VAR_ADDR:\n");
}
else
{
assert(locationOp == GT_LCL_FLD);
JITDUMP("Rewriting GT_ADDR(GT_LCL_FLD) to GT_LCL_FLD_ADDR:\n");
}
#endif // DEBUG
location->SetOper(addrForm(locationOp));
location->gtType = TYP_BYREF;
copyFlags(location, address, GTF_ALL_EFFECT);
use.ReplaceWith(comp, location);
BlockRange().Remove(address);
}
else if (locationOp == GT_CLS_VAR)
{
location->SetOper(GT_CLS_VAR_ADDR);
location->gtType = TYP_BYREF;
copyFlags(location, address, GTF_ALL_EFFECT);
use.ReplaceWith(comp, location);
BlockRange().Remove(address);
JITDUMP("Rewriting GT_ADDR(GT_CLS_VAR) to GT_CLS_VAR_ADDR:\n");
}
else if (location->OperIsIndir())
{
use.ReplaceWith(comp, location->gtGetOp1());
BlockRange().Remove(location);
BlockRange().Remove(address);
JITDUMP("Rewriting GT_ADDR(GT_IND(X)) to X:\n");
}
DISPTREERANGE(BlockRange(), use.Def());
JITDUMP("\n");
}
示例7: JITDUMP
void Compiler::optDumpCopyPropStack(LclNumToGenTreePtrStack* curSsaName)
{
JITDUMP("{ ");
for (LclNumToGenTreePtrStack::KeyIterator iter = curSsaName->Begin(); !iter.Equal(curSsaName->End()); ++iter)
{
GenTree* node = iter.GetValue()->Index(0);
JITDUMP("%d-[%06d]:V%02u ", iter.Get(), dspTreeID(node), node->AsLclVarCommon()->gtLclNum);
}
JITDUMP("}\n\n");
}
示例8: address
//------------------------------------------------------------------------
// DecomposeInd: Decompose GT_IND.
//
// Arguments:
// use - the LIR::Use object for the def that needs to be decomposed.
//
// Return Value:
// The next node to process.
//
GenTree* DecomposeLongs::DecomposeInd(LIR::Use& use)
{
GenTree* indLow = use.Def();
LIR::Use address(Range(), &indLow->gtOp.gtOp1, indLow);
address.ReplaceWithLclVar(m_compiler, m_blockWeight);
JITDUMP("[DecomposeInd]: Saving addr tree to a temp var:\n");
DISPTREERANGE(Range(), address.Def());
// Change the type of lower ind.
indLow->gtType = TYP_INT;
// Create tree of ind(addr+4)
GenTreePtr addrBase = indLow->gtGetOp1();
GenTreePtr addrBaseHigh = new (m_compiler, GT_LCL_VAR)
GenTreeLclVar(GT_LCL_VAR, addrBase->TypeGet(), addrBase->AsLclVarCommon()->GetLclNum(), BAD_IL_OFFSET);
GenTreePtr addrHigh =
new (m_compiler, GT_LEA) GenTreeAddrMode(TYP_REF, addrBaseHigh, nullptr, 0, genTypeSize(TYP_INT));
GenTreePtr indHigh = new (m_compiler, GT_IND) GenTreeIndir(GT_IND, TYP_INT, addrHigh, nullptr);
m_compiler->lvaIncRefCnts(addrBaseHigh);
Range().InsertAfter(indLow, addrBaseHigh, addrHigh, indHigh);
return FinalizeDecomposition(use, indLow, indHigh);
}
示例9: printf
void RangeCheck::Widen(BasicBlock* block, GenTreePtr stmt, GenTreePtr tree, SearchPath* path, Range* pRange)
{
#ifdef DEBUG
if (m_pCompiler->verbose)
{
printf("[RangeCheck::Widen] BB%02d, \n", block->bbNum);
Compiler::printTreeID(tree);
printf("\n");
}
#endif // DEBUG
Range& range = *pRange;
// Try to deduce the lower bound, if it is not known already.
if (range.LowerLimit().IsDependent() || range.LowerLimit().IsUnknown())
{
// To determine the lower bound, ask if the loop increases monotonically.
bool increasing = IsMonotonicallyIncreasing(tree, path);
JITDUMP("IsMonotonicallyIncreasing %d", increasing);
if (increasing)
{
GetRangeMap()->RemoveAll();
*pRange = GetRange(block, stmt, tree, path, true DEBUGARG(0));
}
}
}
示例10: JITDUMP
//--------------------------------------------------------------------------------------------------
// CancelLoopOptInfo - Cancel loop cloning optimization for this loop.
//
// Arguments:
// loopNum the loop index.
//
// Return Values:
// None.
//
void LoopCloneContext::CancelLoopOptInfo(unsigned loopNum)
{
JITDUMP("Cancelling loop cloning for loop L_%02u\n", loopNum);
optInfo[loopNum] = nullptr;
if (conditions[loopNum] != nullptr)
{
conditions[loopNum]->Reset();
conditions[loopNum] = nullptr;
}
}
示例11: JITDUMP
void CodeGen::UnspillFloat(RegSet::SpillDsc *spillDsc)
{
JITDUMP("UnspillFloat() for SpillDsc [%08p]\n", dspPtr(spillDsc));
RemoveSpillDsc(spillDsc);
UnspillFloatMachineDep(spillDsc);
RegSet::SpillDsc::freeDsc(®Set, spillDsc);
compiler->tmpRlsTemp(spillDsc->spillTemp);
}
示例12: assert
//------------------------------------------------------------------------
// LowerCast: Lower GT_CAST(srcType, DstType) nodes.
//
// Arguments:
// tree - GT_CAST node to be lowered
//
// Return Value:
// None.
//
// Notes:
// Casts from float/double to a smaller int type are transformed as follows:
// GT_CAST(float/double, byte) = GT_CAST(GT_CAST(float/double, int32), byte)
// GT_CAST(float/double, sbyte) = GT_CAST(GT_CAST(float/double, int32), sbyte)
// GT_CAST(float/double, int16) = GT_CAST(GT_CAST(double/double, int32), int16)
// GT_CAST(float/double, uint16) = GT_CAST(GT_CAST(double/double, int32), uint16)
//
// Note that for the overflow conversions we still depend on helper calls and
// don't expect to see them here.
// i) GT_CAST(float/double, int type with overflow detection)
//
void Lowering::LowerCast(GenTree* tree)
{
assert(tree->OperGet() == GT_CAST);
JITDUMP("LowerCast for: ");
DISPNODE(tree);
JITDUMP("\n");
GenTreePtr op1 = tree->gtOp.gtOp1;
var_types dstType = tree->CastToType();
var_types srcType = genActualType(op1->TypeGet());
var_types tmpType = TYP_UNDEF;
if (varTypeIsFloating(srcType))
{
noway_assert(!tree->gtOverflow());
}
assert(!varTypeIsSmall(srcType));
// case of src is a floating point type and dst is a small type.
if (varTypeIsFloating(srcType) && varTypeIsSmall(dstType))
{
NYI_ARM("Lowering for cast from float to small type"); // Not tested yet.
tmpType = TYP_INT;
}
if (tmpType != TYP_UNDEF)
{
GenTreePtr tmp = comp->gtNewCastNode(tmpType, op1, tmpType);
tmp->gtFlags |= (tree->gtFlags & (GTF_UNSIGNED | GTF_OVERFLOW | GTF_EXCEPT));
tree->gtFlags &= ~GTF_UNSIGNED;
tree->gtOp.gtOp1 = tmp;
BlockRange().InsertAfter(op1, tmp);
}
// Now determine if we have operands that should be contained.
ContainCheckCast(tree->AsCast());
}
示例13: RewriteAssignmentIntoStoreLclCore
static void RewriteAssignmentIntoStoreLclCore(GenTreeOp* assignment,
GenTree* location,
GenTree* value,
genTreeOps locationOp)
{
assert(assignment != nullptr);
assert(assignment->OperGet() == GT_ASG);
assert(location != nullptr);
assert(value != nullptr);
genTreeOps storeOp = storeForm(locationOp);
#ifdef DEBUG
JITDUMP("rewriting asg(%s, X) to %s(X)\n", GenTree::NodeName(locationOp), GenTree::NodeName(storeOp));
#endif // DEBUG
assignment->SetOper(storeOp);
GenTreeLclVarCommon* store = assignment->AsLclVarCommon();
GenTreeLclVarCommon* var = location->AsLclVarCommon();
store->SetLclNum(var->gtLclNum);
store->SetSsaNum(var->gtSsaNum);
if (locationOp == GT_LCL_FLD)
{
store->gtLclFld.gtLclOffs = var->gtLclFld.gtLclOffs;
store->gtLclFld.gtFieldSeq = var->gtLclFld.gtFieldSeq;
}
copyFlags(store, var, GTF_LIVENESS_MASK);
store->gtFlags &= ~GTF_REVERSE_OPS;
store->gtType = var->TypeGet();
store->gtOp1 = value;
DISPNODE(store);
JITDUMP("\n");
}
示例14: assert
void Compiler::fgFixupArgTabEntryPtr(GenTreePtr parentCall, GenTreePtr oldArg, GenTreePtr newArg)
{
assert(parentCall != nullptr);
assert(oldArg != nullptr);
assert(newArg != nullptr);
JITDUMP("parent call was :\n");
DISPNODE(parentCall);
JITDUMP("old child was :\n");
DISPNODE(oldArg);
if (oldArg->gtFlags & GTF_LATE_ARG)
{
newArg->gtFlags |= GTF_LATE_ARG;
}
else
{
fgArgTabEntryPtr fp = Compiler::gtArgEntryByNode(parentCall, oldArg);
assert(fp->node == oldArg);
fp->node = newArg;
}
}
示例15: new
// Add the def location to the hash table.
void RangeCheck::SetDef(UINT64 hash, Location* loc)
{
if (m_pDefTable == nullptr)
{
m_pDefTable = new (m_pCompiler->getAllocator()) VarToLocMap(m_pCompiler->getAllocator());
}
#ifdef DEBUG
Location* loc2;
if (m_pDefTable->Lookup(hash, &loc2))
{
JITDUMP("Already have BB%02d, %08X, %08X for hash => %0I64X", loc2->block->bbNum, dspPtr(loc2->stmt), dspPtr(loc2->tree), hash);
assert(false);
}
#endif
m_pDefTable->Set(hash, loc);
}