summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/compiler.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-30 10:46:17 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-30 15:50:25 -0700
commit28622f90882d9e13530bea9547a0793b1f4e7236 (patch)
tree480bc5d3de4d13fad218c7bb2a3920e520aed545 /src/panfrost/midgard/compiler.h
parent8e369966d7c98a1d03a82d4a964f44b47522f911 (diff)
pan/midgard: Add mir_insert_instruction*scheduled helpers
In order to run register allocation after scheduling, it is sometimes necessary to be able to insert instructions into an already-scheduled program. This is suboptimal, since it forces us to do a worst-case scheduling, but it is nevertheless required for correct handling of spills/fills. Let's add helpers to insert instructions as standalone bundles for use in spilling code. These helpers are minimal -- they *only* work on load/store ops or moves. They should not be used for anything but register spilling; any other instructions should be added prior to the schedule. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/compiler.h')
-rw-r--r--src/panfrost/midgard/compiler.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 0c9d329c6bf..cc63b6ce7c7 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -520,6 +520,9 @@ bool mir_nontrivial_source2_mod_simple(midgard_instruction *ins);
bool mir_nontrivial_mod(midgard_vector_alu_src src, bool is_int, unsigned mask);
bool mir_nontrivial_outmod(midgard_instruction *ins);
+void mir_insert_instruction_before_scheduled(compiler_context *ctx, midgard_block *block, midgard_instruction *tag, midgard_instruction ins);
+void mir_insert_instruction_after_scheduled(compiler_context *ctx, midgard_block *block, midgard_instruction *tag, midgard_instruction ins);
+
/* MIR goodies */
static const midgard_vector_alu_src blank_alu_src = {