search for: my_recalloc

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

Did you mean: my_realloc
2012 May 29
2
[LLVMdev] alloc_size metadata
...t 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 > function call is required instead). > As long as the fu...
2012 May 29
0
[LLVMdev] alloc_size metadata
...tion 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 instead). As long as the function is marked as readnone, I th...
2012 May 29
2
[LLVMdev] alloc_size metadata
...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
...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 > > function call is requir...
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; 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...
2012 May 29
1
[LLVMdev] alloc_size metadata
...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 instead). I had in mind e...
2012 May 30
2
[LLVMdev] alloc_size metadata
...;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...