X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbejavacoal.h;h=2b19cd3674c9d4d11a96978dee62b301f77f00ed;hb=48f0393daa5d5a14ed7e3e32ee2b090759c9371e;hp=4e583dd0e28a4f0882d896c3292221dc0faee591;hpb=6ae2d84d2d3e245249b5a9baec13895838d22b64;p=libfirm diff --git a/ir/be/bejavacoal.h b/ir/be/bejavacoal.h index 4e583dd0e..2b19cd367 100644 --- a/ir/be/bejavacoal.h +++ b/ir/be/bejavacoal.h @@ -2,8 +2,8 @@ #ifndef _BEJAVACOAL_H #define _BEJAVACOAL_H -struct _java_coal_t; -typedef struct _java_coal_t java_coal_t; +struct _be_java_coal_t; +typedef struct _be_java_coal_t be_java_coal_t; #ifdef WITH_LIBCORE @@ -15,7 +15,7 @@ typedef struct _java_coal_t java_coal_t; /** * Register libcore options. */ -void java_coal_register_options(lc_opt_entry_t *grp) +void be_java_coal_register_options(lc_opt_entry_t *grp); #endif /* WITH_LIBCORE */ @@ -24,7 +24,7 @@ void java_coal_register_options(lc_opt_entry_t *grp) * @param n first node id. * @param m second node id. */ -void java_coal_add_int_edge(java_coal_t *c, int n, int m); +void be_java_coal_add_int_edge(be_java_coal_t *c, int n, int m); /** * Add an affinity edge. @@ -32,14 +32,21 @@ void java_coal_add_int_edge(java_coal_t *c, int n, int m); * @param m second node id. * @param costs Costs for the edge. */ -void java_coal_add_aff_edge(java_coal_t *c, int n, int m, int costs); +void be_java_coal_add_aff_edge(be_java_coal_t *c, int n, int m, int costs); /** * Set the color of a node. * @param n The node. * @param col The color. */ -void java_coal_set_color(java_coal_t *c, int n, int col); +void be_java_coal_set_color(be_java_coal_t *c, int n, int col); + +/** + * Set debug information for a node. + * @param n The node. + * @param dbg Some string copied to Java. + */ +void be_java_coal_set_debug(be_java_coal_t *c, int n, const char *dbg); /** * Forbid a color for a node. @@ -47,25 +54,25 @@ void java_coal_set_color(java_coal_t *c, int n, int col); * @param n The node. * @param col The color. */ -void java_coal_forbid_color(java_coal_t *c, int n, int col); +void be_java_coal_forbid_color(be_java_coal_t *c, int n, int col); /** * Start the coalescing. */ -void java_coal_coalesce(java_coal_t *c); +void be_java_coal_coalesce(be_java_coal_t *c); /** * Dump the graph into a dot file. * @param fn Filename to dump to. */ -void java_coal_dump(java_coal_t *c, const char *fn); +void be_java_coal_dump(be_java_coal_t *c, const char *fn); /** * Get the color of a node. * @param n The node. * @return The color of the node. */ -int java_coal_get_color(java_coal_t *c, int n); +int be_java_coal_get_color(be_java_coal_t *c, int n); /** * Init the JAVA coalescer. @@ -75,12 +82,19 @@ int java_coal_get_color(java_coal_t *c, int n); * @param dbg_level Te debug level for the coalescer. 0 means quiet. >0 more verbose. * @return The coalescing object. */ -java_coal_t *java_coal_init(const char *graph_name, int n_nodes, int n_regs, int dbg_level); +be_java_coal_t *be_java_coal_init(const char *graph_name, int n_nodes, int n_regs, int dbg_level); /** - * Destroy the coalescing object. + * Start the JVM. + * This is also done lazily by be_java_coal_init() but as that is called by + * the coalescing driver, it might tamper the runtime measurements. So here is + * an extra call. */ -void java_coal_destroy(java_coal_t *c); +void be_java_coal_start_jvm(void); +/** + * Destroy the coalescing object. + */ +void be_java_coal_destroy(be_java_coal_t *c); #endif