summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/lima/ir/pp/regalloc.c
diff options
context:
space:
mode:
authorAndreas Baierl <ichgeh@imkreisrum.de>2019-08-20 18:19:55 +0200
committerErico Nunes <nunes.erico@gmail.com>2019-09-13 19:41:32 +0000
commit4b1a14fd47134a3810f9c15d137af4336819e081 (patch)
treeced29cf75960988fe2a6563bd1745ead25ec0dc7 /src/gallium/drivers/lima/ir/pp/regalloc.c
parent4ddadd63709769ff923687b4232e870f6fbcb8a8 (diff)
downloadmesa-4b1a14fd47134a3810f9c15d137af4336819e081.tar.gz
lima/ppir: Add undef handling
Add a ppir dummy node for nir_ssa_undef_instr, create a reg for it and mark it as undefined, so that regalloc can set it non-interfering to avoid register pressure. Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de> Reviewed-by: Vasily Khozuzhick <anarsoul@gmail.com> Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Diffstat (limited to 'src/gallium/drivers/lima/ir/pp/regalloc.c')
-rw-r--r--src/gallium/drivers/lima/ir/pp/regalloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/lima/ir/pp/regalloc.c b/src/gallium/drivers/lima/ir/pp/regalloc.c
index c7012294178..dbec70acb4b 100644
--- a/src/gallium/drivers/lima/ir/pp/regalloc.c
+++ b/src/gallium/drivers/lima/ir/pp/regalloc.c
@@ -612,7 +612,10 @@ static bool ppir_regalloc_prog_try(ppir_compiler *comp, bool *spilled)
list_for_each_entry_from(ppir_reg, reg2, reg1->list.next,
&comp->reg_list, list) {
bool interference = false;
- if (reg1->live_in < reg2->live_in) {
+
+ if (reg1->undef || reg2->undef)
+ interference = false;
+ else if (reg1->live_in < reg2->live_in) {
if (reg1->live_out > reg2->live_in)
interference = true;
}