[Mesa-dev] [PATCH 3/4] nir: support to flatten_all in peephole-select

Kenneth Graunke kenneth at whitecape.org
Thu Apr 2 01:20:14 PDT 2015


On Wednesday, April 01, 2015 07:22:40 PM Connor Abbott wrote:
> I think it might be better here if we had a callback that backends can
> fill in that tells you when an instruction can be pulled out by the
> sel peephole. As Jason noted, you won't be able to do this for
> everything (notably, output writes and variable writes) and we'll
> probably need special handling for predicating discards if we want to
> be able to flatten everything. There are also a few cases where on
> i965 we aren't activating it when we could. Even then, I didn't think
> we'd need something this general, but with different backends with
> such varying needs I guess it makes more sense to go with the more
> general solution.

NIR does have nir_intrinsic_discard_if, which performs a conditional
discard.  Assignments can be handled by conditional selects.  In the
absence of other memory writes (atomics, images, etc), that's probably
sufficient, no?

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150402/b4dcf39a/attachment.sig>


More information about the mesa-dev mailing list