blob: 1cf23492fedf92db7c8a7f63e9d53992e92609aa [file] [log] [blame]
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001From 267dd1f4d571ee606141aa66f1665aa152b4e911 Mon Sep 17 00:00:00 2001
2From: t0b3 <thomas.bettler@gmail.com>
3Date: Sat, 10 Dec 2022 14:32:53 +0100
Andrew Geissler87f5cff2022-09-30 13:13:31 -05004Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error
Andrew Geissler87f5cff2022-09-30 13:13:31 -05005
Andrew Geisslerc5535c92023-01-27 16:10:19 -06006Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
7Reviewed-by: Adam Jackson <ajax@redhat.com>
8Closes: #6825
9Fixes: f1d20ec6 ("nir/nir_opt_move: handle non-SSA defs ")
10Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439>
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050011
Andrew Geisslerc5535c92023-01-27 16:10:19 -060012Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/267dd1f4d571ee606141aa66f1665aa152b4e911]
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050013---
Andrew Geisslerc5535c92023-01-27 16:10:19 -060014 src/compiler/nir/nir_opt_move.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050016
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050017diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c
Andrew Geisslerc5535c92023-01-27 16:10:19 -060018index 81bcde5c436..9aeb9f4cf86 100644
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050019--- a/src/compiler/nir/nir_opt_move.c
20+++ b/src/compiler/nir/nir_opt_move.c
Andrew Geisslerc5535c92023-01-27 16:10:19 -060021@@ -51,13 +51,13 @@
22 * lower register pressure.
23 */
24
25-static ALWAYS_INLINE bool
26+static inline bool
27 src_is_ssa(nir_src *src, void *state)
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050028 {
Andrew Geisslerc5535c92023-01-27 16:10:19 -060029 return src->is_ssa;
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050030 }
31
Andrew Geisslerc5535c92023-01-27 16:10:19 -060032-static ALWAYS_INLINE bool
33+static inline bool
34 instr_reads_register(nir_instr *instr)
35 {
36 return !nir_foreach_src(instr, src_is_ssa, NULL);