From 4fe03cf97c09d18b66de0747a93248d8f2a5fe01 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 26 May 2021 19:46:59 -0400 Subject: [PATCH] agx: Add inner loop nesting count field Needed for proper handling of break/continue with nested if-else. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_compiler.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/asahi/compiler/agx_compiler.h b/src/asahi/compiler/agx_compiler.h index e5cbfaf95e0..731f7e8dbe2 100644 --- a/src/asahi/compiler/agx_compiler.h +++ b/src/asahi/compiler/agx_compiler.h @@ -334,6 +334,11 @@ typedef struct { /* I don't really understand how writeout ops work yet */ bool did_writeout; + /* Number of nested control flow structures within the innermost loop. Since + * NIR is just loop and if-else, this is the number of nested if-else + * statements in the loop */ + unsigned loop_nesting; + /* During instruction selection, for inserting control flow */ agx_block *current_block;