fixed some bugs
[libfirm] / ir / be / bespillilp.c
index 010874b..9ebbee6 100644 (file)
@@ -12,6 +12,8 @@
 #include "config.h"
 #endif
 
+#ifdef WITH_ILP
+
 #include <math.h>
 
 #include "hashptr.h"
@@ -218,7 +220,7 @@ static live_range_t *get_first_use_lr(spill_ilp_t *si, ir_node *bl, ir_node *irn
 static INLINE int can_remat(const spill_ilp_t *si, const ir_node *irn, pset *live)
 {
        int i, n;
-       const arch_env_t *arch_env    = si->chordal_env->main_env->arch_env;
+       const arch_env_t *arch_env    = si->chordal_env->birg->main_env->arch_env;
        int remat = (arch_irn_get_flags(arch_env, irn) & arch_irn_flags_rematerializable) != 0;
 
        for(i = 0, n = get_irn_arity(irn); i < n && remat; ++i) {
@@ -718,3 +720,10 @@ void be_spill_ilp(const be_chordal_env_t *chordal_env)
        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 */