panfrost/midgard: .pos propagation
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 23 May 2019 03:01:32 +0000 (03:01 +0000)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 4 Jun 2019 20:14:50 +0000 (20:14 +0000)
commit4a03d378270cdacadb5e519378f2f26f4bed06c0
treebbe14680be373f71a1945ffde99a4475895f2e5e
parent5da0a33fab0b3cc6ea03c102bd1e156904d983e5
panfrost/midgard: .pos propagation

A previous optimization converts fmax(x, 0.0) instructions to fmov.pos.
This pass then propagates the .pos from the move up to the source
instruction (when possible). From there, copy propagation will eliminate
the move.

In the future, we might prefer to do this in common NIR code like we do
for saturate, as Bifrost can also benefit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ryan Houdek <Sonicadvance1@gmail.com>
src/gallium/drivers/panfrost/midgard/midgard_compile.c