mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 14:18:07 +02:00
pan/bi: Add bi_emit_before helper
For BIR lowering passes. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4276>
This commit is contained in:
parent
6b7077efda
commit
58a51c49bb
1 changed files with 9 additions and 0 deletions
|
|
@ -366,6 +366,15 @@ bi_emit(bi_context *ctx, bi_instruction ins)
|
|||
return u;
|
||||
}
|
||||
|
||||
static inline bi_instruction *
|
||||
bi_emit_before(bi_context *ctx, bi_instruction *tag, bi_instruction ins)
|
||||
{
|
||||
bi_instruction *u = rzalloc(ctx, bi_instruction);
|
||||
memcpy(u, &ins, sizeof(ins));
|
||||
list_addtail(&u->link, &tag->link);
|
||||
return u;
|
||||
}
|
||||
|
||||
static inline void
|
||||
bi_remove_instruction(bi_instruction *ins)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue