Displaying 7 results from an estimated 7 matches for "wonder_alloc".
Did you mean:
wonder_malloc
2012 May 29
2
[LLVMdev] alloc_size metadata
...r pass to drop
> the metadata and remove the calls. I still don't like having the
> explicit calls there, though. Any suggestions to remove the functions
> calls from there?
How about this:
define i32 @lo(i32) {
ret i32 0
}
define i32 @hi(i32 %n) {
ret i32 %n
}
declare i8* @wonder_allocator(i32)
define i8* @foo(i32 %n) {
%r = call i8* @wonder_allocator(i32 %n), !alloc !0
ret i8* %r
}
!0 = metadata !{ i32 (i32)* @lo, i32 (i32)* @hi }
The main problem I see is that if you declare @lo and @hi to have internal
linkage then the optimizers will zap them. Maybe there's a n...
2012 May 29
2
[LLVMdev] alloc_size metadata
...re, though. Any suggestions to remove the
>> > functions calls from there?
>>
>> How about this:
>>
>> define i32 @lo(i32) {
>> ret i32 0
>> }
>>
>> define i32 @hi(i32 %n) {
>> ret i32 %n
>> }
>>
>> declare i8* @wonder_allocator(i32)
>>
>> define i8* @foo(i32 %n) {
>> %r = call i8* @wonder_allocator(i32 %n), !alloc !0
>> ret i8* %r
>> }
>>
>> !0 = metadata !{ i32 (i32)* @lo, i32 (i32)* @hi }
>
> This is the format that I had in mind.
>
>>
>>
>>...
2012 May 29
0
[LLVMdev] alloc_size metadata
...9;t like having the
> > explicit calls there, though. Any suggestions to remove the
> > functions calls from there?
>
> How about this:
>
> define i32 @lo(i32) {
> ret i32 0
> }
>
> define i32 @hi(i32 %n) {
> ret i32 %n
> }
>
> declare i8* @wonder_allocator(i32)
>
> define i8* @foo(i32 %n) {
> %r = call i8* @wonder_allocator(i32 %n), !alloc !0
> ret i8* %r
> }
>
> !0 = metadata !{ i32 (i32)* @lo, i32 (i32)* @hi }
This is the format that I had in mind.
>
>
> The main problem I see is that if you declare @lo...
2012 May 30
0
[LLVMdev] alloc_size metadata
...ctions calls from there?
> >>
> >> How about this:
> >>
> >> define i32 @lo(i32) {
> >> ret i32 0
> >> }
> >>
> >> define i32 @hi(i32 %n) {
> >> ret i32 %n
> >> }
> >>
> >> declare i8* @wonder_allocator(i32)
> >>
> >> define i8* @foo(i32 %n) {
> >> %r = call i8* @wonder_allocator(i32 %n), !alloc !0
> >> ret i8* %r
> >> }
> >>
> >> !0 = metadata !{ i32 (i32)* @lo, i32 (i32)* @hi }
> >
> > This is the format that I...
2012 May 30
2
[LLVMdev] alloc_size metadata
...gt; >> How about this:
>> >>
>> >> define i32 @lo(i32) {
>> >> ret i32 0
>> >> }
>> >>
>> >> define i32 @hi(i32 %n) {
>> >> ret i32 %n
>> >> }
>> >>
>> >> declare i8* @wonder_allocator(i32)
>> >>
>> >> define i8* @foo(i32 %n) {
>> >> %r = call i8* @wonder_allocator(i32 %n), !alloc !0
>> >> ret i8* %r
>> >> }
>> >>
>> >> !0 = metadata !{ i32 (i32)* @lo, i32 (i32)* @hi }
>> >
>...
2012 May 29
0
[LLVMdev] alloc_size metadata
>> 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 they do, can it
>> >>>> really buy them anything? How about
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