本文整理汇总了C++中tr::Block::getNextExtendedBlock方法的典型用法代码示例。如果您正苦于以下问题:C++ Block::getNextExtendedBlock方法的具体用法?C++ Block::getNextExtendedBlock怎么用?C++ Block::getNextExtendedBlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tr::Block
的用法示例。
在下文中一共展示了Block::getNextExtendedBlock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
// n2n icall foo <-- First Child
// n3n aloadi <vft> <-- Parent of Null Chk'd Node
// n4n aload O
// n4n ==> aload O
TR::Node *nodeBeingNullChkd = node->getNullCheckReference();
if (nodeBeingNullChkd)
{
TR::Node *firstChild = node->getFirstChild();
TR::Node *parentOfNullChkdNode = NULL;
if (firstChild->getOpCode().isCall() &&
firstChild->getOpCode().isIndirect())
{
parentOfNullChkdNode = firstChild->getFirstChild();
}
else
{
parentOfNullChkdNode = firstChild;
}
if (parentOfNullChkdNode &&
parentOfNullChkdNode->getOpCodeValue() == TR::aloadi &&
parentOfNullChkdNode->getNumChildren() > 0 &&
parentOfNullChkdNode->getFirstChild() == nodeBeingNullChkd)
{
unAnchorableAloadiNodes->set(parentOfNullChkdNode->getGlobalIndex());
traceMsg(comp, "GuardedStorage: Cannot anchor %p\n", firstChild);
}
}
}
else
{
bool shouldAnchorNode = false;
if (node->getOpCodeValue() == TR::aloadi &&
!unAnchorableAloadiNodes->isSet(node->getGlobalIndex()))
{
shouldAnchorNode = true;
}
else if (node->getOpCodeValue() == TR::aload &&
node->getSymbol()->isStatic() &&
node->getSymbol()->isCollectedReference())
{
shouldAnchorNode = true;
}
if (shouldAnchorNode)
{
TR::TreeTop* anchorTreeTop = TR::TreeTop::create(comp, TR::Node::create(TR::treetop, 1, node));
TR::TreeTop* appendTreeTop = iter.currentTree();
if (currentTreeTopToappendTreeTop.count(appendTreeTop) > 0)
{
appendTreeTop = currentTreeTopToappendTreeTop[appendTreeTop];
}
// Anchor the aload/aloadi before the current treetop
appendTreeTop->insertBefore(anchorTreeTop);
currentTreeTopToappendTreeTop[iter.currentTree()] = anchorTreeTop;
traceMsg(comp, "GuardedStorage: Anchored %p to treetop = %p\n", node, anchorTreeTop);
}
}
}
comp->getBitVectorPool().release(unAnchorableAloadiNodes);
}
if (cg->shouldBuildStructure() &&
(comp->getFlowGraph()->getStructure() != NULL))
{
TR_Structure *rootStructure = TR_RegionAnalysis::getRegions(comp);
comp->getFlowGraph()->setStructure(rootStructure);
}
phase->reportPhase(SetupForInstructionSelectionPhase);
// Dump preIR
if (comp->getOption(TR_TraceRegisterPressureDetails) && !comp->getOption(TR_DisableRegisterPressureSimulation))
{
traceMsg(comp, " { Post optimization register pressure simulation\n");
TR_BitVector emptyBitVector;
vcount_t vc = comp->incVisitCount();
cg->initializeRegisterPressureSimulator();
for (TR::Block *block = comp->getStartBlock(); block; block = block->getNextExtendedBlock())
{
TR_LinkHead<TR_RegisterCandidate> emptyCandidateList;
TR::CodeGenerator::TR_RegisterPressureState state(NULL, 0, emptyBitVector, emptyBitVector, &emptyCandidateList, cg->getNumberOfGlobalGPRs(), cg->getNumberOfGlobalFPRs(), cg->getNumberOfGlobalVRFs(), vc);
TR::CodeGenerator::TR_RegisterPressureSummary summary(state._gprPressure, state._fprPressure, state._vrfPressure);
cg->simulateBlockEvaluation(block, &state, &summary);
}
traceMsg(comp, " }\n");
}
TR::LexicalMemProfiler mp(phase->getName(), comp->phaseMemProfiler());
LexicalTimer pt(phase->getName(), comp->phaseTimer());
cg->setUpForInstructionSelection();
}