search for: get_realloc_size

Displaying 8 results from an estimated 8 matches for "get_realloc_size".

2012 May 29
2
[LLVMdev] alloc_size metadata
...turn the offset of the start of the memory, and the other the offset of the end of the memory (or the end plus 1), i.e. a range. This seems more uniform to me, but I don't have a strong preference. > Something like this would work: > > define i8* @foo() { > %0 = tail call i32 @get_realloc_size(i8* null, i32 42) > %call = tail call i8* @my_recalloc(i8* null, i32 42) nounwind, > !alloc_size !{i32 %0} > ret i8* %call > } > > Basically I just added a function call as the metadata (it's not > currently possible to add the function itself to the metadata; the &...
2012 May 29
0
[LLVMdev] alloc_size metadata
...turned pointer of the tagged > function, and then one function can return the start of the region and > the other the length. Ok, so this seems to be the most general proposal, which can obviously handle all cases. Something like this would work: define i8* @foo() { %0 = tail call i32 @get_realloc_size(i8* null, i32 42) %call = tail call i8* @my_recalloc(i8* null, i32 42) nounwind, !alloc_size !{i32 %0} ret i8* %call } Basically I just added a function call as the metadata (it's not currently possible to add the function itself to the metadata; the function call is required inste...
2012 May 29
2
[LLVMdev] alloc_size metadata
...offset of the end of the memory (or >> the end plus 1), i.e. a range. This seems more uniform to me, but I >> don't have a strong preference. >> >> > Something like this would work: >> > >> > define i8* @foo() { >> > %0 = tail call i32 @get_realloc_size(i8* null, i32 42) >> > %call = tail call i8* @my_recalloc(i8* null, i32 42) nounwind, >> > !alloc_size !{i32 %0} >> > ret i8* %call >> > } >> > >> > Basically I just added a function call as the metadata (it's not >> > curre...
2012 May 29
0
[LLVMdev] alloc_size metadata
...memory, and the other the offset of the end of the memory (or > the end plus 1), i.e. a range. This seems more uniform to me, but I > don't have a strong preference. > > > Something like this would work: > > > > define i8* @foo() { > > %0 = tail call i32 @get_realloc_size(i8* null, i32 42) > > %call = tail call i8* @my_recalloc(i8* null, i32 42) nounwind, > > !alloc_size !{i32 %0} > > ret i8* %call > > } > > > > Basically I just added a function call as the metadata (it's not > > currently possible to add the fun...
2012 May 25
3
[LLVMdev] alloc_size metadata
On Fri, 25 May 2012 17:43:52 +0200 Duncan Sands <baldrick at free.fr> wrote: > Hi John, > > On 25/05/12 17:22, John Criswell wrote: > > On 5/25/12 2:16 AM, Duncan Sands wrote: > >> Hi John, > >> > >>>>> I'm implementing the alloc_size function attribute in clang. > >>>> does anyone actually use this attribute? And if
2012 May 30
0
[LLVMdev] alloc_size metadata
...gt; memory (or the end plus 1), i.e. a range. This seems more uniform > >> to me, but I don't have a strong preference. > >> > >> > Something like this would work: > >> > > >> > define i8* @foo() { > >> > %0 = tail call i32 @get_realloc_size(i8* null, i32 42) > >> > %call = tail call i8* @my_recalloc(i8* null, i32 42) > >> > nounwind, !alloc_size !{i32 %0} > >> > ret i8* %call > >> > } > >> > > >> > Basically I just added a function call as the metadata (it...
2012 May 29
1
[LLVMdev] alloc_size metadata
...tion, and then one function can return the start of the > > region and the other the length. > > Ok, so this seems to be the most general proposal, which can > obviously handle all cases. > Something like this would work: > > define i8* @foo() { > %0 = tail call i32 @get_realloc_size(i8* null, i32 42) > %call = tail call i8* @my_recalloc(i8* null, i32 42) nounwind, > !alloc_size !{i32 %0} > ret i8* %call > } > > Basically I just added a function call as the metadata (it's not > currently possible to add the function itself to the metadata; th...
2012 May 30
2
[LLVMdev] alloc_size metadata
...lus 1), i.e. a range. This seems more uniform >> >> to me, but I don't have a strong preference. >> >> >> >> > Something like this would work: >> >> > >> >> > define i8* @foo() { >> >> > %0 = tail call i32 @get_realloc_size(i8* null, i32 42) >> >> > %call = tail call i8* @my_recalloc(i8* null, i32 42) >> >> > nounwind, !alloc_size !{i32 %0} >> >> > ret i8* %call >> >> > } >> >> > >> >> > Basically I just added a function...