opt_inline: Move all start block placed nodes to the callee's start block, not just...
[libfirm] / ir / kaps / kaps.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   Partitioned Boolean Quadratic Problem (PBQP) solver.
23  * @date    02.10.2008
24  * @author  Sebastian Buchwald
25  */
26 #ifndef KAPS_KAPS_H
27 #define KAPS_KAPS_H
28
29 #include "pbqp_t.h"
30
31 /**
32  * Create an empty PBQP instance with the given number of nodes.
33  */
34 pbqp_t* alloc_pbqp(unsigned number_nodes);
35
36 /**
37  * Free the given PBQP.
38  */
39 void free_pbqp(pbqp_t *pbqp);
40
41 /**
42  * Add costs vector to given node.
43  */
44 void add_node_costs(pbqp_t *pbqp, unsigned node_index, vector_t *costs);
45
46 /**
47  * Add costs matrix between given nodes.
48  */
49 void add_edge_costs(pbqp_t *pbqp, unsigned src_index, unsigned tgt_index,
50                     pbqp_matrix_t *costs);
51
52 pbqp_edge_t *get_edge(pbqp_t *pbqp, unsigned src_index, unsigned tgt_index);
53 pbqp_node_t *get_node(pbqp_t *pbqp, unsigned index);
54
55 num get_node_solution(pbqp_t *pbqp, unsigned node_index);
56 num get_solution(pbqp_t *pbqp);
57
58 void set_dumpfile(pbqp_t *pbqp, FILE *f);
59
60 #endif /* KAPS_KAPS_H */