]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge, from CGTUNE branch, r1774:
authorJulian Seward <jseward@acm.org>
Tue, 28 Aug 2007 06:06:27 +0000 (06:06 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 28 Aug 2007 06:06:27 +0000 (06:06 +0000)
Vex-side changes to allow tools to provide a final_tidy function which
they can use to mess with the final post-tree-built IR before it is
handed off to instruction selection.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1782

VEX/priv/main/vex_main.c
VEX/pub/libvex.h

index 9fabf701078f05042f684471a09af7ebe7022e8c..9e3ba20800941926322cab4c082bdaa09180bc95 100644 (file)
@@ -544,6 +544,10 @@ VexTranslateResult LibVEX_Translate ( VexTranslateArgs* vta )
       also throws away any dead bindings. */
    ado_treebuild_BB( irsb );
 
+   if (vta->finaltidy) {
+      irsb = vta->finaltidy(irsb);
+   }
+
    vexAllocSanityCheck();
 
    if (vex_traceflags & VEX_TRACE_TREES) {
index 0d5a3377c0d0529c21c1048941ab43501c7ab5e9..bb1087157a03344c82598379c07fe6b3c2360015 100644 (file)
@@ -452,6 +452,8 @@ typedef
                                VexGuestExtents*,
                                IRType gWordTy, IRType hWordTy );
 
+      IRSB* (*finaltidy) ( IRSB* );
+
       /* IN: should this translation be self-checking?  default: False */
       Bool    do_self_check;