src/lima/gp_ir/regalloc.c
//Calculates the interference for a single set of live variables
Calculates the interference for a single set of live variables
Calculates the interference for a single set of live variables
static void calc_interference(bitset_t live, bitset_t matrix, unsigned reg_index,
							  unsigned num_regs)
{
	unsigned i;
	for (i = 0; i < num_regs; i++)
	{
		if (i == reg_index)
			continue;
		if (bitset_get(live, 4 * i + 0) ||
			bitset_get(live, 4 * i + 1) ||
			bitset_get(live, 4 * i + 2) ||
			bitset_get(live, 4 * i + 3))
		{
			bitset_set(matrix, num_regs*reg_index + i, true);
			bitset_set(matrix, num_regs*i + reg_index, true);
		}
	}
}
static void calc_interference ( bitset_t live , bitset_t matrix , unsigned reg_index , unsigned num_regs ) { unsigned i ; for ( i = 0 ; i < num_regs ; i ++ ) { if ( i == reg_index ) continue ; if ( bitset_get ( live , 4 * i + 0 ) || bitset_get ( live , 4 * i + 1 ) || bitset_get ( live , 4 * i + 2 ) || bitset_get ( live , 4 * i + 3 ) ) { bitset_set ( matrix , num_regs * reg_index + i , true ) ; bitset_set ( matrix , num_regs * i + reg_index , true ) ; } } }
Calculates the interference for a single set of live variables
Calculates the interference for a single set of live variables