]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Use the newly-added dopyIRBBExceptStmts() in tools.
authorNicholas Nethercote <njn@valgrind.org>
Sat, 25 Nov 2006 22:38:11 +0000 (22:38 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sat, 25 Nov 2006 22:38:11 +0000 (22:38 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6372

cachegrind/cg_main.c
callgrind/main.c
lackey/lk_main.c
memcheck/mc_translate.c

index e1ccc41e6d9d0c75d43cbbbad34455573bcde5c0..f61c801ccdbebe9f2685951f9b85949a8d0b4cfa 100644 (file)
@@ -724,12 +724,8 @@ IRBB* cg_instrument ( VgCallbackClosure* closure,
       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;
index 4b54ef57d6ca394ff4d4ae9cd474efb2bf86cb46..4bae4e022bd13067361d661a822d3394f13697d8 100644 (file)
@@ -530,10 +530,7 @@ IRBB* CLG_(instrument)( VgCallbackClosure* closure,
    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;
index c85638b5035830fda1d7ea762f1a905487fc8280..4a8745d0c1a5461430f8ebef46e320efc194f175 100644 (file)
@@ -560,10 +560,7 @@ IRBB* lk_instrument ( VgCallbackClosure* closure,
    }
 
    /* 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;
index 5e9cc84acc6d816c6dc2cd28d7cf50beb8242f3e..ac38e5e2b9e39eca242d81a8f43c01127a31fbd6 100644 (file)
@@ -3257,10 +3257,7 @@ IRBB* MC_(instrument) ( VgCallbackClosure* closure,
    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. */