diff options
author | Andreas Baierl <ichgeh@imkreisrum.de> | 2019-08-20 18:19:55 +0200 |
---|---|---|
committer | Erico Nunes <nunes.erico@gmail.com> | 2019-09-13 19:41:32 +0000 |
commit | 4b1a14fd47134a3810f9c15d137af4336819e081 (patch) | |
tree | ced29cf75960988fe2a6563bd1745ead25ec0dc7 /src/gallium/drivers/lima/ir/pp/regalloc.c | |
parent | 4ddadd63709769ff923687b4232e870f6fbcb8a8 (diff) | |
download | mesa-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.c | 5 |
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; } |