OSDN Git Service

lima/ppir: simplify select op lowering and scheduling
authorErico Nunes <nunes.erico@gmail.com>
Sun, 21 Jul 2019 13:07:50 +0000 (15:07 +0200)
committerErico Nunes <nunes.erico@gmail.com>
Sun, 4 Aug 2019 11:38:18 +0000 (13:38 +0200)
commitfd29c4d6c561272ab34a71a308c36a0bb72b4816
treed52aa442acc8084e806db4b213d7431c1e045951
parenteb82637c2f9cad0c84d09502b7e65166448c0475
lima/ppir: simplify select op lowering and scheduling

The select operation relies on the select condition coming from the
result of the the alu scalar mult slot, in the same instruction.
The current implementation creates a mov node to be the predecessor of
select, and then relies on an exception during scheduling to ensure that
both ops are inserted in the same instruction.

Now that the ppir scheduler supports pipeline register dependencies,
this can be simplified by making the mov explicitly output to the fmul
pipeline register, and the scheduler can place it without an exception.

Since the select condition can only be placed in the scalar mult slot,
differently than a regular mov, define a separate op for it.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
src/gallium/drivers/lima/ir/pp/codegen.c
src/gallium/drivers/lima/ir/pp/lower.c
src/gallium/drivers/lima/ir/pp/node.c
src/gallium/drivers/lima/ir/pp/node_to_instr.c
src/gallium/drivers/lima/ir/pp/ppir.h