panfrost: Use ralloc() to allocate instructions to avoid leaking those objs
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 28 Aug 2019 07:17:21 +0000 (09:17 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 28 Aug 2019 15:50:01 +0000 (17:50 +0200)
commit938c5b0148688f426235e81d6573f25e5021ceb7
tree819b1716d1ece65028d330222b6b48c5cd22bbd2
parent6e01575b6817d4e3b243a09b0cea90fdb5d40d2f
panfrost: Use ralloc() to allocate instructions to avoid leaking those objs

Instructions attached to blocks are never explicitly freed. Let's
use ralloc() to attach those objects to the compiler context so that
they are automatically freed when the ctx object is freed.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/compiler.h
src/panfrost/midgard/midgard_compile.c
src/panfrost/midgard/midgard_derivatives.c
src/panfrost/midgard/midgard_opt_invert.c
src/panfrost/midgard/midgard_opt_perspective.c
src/panfrost/midgard/midgard_ra.c
src/panfrost/midgard/midgard_schedule.c
src/panfrost/midgard/mir_promote_uniforms.c