]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
More IRBB -> IRSB renaming.
authorJulian Seward <jseward@acm.org>
Tue, 6 Feb 2007 01:52:52 +0000 (01:52 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 6 Feb 2007 01:52:52 +0000 (01:52 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1734

VEX/priv/guest-generic/bb_to_IR.c
VEX/priv/ir/iropt.c
VEX/pub/libvex.h
VEX/pub/libvex_ir.h
VEX/test_main.c

index a36608915fd07b5476be393fc6f446b0ad3d732f..39d0a9cff79f0241ea9b360545a50efe40fb4e2e 100644 (file)
@@ -62,7 +62,7 @@ static Bool const_False ( void* callback_opaque, Addr64 a ) {
 }
 
 /* Disassemble a complete basic block, starting at guest_IP_start, 
-   returning a new IRBB.  The disassembler may chase across basic
+   returning a new IRSB.  The disassembler may chase across basic
    block boundaries if it wishes and if chase_into_ok allows it.
    The precise guest address ranges from which code has been taken
    are written into vge.  guest_IP_bbstart is taken to be the IP in
@@ -77,7 +77,7 @@ static Bool const_False ( void* callback_opaque, Addr64 a ) {
 
    preamble_function is a callback which allows the caller to add
    its own IR preamble (following the self-check, if any).  May be
-   NULL.  If non-NULL, the IRBB under construction is handed to 
+   NULL.  If non-NULL, the IRSB under construction is handed to 
    this function, which presumably adds IR statements to it.  The
    callback may optionally complete the block and direct bb_to_IR
    not to disassemble any instructions into it; this is indicated
index 9a2d958835cfbe684b15ebcce6631090a17fa6ea..40c7888163c089f74f62a632f25de0dab68875ab 100644 (file)
@@ -59,7 +59,7 @@
 
 /* What iropt does, 29 Dec 04.
 
-   It takes an IRBB and produces a new one with the same meaning,
+   It takes an IRSB and produces a new one with the same meaning,
    defined thus:
 
    After execution of the new BB, all guest state and guest memory is
index 3e7786b1794abe8101075c1419aa89e4f9c60c20..0d5a3377c0d0529c21c1048941ab43501c7ab5e9 100644 (file)
@@ -458,7 +458,7 @@ typedef
       /* IN: optionally, a callback which allows the caller to add its
          own IR preamble following the self-check and any other
          VEX-generated preamble, if any.  May be NULL.  If non-NULL,
-         the IRBB under construction is handed to this function, which
+         the IRSB under construction is handed to this function, which
          presumably adds IR statements to it.  The callback may
          optionally complete the block and direct bb_to_IR not to
          disassemble any instructions into it; this is indicated by
index 436df5264a8bbd2384aa13644c6555d6c60152e8..f781ed8e88c39731f834866676816ea7abb5a1b3 100644 (file)
 #include "libvex_basictypes.h"
 
    
-// Possible name changes?
-// - Tmp     -> AssignTmp  (Tmp statements only, not Tmp expressions)
-// - IRBB    -> IRSB (superblock)?  IRB?  IRCB (code block)?
-// - dopyFoo -> copyFoo
-// - sopyFoo -> shallowCopyFoo (there's only one sopyFoo function)
-
-
 /*---------------------------------------------------------------*/
 /*--- High-level IR description                               ---*/
 /*---------------------------------------------------------------*/
 
    - deepCopyIRFoo is a deep copy constructor for IRFoos. 
      It recursively traverses the entire argument tree and
-     produces a complete new tree.
+     produces a complete new tree.  All types have a deep copy
+     constructor.
 
    - shallowCopyIRFoo is the shallow copy constructor for IRFoos.
      It creates a new top-level copy of the supplied object,
-     but does not copy any sub-objects.
+     but does not copy any sub-objects.  Only some types have a
+     shallow copy constructor.
 */
 
 /* ------------------ Types ------------------ */
index c28c5cac9c19a398b3e9f822e9106a0e34c823b5..8ca122f04063f39ddc946d2709eb8e0bfb9601f4 100644 (file)
@@ -49,8 +49,8 @@ static Bool verbose = True;
 
 /* Forwards */
 #if 0 /* UNUSED */
-static IRBB* ac_instrument ( IRBB*, VexGuestLayout*, IRType );
-static IRBB* mc_instrument ( IRBB*, VexGuestLayout*, IRType, IRType );
+static IRSB* ac_instrument ( IRSB*, VexGuestLayout*, IRType );
+static IRSB* mc_instrument ( IRSB*, VexGuestLayout*, IRType, IRType );
 #endif
 
 static Bool chase_into_not_ok ( void* opaque, Addr64 dst ) { return False; }
@@ -230,7 +230,7 @@ void panic ( HChar* s )
 }
 
 static
-IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
+IRSB* ac_instrument (IRSB* bb_in, VexGuestLayout* layout, IRType hWordTy )
 {
 /* Use this rather than eg. -1 because it's a UInt. */
 #define INVALID_DATA_SIZE   999999
@@ -244,7 +244,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
    Bool needSz;
 
    /* Set up BB */
-   IRBB* bb     = emptyIRBB();
+   IRSB* bb     = emptyIRSB();
    bb->tyenv    = dopyIRTypeEnv(bb_in->tyenv);
    bb->next     = dopyIRExpr(bb_in->next);
    bb->jumpkind = bb_in->jumpkind;
@@ -276,7 +276,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
                                                   needSz = True; break;
                }
                if (needSz) {
-                  addStmtToIRBB( 
+                  addStmtToIRSB( 
                      bb,
                      IRStmt_Dirty(
                         unsafeIRDirty_0_N( helper->regparms, 
@@ -284,7 +284,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
                                            mkIRExprVec_2(addr, mkIRExpr_HWord(sz)))
                   ));
                } else {
-                  addStmtToIRBB( 
+                  addStmtToIRSB( 
                      bb,
                      IRStmt_Dirty(
                         unsafeIRDirty_0_N( helper->regparms, 
@@ -314,7 +314,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
                                                needSz = True; break;
             }
             if (needSz) {
-               addStmtToIRBB( 
+               addStmtToIRSB( 
                   bb,
                   IRStmt_Dirty(
                      unsafeIRDirty_0_N( helper->regparms, 
@@ -322,7 +322,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
                                         mkIRExprVec_2(addr, mkIRExpr_HWord(sz)))
                ));
             } else {
-               addStmtToIRBB( 
+               addStmtToIRSB( 
                   bb,
                   IRStmt_Dirty(
                      unsafeIRDirty_0_N( helper->regparms,
@@ -360,7 +360,7 @@ IRBB* ac_instrument (IRBB* bb_in, VexGuestLayout* layout, IRType hWordTy )
             panic("addrcheck: unhandled IRStmt");
       }
 
-      addStmtToIRBB( bb, dopyIRStmt(st));
+      addStmtToIRSB( bb, dopyIRStmt(st));
    }
 
    return bb;
@@ -463,7 +463,7 @@ static IRExpr* expr2vbits ( struct _MCEnv* mce, IRExpr* e );
 typedef
    struct _MCEnv {
       /* MODIFIED: the bb being constructed.  IRStmts are added. */
-      IRBB* bb;
+      IRSB* bb;
 
       /* MODIFIED: a table [0 .. #temps_in_original_bb-1] which maps
          original temps to their current their current shadow temp.
@@ -631,11 +631,11 @@ static IRExpr* definedOfType ( IRType ty ) {
 
 /* assign value to tmp */
 #define assign(_bb,_tmp,_expr)   \
-   addStmtToIRBB((_bb), IRStmt_Tmp((_tmp),(_expr)))
+   addStmtToIRSB((_bb), IRStmt_Tmp((_tmp),(_expr)))
 
 /* add stmt to a bb */
 #define stmt(_bb,_stmt)    \
-   addStmtToIRBB((_bb), (_stmt))
+   addStmtToIRSB((_bb), (_stmt))
 
 /* build various kinds of expressions */
 #define binop(_op, _arg1, _arg2) IRExpr_Binop((_op),(_arg1),(_arg2))
@@ -2506,7 +2506,7 @@ static Bool checkForBogusLiterals ( /*FLAT*/ IRStmt* st )
    }
 }
 
-IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout, 
+IRSB* mc_instrument ( IRSB* bb_in, VexGuestLayout* layout, 
                       IRType gWordTy, IRType hWordTy )
 {
    Bool verboze = False; //True; 
@@ -2518,7 +2518,7 @@ IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout,
    MCEnv mce;
 
    /* Set up BB */
-   IRBB* bb     = emptyIRBB();
+   IRSB* bb     = emptyIRSB();
    bb->tyenv    = dopyIRTypeEnv(bb_in->tyenv);
    bb->next     = dopyIRExpr(bb_in->next);
    bb->jumpkind = bb_in->jumpkind;
@@ -2616,7 +2616,7 @@ IRBB* mc_instrument ( IRBB* bb_in, VexGuestLayout* layout,
          VG_(printf)("\n");
       }
 
-      addStmtToIRBB(bb, st);
+      addStmtToIRSB(bb, st);
 
    }