becopyilp: Remove the unused function co_ilp_get_costs().
[libfirm] / ir / be / becopyilp_t.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       Common stuff used by all ILP formulations.
9  * @author      Daniel Grund
10  * @date        28.02.2006
11  */
12 #ifndef FIRM_BE_BECOPYILP_T_H
13 #define FIRM_BE_BECOPYILP_T_H
14
15 #include "firm_types.h"
16 #include "becopyopt_t.h"
17
18 /******************************************************************************
19     _____ _                        _            _   _
20    / ____(_)                      | |          | | (_)
21   | (___  _ _______   _ __ ___  __| |_   _  ___| |_ _  ___  _ __
22    \___ \| |_  / _ \ | '__/ _ \/ _` | | | |/ __| __| |/ _ \| '_ \
23    ____) | |/ /  __/ | | |  __/ (_| | |_| | (__| |_| | (_) | | | |
24   |_____/|_/___\___| |_|  \___|\__,_|\__,_|\___|\__|_|\___/|_| |_|
25
26  *****************************************************************************/
27
28 typedef struct size_red_t {
29         copy_opt_t    *co;
30         ir_node      **col_suff;    /**< Coloring suffix. A PEO prefix. */
31         ir_nodeset_t   all_removed; /**< All nodes removed during problem size reduction */
32 } size_red_t;
33
34 /**
35  * Checks if a node has already been removed
36  */
37 static inline bool sr_is_removed(size_red_t const *const sr, ir_node const *const irn)
38 {
39         return ir_nodeset_contains(&sr->all_removed, irn);
40 }
41
42 /******************************************************************************
43     _____                      _        _____ _      _____
44    / ____|                    (_)      |_   _| |    |  __ \
45   | |  __  ___ _ __   ___ _ __ _  ___    | | | |    | |__) |
46   | | |_ |/ _ \ '_ \ / _ \ '__| |/ __|   | | | |    |  ___/
47   | |__| |  __/ | | |  __/ |  | | (__   _| |_| |____| |
48    \_____|\___|_| |_|\___|_|  |_|\___| |_____|______|_|
49
50  *****************************************************************************/
51
52 #include "lpp.h"
53 #include "lpp_net.h"
54
55 #define EPSILON 0.00001
56
57 typedef struct ilp_env_t ilp_env_t;
58
59 typedef void(*ilp_callback)(ilp_env_t*);
60
61 struct ilp_env_t {
62         const copy_opt_t *co;   /**< the copy opt problem */
63         size_red_t       *sr;   /**< problem size reduction. removes simple nodes */
64         lpp_t            *lp;   /**< the linear programming problem */
65         void             *env;
66         ilp_callback     build;
67         ilp_callback     apply;
68 };
69
70 ilp_env_t *new_ilp_env(copy_opt_t *co, ilp_callback build, ilp_callback apply, void *env);
71
72 lpp_sol_state_t ilp_go(ilp_env_t *ienv);
73
74 void free_ilp_env(ilp_env_t *ienv);
75
76 #endif