blob: c99eea0545c060222fde9474bd064977ceba9112 [file] [log] [blame]
Alyssa Rosenzweigeceaea42020-03-02 19:47:11 -05001/*
2 * Copyright (C) 2020 Collabora Ltd.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *
23 * Authors (Collabora):
24 * Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
25 */
26
27#ifndef __BIFROST_COMPILER_H
28#define __BIFROST_COMPILER_H
29
Alyssa Rosenzweig29acd7b2020-03-02 20:40:52 -050030#include "bifrost.h"
Alyssa Rosenzweig7ac62122020-03-02 20:38:26 -050031#include "compiler/nir/nir.h"
Alyssa Rosenzweig9b8cb9f2020-03-09 20:19:29 -040032#include "panfrost/util/pan_ir.h"
Alyssa Rosenzweig7ac62122020-03-02 20:38:26 -050033
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -050034/* Bifrost opcodes are tricky -- the same op may exist on both FMA and
35 * ADD with two completely different opcodes, and opcodes can be varying
36 * length in some cases. Then we have different opcodes for int vs float
37 * and then sometimes even for different typesizes. Further, virtually
38 * every op has a number of flags which depend on the op. In constrast
39 * to Midgard where you have a strict ALU/LDST/TEX division and within
40 * ALU you have strict int/float and that's it... here it's a *lot* more
41 * involved. As such, we use something much higher level for our IR,
42 * encoding "classes" of operations, letting the opcode details get
43 * sorted out at emit time.
44 *
45 * Please keep this list alphabetized. Please use a dictionary if you
46 * don't know how to do that.
47 */
48
49enum bi_class {
50 BI_ADD,
51 BI_ATEST,
52 BI_BRANCH,
53 BI_CMP,
54 BI_BLEND,
55 BI_BITWISE,
56 BI_CONVERT,
57 BI_CSEL,
58 BI_DISCARD,
59 BI_FMA,
60 BI_FREXP,
61 BI_LOAD,
Alyssa Rosenzweig1ead0d32020-03-06 09:52:09 -050062 BI_LOAD_UNIFORM,
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -050063 BI_LOAD_ATTR,
64 BI_LOAD_VAR,
65 BI_LOAD_VAR_ADDRESS,
66 BI_MINMAX,
67 BI_MOV,
68 BI_SHIFT,
69 BI_STORE,
70 BI_STORE_VAR,
71 BI_SPECIAL, /* _FAST, _TABLE on supported GPUs */
Alyssa Rosenzweig5896db92020-03-03 08:35:51 -050072 BI_SWIZZLE,
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -050073 BI_TEX,
74 BI_ROUND,
Alyssa Rosenzweig7ac62122020-03-02 20:38:26 -050075 BI_NUM_CLASSES
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -050076};
77
Alyssa Rosenzweig7ac62122020-03-02 20:38:26 -050078/* Properties of a class... */
79extern unsigned bi_class_props[BI_NUM_CLASSES];
80
81/* abs/neg/outmod valid for a float op */
82#define BI_MODS (1 << 0)
83
Alyssa Rosenzweig34165c72020-03-02 20:46:37 -050084/* Generic enough that little class-specific information is required. In other
85 * words, it acts as a "normal" ALU op, even if the encoding ends up being
86 * irregular enough to warrant a separate class */
87#define BI_GENERIC (1 << 1)
88
Alyssa Rosenzweigd69bf8d2020-03-02 20:52:36 -050089/* Accepts a bifrost_roundmode */
90#define BI_ROUNDMODE (1 << 2)
91
Alyssa Rosenzweig99f3c1f2020-03-02 21:53:13 -050092/* Can be scheduled to FMA */
93#define BI_SCHED_FMA (1 << 3)
94
95/* Can be scheduled to ADD */
96#define BI_SCHED_ADD (1 << 4)
97
98/* Most ALU ops can do either, actually */
99#define BI_SCHED_ALL (BI_SCHED_FMA | BI_SCHED_ADD)
100
Alyssa Rosenzweigc70a1982020-03-03 08:16:50 -0500101/* Along with setting BI_SCHED_ADD, eats up the entire cycle, so FMA must be
102 * nopped out. Used for _FAST operations. */
103#define BI_SCHED_SLOW (1 << 5)
104
Alyssa Rosenzweig5896db92020-03-03 08:35:51 -0500105/* Swizzling allowed for the 8/16-bit source */
106#define BI_SWIZZLABLE (1 << 6)
107
Alyssa Rosenzweig07228a62020-03-03 13:55:33 -0500108/* For scheduling purposes this is a high latency instruction and must be at
109 * the end of a clause. Implies ADD */
110#define BI_SCHED_HI_LATENCY ((1 << 7) | BI_SCHED_ADD)
111
Alyssa Rosenzweig230be612020-03-02 20:24:03 -0500112/* It can't get any worse than csel4... can it? */
113#define BIR_SRC_COUNT 4
114
Alyssa Rosenzweig1ead0d32020-03-06 09:52:09 -0500115/* Class-specific data for BI_LOAD, BI_LD_ATTR, BI_LD_VAR_ADDR */
Alyssa Rosenzweigaa2f12d2020-03-02 21:19:16 -0500116struct bi_load {
Alyssa Rosenzweig1ead0d32020-03-06 09:52:09 -0500117 /* Note: LD_ATTR does not support indirects */
Alyssa Rosenzweigaa2f12d2020-03-02 21:19:16 -0500118 unsigned location;
119
Alyssa Rosenzweig1ead0d32020-03-06 09:52:09 -0500120 /* Number of vector channels */
Alyssa Rosenzweigaa2f12d2020-03-02 21:19:16 -0500121 unsigned channels;
122};
123
Alyssa Rosenzweig9643b9d2020-03-02 21:48:51 -0500124/* BI_LD_VARY */
125struct bi_load_vary {
126 /* All parameters used here. Indirect location specified in
127 * src1 and ignoring location, if present. */
128 struct bi_load load;
129
130 enum bifrost_interp_mode interp_mode;
131 bool reuse;
132 bool flat;
133};
134
Alyssa Rosenzweig47451bb2020-03-03 13:48:13 -0500135/* BI_BRANCH encoding the details of the branch itself as well as a pointer to
136 * the target. We forward declare bi_block since this is mildly circular (not
137 * strictly, but this order of the file makes more sense I think)
138 *
139 * We define our own enum of conditions since the conditions in the hardware
140 * packed in crazy ways that would make manipulation unweildly (meaning changes
141 * based on port swapping, etc), so we defer dealing with that until emit time.
142 * Likewise, we expose NIR types instead of the crazy branch types, although
143 * the restrictions do eventually apply of course. */
144
145struct bi_block;
146
147enum bi_cond {
148 BI_COND_ALWAYS,
149 BI_COND_LT,
150 BI_COND_LE,
151 BI_COND_GE,
152 BI_COND_GT,
153 BI_COND_EQ,
154 BI_COND_NE,
155};
156
157struct bi_branch {
158 /* Types are specified in src_types and must be compatible (either both
159 * int, or both float, 16/32, and same size or 32/16 if float. Types
160 * ignored if BI_COND_ALWAYS is set for an unconditional branch. */
161
162 enum bi_cond cond;
163 struct bi_block *target;
164};
165
Alyssa Rosenzweig44ebc272020-03-03 07:58:05 -0500166/* Opcodes within a class */
167enum bi_minmax_op {
168 BI_MINMAX_MIN,
169 BI_MINMAX_MAX
170};
171
172enum bi_bitwise_op {
173 BI_BITWISE_AND,
174 BI_BITWISE_OR,
175 BI_BITWISE_XOR
176};
177
178enum bi_round_op {
179 BI_ROUND_MODE, /* use round mode */
180 BI_ROUND_ROUND /* i.e.: fround() */
181};
182
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -0500183typedef struct {
184 struct list_head link; /* Must be first */
185 enum bi_class type;
Alyssa Rosenzweig230be612020-03-02 20:24:03 -0500186
187 /* Indices, see bir_ssa_index etc. Note zero is special cased
188 * to "no argument" */
189 unsigned dest;
190 unsigned src[BIR_SRC_COUNT];
Alyssa Rosenzweig29acd7b2020-03-02 20:40:52 -0500191
Alyssa Rosenzweig795646d2020-03-09 14:09:04 -0400192 /* If one of the sources has BIR_INDEX_CONSTANT */
Alyssa Rosenzweigb5bdd892020-03-03 07:47:29 -0500193 union {
194 uint64_t u64;
195 uint32_t u32;
196 uint16_t u16[2];
197 uint8_t u8[4];
198 } constant;
199
Alyssa Rosenzweig29acd7b2020-03-02 20:40:52 -0500200 /* Floating-point modifiers, type/class permitting. If not
201 * allowed for the type/class, these are ignored. */
202 enum bifrost_outmod outmod;
203 bool src_abs[BIR_SRC_COUNT];
204 bool src_neg[BIR_SRC_COUNT];
Alyssa Rosenzweigd69bf8d2020-03-02 20:52:36 -0500205
206 /* Round mode (requires BI_ROUNDMODE) */
207 enum bifrost_roundmode roundmode;
Alyssa Rosenzweigb93aec62020-03-02 20:53:47 -0500208
Alyssa Rosenzweige9d480c2020-03-09 14:25:00 -0400209 /* Writemask (bit for each affected byte). This is quite restricted --
210 * ALU ops can only write to a single channel (exception: <32 in which
211 * you can write to 32/N contiguous aligned channels). Load/store can
212 * only write to all channels at once, in a sense. But it's still
213 * better to use this generic form than have synthetic ops flying
214 * about, since we're not essentially vector for RA purposes. */
215 uint16_t writemask;
216
Alyssa Rosenzweigc42002d2020-03-02 22:03:05 -0500217 /* Destination type. Usually the type of the instruction
218 * itself, but if sources and destination have different
219 * types, the type of the destination wins (so f2i would be
220 * int). Zero if there is no destination. Bitsize included */
221 nir_alu_type dest_type;
222
Alyssa Rosenzweig8929fe02020-03-03 08:37:15 -0500223 /* Source types if required by the class */
224 nir_alu_type src_types[BIR_SRC_COUNT];
225
Alyssa Rosenzweig795646d2020-03-09 14:09:04 -0400226 /* If the source type is 8-bit or 16-bit such that SIMD is possible,
227 * and the class has BI_SWIZZLABLE, this is a swizzle in the usual
228 * sense. On non-SIMD instructions, it can be used for component
229 * selection, so we don't have to special case extraction. */
230 uint8_t swizzle[BIR_SRC_COUNT][NIR_MAX_VEC_COMPONENTS];
Alyssa Rosenzweig5896db92020-03-03 08:35:51 -0500231
Alyssa Rosenzweig44ebc272020-03-03 07:58:05 -0500232 /* A class-specific op from which the actual opcode can be derived
233 * (along with the above information) */
234
235 union {
236 enum bi_minmax_op minmax;
237 enum bi_bitwise_op bitwise;
238 enum bi_round_op round;
239 } op;
240
Alyssa Rosenzweigb93aec62020-03-02 20:53:47 -0500241 /* Union for class-specific information */
242 union {
243 enum bifrost_minmax_mode minmax;
Alyssa Rosenzweigaa2f12d2020-03-02 21:19:16 -0500244 struct bi_load load;
Alyssa Rosenzweig9643b9d2020-03-02 21:48:51 -0500245 struct bi_load_vary load_vary;
Alyssa Rosenzweig47451bb2020-03-03 13:48:13 -0500246 struct bi_branch branch;
Alyssa Rosenzweig546c3012020-03-05 07:46:00 -0500247
248 /* For CSEL, the comparison op. BI_COND_ALWAYS doesn't make
249 * sense here but you can always just use a move for that */
250 enum bi_cond csel_cond;
Alyssa Rosenzweig92a4f262020-03-06 09:25:58 -0500251
252 /* For BLEND -- the location 0-7 */
253 unsigned blend_location;
Alyssa Rosenzweigb93aec62020-03-02 20:53:47 -0500254 };
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -0500255} bi_instruction;
256
Alyssa Rosenzweiga35854c2020-03-02 22:00:07 -0500257/* Scheduling takes place in two steps. Step 1 groups instructions within a
258 * block into distinct clauses (bi_clause). Step 2 schedules instructions
259 * within a clause into FMA/ADD pairs (bi_bundle).
260 *
261 * A bi_bundle contains two paired instruction pointers. If a slot is unfilled,
262 * leave it NULL; the emitter will fill in a nop.
263 */
264
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -0500265typedef struct {
Alyssa Rosenzweiga35854c2020-03-02 22:00:07 -0500266 bi_instruction *fma;
267 bi_instruction *add;
268} bi_bundle;
269
270typedef struct {
271 struct list_head link;
272
273 /* A clause can have 8 instructions in bundled FMA/ADD sense, so there
274 * can be 8 bundles. But each bundle can have both an FMA and an ADD,
275 * so a clause can have up to 16 bi_instructions. Whether bundles or
276 * instructions are used depends on where in scheduling we are. */
277
278 unsigned instruction_count;
279 unsigned bundle_count;
280
281 union {
282 bi_instruction *instructions[16];
283 bi_bundle bundles[8];
284 };
Alyssa Rosenzweigfba1d122020-03-03 08:09:18 -0500285
286 /* For scoreboarding -- the clause ID (this is not globally unique!)
287 * and its dependencies in terms of other clauses, computed during
288 * scheduling and used when emitting code. Dependencies expressed as a
289 * bitfield matching the hardware, except shifted by a clause (the
290 * shift back to the ISA's off-by-one encoding is worked out when
291 * emitting clauses) */
292 unsigned scoreboard_id;
293 uint8_t dependencies;
294
295 /* Back-to-back corresponds directly to the back-to-back bit. Branch
296 * conditional corresponds to the branch conditional bit except that in
297 * the emitted code it's always set if back-to-bit is, whereas we use
298 * the actual value (without back-to-back so to speak) internally */
299 bool back_to_back;
300 bool branch_conditional;
301
302 /* Corresponds to the usual bit but shifted by a clause */
303 bool data_register_write_barrier;
Alyssa Rosenzweigd3370bd2020-03-03 13:01:41 -0500304
305 /* Constants read by this clause. ISA limit. */
306 uint64_t constants[8];
307 unsigned constant_count;
Alyssa Rosenzweiga35854c2020-03-02 22:00:07 -0500308} bi_clause;
309
310typedef struct bi_block {
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -0500311 struct list_head link; /* must be first */
Alyssa Rosenzweiga35854c2020-03-02 22:00:07 -0500312 unsigned name; /* Just for pretty-printing */
313
314 /* If true, uses clauses; if false, uses instructions */
315 bool scheduled;
Alyssa Rosenzweigb329f8c2020-03-06 19:25:00 -0500316 struct list_head instructions; /* pre-schedule, list of bi_instructions */
317 struct list_head clauses; /* list of bi_clause */
Alyssa Rosenzweig2afddc42020-03-03 13:47:13 -0500318
319 /* Control flow graph */
320 struct set *predecessors;
321 struct bi_block *successors[2];
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -0500322} bi_block;
323
Alyssa Rosenzweigeceaea42020-03-02 19:47:11 -0500324typedef struct {
325 nir_shader *nir;
Alyssa Rosenzweig0d291842020-03-05 10:11:39 -0500326 gl_shader_stage stage;
Alyssa Rosenzweige7dc2a72020-03-02 20:06:34 -0500327 struct list_head blocks; /* list of bi_block */
Alyssa Rosenzweig0b26cb12020-03-03 14:27:05 -0500328 uint32_t quirks;
Alyssa Rosenzweig83c45622020-03-05 10:25:19 -0500329
330 /* During NIR->BIR */
Alyssa Rosenzweigd86659c2020-03-06 09:43:43 -0500331 nir_function_impl *impl;
Alyssa Rosenzweig83c45622020-03-05 10:25:19 -0500332 bi_block *current_block;
333 unsigned block_name_count;
Alyssa Rosenzweig55dab922020-03-05 16:44:49 -0500334 bi_block *after_block;
Alyssa Rosenzweig987aea12020-03-05 17:03:53 -0500335 bi_block *break_block;
336 bi_block *continue_block;
Alyssa Rosenzweigdabb6c62020-03-06 09:26:44 -0500337 bool emitted_atest;
Alyssa Rosenzweig83c45622020-03-05 10:25:19 -0500338
Alyssa Rosenzweigd86659c2020-03-06 09:43:43 -0500339 /* For creating temporaries */
340 unsigned temp_alloc;
341
Alyssa Rosenzweig83c45622020-03-05 10:25:19 -0500342 /* Stats for shader-db */
343 unsigned instruction_count;
Alyssa Rosenzweig987aea12020-03-05 17:03:53 -0500344 unsigned loop_count;
Alyssa Rosenzweig55dab922020-03-05 16:44:49 -0500345} bi_context;
346
347static inline bi_instruction *
348bi_emit(bi_context *ctx, bi_instruction ins)
349{
350 bi_instruction *u = rzalloc(ctx, bi_instruction);
351 memcpy(u, &ins, sizeof(ins));
352 list_addtail(&u->link, &ctx->current_block->instructions);
353 return u;
354}
355
356static inline void
357bi_remove_instruction(bi_instruction *ins)
358{
359 list_del(&ins->link);
360}
Alyssa Rosenzweigeceaea42020-03-02 19:47:11 -0500361
Alyssa Rosenzweig230be612020-03-02 20:24:03 -0500362/* So we can distinguish between SSA/reg/sentinel quickly */
363#define BIR_NO_ARG (0)
364#define BIR_IS_REG (1)
365
Alyssa Rosenzweiga2c12652020-03-03 07:45:33 -0500366/* If high bits are set, instead of SSA/registers, we have specials indexed by
367 * the low bits if necessary.
368 *
369 * Fixed register: do not allocate register, do not collect $200.
370 * Uniform: access a uniform register given by low bits.
371 * Constant: access the specified constant
372 * Zero: special cased to avoid wasting a constant
373 */
374
375#define BIR_INDEX_REGISTER (1 << 31)
376#define BIR_INDEX_UNIFORM (1 << 30)
377#define BIR_INDEX_CONSTANT (1 << 29)
378#define BIR_INDEX_ZERO (1 << 28)
379
380/* Keep me synced please so we can check src & BIR_SPECIAL */
381
382#define BIR_SPECIAL ((BIR_INDEX_REGISTER | BIR_INDEX_UNIFORM) | \
383 (BIR_INDEX_CONSTANT | BIR_INDEX_ZERO)
384
Alyssa Rosenzweig230be612020-03-02 20:24:03 -0500385static inline unsigned
Alyssa Rosenzweigd86659c2020-03-06 09:43:43 -0500386bi_make_temp(bi_context *ctx)
387{
388 return (ctx->impl->ssa_alloc + 1 + ctx->temp_alloc++) << 1;
389}
390
391static inline unsigned
392bi_make_temp_reg(bi_context *ctx)
393{
394 return ((ctx->impl->reg_alloc + ctx->temp_alloc++) << 1) | BIR_IS_REG;
395}
396
397static inline unsigned
Alyssa Rosenzweig230be612020-03-02 20:24:03 -0500398bir_ssa_index(nir_ssa_def *ssa)
399{
400 /* Off-by-one ensures BIR_NO_ARG is skipped */
401 return ((ssa->index + 1) << 1) | 0;
402}
403
404static inline unsigned
405bir_src_index(nir_src *src)
406{
407 if (src->is_ssa)
408 return bir_ssa_index(src->ssa);
409 else {
410 assert(!src->reg.indirect);
411 return (src->reg.reg->index << 1) | BIR_IS_REG;
412 }
413}
414
415static inline unsigned
416bir_dest_index(nir_dest *dst)
417{
418 if (dst->is_ssa)
419 return bir_ssa_index(&dst->ssa);
420 else {
421 assert(!dst->reg.indirect);
422 return (dst->reg.reg->index << 1) | BIR_IS_REG;
423 }
424}
425
Alyssa Rosenzweig8ec67182020-03-03 14:32:28 -0500426/* Iterators for Bifrost IR */
427
428#define bi_foreach_block(ctx, v) \
429 list_for_each_entry(bi_block, v, &ctx->blocks, link)
430
431#define bi_foreach_block_from(ctx, from, v) \
432 list_for_each_entry_from(bi_block, v, from, &ctx->blocks, link)
433
434#define bi_foreach_instr_in_block(block, v) \
435 list_for_each_entry(bi_instruction, v, &block->instructions, link)
436
437#define bi_foreach_instr_in_block_rev(block, v) \
438 list_for_each_entry_rev(bi_instruction, v, &block->instructions, link)
439
440#define bi_foreach_instr_in_block_safe(block, v) \
441 list_for_each_entry_safe(bi_instruction, v, &block->instructions, link)
442
443#define bi_foreach_instr_in_block_safe_rev(block, v) \
444 list_for_each_entry_safe_rev(bi_instruction, v, &block->instructions, link)
445
446#define bi_foreach_instr_in_block_from(block, v, from) \
447 list_for_each_entry_from(bi_instruction, v, from, &block->instructions, link)
448
449#define bi_foreach_instr_in_block_from_rev(block, v, from) \
450 list_for_each_entry_from_rev(bi_instruction, v, from, &block->instructions, link)
451
452#define bi_foreach_clause_in_block(block, v) \
453 list_for_each_entry(bi_clause, v, &block->clauses, link)
454
455#define bi_foreach_instr_global(ctx, v) \
456 bi_foreach_block(ctx, v_block) \
457 bi_foreach_instr_in_block(v_block, v)
458
459#define bi_foreach_instr_global_safe(ctx, v) \
460 bi_foreach_block(ctx, v_block) \
461 bi_foreach_instr_in_block_safe(v_block, v)
462
463#define bi_foreach_successor(blk, v) \
464 bi_block *v; \
465 bi_block **_v; \
466 for (_v = &blk->successors[0], \
467 v = *_v; \
468 v != NULL && _v < &blk->successors[2]; \
469 _v++, v = *_v) \
470
471/* Based on set_foreach, expanded with automatic type casts */
472
473#define bi_foreach_predecessor(blk, v) \
474 struct set_entry *_entry_##v; \
475 bi_block *v; \
476 for (_entry_##v = _mesa_set_next_entry(blk->predecessors, NULL), \
477 v = (bi_block *) (_entry_##v ? _entry_##v->key : NULL); \
478 _entry_##v != NULL; \
479 _entry_##v = _mesa_set_next_entry(blk->predecessors, _entry_##v), \
480 v = (bi_block *) (_entry_##v ? _entry_##v->key : NULL))
481
482#define bi_foreach_src(ins, v) \
483 for (unsigned v = 0; v < ARRAY_SIZE(ins->src); ++v)
484
Alyssa Rosenzweig5d16a812020-03-04 09:19:06 -0500485/* BIR manipulation */
486
487bool bi_has_outmod(bi_instruction *ins);
488bool bi_has_source_mods(bi_instruction *ins);
489bool bi_is_src_swizzled(bi_instruction *ins, unsigned s);
490
Alyssa Rosenzweigb329f8c2020-03-06 19:25:00 -0500491/* BIR passes */
492
493void bi_schedule(bi_context *ctx);
494
Alyssa Rosenzweigeceaea42020-03-02 19:47:11 -0500495#endif