diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index 53efcb417df..36653e6fc60 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -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 */ diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 2c731ee9cae..b9d9870bb6e 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -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);