disable experimental code for now
[libfirm] / ir / be / bejavacoal.h
1
2 #ifndef _BEJAVACOAL_H
3 #define _BEJAVACOAL_H
4
5 struct _be_java_coal_t;
6 typedef struct _be_java_coal_t be_java_coal_t;
7
8 /**
9  * Add an interference edge
10  * @param n first node id.
11  * @param m second node id.
12  */
13 void be_java_coal_add_int_edge(be_java_coal_t *c, int n, int m);
14
15 /**
16  * Add an affinity edge.
17  * @param n first node id.
18  * @param m second node id.
19  * @param costs Costs for the edge.
20  */
21 void be_java_coal_add_aff_edge(be_java_coal_t *c, int n, int m, int costs);
22
23 /**
24  * Set the color of a node.
25  * @param n The node.
26  * @param col The color.
27  */
28 void be_java_coal_set_color(be_java_coal_t *c, int n, int col);
29
30 /**
31  * Set debug information for a node.
32  * @param n The node.
33  * @param dbg Some string copied to Java.
34  */
35 void be_java_coal_set_debug(be_java_coal_t *c, int n, const char *dbg);
36
37 /**
38  * Forbid a color for a node.
39  * Afterwards, the node may not be assigned that color.
40  * @param n The node.
41  * @param col The color.
42  */
43 void be_java_coal_forbid_color(be_java_coal_t *c, int n, int col);
44
45 /**
46  * Start the coalescing.
47  */
48 void be_java_coal_coalesce(be_java_coal_t *c);
49
50 /**
51  * Dump the graph into a dot file.
52  * @param fn Filename to dump to.
53  */
54 void be_java_coal_dump(be_java_coal_t *c, const char *fn);
55
56 /**
57  * Get the color of a node.
58  * @param n The node.
59  * @return The color of the node.
60  */
61 int be_java_coal_get_color(be_java_coal_t *c, int n);
62
63 /**
64  * Init the JAVA coalescer.
65  * @param graph_name The name of the graph to coalesce.
66  * @param n_nodes The number of nodes in the graph. Each node has an ID which ranges from 0 to n_nodes - 1.
67  * @param n_regs  The number of colors available.
68  * @param dbg_level Te debug level for the coalescer. 0 means quiet. >0 more verbose.
69  * @return The coalescing object.
70  */
71 be_java_coal_t *be_java_coal_init(const char *graph_name, int n_nodes, int n_regs, int dbg_level);
72
73 /**
74  * Start the JVM.
75  * This is also done lazily by be_java_coal_init() but as that is called by
76  * the coalescing driver, it might tamper the runtime measurements. So here is
77  * an extra call.
78  */
79 void be_java_coal_start_jvm(void);
80
81 /**
82  * Destroy the coalescing object.
83  */
84 void be_java_coal_destroy(be_java_coal_t *c);
85
86 #endif