本文整理汇总了C++中tr::Register::incTotalUseCount方法的典型用法代码示例。如果您正苦于以下问题:C++ Register::incTotalUseCount方法的具体用法?C++ Register::incTotalUseCount怎么用?C++ Register::incTotalUseCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tr::Register
的用法示例。
在下文中一共展示了Register::incTotalUseCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assignRegisters
void TR_OutlinedInstructions::assignRegisters(TR_RegisterKinds kindsToBeAssigned, TR::X86VFPSaveInstruction *vfpSaveInstruction)
{
if (hasBeenRegisterAssigned())
return;
// nested internal control flow assert:
_cg->setInternalControlFlowSafeNestingDepth(_cg->internalControlFlowNestingDepth());
// Create a dependency list on the first instruction in this stream that captures all
// current real register associations. This is necessary to get the register assigner
// back into its original state before the helper stream was processed.
//
TR::RegisterDependencyConditions *liveRealRegDeps = _cg->machine()->createDepCondForLiveGPRs();
_firstInstruction->setDependencyConditions(liveRealRegDeps);
#if 0
// If the outlined section jumps back to a section that's expecting a certain register
// state then add register dependencies on the exit branch to set that state.
//
if (_postDependencyMergeList)
{
TR::RegisterDependencyConditions *mergeDeps = _postDependencyMergeList->clone(_cg);
TR_ASSERT(_appendInstruction->getDependencyConditions() == NULL, "unexpected reg deps on OOL append instruction");
_appendInstruction->setDependencyConditions(mergeDeps);
TR_X86RegisterDependencyGroup *depGroup = mergeDeps->getPostConditions();
for (int32_t i=0; i<mergeDeps->getNumPostConditions(); i++)
{
TR::RegisterDependency *dependency = depGroup->getRegisterDependency(i);
TR::Register *virtReg = dependency->getRegister();
virtReg->incTotalUseCount();
virtReg->incFutureUseCount();
#ifdef DEBUG
// Ensure all register dependencies have been assigned.
//
TR_ASSERT(dependency->getRealRegister() != TR::RealRegister::NoReg, "unassigned merge dep register");
TR_ASSERT(virtReg->getAssignedRealRegister() == _cg->machine()->getX86RealRegister(dependency->getRealRegister()), "unexpected(?) register assignment");
#endif
}
}
#endif
// TODO:AMD64: Fix excessive register assignment exchanges in outlined instruction dispatch.
// Ensure correct VFP state at the start of the outlined instruction sequence.
//
generateVFPRestoreInstruction(comp()->getAppendInstruction(), vfpSaveInstruction, _cg);
// Link in the helper stream into the mainline code.
//
TR::Instruction *appendInstruction = comp()->getAppendInstruction();
appendInstruction->setNext(_firstInstruction);
_firstInstruction->setPrev(appendInstruction);
comp()->setAppendInstruction(_appendInstruction);
// Register assign the helper dispatch instructions.
//
_cg->doBackwardsRegisterAssignment(kindsToBeAssigned, _appendInstruction, appendInstruction);
// Returning to mainline, reset this counter
_cg->setInternalControlFlowSafeNestingDepth(0);
setHasBeenRegisterAssigned(true);
}