projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b7077e
)
pan/bi: Add bi_emit_before helper
author
Alyssa Rosenzweig
<alyssa.rosenzweig@collabora.com>
Thu, 19 Mar 2020 21:21:34 +0000
(17:21 -0400)
committer
Marge Bot
<eric+marge@anholt.net>
Sun, 22 Mar 2020 03:32:34 +0000
(
03:32
+0000)
For BIR lowering passes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4276>
src/panfrost/bifrost/compiler.h
patch
|
blob
|
history
diff --git
a/src/panfrost/bifrost/compiler.h
b/src/panfrost/bifrost/compiler.h
index d7d80d5c8a95cdc5ba7f3fe812b7b45f0841eb3b..178346146729e0d8a967b37f0abdbdc5fa25e1a3 100644
(file)
--- a/
src/panfrost/bifrost/compiler.h
+++ b/
src/panfrost/bifrost/compiler.h
@@
-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)
{