Displaying 4 results from an estimated 4 matches for "opt_33_with_header".
2009 Jun 13
4
[LLVMdev] ML types in LLVM
...object. Sometimes, however, the program itself accesses
the header. For example, to determine the length of an array (the
length is in the header). For every type I output it like this:
%opt_33 = { i32, %opt_45*, float }
I could also create another type which includes the header something like:
%opt_33_with_header = {i32, %opt_33 }
Is there any way to express that a pointer is actually a pointer to an
interior element of a type? Something like %opt_33_in_heap =
%opt_33_with_header:1 ?
Currently when I want to read the header of an %opt_33, I cast it to a
i32* and then use getelementptr -1. Is there a bette...
2009 Jun 13
0
[LLVMdev] ML types in LLVM
...t you can do is abuse address
spaces, giving every distinct type its own address space and casting
back and forth between address spaces as necessary.
> Is there any way to express that a pointer is actually a pointer to an
> interior element of a type? Something like %opt_33_in_heap =
> %opt_33_with_header:1 ?
Something like an ungetelementptr? No, sorry. That would be a
pretty nice extension, though obviously unsound, of course.
> Currently when I want to read the header of an %opt_33, I cast it to a
> i32* and then use getelementptr -1. Is there a better way?
I think it depends on (1) ex...
2009 Jun 14
5
[LLVMdev] ML types in LLVM
...al indicates that only addresses in space 0 can have GC
intrinsics used on them. Also I get the impression that this would be
a pretty unsafe idea. ;)
> Is there any way to express that a pointer is actually a pointer to an
> interior element of a type? Something like %opt_33_in_heap =
> %opt_33_with_header:1 ?
>
> Something like an ungetelementptr? No, sorry. That would be a
> pretty nice extension, though obviously unsound, of course.
Well, ungetelementptr could be nice, but I was hoping for something
even better: a way to refer to the whole object type (including the
header) even though...
2009 Jun 14
0
[LLVMdev] ML types in LLVM
...esses in space 0 can have GC
> intrinsics used on them. Also I get the impression that this would be
> a pretty unsafe idea. ;)
>
>> Is there any way to express that a pointer is actually a pointer to an
>> interior element of a type? Something like %opt_33_in_heap =
>> %opt_33_with_header:1 ?
>>
>> Something like an ungetelementptr? No, sorry. That would be a
>> pretty nice extension, though obviously unsound, of course.
>
> Well, ungetelementptr could be nice, but I was hoping for something
> even better: a way to refer to the whole object type (includ...