blob: 24e5bdecdfef799f77d794cb9e0f070846881ec5 [file] [log] [blame]
sewardjedf4d692004-08-17 13:52:58 +00001
2/*---------------------------------------------------------------*/
3/*--- ---*/
4/*--- This file (ir/iropt.h) is ---*/
5/*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/
6/*--- ---*/
7/*---------------------------------------------------------------*/
8
9#include "libvex_basictypes.h"
10#include "libvex_ir.h"
11#include "libvex.h"
12
sewardj49651f42004-10-28 22:11:04 +000013/* Top level optimiser entry point. Returns a new BB. Operates
14 under the control of the global "vex_control" struct. */
15extern
16IRBB* do_iropt_BB ( IRBB* bb,
17 IRExpr* (*specHelper) ( Char*, IRExpr**),
18 Bool (*preciseMemExnsFn)(Int,Int),
19 Addr64 guest_addr );
sewardjedf4d692004-08-17 13:52:58 +000020
sewardj9578a8b2004-11-04 19:44:48 +000021/* Do a constant folding/propagation pass. */
22extern
23IRBB* cprop_BB ( IRBB* );
24
sewardj49651f42004-10-28 22:11:04 +000025/* Do a dead-code removal pass, which is generally needed to avoid
26 crashing the tree-builder. bb is destructively modified. */
27extern
28void do_deadcode_BB ( IRBB* bb );
29
30/* The tree-builder. Make maximal safe trees. bb is destructively
31 modified. */
32extern
33void do_treebuild_BB ( IRBB* bb );
sewardjedf4d692004-08-17 13:52:58 +000034
35/*---------------------------------------------------------------*/
36/*--- end ir/iropt.h ---*/
37/*---------------------------------------------------------------*/