struct _be_uses_t {
set *uses;
ir_graph *irg;
- firm_dbg_module_t *dbg;
const arch_env_t *arch_env;
+ DEBUG_ONLY(firm_dbg_module_t *dbg;)
};
-
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
static INLINE unsigned sadd(unsigned a, unsigned b)
{
return a + b;
be_use_t *u;
u = get_or_set_use(uses, bl, def, 0);
- if(!u->is_set) {
+ if (! u->is_set) {
u->is_set = 1;
u->next_use = USES_INFINITY;
u->next_use = be_get_next_use(uses, sched_first(bl), 0, def, 0);
sched_foreach_from(from, irn) {
int i, n;
- if(!skip_from_uses) {
- for(i = 0, n = get_irn_arity(irn); i < n; ++i) {
+ if (! skip_from_uses) {
+ for (i = 0, n = get_irn_arity(irn); i < n; ++i) {
ir_node *operand = get_irn_n(irn, i);
- if(operand == def) {
+ if (operand == def) {
DBG((uses->dbg, LEVEL_3, "found use of %+F at %+F\n", operand, irn));
return step;
}
step++;
}
+ /* FIXME: quick and dirty hack to prevent ignore nodes (like stack pointer) from being spilled */
+ return is_live_end(bl, def) ? step : USES_INFINITY;
+
next_use = USES_INFINITY;
foreach_block_succ(bl, succ_edge) {
const ir_node *succ_bl = succ_edge->src;