[Mesa-dev] [PATCH 2/2] nir: Mark nir_start_block()/nir_impl_last_block() with returns_nonnull.
Matt Turner
mattst88 at gmail.com
Fri May 13 21:31:31 UTC 2016
---
src/compiler/nir/nir.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 8a616d4..7ea6791 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>
@@ -1544,16 +1545,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 *
--
2.7.3
More information about the mesa-dev
mailing list