]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/VEX/priv/ir_opt.h
c92b9532e1f35804af2eef1c3b274f307cd2869c
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / VEX / priv / ir_opt.h
1
2 /*---------------------------------------------------------------*/
3 /*--- begin                                          ir_opt.h ---*/
4 /*---------------------------------------------------------------*/
5
6 /*
7    This file is part of Valgrind, a dynamic binary instrumentation
8    framework.
9
10    Copyright (C) 2004-2010 OpenWorks LLP
11       info@open-works.net
12
13    This program is free software; you can redistribute it and/or
14    modify it under the terms of the GNU General Public License as
15    published by the Free Software Foundation; either version 2 of the
16    License, or (at your option) any later version.
17
18    This program is distributed in the hope that it will be useful, but
19    WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21    General Public License for more details.
22
23    You should have received a copy of the GNU General Public License
24    along with this program; if not, write to the Free Software
25    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26    02110-1301, USA.
27
28    The GNU General Public License is contained in the file COPYING.
29
30    Neither the names of the U.S. Department of Energy nor the
31    University of California nor the names of its contributors may be
32    used to endorse or promote products derived from this software
33    without prior written permission.
34 */
35
36 #ifndef __VEX_IR_OPT_H
37 #define __VEX_IR_OPT_H
38
39 #include "libvex_basictypes.h"
40 #include "libvex_ir.h"
41 #include "libvex.h"
42
43 /* Top level optimiser entry point.  Returns a new BB.  Operates
44    under the control of the global "vex_control" struct. */
45 extern 
46 IRSB* do_iropt_BB ( IRSB* bb,
47                     IRExpr* (*specHelper) (HChar*, IRExpr**),
48                     Bool (*preciseMemExnsFn)(Int,Int),
49                     Addr64 guest_addr );
50
51 /* Do a constant folding/propagation pass. */
52 extern
53 IRSB* cprop_BB ( IRSB* );
54
55 /* Do a dead-code removal pass.  bb is destructively modified. */
56 extern
57 void do_deadcode_BB ( IRSB* bb );
58
59 /* The tree-builder.  Make (approximately) maximal safe trees.  bb is
60    destructively modified. */
61 extern
62 void ado_treebuild_BB ( IRSB* bb );
63
64 #endif /* ndef __VEX_IR_OPT_H */
65
66 /*---------------------------------------------------------------*/
67 /*--- end                                            ir_opt.h ---*/
68 /*---------------------------------------------------------------*/