sewardj | edf4d69 | 2004-08-17 13:52:58 +0000 | [diff] [blame] | 1 | |
| 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 | |
sewardj | 49651f4 | 2004-10-28 22:11:04 +0000 | [diff] [blame] | 13 | /* Top level optimiser entry point. Returns a new BB. Operates |
| 14 | under the control of the global "vex_control" struct. */ |
| 15 | extern |
| 16 | IRBB* do_iropt_BB ( IRBB* bb, |
| 17 | IRExpr* (*specHelper) ( Char*, IRExpr**), |
| 18 | Bool (*preciseMemExnsFn)(Int,Int), |
| 19 | Addr64 guest_addr ); |
sewardj | edf4d69 | 2004-08-17 13:52:58 +0000 | [diff] [blame] | 20 | |
sewardj | 9578a8b | 2004-11-04 19:44:48 +0000 | [diff] [blame^] | 21 | /* Do a constant folding/propagation pass. */ |
| 22 | extern |
| 23 | IRBB* cprop_BB ( IRBB* ); |
| 24 | |
sewardj | 49651f4 | 2004-10-28 22:11:04 +0000 | [diff] [blame] | 25 | /* Do a dead-code removal pass, which is generally needed to avoid |
| 26 | crashing the tree-builder. bb is destructively modified. */ |
| 27 | extern |
| 28 | void do_deadcode_BB ( IRBB* bb ); |
| 29 | |
| 30 | /* The tree-builder. Make maximal safe trees. bb is destructively |
| 31 | modified. */ |
| 32 | extern |
| 33 | void do_treebuild_BB ( IRBB* bb ); |
sewardj | edf4d69 | 2004-08-17 13:52:58 +0000 | [diff] [blame] | 34 | |
| 35 | /*---------------------------------------------------------------*/ |
| 36 | /*--- end ir/iropt.h ---*/ |
| 37 | /*---------------------------------------------------------------*/ |