nir: Remove casts from void*.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
+8
-8
@@ -1180,7 +1180,7 @@ nir_cf_node_remove(nir_cf_node *node)
|
||||
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;
|
||||
|
||||
@@ -1192,7 +1192,7 @@ add_use_cb(nir_src *src, void *state)
|
||||
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 =
|
||||
@@ -1207,7 +1207,7 @@ add_ssa_def_cb(nir_ssa_def *def, void *state)
|
||||
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);
|
||||
@@ -1325,7 +1325,7 @@ nir_instr_insert_after_cf_list(struct exec_list *list, nir_instr *after)
|
||||
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;
|
||||
|
||||
@@ -1339,7 +1339,7 @@ remove_use_cb(nir_src *src, void *state)
|
||||
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;
|
||||
@@ -1984,7 +1984,7 @@ nir_block_get_following_if(nir_block *block)
|
||||
static bool
|
||||
index_block(nir_block *block, void *state)
|
||||
{
|
||||
unsigned *index = (unsigned *) state;
|
||||
unsigned *index = state;
|
||||
block->index = (*index)++;
|
||||
return true;
|
||||
}
|
||||
@@ -2011,7 +2011,7 @@ index_ssa_def(nir_ssa_def *def, unsigned *index)
|
||||
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;
|
||||
@@ -2026,7 +2026,7 @@ index_ssa_undef(nir_ssa_undef_instr *instr, unsigned *index)
|
||||
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)
|
||||
|
||||
@@ -215,7 +215,7 @@ nir_calc_dominance(nir_shader *shader)
|
||||
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;
|
||||
@@ -241,7 +241,7 @@ nir_dump_dom_tree(nir_shader *shader, FILE *fp)
|
||||
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;
|
||||
@@ -271,7 +271,7 @@ nir_dump_dom_frontier(nir_shader *shader, FILE *fp)
|
||||
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])
|
||||
|
||||
@@ -128,8 +128,7 @@ lower_block(nir_block *block, void *state)
|
||||
{
|
||||
nir_foreach_instr_safe(block, instr) {
|
||||
if (instr->type == nir_instr_type_intrinsic)
|
||||
lower_instr(nir_instr_as_intrinsic(instr),
|
||||
(nir_function_impl *) state);
|
||||
lower_instr(nir_instr_as_intrinsic(instr), state);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -63,7 +63,7 @@ add_var_use_tex(nir_tex_instr *instr, struct set *live)
|
||||
static bool
|
||||
add_var_use_block(nir_block *block, void *state)
|
||||
{
|
||||
struct set *live = (struct set *) state;
|
||||
struct set *live = state;
|
||||
|
||||
nir_foreach_instr(block, instr) {
|
||||
switch(instr->type) {
|
||||
|
||||
Reference in New Issue
Block a user