[Mesa-dev] [PATCH 00/11] nir: Add a pass management framework
Jason Ekstrand
jason at jlekstrand.net
Wed Oct 28 22:01:23 PDT 2015
On Oct 28, 2015 9:12 PM, "Kenneth Graunke" <kenneth at whitecape.org> wrote:
>
> On Wednesday, October 28, 2015 02:58:07 PM Kristian Høgsberg wrote:
> > On Wed, Oct 28, 2015 at 2:34 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> > > On Wed, Oct 28, 2015 at 2:32 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> > >> This series adds a nir_pass datastructure and some helpers for
managing
> > >> optimization and lowering passes. I've been meaning to get around
to this
> > >> for some time. There are a couple of primary benifits to this:
> > >>
> > >> First, this gives us a central place to put things such as
validating the
> > >> shader, printing it if it changes, etc. Right now, the i965 backend
calls
> > >> nir_validate_shader after each pass. We would also like to add
something
> > >> like we have in the i965 backend where it can be set to dump the IR
to a
> > >> file after every pass that changess it.
> > >>
> > >> Mor importantly, though, it moves metadata out of the passes them
selves
> > >> and into the runner. In the process of putting this series
together, I
> > >> found at least 3 or 4 optimization passes that don't properly
invalidate
> > >> metadata. By putting a metadata_preserved field in nir_pass and
handling
> > >> metadata in the pass runner, we make it much less likely that a pass
will
> > >> get this wrong. LLVM has a similar optimization pass architecture
for
> > >> precicely this reason.
> > >>
> > >> As a nice little side-benifit, we no longer have to iterate over all
of the
> > >> overloads with non-NULL impl pointers in each pass.
> > >
> > > Once again, git-send-email failed to send the last patch for whatever
> > > reason. The entire series can be found here:
> > >
> > > http://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/nir-pass
> >
> > Nice. Series,
> >
> > Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
>
> I plan to review this as well, so please hold off on pushing it for a
> little while. Thanks!
By all means, go ahead. It'd also be nice, while you're at it to weigh in
on how to handle passing arguments to passes. There are a number of ideas
thrown back-and-forth between Connor and myself on how to do it (if you can
sort through through the bike-shedding).
--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151028/6a2144be/attachment-0001.html>
More information about the mesa-dev
mailing list