More IRBB -> IRSB renaming.
git-svn-id: svn://svn.valgrind.org/vex/trunk@1734 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/priv/guest-generic/bb_to_IR.c b/priv/guest-generic/bb_to_IR.c
index a366089..39d0a9c 100644
--- a/priv/guest-generic/bb_to_IR.c
+++ b/priv/guest-generic/bb_to_IR.c
@@ -62,7 +62,7 @@
}
/* 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 @@
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
diff --git a/priv/ir/iropt.c b/priv/ir/iropt.c
index 9a2d958..40c7888 100644
--- a/priv/ir/iropt.c
+++ b/priv/ir/iropt.c
@@ -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
diff --git a/pub/libvex.h b/pub/libvex.h
index 3e7786b..0d5a337 100644
--- a/pub/libvex.h
+++ b/pub/libvex.h
@@ -458,7 +458,7 @@
/* 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
diff --git a/pub/libvex_ir.h b/pub/libvex_ir.h
index 436df52..f781ed8 100644
--- a/pub/libvex_ir.h
+++ b/pub/libvex_ir.h
@@ -50,13 +50,6 @@
#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 ---*/
/*---------------------------------------------------------------*/
@@ -221,11 +214,13 @@
- 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 ------------------ */
diff --git a/test_main.c b/test_main.c
index c28c5ca..8ca122f 100644
--- a/test_main.c
+++ b/test_main.c
@@ -49,8 +49,8 @@
/* 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 @@
}
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 @@
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 @@
needSz = True; break;
}
if (needSz) {
- addStmtToIRBB(
+ addStmtToIRSB(
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,
@@ -284,7 +284,7 @@
mkIRExprVec_2(addr, mkIRExpr_HWord(sz)))
));
} else {
- addStmtToIRBB(
+ addStmtToIRSB(
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,
@@ -314,7 +314,7 @@
needSz = True; break;
}
if (needSz) {
- addStmtToIRBB(
+ addStmtToIRSB(
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,
@@ -322,7 +322,7 @@
mkIRExprVec_2(addr, mkIRExpr_HWord(sz)))
));
} else {
- addStmtToIRBB(
+ addStmtToIRSB(
bb,
IRStmt_Dirty(
unsafeIRDirty_0_N( helper->regparms,
@@ -360,7 +360,7 @@
panic("addrcheck: unhandled IRStmt");
}
- addStmtToIRBB( bb, dopyIRStmt(st));
+ addStmtToIRSB( bb, dopyIRStmt(st));
}
return bb;
@@ -463,7 +463,7 @@
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 @@
/* 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 @@
}
}
-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 @@
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 @@
VG_(printf)("\n");
}
- addStmtToIRBB(bb, st);
+ addStmtToIRSB(bb, st);
}