debug_program_log(c, "after native rewrite part 2");
- rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_use, c);
+ rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_use);
if (c->Base.Error)
return;
debug_program_log(c, "after source conflict resolve");
- rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_used, c);
+ rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_used);
if (c->Base.Error)
return;
/*@{*/
typedef void (*rc_dataflow_mark_outputs_fn)(void * userdata, void * data,
void (*mark_fn)(void * data, unsigned int index, unsigned int mask));
-void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce, void * userdata);
+void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce);
void rc_dataflow_swizzles(struct radeon_compiler * c);
/*@}*/
mark_used(s, RC_FILE_OUTPUT, index, mask);
}
-void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce, void * userdata)
+void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce)
{
struct deadcode_state s;
unsigned int nr_instructions;
s.Instructions = memory_pool_malloc(&c->Pool, sizeof(struct instruction_state)*nr_instructions);
memset(s.Instructions, 0, sizeof(struct instruction_state)*nr_instructions);
- dce(userdata, &s, &mark_output_use);
+ dce(c, &s, &mark_output_use);
for(struct rc_instruction * inst = c->Program.Instructions.Prev;
inst != &c->Program.Instructions;