Skip to content
Snippets Groups Projects
Commit fe59b772 authored by Mary Guillemard's avatar Mary Guillemard
Browse files

bi: Alloc replacement array once in opt_cse


This create an uneeded pressure otherwise.

Signed-off-by: default avatarMary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Part-of: <!29372>
parent 01ea55b4
1 merge request!29372panfrost: Reformat compiler code
Pipeline #1185018 passed
......@@ -149,9 +149,9 @@ void
bi_opt_cse(bi_context *ctx)
{
struct set *instr_set = _mesa_set_create(NULL, hash_instr, instrs_equal);
bi_index *replacement = calloc(sizeof(bi_index), ctx->ssa_alloc);
bi_foreach_block(ctx, block) {
bi_index *replacement = calloc(sizeof(bi_index), ctx->ssa_alloc);
_mesa_set_clear(instr_set, NULL);
bi_foreach_instr_in_block(block, instr) {
......@@ -180,9 +180,8 @@ bi_opt_cse(bi_context *ctx)
}
}
}
free(replacement);
}
free(replacement);
_mesa_set_destroy(instr_set, NULL);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment