Hi, I'm currently working on LLVM IR and have a question.
I'm creating function using following code.
Function::Create(Ty, Linkage, "tile_load", mod);
In doing so, my function type Ty is represented as:
FunctionType *Ty = FunctionType::get(Builder.getVoidTy(), params, false);
One of my params is an array, which is currently pointed with int32*.
params.push_back(Type::getInt32PtrTy(mod->getContext()));
I want to change this part with ArrayType like [10 * i32*] but with varying array size.
I know that array type is defined like:
Type* I = IntegerType::getInt32Ty(mod->getContext());
auto num = 6;
ArrayType* arrayType = ArrayType::get(I, num);
But have no idea how to make an array type with size varying.
Does any body know how can it be done?
Thank you in advance.
jwlee
bitcastinstruction. - arrowd