RegionDescPtr selectHotCFG(HotTransContext& ctx, TransIDSet& selectedSet, TransIDVec* selectedVec /* = nullptr */) { ITRACE(1, "selectHotCFG: starting with maxBCInstrs = {}\n", ctx.maxBCInstrs); auto const region = DFS(ctx.profData, *ctx.cfg, selectedSet, selectedVec, ctx.maxBCInstrs, ctx.inlining) .formRegion(ctx.tid); if (region->empty()) return nullptr; ITRACE(3, "selectHotCFG: before region_prune_arcs:\n{}\n", show(*region)); region_prune_arcs(*region, ctx.inputTypes); ITRACE(3, "selectHotCFG: before chainRetransBlocks:\n{}\n", show(*region)); region->chainRetransBlocks(); // Relax the region guards. if (RuntimeOption::EvalRegionRelaxGuards) { ITRACE(3, "selectHotCFG: before optimizeProfiledGuards:\n{}\n", show(*region)); optimizeProfiledGuards(*region, *ctx.profData); } ITRACE(1, "selectHotCFG: final version after optimizeProfiledGuards:\n{}\n", show(*region)); return region; }
RegionDescPtr selectHotCFG(TransID head, const ProfData* profData, const TransCFG& cfg, TransIDSet& selectedSet, TransIDVec* selectedVec) { FTRACE(1, "selectHotCFG\n"); auto const region = DFS(profData, cfg, selectedSet, selectedVec) .formRegion(head); FTRACE(3, "selectHotCFG: before region_prune_arcs:\n{}\n", show(*region)); region_prune_arcs(*region); FTRACE(3, "selectHotCFG: before chainRetransBlocks:\n{}\n", show(*region)); region->chainRetransBlocks(); FTRACE(3, "selectHotCFG: after chainRetransBlocks:\n{}\n", show(*region)); return region; }