//All global prs must be mapped. bool DEX_REGION::verify_ra_res(RA & ra, PRNO2UINT & prno2v) { GLTM * gltm = ra.get_gltm(); SVECTOR<GLT*> * gltv = gltm->get_gltvec(); for (UINT i = 0; i < gltm->get_num_of_glt(); i++) { GLT * g = gltv->get(i); if (g == NULL) { continue; } IS_TRUE0(g->has_allocated()); if (GLT_bbs(g) == NULL) { //parameter may be have no occ. continue; } bool find; prno2v.get(GLT_prno(g), &find); IS_TRUE0(find); } IR_BB_LIST * bbl = get_bb_list(); for (IR_BB * bb = bbl->get_head(); bb != NULL; bb = bbl->get_next()) { LTM * ltm = gltm->map_bb2ltm(bb); if (ltm == NULL) { continue; } SVECTOR<LT*> * lvec = ltm->get_lt_vec(); for (INT i = 0; i <= lvec->get_last_idx(); i++) { LT * l = lvec->get(i); if (l == NULL) { continue; } IS_TRUE0(l->has_allocated()); bool find; prno2v.get(LT_prno(l), &find); IS_TRUE0(find); } } return true; }
//All global prs must be mapped. bool DexRegion::verifyRAresult(RA & ra, Prno2Vreg & prno2v) { GltMgr * gltm = ra.get_gltm(); Vector<GLT*> * gltv = gltm->get_gltvec(); for (UINT i = 0; i < gltm->get_num_of_glt(); i++) { GLT * g = gltv->get(i); if (g == NULL) { continue; } ASSERT0(g->has_allocated()); if (GLT_bbs(g) == NULL) { //parameter may be have no occ. continue; } bool find; prno2v.get(GLT_prno(g), &find); ASSERT0(find); } BBList * bbl = getBBList(); for (IRBB * bb = bbl->get_head(); bb != NULL; bb = bbl->get_next()) { LTMgr * ltm = gltm->map_bb2ltm(bb); if (ltm == NULL) { continue; } Vector<LT*> * lvec = ltm->get_lt_vec(); for (INT i = 0; i <= lvec->get_last_idx(); i++) { LT * l = lvec->get(i); if (l == NULL) { continue; } ASSERT0(l->has_allocated()); bool find; prno2v.get(LT_prno(l), &find); ASSERT0(find); } } return true; }