projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added another test file
[libfirm]
/
ir
/
be
/
bespillilp.c
diff --git
a/ir/be/bespillilp.c
b/ir/be/bespillilp.c
index
cfcdeb7
..
6dfcac4
100644
(file)
--- a/
ir/be/bespillilp.c
+++ b/
ir/be/bespillilp.c
@@
-12,6
+12,8
@@
#include "config.h"
#endif
#include "config.h"
#endif
+#ifdef WITH_ILP
+
#include <math.h>
#include "hashptr.h"
#include <math.h>
#include "hashptr.h"
@@
-84,7
+86,6
@@
typedef struct _spill_ilp_t {
spill_stat_t stats;
const arch_register_class_t *cls;
const be_chordal_env_t *chordal_env;
spill_stat_t stats;
const arch_register_class_t *cls;
const be_chordal_env_t *chordal_env;
- firm_dbg_module_t *dbg;
lpp_t *lpp;
set *irn_use_heads;
set *live_ranges;
lpp_t *lpp;
set *irn_use_heads;
set *live_ranges;
@@
-94,6
+95,7
@@
typedef struct _spill_ilp_t {
struct obstack *obst;
int enable_store : 1;
int enable_remat : 1;
struct obstack *obst;
int enable_store : 1;
int enable_remat : 1;
+ DEBUG_ONLY(firm_dbg_module_t *dbg;)
} spill_ilp_t;
typedef struct _live_range_t live_range_t;
} spill_ilp_t;
typedef struct _live_range_t live_range_t;
@@
-633,8
+635,8
@@
void be_spill_ilp(const be_chordal_env_t *chordal_env)
memset(&si.stats, 0, sizeof(si.stats));
si.chordal_env = chordal_env;
si.obst = &obst;
memset(&si.stats, 0, sizeof(si.stats));
si.chordal_env = chordal_env;
si.obst = &obst;
- si.
dbg = firm_dbg_register("be.ra.spillilp"
);
- si.senv = be_new_spill_env(si.dbg, chordal_env, is_mem_phi, &si);
+ si.
senv = be_new_spill_env(chordal_env, is_mem_phi, &si
);
+ DEBUG_ONLY(si.senv->dbg = si.dbg;)
si.cls = chordal_env->cls;
si.lpp = new_lpp(problem_name, lpp_minimize);
si.irn_use_heads = new_set(cmp_irn_use_head, 4096);
si.cls = chordal_env->cls;
si.lpp = new_lpp(problem_name, lpp_minimize);
si.irn_use_heads = new_set(cmp_irn_use_head, 4096);
@@
-643,8
+645,8
@@
void be_spill_ilp(const be_chordal_env_t *chordal_env)
si.edges = NULL;
si.enable_remat = 0;
si.enable_store = 1;
si.edges = NULL;
si.enable_remat = 0;
si.enable_store = 1;
+ FIRM_DBG_REGISTER(si.dbg, "firm.be.ra.spillilp");
- firm_dbg_set_mask(si.dbg, DBG_LEVEL);
irg_block_walk_graph(chordal_env->irg, process_block, NULL, &si);
if(si.enable_store)
add_store_costs(&si);
irg_block_walk_graph(chordal_env->irg, process_block, NULL, &si);
if(si.enable_store)
add_store_costs(&si);
@@
-718,3
+720,10
@@
void be_spill_ilp(const be_chordal_env_t *chordal_env)
free_lpp(si.lpp);
obstack_free(&obst, NULL);
}
free_lpp(si.lpp);
obstack_free(&obst, NULL);
}
+
+#else /* WITH_ILP */
+
+static void only_that_you_can_compile_without_WITH_ILP_defined(void) {
+}
+
+#endif /* WITH_ILP */