search for: opt_33_in_heap

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

2009 Jun 13
4
[LLVMdev] ML types in LLVM
...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 better way?
2009 Jun 13
0
[LLVMdev] ML types in LLVM
...at won't work. What 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...
2009 Jun 14
5
[LLVMdev] ML types in LLVM
...as necessary. The manual 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 (includ...
2009 Jun 14
0
[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 t...