diff options
author | Brian Paul <[email protected]> | 2010-11-30 16:07:52 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-11-30 16:35:12 -0700 |
commit | efc82aef35a2aac5d2ed9774f6d28f2626796416 (patch) | |
tree | 72fe4482d72dbeb8e41b15793b21f38de62ef834 /src/gallium/auxiliary/gallivm/lp_bld_flow.h | |
parent | 1f1375d4d876c2c85156e02a177254684446040b (diff) |
gallivm/llvmpipe: squash merge of the llvm-context branch
This branch defines a gallivm_state structure which contains the
LLVMBuilderRef, LLVMContextRef, etc. All data structures built with
this object can be periodically freed during a "garbage collection"
operation.
The gallivm_state object has to be passed to most of the builder
functions where LLVMBuilderRef used to be used.
Conflicts:
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/drivers/llvmpipe/lp_state_setup.c
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_flow.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_flow.h | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_flow.h b/src/gallium/auxiliary/gallivm/lp_bld_flow.h index e729ee6eaac..3cd5a9f42a5 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_flow.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_flow.h @@ -47,7 +47,7 @@ struct lp_type; */ struct lp_build_skip_context { - LLVMBuilderRef builder; + struct gallivm_state *gallivm; /** Block to skip to */ LLVMBasicBlockRef block; @@ -55,7 +55,7 @@ struct lp_build_skip_context void lp_build_flow_skip_begin(struct lp_build_skip_context *ctx, - LLVMBuilderRef builder); + struct gallivm_state *gallivm); void lp_build_flow_skip_cond_break(struct lp_build_skip_context *ctx, @@ -77,7 +77,7 @@ struct lp_build_mask_context void lp_build_mask_begin(struct lp_build_mask_context *mask, - LLVMBuilderRef builder, + struct gallivm_state *gallivm, struct lp_type type, LLVMValueRef value); @@ -107,31 +107,28 @@ lp_build_mask_end(struct lp_build_mask_context *mask); */ struct lp_build_loop_state { - LLVMBasicBlockRef block; - LLVMValueRef counter_var; - LLVMValueRef counter; + LLVMBasicBlockRef block; + LLVMValueRef counter_var; + LLVMValueRef counter; + struct gallivm_state *gallivm; }; void -lp_build_loop_begin(LLVMBuilderRef builder, - LLVMValueRef start, - struct lp_build_loop_state *state); - +lp_build_loop_begin(struct lp_build_loop_state *state, + struct gallivm_state *gallivm, + LLVMValueRef start); void -lp_build_loop_end(LLVMBuilderRef builder, +lp_build_loop_end(struct lp_build_loop_state *state, LLVMValueRef end, - LLVMValueRef step, - struct lp_build_loop_state *state); + LLVMValueRef step); void -lp_build_loop_end_cond(LLVMBuilderRef builder, +lp_build_loop_end_cond(struct lp_build_loop_state *state, LLVMValueRef end, LLVMValueRef step, - LLVMIntPredicate cond, - struct lp_build_loop_state *state); - + LLVMIntPredicate cond); @@ -140,7 +137,7 @@ lp_build_loop_end_cond(LLVMBuilderRef builder, */ struct lp_build_if_state { - LLVMBuilderRef builder; + struct gallivm_state *gallivm; LLVMValueRef condition; LLVMBasicBlockRef entry_block; LLVMBasicBlockRef true_block; @@ -151,7 +148,7 @@ struct lp_build_if_state void lp_build_if(struct lp_build_if_state *ctx, - LLVMBuilderRef builder, + struct gallivm_state *gallivm, LLVMValueRef condition); void @@ -161,15 +158,15 @@ void lp_build_endif(struct lp_build_if_state *ctx); LLVMBasicBlockRef -lp_build_insert_new_block(LLVMBuilderRef builder, const char *name); +lp_build_insert_new_block(struct gallivm_state *gallivm, const char *name); LLVMValueRef -lp_build_alloca(LLVMBuilderRef builder, +lp_build_alloca(struct gallivm_state *gallivm, LLVMTypeRef type, const char *name); LLVMValueRef -lp_build_array_alloca(LLVMBuilderRef builder, +lp_build_array_alloca(struct gallivm_state *gallivm, LLVMTypeRef type, LLVMValueRef count, const char *name); |