Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Order of fiels and structure usage"
2008 Sep 12
0
[LLVMdev] Order of fiels and structure usage
On Fri, Sep 12, 2008 at 9:35 AM, Hendrik Boom <hendrik at topoi.pooq.com> wrote:
> I'd like to be able to make use of a structure type and its fields before
> it is completely defined. To be specific, let me ask detailed questions
> at various stages in the construction of a recursive type. I copy from
>
> http://llvm.org/docs/ProgrammersManual.html#TypeResolve
>
>
2005 Mar 08
0
[LLVMdev] Recursive Types using the llvm support library
On Mon, 7 Mar 2005, John Carrino wrote:
> As far as I can tell, when you construct a type using the support
> library StructType::get, you have to pass in a list of types. How can
> you make a Recursive type by passing in a pointer to the type you are
> constucting.
>
> An example where something really simple like the line below was output
> would be perfect.
>
>
2005 Mar 08
2
[LLVMdev] Recursive Types using the llvm support library
>> An example where something really simple like the line below was output
>> would be perfect.
>>
>> %struct.linked_list = type { %struct.linked_list*, %sbyte* }
>
> Use something like this:
>
> PATypeHolder StructTy = OpaqueType::get();
> std::vector<const Type*> Elts;
> Elts.push_back(PointerType::get(StructTy));
>
2005 Mar 08
0
[LLVMdev] Recursive Types using the llvm support library
On Tue, 8 Mar 2005, Vladimir Merzliakov wrote:
>>> An example where something really simple like the line below was output
>>> would be perfect.
>>>
>>> %struct.linked_list = type { %struct.linked_list*, %sbyte* }
>>
>> Use something like this:
>>
>> PATypeHolder StructTy = OpaqueType::get();
>> std::vector<const
2005 Mar 15
2
[LLVMdev] Dynamic Creation of a simple program
Thanks for the information
I am trying to use one of your examples for recursive data structures:
=========================
PATypeHolder StructTy = OpaqueType::get();
std::vector<const Type*> Elts;
Elts.push_back(PointerType::get(StructTy));
Elts.push_back(PointerType::get(Type::SByteTy));
StructType *NewSTy = StructType::get(Elts);
// At this point, NewSTy = "{ opaque*, sbyte*
2005 Mar 15
0
[LLVMdev] Dynamic Creation of a simple program
On Tue, 15 Mar 2005, xavier wrote:
> Thanks for the information
> I am trying to use one of your examples for recursive data structures:
>
> =========================
> PATypeHolder StructTy = OpaqueType::get();
> std::vector<const Type*> Elts;
> Elts.push_back(PointerType::get(StructTy));
> Elts.push_back(PointerType::get(Type::SByteTy));
> StructType *NewSTy =
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;
:
2008 Sep 13
3
[LLVMdev] Order of fiels and structure usage
On Fri, 12 Sep 2008 11:06:30 -0700, Eli Friedman wrote:
> On Fri, Sep 12, 2008 at 9:35 AM, Hendrik Boom <hendrik at topoi.pooq.com>
> wrote:
>> I'd like to be able to make use of a structure type and its fields
>> before it is completely defined. To be specific, let me ask detailed
>> questions at various stages in the construction of a recursive type. I
2008 Oct 03
1
[LLVMdev] Question about recursive types
Dear all,
I'm trying to run the example of recursive type construction examples
in LLVM Programmer's Manual, here is the code:
// 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);
// At this point, NewSTy =
2005 Mar 08
3
[LLVMdev] Recursive Types using the llvm support library
As far as I can tell, when you construct a type using the support
library StructType::get, you have to pass in a list of types. How can
you make a Recursive type by passing in a pointer to the type you are
constucting.
An example where something really simple like the line below was output
would be perfect.
%struct.linked_list = type { %struct.linked_list*, %sbyte* }
Thanks for any help,
2005 Mar 09
4
[LLVMdev] Recursive Types using the llvm support library
----- Original Message -----
From: "Chris Lattner" <sabre at nondot.org>
To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
Sent: Tuesday, March 08, 2005 6:31 PM
Subject: Re: [LLVMdev] Recursive Types using the llvm support library
> On Tue, 8 Mar 2005, Vladimir Merzliakov wrote:
>
>>>> An example where something really simple like the
2008 Jun 12
0
[LLVMdev] code generation order revisited.
On Jun 12, 2008, at 13:25, Hendrik Boom wrote:
> So it appears that types are processed for identity the moment they
> are made during parse tree construction?
Yes.
> This means that a type has to be completely known on creation.
Yes.
> Presumably there's some mechanism tor a type that isn't completely
> known yet -- or is thet avoided by having a type
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
2005 Mar 16
1
[LLVMdev] Dynamic Creation of a simple program
Hi,
Given these C instructions:
==============================
struct stru { struct stru *Next; };
struct list *NewStru = malloc ( sizeof ( struct stru ) );
struct list *tmp.3;
...
tmp.3 = NewStru->Next;
==============================
LLVM generates something like this:
%tmp.0 = malloc %struct.stru ; <%struct.stru*>
%tmp.3 = getelementptr %struct.stru* %tmp.0, int 0, uint 1 ;
2008 Oct 03
0
[LLVMdev] Making Sense of ISel DAG Output
On Fri, October 3, 2008 9:10 am, David Greene wrote:
> On Thursday 02 October 2008 19:32, Dan Gohman wrote:
>
>> Looking at your dump() output above, it looks like the pre-selection
>> loads have multiple uses, so even though you've managed to match a
>> larger pattern that incorporates them, they still need to exist to
>> satisfy some other users.
>
> Yes,
2008 Oct 03
3
[LLVMdev] Making Sense of ISel DAG Output
On Thursday 02 October 2008 19:32, Dan Gohman wrote:
> Looking at your dump() output above, it looks like the pre-selection
> loads have multiple uses, so even though you've managed to match a
> larger pattern that incorporates them, they still need to exist to
> satisfy some other users.
Yes, I looked at that too. It looks like these other uses end up being
chains to
2010 Jun 14
2
[LLVMdev] Adding fields in a already built type?
Hi,
We build a type with StructType::get(fModule->getContext(), fDspFields, false); with a fDspFields (std::vector<const llvm::Type*> fDspFields;) that is not yet completely known when we have to build the type. It is possible to add fields in a already build type?
Thanks
Stéphane Letz
2020 Jan 14
2
sizeof implementation: how to get size as a constantInt?
I'm implementing c style "sizeof()", and I did as
http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt
illuarstrated,
and it works find, here's an example of my implementation:
auto *p = builder.CreateGEP(structTy,
llvm::ConstantPointerNull::get(pointerTy),
constint1);
auto *size =
2010 Jun 14
0
[LLVMdev] Adding fields in a already built type?
On Jun 14, 2010, at 1:22 PM, Stéphane Letz wrote:
> Hi,
>
> We build a type with StructType::get(fModule->getContext(), fDspFields, false); with a fDspFields (std::vector<const llvm::Type*> fDspFields;) that is not yet completely known when we have to build the type. It is possible to add fields in a already build type?
Nope, types are immutable once created. The only
2004 Oct 06
1
[LLVMdev] generating function declarations in c frontend
I'm trying to generate the declarations for function intrinsics, and I
must be misunderstanding how to create new functions - I saw that a
function with no basic blocks is treated as a declaration, so I tried
to just create one and add it to the globals list:
llvm_type *structTy, *ptrToStructTy;
structTy = llvm_type_create_struct(0, 0);
structTy =