Displaying 9 results from an estimated 9 matches for "buildrectyp".
Did you mean:
buildrectype
2010 Nov 11
2
[LLVMdev] defining types structurally equivalent to a recursive type
Hi all,
http://www.llvm.org/docs/ProgrammersManual.html#BuildRecType suggests
us to define recursive types via opaque and refine. Since LLVM has
structural types, %rt = type { %rt* } and %rt1 = type { %rt* } should
be same structurally. I tested the following code,
%rt = type { %rt* }
%rt1 = type { %rt* }
define i32 @main() nounwind {
entry:
%0 = alloca %rt...
2008 Jun 12
0
[LLVMdev] code generation order revisited.
...or a type that isn't completely
> known yet -- or is thet avoided by having a type 'pointer' instead
> of 'poimter-to-foo'?
Partially opaque types can be refined. This section of the
programmer's manual is applicable:
http://llvm.org/docs/ProgrammersManual.html#BuildRecType
— Gordon
2010 Nov 11
0
[LLVMdev] defining types structurally equivalent to a recursive type
On Thu, Nov 11, 2010 at 8:28 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
> Hi all,
>
> http://www.llvm.org/docs/ProgrammersManual.html#BuildRecType suggests
> us to define recursive types via opaque and refine. Since LLVM has
> structural types, %rt = type { %rt* } and %rt1 = type { %rt* } should
> be same structurally. I tested the following code,
>
> %rt = type { %rt* }
> %rt1 = type { %rt* }
>
> define i32 @main() n...
2008 Jun 12
2
[LLVMdev] code generation order revisited.
>>
>> I think I may have found an exception to this -- the API seems to
>> require me to have all the fields for a struct ready before I
>> construct the struct. I don't have the ability to make a struct
>> type, use it to declare some variables, and still contribute fields
>> to it during the rest of the compilation.
>>
>> Is there a
2010 Jan 06
2
[LLVMdev] Correct way to resolve recursive type information?
Hi,
I've followed the instructions on constructing recursive types (
http://llvm.org/docs/ProgrammersManual.html#BuildRecType) and I can
succesfully create simple recursive types using the C bindings (e.g. struct
Test { struct Test *t };). I want to generalize this to get type information
from my language into generated LLVM code. My language allows arbitrary
forward type declarations that I resolve using two passes - fi...
2008 May 11
0
[LLVMdev] Python bindings available.
...y sort of
>> data structure.
>
> On it already. BTW, where can I find a good example of how to use it?
To close the loop with C++ syntax, LLVMTypeHandleRef is really a
pointer to a heap-allocated PATypeHolder, which is discussed here:
http://llvm.org/docs/ProgrammersManual.html#BuildRecType
The file test/Bindings/Ocaml/vmcore.ml contains this fragment:
(* RUN: grep -v {RecursiveTy.*RecursiveTy} < %t.ll
*)
let ty = opaque_type () in
let th = handle_to_type ty in
refine_type ty (pointer_type ty);
let ty = type_of_handle th in
insist (define_type_name "Re...
2008 Jun 13
1
[LLVMdev] code generation order revisited.
On Thu, 12 Jun 2008 16:05:19 -0400, Gordon Henriksen wrote:
>
> Partially opaque types can be refined. This section of the programmer's
> manual is applicable:
>
> http://llvm.org/docs/ProgrammersManual.html#BuildRecType
>
> — Gordon
Here it is:
: // Create the initial outer struct
: PATypeHolder StructTy = OpaqueType::get();
: std::vector<const Type*> Elts;
: Elts.push_back(PointerType::get(StructTy));
: Elts.push_back(Type::Int32Ty);
: StructType *NewSTy = StructType::get(Elts);
Here NewSTy is a...
2010 Jan 06
0
[LLVMdev] Fwd: Correct way to resolve recursive type information?
...il all refineAbstractTypeTo()'s are done.
-- James
On Wed, Jan 6, 2010 at 5:20 AM, James Williams <junk at giantblob.com> wrote:
>
>> Hi,
>>
>> I've followed the instructions on constructing recursive types (
>> http://llvm.org/docs/ProgrammersManual.html#BuildRecType) and I can
>> succesfully create simple recursive types using the C bindings (e.g. struct
>> Test { struct Test *t };). I want to generalize this to get type information
>> from my language into generated LLVM code. My language allows arbitrary
>> forward type declarations...
2008 May 11
2
[LLVMdev] Python bindings available.
Hi Gordon,
Thanks for your comments.
> > Constant.string(value, dont_null_terminate) -- value is a string
> > Constant.struct(consts, packed) -- a struct, consts is a list of
> > other constants, packed is boolean
>
> I did this in Ocaml initially, but found the boolean constants pretty
> confusing to read in code. I kept asking "What's that random true