search for: my_calloc

Displaying 4 results from an estimated 4 matches for "my_calloc".

2012 May 23
2
[LLVMdev] alloc_size metadata
...This attribute exists in gcc since version 4.3. The attribute specifies that a function returns a buffer with the size given by the multiplication of the specified arguments. I would like to add new metadata to pass this information to LLVM IR. For example, take the following C code: void* my_calloc(size_t, size_t) __attribute__((alloc_size(1,2))); void* fn() { return my_calloc(1, 3); } which would get translated to: define i8* @fn() { entry: %call = call i8* @my_calloc(i32 1, i32 3), !alloc_size !0 ret i8* %call } declare i8* @my_calloc(i32, i32) !0 = metadata !{i32 0, i32 1}...
2012 May 24
0
[LLVMdev] alloc_size metadata
...c since version 4.3. > The attribute specifies that a function returns a buffer with the size > given by the multiplication of the specified arguments. I would like > to add new metadata to pass this information to LLVM IR. > > For example, take the following C code: > > void* my_calloc(size_t, size_t) __attribute__((alloc_size(1,2))); > > void* fn() { > return my_calloc(1, 3); > } > > > which would get translated to: > > > define i8* @fn() { > entry: > %call = call i8* @my_calloc(i32 1, i32 3), !alloc_size !0 > ret i8* %call >...
2012 May 24
5
[LLVMdev] alloc_size metadata
...; The attribute specifies that a function returns a buffer with the size >> given by the multiplication of the specified arguments. I would like >> to add new metadata to pass this information to LLVM IR. >> >> For example, take the following C code: >> >> void* my_calloc(size_t, size_t) __attribute__((alloc_size(1,2))); >> >> void* fn() { >> return my_calloc(1, 3); >> } >> >> >> which would get translated to: >> >> >> define i8* @fn() { >> entry: >> %call = call i8* @my_calloc(i32 1,...
2012 May 25
0
[LLVMdev] alloc_size metadata
...a function returns a buffer with the size > >> given by the multiplication of the specified arguments. I would like > >> to add new metadata to pass this information to LLVM IR. > >> > >> For example, take the following C code: > >> > >> void* my_calloc(size_t, size_t) __attribute__((alloc_size(1,2))); > >> > >> void* fn() { > >> return my_calloc(1, 3); > >> } > >> > >> > >> which would get translated to: > >> > >> > >> define i8* @fn() { > >> e...