mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
gallivm: add lp_build_alloca_undef
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
17e88e276c
commit
41001ca4bd
2 changed files with 24 additions and 0 deletions
|
|
@ -507,6 +507,25 @@ lp_build_alloca(struct gallivm_state *gallivm,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Like lp_build_alloca, but do not zero-initialize the variable.
|
||||
*/
|
||||
LLVMValueRef
|
||||
lp_build_alloca_undef(struct gallivm_state *gallivm,
|
||||
LLVMTypeRef type,
|
||||
const char *name)
|
||||
{
|
||||
LLVMBuilderRef first_builder = create_builder_at_entry(gallivm);
|
||||
LLVMValueRef res;
|
||||
|
||||
res = LLVMBuildAlloca(first_builder, type, name);
|
||||
|
||||
LLVMDisposeBuilder(first_builder);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Allocate an array of scalars/vectors.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -195,6 +195,11 @@ lp_build_alloca(struct gallivm_state *gallivm,
|
|||
LLVMTypeRef type,
|
||||
const char *name);
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_alloca_undef(struct gallivm_state *gallivm,
|
||||
LLVMTypeRef type,
|
||||
const char *name);
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_array_alloca(struct gallivm_state *gallivm,
|
||||
LLVMTypeRef type,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue