本文整理汇总了C++中Dlist::push方法的典型用法代码示例。如果您正苦于以下问题:C++ Dlist::push方法的具体用法?C++ Dlist::push怎么用?C++ Dlist::push使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dlist
的用法示例。
在下文中一共展示了Dlist::push方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: El_frpize_sbs
/*
* FRPize a superblock using the if-converter
*/
void El_frpize_sbs(Procedure *f)
{
Basicblock *entry_bb;
Hyperblock *hb;
List_set<Basicblock*> hb_bbs;
Hash_set<Hyperblock*> all_hbs;
bool push_flag, applied;
Dlist<Region*> rstack;
Region *rtmp;
Compound_region *new_hb;
if (dbg(cpr, 2))
cdbg << "Enter frpize sbs" << endl;
// First find all the HBs in f and add them to set all_hbs
rstack.push(f);
while (! rstack.is_empty()) {
rtmp = rstack.pop();
push_flag = true;
if (rtmp->is_hb()) {
all_hbs += ((Hyperblock *) rtmp);
push_flag = false; // Only ops below, so don't waste time!
}
else if (rtmp->is_bb()) {
push_flag = false; // Only ops below, so don't waste time!
}
if (push_flag==true) {
for (Region_subregions subri(rtmp); subri!=0; subri++) {
if ((*subri)->is_compound())
rstack.push(*subri);
}
}
}
// Now walk thru hash_set and frpize it
applied = false;
for (Hash_set_iterator<Hyperblock*> hseti(all_hbs); hseti!=0; hseti++) {
hb = *hseti;
if (dbg(cpr, 2))
cdbg << "Processing HB " << hb->id() << endl;
if (! El_is_frpizable(hb)) {
if (dbg(cpr, 2))
cdbg << "\tHB " << hb->id() << " not frpizable" << endl;
continue;
}
hb_bbs.clear();
El_find_bbs_in_hb(hb, &entry_bb, hb_bbs);
El_remove_region(hb, false);
El_fprize_this_sb(f, entry_bb, hb_bbs);
new_hb = entry_bb->parent();
if (! new_hb->is_hb())
El_punt("El_frpize_sbs: HB not correctly inserted");
// Copy over id/flags/lcode_attrs from hb to new_hb
new_hb->set_id(hb->id());
delete new_hb->attributes;
new_hb->attributes = new Graph_attribute(*(hb->attributes)) ;
((Region *)new_hb)->copy_flags(hb);
// 1 of the flags will be the SB flag, so reset that one
new_hb->reset_flag(EL_REGION_SUPERBLOCK);
new_hb->set_flag(EL_REGION_HYPERBLOCK_FRP);
applied = true;
delete hb;
}
if (applied == true)
f->set_flag(EL_PROC_HYPERBLOCK);
}