pan/bi: Expose unit tested scheduler predicates

I want to move the tests to their own executable to integrate better
with meson.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109>
This commit is contained in:
Alyssa Rosenzweig 2021-07-28 12:04:20 -04:00 committed by Marge Bot
parent 0d08ce287b
commit 9358d1fca6
2 changed files with 14 additions and 7 deletions

View File

@ -479,7 +479,7 @@ bi_can_iaddc(bi_instr *ins)
ins->src[1].swizzle == BI_SWIZZLE_H01);
}
static bool
bool
bi_can_fma(bi_instr *ins)
{
/* Errata: *V2F32_TO_V2F16 with distinct sources raises
@ -507,7 +507,7 @@ bi_impacted_fadd_widens(bi_instr *I)
(swz0 == BI_SWIZZLE_H11 && swz1 == BI_SWIZZLE_H00);
}
static bool
bool
bi_can_add(bi_instr *ins)
{
/* +FADD.v2f16 lacks clamp modifier, use *FADD.v2f16 instead */
@ -544,7 +544,7 @@ bi_must_not_last(bi_instr *ins)
* be raised for unknown reasons (possibly an errata).
*/
static bool
bool
bi_must_message(bi_instr *ins)
{
return (bi_opcode_props[ins->op].message != BIFROST_MESSAGE_NONE) ||
@ -572,13 +572,13 @@ bi_fma_atomic(enum bi_opcode op)
}
}
static bool
bool
bi_reads_zero(bi_instr *ins)
{
return !(bi_fma_atomic(ins->op) || ins->op == BI_OPCODE_IMULD);
}
static bool
bool
bi_reads_temps(bi_instr *ins, unsigned src)
{
switch (ins->op) {
@ -593,7 +593,7 @@ bi_reads_temps(bi_instr *ins, unsigned src)
}
}
static bool
bool
bi_reads_t(bi_instr *ins, unsigned src)
{
/* Branch offset cannot come from passthrough */

View File

@ -893,10 +893,17 @@ void bi_opt_dce_post_ra(bi_context *ctx);
void bi_opt_push_ubo(bi_context *ctx);
void bi_lower_swizzle(bi_context *ctx);
void bi_lower_fau(bi_context *ctx);
void bi_schedule(bi_context *ctx);
void bi_assign_scoreboard(bi_context *ctx);
void bi_register_allocate(bi_context *ctx);
void bi_schedule(bi_context *ctx);
bool bi_can_fma(bi_instr *ins);
bool bi_can_add(bi_instr *ins);
bool bi_must_message(bi_instr *ins);
bool bi_reads_zero(bi_instr *ins);
bool bi_reads_temps(bi_instr *ins, unsigned src);
bool bi_reads_t(bi_instr *ins, unsigned src);
uint32_t bi_fold_constant(bi_instr *I, bool *unsupported);
void bi_opt_constant_fold(bi_context *ctx);