src/lima/pp_lir/regalloc.c
//Calculate coarse interference matrix for register allocation
Calculate coarse interference matrix for register allocation
Calculate coarse interference matrix for register allocation
static bitset_t calc_coarse_int_matrix(bitset_t detailed_int_matrix, unsigned num_regs)
{
	bitset_t ret = bitset_create((num_regs + 1) * (num_regs + 1));
	unsigned i, j, ii, jj;
	for (i = 0; i < num_regs + 1; i++)
		for (j = 0; j < num_regs + 1; j++)
		{
			for (ii = 0; ii < 4; ii++)
			{
				for (jj = 0; jj < 4; jj++)
					if (bitset_get(detailed_int_matrix,
								   (num_regs + 1)*4*(4*i + ii) + (4*j + jj)))
					{
						bitset_set(ret, (num_regs + 1)*i + j, true);
						goto outer_break;
					}
			}
			outer_break:
			; 
		}
	return ret;
}
static bitset_t calc_coarse_int_matrix ( bitset_t detailed_int_matrix , unsigned num_regs ) { bitset_t ret = bitset_create ( ( num_regs + 1 ) * ( num_regs + 1 ) ) ; unsigned i , j , ii , jj ; for ( i = 0 ; i < num_regs + 1 ; i ++ ) for ( j = 0 ; j < num_regs + 1 ; j ++ ) { for ( ii = 0 ; ii < 4 ; ii ++ ) { for ( jj = 0 ; jj < 4 ; jj ++ ) if ( bitset_get ( detailed_int_matrix , ( num_regs + 1 ) * 4 * ( 4 * i + ii ) + ( 4 * j + jj ) ) ) { bitset_set ( ret , ( num_regs + 1 ) * i + j , true ) ; goto outer_break ; } } outer_break : ; } return ret ; }
Calculate coarse interference matrix for register allocation
Calculate coarse interference matrix for register allocation
//Silly GCC error