intel/compiler: Refactor dump_instruction(s)
Delete unnecessary virtual functions, we need just two. Refactor code so the 'default behavior' logic (stderr and/or creating file) is not duplicated. Rename the virtuals so overrides don't hide the common convenience functions. Finally, provide a variant of dump_instructions() with a `FILE *` parameter. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23457>
This commit is contained in:
@@ -1309,13 +1309,7 @@ vec4_visitor::split_virtual_grfs()
|
||||
}
|
||||
|
||||
void
|
||||
vec4_visitor::dump_instruction(const backend_instruction *be_inst) const
|
||||
{
|
||||
dump_instruction(be_inst, stderr);
|
||||
}
|
||||
|
||||
void
|
||||
vec4_visitor::dump_instruction(const backend_instruction *be_inst, FILE *file) const
|
||||
vec4_visitor::dump_instruction_to_file(const backend_instruction *be_inst, FILE *file) const
|
||||
{
|
||||
const vec4_instruction *inst = (const vec4_instruction *)be_inst;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user