* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <stdlib.h>
#include "benodesets.h"
#include "bestatevent.h"
#include "bespilloptions.h"
+#include "bemodule.h"
#define DBG_COALESCING 1
#define DBG_INTERFERENCES 2
// construct interferences
for(i = 0; i < spillcount; ++i) {
+ ir_node *spill1 = spilllist[i]->spill;
+ if(is_NoMem(spill1))
+ continue;
+
for(i2 = i+1; i2 < spillcount; ++i2) {
- if(values_interfere(lv, spilllist[i]->spill, spilllist[i2]->spill)) {
- DBG((dbg, DBG_INTERFERENCES, "Slot %d and %d interfere\n", i, i2));
+ ir_node *spill2 = spilllist[i2]->spill;
+ if(is_NoMem(spill2))
+ continue;
+
+ if(values_interfere(lv, spill1, spill2)) {
+ DBG((dbg, DBG_INTERFERENCES, "Slot %d and %d interfere\n",
+ i, i2));
bitset_set(interferences[i], i2);
bitset_set(interferences[i2], i);
}
}
}
} else {
- arch_set_frame_entity(arch_env, node, slot->entity);
+ if(!is_NoMem(node))
+ arch_set_frame_entity(arch_env, node, slot->entity);
}
}
env->reloads = NEW_ARR_F(ir_node*, 0);
env->affinity_edges = NEW_ARR_F(affinity_edge_t*, 0);
env->memperms = new_set(cmp_memperm, 10);
- FIRM_DBG_REGISTER(dbg, "firm.be.spillslots");
return env;
}
be_free_frame_entity_coalescer(env);
}
+
+void be_init_spillslots(void)
+{
+ FIRM_DBG_REGISTER(dbg, "firm.be.spillslots");
+}
+
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spillslots);