similar to: [LLVMdev] PATCH: Typo is StructType assert

Displaying 20 results from an estimated 11000 matches similar to: "[LLVMdev] PATCH: Typo is StructType assert"

2006 Dec 08
0
[LLVMdev] Proposed: first class packed structures
On Dec 6, 2006, at 10:44 AM, Andrew Lenharth wrote: > Currently, Structure layout is left to targets, which implement them > according to the ABI of that platform. While this is fine for most > structures, it makes packed structures very ugly. All fields in a > packed type must be converted to byte arrays with casts to access > fields, which bloats accesses and obsfucates the
2013 Jan 22
2
[LLVMdev] StructType opaque->sized
I'm building a StructType without a body using StructType *StructType::create(LLVMContext &Context, StringRef Name); and then later adding a body to with setBody(). It starts of isOpaque() == true, and isSized() == false, and after I add the body, isOpaque() == false, but isSized() is still false. If I create a StructType using StructType * StructType ::create(LLVMContext
2013 Jan 22
0
[LLVMdev] StructType opaque->sized
Hi Rick, On 22/01/13 09:04, Rick Mann wrote: > I'm building a StructType without a body using > > StructType *StructType::create(LLVMContext &Context, StringRef Name); > > and then later adding a body to with setBody(). It starts of isOpaque() == true, and isSized() == false, and after I add the body, isOpaque() == false, but isSized() is still false. this is the standard
2010 Oct 26
2
[LLVMdev] StructType member offset
Hi, how can i correctly calculate the size of a member of a struct (including alignment etc)? This doesn't work : const StructType *STy = cast<StructType>(Ty); for (StructType::element_iterator I = STy->element_begin(), E = STy->element_end(); I != E; ++I) { usigned size =I->get()->getScalarSizeInBits(); //often
2010 Nov 03
0
[LLVMdev] StructType member offset
On 02/11/10 22:48, Mark Leone wrote: > You can also use getelementptr to get the offset of a struct member: > > http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt Yup, except that this returns a constant expression in general, rather than a number. There's even a helper for doing this: ConstantExpr:getOffsetOf Ciao, Duncan. > > - Mark > > On
2011 Jul 19
1
[LLVMdev] StructType::setName(...)
My apologies if this has already been discussed/explained (reference?). In browsing the new type system implementation, I was wondering if someone could give a simple example of why one would want to reset the name of a previous realized StructType instance (setBody(...) has been called). My curiosity is enhanced by the fact that reseting a name of a StructType instance may result in a symbol
2008 Jul 07
0
[LLVMdev] (GEP) Index validity
Hi all, I just found that TargetData also contains a similar assert, and that I forgot a "return" in my previous patch. Here's an updated patch, which allows to use any integer to index a CompositeType. It seems this enables GEP to work with any integer value as well, I tested indexing a struct with a i16 an i64 (also through llc). This should still be adressed somewhere, unless we
2006 Sep 16
0
[LLVMdev] failed assertion in PPCJITInfo.cpp when calling native function
Hi, I am trying to generate LLVM code that calls a "native" function in the parent program (the program hosting the JIT). I think that I have figured out how to do this, but I get the following assertion failure when the LLVM code is executed: ../llvm/lib/Target/PowerPC/PPCJITInfo.cpp:206: failed assertion `ResultPtr >= -(1 << 23) && ResultPtr < (1 << 23)
2012 Dec 14
2
[LLVMdev] StructType for dispatch_object_t changed by Linker
Hi, everyone. I've run into a strange problem generating code that contains the `dispatch_object_t` type. The problem happens when a program does these steps (all with the global LLVMContext): 1. Loads a module (otherModule) that uses `dispatch_object_t`. 2. Generates code that calls `dispatch_release`, which takes a `dispatch_object_t` argument, into a module (mainModule). 3. Links
2018 Jul 24
2
StructType --> DICompositeType?
Is there a more convenient way to obtain a DIType given a Type than matching up the strings for the names? For example, given: struct S { int x, y; } s; void foo(S *a) { a->x = 0; a->y = 1; } There are DIType nodes for the struct Type: !6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !3, line: 1, size: 64, flags: DIFlagTypePassByValue,
2003 Nov 13
4
[LLVMdev] Headers & Libraries
LLVMers, I'm running into a fair bit of confusion as I start to *use* LLVM to build my own compiler. The issues relate to what is in a given .a or .o file, why linking takes so long, and getting LLVM header files to include correctly, and the lack of viable "install" target. I'll deal with each of these in turn: For my own project, I've added an AC_CHECK_LIB line to check
2008 Jul 10
2
[LLVMdev] (GEP) Index validity
Hi all, any comments about this patch? I'd like to get it out of my working copy :-) Gr. Matthijs > Index: lib/VMCore/Type.cpp > =================================================================== > --- lib/VMCore/Type.cpp (revision 53136) > +++ lib/VMCore/Type.cpp (working copy) > @@ -394,9 +394,8 @@ > > bool StructType::indexValid(const Value *V) const { >
2008 Jul 10
0
[LLVMdev] (GEP) Index validity
I don't think this is right. According to llvm documentation: The index types specified for the 'getelementptr' instruction depend on the pointer type that is being indexed into. Pointer and array types can use a 32-bit or 64-bit integer type but the value will always be sign extended to 64-bits. Structure and packed structure types require i32 constants. Evan On Jul 10,
2011 Mar 14
0
[LLVMdev] how to build a StructType incrementally
Hi! StructType has no method for adding elements, but I'd like to build a type incrementally, i.e. it starts empty and a global of the type exists. then load instructions are added to a basic block and for each load instruction an element to the type has to be added. Is there a way to do this? For example I could first use UndefValues instead of load and then do a replaceAllUsesWith when the
2012 Dec 14
0
[LLVMdev] StructType for dispatch_object_t changed by Linker
Hi Jaymie, ... > Step 2: %union.dispatch_object_t = type { %struct.dispatch_object_s* } > Step 4: %union.dispatch_object_t = type { %struct.dispatch_object_s.1* } > > Code that reproduces the problem is at http://pastebin.com/pxveBUJa and > http://pastebin.com/GDb9n9xA. > > A workaround is to call > `StructType::create(mod->getContext(),
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; :
2004 Mar 28
2
[LLVMdev] Can't Figure Out My Error :(
The XPL compiler produced the attached OneOfEach.bc file without error or warning from either LLVM or XPLC. However when I llvm-dis the file, I get: llvm-dis: Failed value look-up for name 'entry' The Bytecode Reader prints this out when it can't find the associated value for the name. Obviously I botched something in the XPL compiler but I would have thought the verified would
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. > >
2004 Dec 03
1
[Fwd: [LLVMdev] GetElementPtr for packed types and VS build]
This needs to be applied as well. Thanks, Reid. -----Forwarded Message----- > From: Morten Ofstad <morten at hue.no> > To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> > Subject: [LLVMdev] GetElementPtr for packed types and VS build > Date: Wed, 01 Dec 2004 15:10:49 +0100 > > As I was working with packed types it became apparent that I sometimes >
2006 Apr 13
0
[LLVMdev] Re: Creating Release 1.7 Branch at 1:00pm PDT
On Thu, 13 Apr 2006, Reid Spencer wrote: > I just updated again (both llvm and llvm-gcc). The only thing that > changed was: > P test/Regression/CFrontend/2005-12-04-DeclarationLineNumbers.c > > The regression test below was done *with* your llvm-gcc changes to llvm- > expand.c. I don't know what the failures are all about, but I will try > it again. If its the same,