VG_(tool_panic)("host/guest word size mismatch");
}
- /* Set up BB, including copying of the where-next stuff. */
- cgs.bbOut = emptyIRBB();
- cgs.bbOut->tyenv = dopyIRTypeEnv(tyenv);
- tl_assert( isIRAtom(bbIn->next) );
- cgs.bbOut->next = dopyIRExpr(bbIn->next);
- cgs.bbOut->jumpkind = bbIn->jumpkind;
+ // Set up new BB
+ cgs.bbOut = dopyIRBBExceptStmts(bbIn);
// Copy verbatim any IR preamble preceding the first IMark
i = 0;
CLG_DEBUG(3, "+ instrument(BB %p)\n", (Addr)closure->readdr);
/* Set up BB for instrumented IR */
- bbOut = emptyIRBB();
- bbOut->tyenv = dopyIRTypeEnv(bbIn->tyenv);
- bbOut->next = dopyIRExpr(bbIn->next);
- bbOut->jumpkind = bbIn->jumpkind;
+ bbOut = dopyIRBBExceptStmts(bbIn);
// Copy verbatim any IR preamble preceding the first IMark
i = 0;
}
/* Set up BB */
- bbOut = emptyIRBB();
- bbOut->tyenv = dopyIRTypeEnv(bbIn->tyenv);
- bbOut->next = dopyIRExpr(bbIn->next);
- bbOut->jumpkind = bbIn->jumpkind;
+ bbOut = dopyIRBBExceptStmts(bbIn);
// Copy verbatim any IR preamble preceding the first IMark
i = 0;
tl_assert(sizeof(Int) == 4);
/* Set up BB */
- bb = emptyIRBB();
- bb->tyenv = dopyIRTypeEnv(bb_in->tyenv);
- bb->next = dopyIRExpr(bb_in->next);
- bb->jumpkind = bb_in->jumpkind;
+ bb = dopyIRBBExceptStmts(bb_in);
/* Set up the running environment. Only .bb is modified as we go
along. */