本文整理汇总了C++中BlockScopeRawPtr::getUpdated方法的典型用法代码示例。如果您正苦于以下问题:C++ BlockScopeRawPtr::getUpdated方法的具体用法?C++ BlockScopeRawPtr::getUpdated怎么用?C++ BlockScopeRawPtr::getUpdated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockScopeRawPtr
的用法示例。
在下文中一共展示了BlockScopeRawPtr::getUpdated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
int DepthFirstVisitor<Pre, OptVisitor>::visitScope(BlockScopeRawPtr scope) {
int updates, all_updates = 0;
StatementPtr stmt = scope->getStmt();
if (MethodStatementPtr m =
dynamic_pointer_cast<MethodStatement>(stmt)) {
do {
scope->clearUpdated();
StatementPtr rep = this->visitStmtRecur(stmt);
always_assert(!rep);
updates = scope->getUpdated();
all_updates |= updates;
} while (updates);
if (all_updates & BlockScope::UseKindCaller) {
all_updates &= ~BlockScope::UseKindCaller;
}
return all_updates;
}
do {
scope->clearUpdated();
StatementPtr rep = this->visitStmtRecur(stmt);
always_assert(!rep);
updates = scope->getUpdated();
all_updates |= updates;
} while (updates);
return all_updates;
}
示例2: lock
int DepthFirstVisitor<Pre, OptVisitor>::visitScope(BlockScopeRawPtr scope) {
int updates, all_updates = 0;
StatementPtr stmt = scope->getStmt();
if (MethodStatementPtr m =
dynamic_pointer_cast<MethodStatement>(stmt)) {
WriteLock lock(m->getFunctionScope()->getInlineMutex());
do {
scope->clearUpdated();
if (Option::LocalCopyProp || Option::EliminateDeadCode) {
AliasManager am(-1);
if (am.optimize(this->m_data.m_ar, m)) {
scope->addUpdates(BlockScope::UseKindCaller);
}
} else {
StatementPtr rep = this->visitStmtRecur(stmt);
always_assert(!rep);
}
updates = scope->getUpdated();
all_updates |= updates;
} while (updates);
if (all_updates & BlockScope::UseKindCaller &&
!m->getFunctionScope()->getInlineAsExpr()) {
all_updates &= ~BlockScope::UseKindCaller;
}
return all_updates;
}
do {
scope->clearUpdated();
StatementPtr rep = this->visitStmtRecur(stmt);
always_assert(!rep);
updates = scope->getUpdated();
all_updates |= updates;
} while (updates);
return all_updates;
}