|
From: <sv...@va...> - 2007-05-16 18:42:46
|
Author: sewardj
Date: 2007-05-16 19:42:41 +0100 (Wed, 16 May 2007)
New Revision: 1774
Log:
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:
branches/CGTUNE/priv/main/vex_main.c
branches/CGTUNE/pub/libvex.h
Modified: branches/CGTUNE/priv/main/vex_main.c
===================================================================
--- branches/CGTUNE/priv/main/vex_main.c 2007-05-09 01:15:15 UTC (rev 1773)
+++ branches/CGTUNE/priv/main/vex_main.c 2007-05-16 18:42:41 UTC (rev 1774)
@@ -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: branches/CGTUNE/pub/libvex.h
===================================================================
--- branches/CGTUNE/pub/libvex.h 2007-05-09 01:15:15 UTC (rev 1773)
+++ branches/CGTUNE/pub/libvex.h 2007-05-16 18:42:41 UTC (rev 1774)
@@ -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;
|