void visit(SgNode *node) { SgAsmFunction *func = isSgAsmFunction(node); if (func && 0==func->get_name().compare("simple06")) { ++nvisits; CFG cfg = rose::BinaryAnalysis::ControlFlow().build_block_cfg_from_ast<CFG>(func); CFG_Vertex start = 0; assert(get(boost::vertex_name, cfg, start)==func->get_entry_block()); DG_RelMap dgmap1 = rose::BinaryAnalysis::Dominance().build_postdom_relation_from_cfg(cfg, start); DG_RelMap dgmap2 = MyDominance().build_postdom_relation_from_cfg(cfg, start); } }
void visit(SgNode *node) { SgAsmBlock *block = isSgAsmBlock(node); SgAsmFunction *func = block ? block->get_enclosing_function() : NULL; if (block && func) { if (block==func->get_entry_block()) { if (block->get_immediate_dominator()) { if (bad_blocks) bad_blocks->insert(block); failed = true; } } else { SgAsmBlock *idom = block->get_immediate_dominator(); if (!idom || idom->get_enclosing_function()!=func) { if (bad_blocks) bad_blocks->insert(block); failed = true; } } } }