static bool
add_use_cb(nir_src *src, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
struct set *uses_set = src->is_ssa ? src->ssa->uses : src->reg.reg->uses;
static bool
add_ssa_def_cb(nir_ssa_def *def, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
if (instr->block && def->index == UINT_MAX) {
nir_function_impl *impl =
static bool
add_reg_def_cb(nir_dest *dest, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
if (!dest->is_ssa)
_mesa_set_add(dest->reg.reg->defs, instr);
static bool
remove_use_cb(nir_src *src, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
struct set *uses_set = src->is_ssa ? src->ssa->uses : src->reg.reg->uses;
static bool
remove_def_cb(nir_dest *dest, void *state)
{
- nir_instr *instr = (nir_instr *) state;
+ nir_instr *instr = state;
if (dest->is_ssa)
return true;
static bool
index_block(nir_block *block, void *state)
{
- unsigned *index = (unsigned *) state;
+ unsigned *index = state;
block->index = (*index)++;
return true;
}
static bool
index_ssa_def_cb(nir_dest *dest, void *state)
{
- unsigned *index = (unsigned *) state;
+ unsigned *index = state;
if (dest->is_ssa)
index_ssa_def(&dest->ssa, index);
return true;
static bool
index_ssa_block(nir_block *block, void *state)
{
- unsigned *index = (unsigned *) state;
+ unsigned *index = state;
nir_foreach_instr(block, instr) {
if (instr->type == nir_instr_type_ssa_undef)
static bool
dump_block_dom(nir_block *block, void *state)
{
- FILE *fp = (FILE *) state;
+ FILE *fp = state;
if (block->imm_dom)
fprintf(fp, "\t%u -> %u\n", block->imm_dom->index, block->index);
return true;
static bool
dump_block_dom_frontier(nir_block *block, void *state)
{
- FILE *fp = (FILE *) state;
+ FILE *fp = state;
fprintf(fp, "DF(%u) = {", block->index);
struct set_entry *entry;
static bool
dump_block_succs(nir_block *block, void *state)
{
- FILE *fp = (FILE *) state;
+ FILE *fp = state;
if (block->successors[0])
fprintf(fp, "\t%u -> %u\n", block->index, block->successors[0]->index);
if (block->successors[1])