U_32 IpfCfgCodeSelector::genExitNode(U_32 numInEdges, double cnt) { BbNode *node = new(mm) BbNode(mm, opndManager->getNextNodeId(), (U_32) cnt); nodes.push_back(node); cfg.setExitNode(node); IPF_LOG << endl << " Generate Exit node" << node->getId() << endl << endl; return nodes.size()-1; }
U_32 IpfCfgCodeSelector::genBlock(U_32 numInEdges, U_32 numOutEdges, BlockKind blockKind, BlockCodeSelector &codeSelector, double cnt) { BbNode *node = new(mm) BbNode(mm, opndManager->getNextNodeId(), (U_32)cnt); nodes.push_back(node); if(blockKind == Prolog) cfg.setEnterNode(node); IPF_LOG << endl << " Generate BB node" << node->getId() << endl; IpfInstCodeSelector ipfInstCodeSelector(cfg, *node, opnds, compilationInterface); codeSelector.genCode(ipfInstCodeSelector); return nodes.size()-1; }