lima/ppir: add support for unconditional branches and condition negation
authorVasily Khoruzhick <anarsoul@gmail.com>
Tue, 28 May 2019 03:02:55 +0000 (20:02 -0700)
committerVasily Khoruzhick <anarsoul@gmail.com>
Sat, 24 Aug 2019 01:19:46 +0000 (18:19 -0700)
commitfd129817f0ba6a58d8f190628b69c59f716191ef
treee0a0818c73168c8f095809b3e3aea9b6a2e0c974
parente15af23b73eb5a5c91c559fb4972637a06b9b924
lima/ppir: add support for unconditional branches and condition negation

We need 'negate' modifier for branch condition to minimize branching. Idea
is to generate following:

current_block: { ...; if (!statement) branch else_block; }
then_block: { ...; branch after_block; }
else_block: { ... }
after_block: { ... }

Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/ir/pp/codegen.c
src/gallium/drivers/lima/ir/pp/lower.c
src/gallium/drivers/lima/ir/pp/nir.c
src/gallium/drivers/lima/ir/pp/ppir.h