|
From: <sv...@va...> - 2007-08-28 06:06:27
|
Author: sewardj
Date: 2007-08-28 07:06:27 +0100 (Tue, 28 Aug 2007)
New Revision: 1782
Log:
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.
Modified:
trunk/priv/main/vex_main.c
trunk/pub/libvex.h
Modified: trunk/priv/main/vex_main.c
===================================================================
--- trunk/priv/main/vex_main.c 2007-08-25 23:21:08 UTC (rev 1781)
+++ trunk/priv/main/vex_main.c 2007-08-28 06:06:27 UTC (rev 1782)
@@ -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) {
Modified: trunk/pub/libvex.h
===================================================================
--- trunk/pub/libvex.h 2007-08-25 23:21:08 UTC (rev 1781)
+++ trunk/pub/libvex.h 2007-08-28 06:06:27 UTC (rev 1782)
@@ -452,6 +452,8 @@
VexGuestExtents*,
IRType gWordTy, IRType hWordTy );
+ IRSB* (*finaltidy) ( IRSB* );
+
/* IN: should this translation be self-checking? default: False */
Bool do_self_check;
|