summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-13 13:17:34 -0700
committerMatt Turner <[email protected]>2016-05-16 11:06:15 -0700
commit41915512624b26f10ebc2e7c41e9b982fb9208bb (patch)
treee225ee887c9d4a3311ca409953ffe731ce647df0 /src/compiler/nir/nir.h
parent377ab2f2d781aef9408f26b24bb8b17426be6606 (diff)
nir: Mark nir_start_block()/nir_impl_last_block() with returns_nonnull.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index cb9d44abafb..2cfca3ed80a 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -34,6 +34,7 @@
#include "util/ralloc.h"
#include "util/set.h"
#include "util/bitset.h"
+#include "util/macros.h"
#include "compiler/nir_types.h"
#include "compiler/shader_enums.h"
#include <stdio.h>
@@ -1550,16 +1551,16 @@ typedef struct {
nir_metadata valid_metadata;
} nir_function_impl;
-static inline nir_block *
+ATTRIBUTE_RETURNS_NONNULL static inline nir_block *
nir_start_block(nir_function_impl *impl)
{
- return (nir_block *) exec_list_get_head(&impl->body);
+ return (nir_block *) impl->body.head;
}
-static inline nir_block *
+ATTRIBUTE_RETURNS_NONNULL static inline nir_block *
nir_impl_last_block(nir_function_impl *impl)
{
- return (nir_block *) exec_list_get_tail(&impl->body);
+ return (nir_block *) impl->body.tail_pred;
}
static inline nir_cf_node *