projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
addapted to bearch interface changes
[libfirm]
/
ir
/
be
/
becopyilp.c
diff --git
a/ir/be/becopyilp.c
b/ir/be/becopyilp.c
index
97dd23b
..
93d329c
100644
(file)
--- a/
ir/be/becopyilp.c
+++ b/
ir/be/becopyilp.c
@@
-3,11
+3,18
@@
* Date: 28.02.2006
* Copyright: (c) Universitaet Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
* Date: 28.02.2006
* Copyright: (c) Universitaet Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ * $Id$
*
* Common stuff used by all ILP fomulations.
*
*/
*
* Common stuff used by all ILP fomulations.
*
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef WITH_ILP
+
#include "becopyilp_t.h"
#include "beifg_t.h"
#include "becopyilp_t.h"
#include "beifg_t.h"
@@
-21,6
+28,18
@@
*****************************************************************************/
*****************************************************************************/
+
+size_red_t *new_size_red(copy_opt_t *co) {
+ size_red_t *res = malloc(sizeof(*res));
+
+ res->co = co;
+ res->all_removed = pset_new_ptr_default();
+ res->col_suff = NULL;
+ obstack_init(&res->ob);
+
+ return res;
+}
+
/**
* Checks if a node is simplicial in the graph heeding the already removed nodes.
*/
/**
* Checks if a node is simplicial in the graph heeding the already removed nodes.
*/
@@
-55,10
+74,9
@@
void sr_remove(size_red_t *sr) {
void *iter = be_ifg_neighbours_iter_alloca(ifg);
while (redo) {
void *iter = be_ifg_neighbours_iter_alloca(ifg);
while (redo) {
- arch_register_req_t req;
redo = 0;
be_ifg_foreach_node(ifg, iter, irn) {
redo = 0;
be_ifg_foreach_node(ifg, iter, irn) {
- if (!sr_is_removed(sr, irn) && !co_is_optimizable
(sr->co->aenv, irn, &req
) && !co_is_optimizable_arg(sr->co, irn)) {
+ if (!sr_is_removed(sr, irn) && !co_is_optimizable
_root(sr->co, irn
) && !co_is_optimizable_arg(sr->co, irn)) {
if (sr_is_simplicial(sr, irn)) {
coloring_suffix_t *cs = obstack_alloc(&sr->ob, sizeof(*cs));
if (sr_is_simplicial(sr, irn)) {
coloring_suffix_t *cs = obstack_alloc(&sr->ob, sizeof(*cs));
@@
-104,6
+122,7
@@
void sr_reinsert(size_red_t *sr) {
}
void free_size_red(size_red_t *sr) {
}
void free_size_red(size_red_t *sr) {
+ del_pset(sr->all_removed);
obstack_free(&sr->ob, NULL);
free(sr);
}
obstack_free(&sr->ob, NULL);
free(sr);
}
@@
-118,12
+137,11
@@
void free_size_red(size_red_t *sr) {
*****************************************************************************/
*****************************************************************************/
-ilp_env_t *new_ilp_env(copy_opt_t *co,
firm_dbg_module_t *dbg,
ilp_callback build, ilp_callback apply, void *env) {
+ilp_env_t *new_ilp_env(copy_opt_t *co, ilp_callback build, ilp_callback apply, void *env) {
ilp_env_t *res = malloc(sizeof(*res));
assert(res);
res->co = co;
ilp_env_t *res = malloc(sizeof(*res));
assert(res);
res->co = co;
- res->dbg = dbg;
res->build = build;
res->apply = apply;
res->env = env;
res->build = build;
res->apply = apply;
res->env = env;
@@
-132,13
+150,11
@@
ilp_env_t *new_ilp_env(copy_opt_t *co, firm_dbg_module_t *dbg, ilp_callback buil
return res;
}
return res;
}
-lpp_sol_state_t ilp_go(ilp_env_t *ienv
, double time_limit
) {
+lpp_sol_state_t ilp_go(ilp_env_t *ienv) {
sr_remove(ienv->sr);
ienv->build(ienv);
sr_remove(ienv->sr);
ienv->build(ienv);
- lpp_set_time_limit(ienv->lp, time_limit);
-
#ifdef LPP_SOLVE_NET
lpp_solve_net(ienv->lp, LPP_HOST, LPP_SOLVER);
#else
#ifdef LPP_SOLVE_NET
lpp_solve_net(ienv->lp, LPP_HOST, LPP_SOLVER);
#else
@@
-157,3
+173,10
@@
void free_ilp_env(ilp_env_t *ienv) {
free_lpp(ienv->lp);
free(ienv);
}
free_lpp(ienv->lp);
free(ienv);
}
+
+#else /* WITH_ILP */
+
+static void only_that_you_can_compile_without_WITH_ILP_defined(void) {
+}
+
+#endif /* WITH_ILP */