Displaying 1 result from an estimated 1 matches for "tmp_207".
Did you mean:
tmp20
2007 Feb 13
2
[LLVMdev] Unused malloc/free don't get optimized
Hi, i have some code that allocate some memory, store the pointer to a
variable, read it back and deallocates it, like this:
int %main(int %argc, ubyte** %argv)
{
%c_19 = alloca ubyte*
%malloc_206 = malloc ubyte, uint 10
store ubyte* %malloc_206, ubyte** %c_19
%tmp_207 = load ubyte** %c_19
free ubyte* %tmp_207
ret int 0
}
i expected the optimized to remove everything, but after running it
the code i get is:
int %main(int %argc, ubyte** %argv) {
%malloc_206 = malloc [10 x ubyte]
%malloc_206.sub = getelementptr [10 x ubyte]* %malloc_206, int 0, int 0
free uby...