summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_flow.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-10-09 21:39:14 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-10-09 21:39:14 +0100
commit307df6a858dcab1bc10f3f52d9968acb3ea6d74f (patch)
tree05e09d4b53cd98c4331267a28b4b4cfed1b419be /src/gallium/auxiliary/gallivm/lp_bld_flow.h
parentd0ea4641597d23df2198fd76ed7430c06cef8c5d (diff)
gallivm: Cleanup the rest of the flow module.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_flow.h')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_flow.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_flow.h b/src/gallium/auxiliary/gallivm/lp_bld_flow.h
index a4fc8d1955..e21d9de280 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_flow.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_flow.h
@@ -41,29 +41,33 @@
struct lp_type;
-struct lp_build_flow_context;
-
-
-struct lp_build_flow_context *
-lp_build_flow_create(LLVMBuilderRef builder);
+/**
+ * Early exit. Useful to skip to the end of a function or block when
+ * the execution mask becomes zero or when there is an error condition.
+ */
+struct lp_build_skip_context
+{
+ LLVMBuilderRef builder;
-void
-lp_build_flow_destroy(struct lp_build_flow_context *flow);
+ /** Block to skip to */
+ LLVMBasicBlockRef block;
+};
void
-lp_build_flow_skip_begin(struct lp_build_flow_context *flow);
+lp_build_flow_skip_begin(struct lp_build_skip_context *ctx,
+ LLVMBuilderRef builder);
void
-lp_build_flow_skip_cond_break(struct lp_build_flow_context *flow,
+lp_build_flow_skip_cond_break(struct lp_build_skip_context *ctx,
LLVMValueRef cond);
void
-lp_build_flow_skip_end(struct lp_build_flow_context *flow);
+lp_build_flow_skip_end(struct lp_build_skip_context *ctx);
struct lp_build_mask_context
{
- struct lp_build_flow_context *flow;
+ struct lp_build_skip_context skip;
LLVMTypeRef reg_type;
@@ -73,7 +77,7 @@ struct lp_build_mask_context
void
lp_build_mask_begin(struct lp_build_mask_context *mask,
- struct lp_build_flow_context *flow,
+ LLVMBuilderRef builder,
struct lp_type type,
LLVMValueRef value);