Merge, from CGTUNE branch, r1774:

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 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/priv/main/vex_main.c b/priv/main/vex_main.c
index 9fabf70..9e3ba20 100644
--- a/priv/main/vex_main.c
+++ b/priv/main/vex_main.c
@@ -544,6 +544,10 @@
       also throws away any dead bindings. */
    ado_treebuild_BB( irsb );
 
+   if (vta->finaltidy) {
+      irsb = vta->finaltidy(irsb);
+   }
+
    vexAllocSanityCheck();
 
    if (vex_traceflags & VEX_TRACE_TREES) {