Adjust ppc set_AV_CR6 computation to help Memcheck instrumentation.
[valgrind.git] / VEX / priv / ir_opt.h
blobf67ed001070ab47665a6211cb3dc9da8284ed841
2 /*---------------------------------------------------------------*/
3 /*--- begin ir_opt.h ---*/
4 /*---------------------------------------------------------------*/
6 /*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
10 Copyright (C) 2004-2017 OpenWorks LLP
11 info@open-works.net
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.
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.
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.
28 The GNU General Public License is contained in the file COPYING.
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.
36 #ifndef __VEX_IR_OPT_H
37 #define __VEX_IR_OPT_H
39 #include "libvex_basictypes.h"
40 #include "libvex_ir.h"
41 #include "libvex.h"
43 /* Top level optimiser entry point. Returns a new BB. Operates
44 under the control of the global "vex_control" struct and of the
45 supplied |pxControl| argument. */
46 extern
47 IRSB* do_iropt_BB (
48 IRSB* bb,
49 IRExpr* (*specHelper) (const HChar*, IRExpr**, IRStmt**, Int),
50 Bool (*preciseMemExnsFn)(Int,Int,VexRegisterUpdates),
51 VexRegisterUpdates pxControl,
52 Addr guest_addr,
53 VexArch guest_arch
56 /* Do a constant folding/propagation pass. */
57 extern
58 IRSB* cprop_BB ( IRSB* );
60 /* Do a dead-code removal pass. bb is destructively modified. */
61 extern
62 void do_deadcode_BB ( IRSB* bb );
64 /* The tree-builder. Make (approximately) maximal safe trees. bb is
65 destructively modified. Returns (unrelatedly, but useful later on)
66 the guest address of the highest addressed byte from any insn in
67 this block, or Addr_MAX if unknown (can that ever happen?) */
68 extern
69 Addr ado_treebuild_BB (
70 IRSB* bb,
71 Bool (*preciseMemExnsFn)(Int,Int,VexRegisterUpdates),
72 VexRegisterUpdates pxControl
75 #endif /* ndef __VEX_IR_OPT_H */
77 /*---------------------------------------------------------------*/
78 /*--- end ir_opt.h ---*/
79 /*---------------------------------------------------------------*/