本文整理汇总了C++中PEdge::IncRef方法的典型用法代码示例。如果您正苦于以下问题:C++ PEdge::IncRef方法的具体用法?C++ PEdge::IncRef怎么用?C++ PEdge::IncRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEdge
的用法示例。
在下文中一共展示了PEdge::IncRef方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CopyCFGPointsEdges
void CopyCFGPointsEdges(BlockCFG *old_cfg, BlockCFG *new_cfg)
{
// duplicate the CFG's points list.
for (size_t pind = 0; pind < old_cfg->GetPointCount(); pind++) {
Location *loc = old_cfg->GetPointLocation(pind + 1);
loc->IncRef();
new_cfg->AddPoint(loc);
}
// set the entry/exit points.
new_cfg->SetEntryPoint(old_cfg->GetEntryPoint());
new_cfg->SetExitPoint(old_cfg->GetExitPoint());
// duplicate the CFG's loop heads list.
for (size_t lind = 0; lind < old_cfg->GetLoopHeadCount(); lind++) {
const LoopHead &head = old_cfg->GetLoopHead(lind);
if (head.end_location)
head.end_location->IncRef();
new_cfg->AddLoopHead(head.point, head.end_location);
}
// duplicate the CFG's edges list.
for (size_t eind = 0; eind < old_cfg->GetEdgeCount(); eind++) {
PEdge *edge = old_cfg->GetEdge(eind);
edge->IncRef();
new_cfg->AddEdge(edge);
}
}