本文整理汇总了C++中tr::Block::getSuccessors方法的典型用法代码示例。如果您正苦于以下问题:C++ Block::getSuccessors方法的具体用法?C++ Block::getSuccessors怎么用?C++ Block::getSuccessors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tr::Block
的用法示例。
在下文中一共展示了Block::getSuccessors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: collectColdPathLoads
/**
* Search for direct loads in the taken side of a guard
*
* @param firstBlock The guard's branch destination
* @param coldPathLoads BitVector of symbol reference numbers for any direct loads seen until the merge back to mainline
*/
static void collectColdPathLoads(TR::Block* firstBlock, TR_BitVector &coldPathLoads)
{
TR_Stack<TR::Block*> blocksToCheck(TR::comp()->trMemory(), 8, false, stackAlloc);
blocksToCheck.push(firstBlock);
TR::NodeChecklist checklist(TR::comp());
coldPathLoads.empty();
while (!blocksToCheck.isEmpty())
{
TR::Block *block = blocksToCheck.pop();
for (TR::TreeTop *tt = block->getFirstRealTreeTop(); tt->getNode()->getOpCodeValue() != TR::BBEnd; tt = tt->getNextTreeTop())
collectDirectLoads(tt->getNode(), coldPathLoads, checklist);
// Search for any successors that have not merged with the mainline
for (auto itr = block->getSuccessors().begin(), end = block->getSuccessors().end(); itr != end; ++itr)
{
TR::Block *dest = (*itr)->getTo()->asBlock();
if (dest != TR::comp()->getFlowGraph()->getEnd() && dest->getPredecessors().size() == 1)
blocksToCheck.push(dest);
}
}
}