Commit Graph

3 Commits

Author SHA1 Message Date
Jason Ekstrand f69d732fca nir/lower_goto_if: Clean up ralloc usage
It's really hard to track in this pass which sets are getting ralloc'd
off which other sets.  To avoid leaks, just pass a mem_ctx around
everywhere and ralloc almost everything off the one context.  We do keep
using recursion a few places where it's crystal clear what the parent
relationship is.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
2020-08-14 20:35:37 +00:00
Jason Ekstrand 202b4df4ae nir/lower_goto_if: Document some data structures
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
2020-08-14 20:35:37 +00:00
Julian Winkler b273611bb1 nir: Add a structurizer
v2 (Karol):
  renamed pathes to paths
  use more bool
  use _mesa_set_intersects
  deduplicated some code
  fixed some typos
v3 (Karol):
  don't enable structurizer as we do this in vtn now
v4 (Jason):
  A few clean-ups due to unstructured NIR changes
v5 (Jason):
  Misc whitespace and style cleanups

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
2020-08-14 20:35:36 +00:00