<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div><br></div><div>In my llvm code I want to create some function calls. The function prototype is as follows: </div><div>  </div><div><div>int memoize ( char *function_name, </div><div>               <span class="Apple-tab-span" style="white-space:pre">             </span>int *int_params, unsigned num_ints,</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>               double *double_params, unsigned num_doubles)</div></div><div><br></div><div>In order to create these calls I do the following for example:</div><div><br></div><div>  %88 = <b>alloca</b> [7 x i8]</div><div>  store volatile [7 x i8] c"ORACLE\00", [7 x i8]* %88</div><div>  %89 = getelementptr [7 x i8]* %88, i32 0, i32 0</div><div>  </div><div>  %90 = <b>alloca</b> [1 x i32]</div><div>  %91 = getelementptr inbounds [1 x i32]* %90, i32 0, i32 0</div><div>  store volatile i32 3, i32* %91</div><div>  %92 = getelementptr inbounds [1 x i32]* %90, i32 0, i32 0</div><div>  </div><div>  %93 = <b>alloca</b> [0 x double]</div><div>  %94 = getelementptr inbounds [0 x double]* %93, i32 0, i32 0</div><div><br></div><div>  %95 = call i32 @memoize(i8* %89, i32* %92, i32 1, double* %94, i32 0)</div><div><br></div><div>This works, but I need to create *many* such function calls in one "parent" function, and eventually all the "<b>alloca</b>" instructions add up to overflowing the stack. So I have two questions:</div><div><br></div><div>a) Is it possible to create the arrays for my function call args without using the alloca instruction (maybe use heap)?</div><div>b) If not, can I release those alloca'd spaces during the function execution and not after it returns?</div><div><br></div><div>Thanks,</div><div>Ali</div></body></html>