本文整理汇总了C++中IR::isMemoryRef方法的典型用法代码示例。如果您正苦于以下问题:C++ IR::isMemoryRef方法的具体用法?C++ IR::isMemoryRef怎么用?C++ IR::isMemoryRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IR
的用法示例。
在下文中一共展示了IR::isMemoryRef方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: collectUse
//Collect all USE, where USE is IR expression.
void MDSSAInfo::collectUse(
OUT DefSBitSetCore & set,
IN UseDefMgr * usedefmgr,
IN DefMiscBitSetMgr * bsmgr)
{
ASSERT0(usedefmgr && bsmgr);
SEGIter * iter = NULL;
Region * rg = usedefmgr->getRegion();
for (INT i = getVOpndSet()->get_first(&iter);
i >= 0; i = getVOpndSet()->get_next(i, &iter)) {
VMD * vopnd = (VMD*)usedefmgr->getVOpnd(i);
ASSERT0(vopnd && vopnd->is_md());
SEGIter * vit = NULL;
for (INT i2 = vopnd->getOccSet()->get_first(&vit);
i2 >= 0; i2 = vopnd->getOccSet()->get_next(i2, &vit)) {
IR * use = rg->getIR(i2);
ASSERT0(use && (use->isMemoryRef() || use->is_id()));
set.bunion(use->id(), *bsmgr);
}
}
}
示例2: dump
//
//START VMD
//
void VMD::dump(Region * rg, UseDefMgr * mgr)
{
if (g_tfile == NULL) { return; }
ASSERT0(is_md() && rg);
fprintf(g_tfile, "(MD%dV%d", mdid(), version());
//Dump Def
if (getDef() != NULL) {
ASSERT0(!getDef()->is_phi());
if (getDef()->getPrev() != NULL) {
fprintf(g_tfile, ",PrevDEF:MD%dV%d",
getDef()->getPrev()->getResult()->mdid(),
getDef()->getPrev()->getResult()->version());
} else {
fprintf(g_tfile, ",-");
}
if (getDef()->getNextSet() != NULL) {
SEGIter * nit = NULL;
bool first = true;
for (INT w = getDef()->getNextSet()->get_first(&nit);
w >= 0; w = getDef()->getNextSet()->get_next(w, &nit)) {
if (first) {
first = false;
} else {
fprintf(g_tfile, ",");
}
MDDef const* use = mgr->getMDDef(w);
ASSERT(use, ("not such MDDef"));
ASSERT0(use->getResult());
ASSERT(use->getPrev() == getDef(), ("insanity relation"));
fprintf(g_tfile, ",NextDEF:MD%dV%d",
use->getResult()->mdid(), use->getResult()->version());
}
}
} else {
fprintf(g_tfile, ",-");
}
fprintf(g_tfile, ")");
//Dump OccSet
fprintf(g_tfile, "|UsedBy:");
SEGIter * vit = NULL;
bool first = true;
for (INT i2 = getOccSet()->get_first(&vit);
i2 >= 0; i2 = getOccSet()->get_next(i2, &vit)) {
if (first) {
first = false;
} else {
fprintf(g_tfile, ",");
}
IR * use = rg->getIR(i2);
ASSERT0(use && (use->isMemoryRef() || use->is_id()));
fprintf(g_tfile, "%s(id:%d)", IRNAME(use), use->id());
}
fflush(g_tfile);
}