similar to: [LLVMdev] Primitive types

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Primitive types"

2004 Jun 17
0
[LLVMdev] Primitive types
On Thu, 17 Jun 2004, Vladimir Prus wrote: > I'm getting this in debugger, where 't' is 'Type*': > > (gdb) p t->isPrimitiveType() > $15 = false > (gdb) p t->getPrimitiveID() > $16 = PointerTyID > (gdb) p t->getPrimitiveSize() > $17 = 0 > > There are a couple of things that I'd like to ask. First, if >
2004 Jul 01
1
[LLVMdev] Add assert in llvm::StroreInst::init and llvm::LoadInst::init
I'm make silly error (swap arguments in llvm::StroreInst constructor call: llvm::Value* var = genExpr(bb,*varExpr,false); llvm::Value* val = genExpr(bb,*valExpr,true ); llvm::StoreInst* lStore = new llvm::StoreInst(var,val,bb); instead assert(var && var->getType()->getTypeID()==llvm::Type::PointerTyID && "var side isn't pointer type"); llvm::StoreInst*
2008 Nov 07
2
[LLVMdev] non-pointer gcroot
Hi I'm getting an assert in LowerIntrinsics::InsertRootInitializers because I'm gcroot'ing an alloca to a non-pointer. I was hoping to modify InsertRootInitializers to memset the structure in the case that it's not a pointer, but I'm not sure how to. Can anyone suggest what should go at "todo; something here"? ... for (AllocaInst **I = Roots, **E = Roots +
2007 Nov 25
2
[LLVMdev] C embedded extensions and LLVM
>>> Please add a generous block comment to >>> llvm/include/llvm/Bitcode/LLVMBitCodes.h above the new enum >>> explaining >>> what the difference is though. :) >> > > Should have said: > >> Should I take the same approach to the encoding of pointer types in >> the types table? PointerTypes are a bit easier. The code to write them
2007 Oct 11
0
[LLVMdev] Can't bootstrap llvm-gcc-4.0 for x84_64
Hi David, > "LLVM type size doesn't match GCC type size!"' failed. this assertion checks that gcc types are converted into LLVM types of the same size. Try running cc1 in gdb. When you hit the assertion, go up a few stack frames until you get to ConvertType. Do call debug_tree(type) That will tell you what the gcc type was. From that and the LLVM type it should be clear
2008 Sep 08
0
[LLVMdev] Problems when refining type
On Mon, Sep 8, 2008 at 2:45 PM, Scott Graham <scott.llvm at h4ck3r.net> wrote: > LLVMTypeRef a = LLVMPointerType(LLVMOpaqueType(), 0); > LLVMTypeHandleRef ha = LLVMCreateTypeHandle(a); > LLVMTypeRef atypes[1] = { LLVMResolveTypeHandle(ha) }; > LLVMRefineType(LLVMResolveTypeHandle(ha), LLVMStructType(atypes, 1, 0)); > > Can anyone explain what I'm doing wrong
2010 Jan 06
3
[LLVMdev] [PATCH] - Union types, attempt 2
This patch adds a UnionType to DerivedTypes.h. It also adds code to the bitcode reader / writer and the assembly parser for the new type, as well as a tiny .ll test file in test/Assembler. It does not contain any code related to code generation or type layout - I wanted to see if this much was acceptable before I proceeded any further. Unlike my previous patch, in which the Union type was
2007 Nov 25
0
[LLVMdev] C embedded extensions and LLVM
On Nov 24, 2007, at 7:47 PM, Christopher Lamb wrote: > > On Nov 21, 2007, at 6:22 PM, Chris Lattner wrote: > >> On Wed, 21 Nov 2007, Christopher Lamb wrote: >>>> Unlike alignment and volatility, I think that the address space >>>> qualifier >>>> should be represented explicitly in the type system. The >>>> reason for this
2008 Sep 08
3
[LLVMdev] Problems when refining type
Hi I'm using the llvm-c wrapper, and trying to build some recursive types (using released 2.3). I get an assert on trying to create a second opaque pointer type after refining a first. The first time through creating an opaque pointer type, a new type is created and returned from PointerType::get, but the second time, ValueType (the opaque type) is found in the PointerTypes map, which seems
2013 Aug 11
3
[LLVMdev] Are integer types primitive?
The LLVM docs seem to indicate that integer types are considered primitive, however looking at the code I see `FirstDerivedTyID = IntegerTyID`, implying that integers are derived rather than primitive. Should the docs be updated? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Nov 25
2
[LLVMdev] C embedded extensions and LLVM
On Nov 21, 2007, at 6:22 PM, Chris Lattner wrote: > On Wed, 21 Nov 2007, Christopher Lamb wrote: >>> Unlike alignment and volatility, I think that the address space >>> qualifier >>> should be represented explicitly in the type system. The reason >>> for this > >> I've come across a hitch. Store instructions do not reference the
2010 Jan 09
0
[LLVMdev] [PATCH] - Union types, attempt 2
On Jan 6, 2010, at 12:45 PM, Talin wrote: > This patch adds a UnionType to DerivedTypes.h. Cool. When proposing an IR extension, it is usually best to start with a LangRef.html patch so that we can discuss the semantics of the extension. Please do write this before you get much farther. I assume that you want unions usable in the same situations as a struct. However, how do "constant
2007 Oct 10
3
[LLVMdev] Can't bootstrap llvm-gcc-4.0 for x84_64
On Wednesday 10 October 2007 17:12, David Greene wrote: > This particular problem is gone (thanks!) but I'm having other troubles. > I'm tracking those down now. This is the current problem: [x86_64-off-dbg]: ./xgcc -B./ -B/install.official.debug/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/bin/ -isystem
2008 Nov 08
0
[LLVMdev] non-pointer gcroot
On Nov 7, 2008, at 15:29, Scott Graham wrote: > I'm getting an assert in LowerIntrinsics::InsertRootInitializers > because I'm gcroot'ing an alloca to a non-pointer. > > I was hoping to modify InsertRootInitializers to memset the > structure in the case that it's not a pointer, but I'm not sure how > to. Can anyone suggest what should go at "todo;
2008 Apr 21
3
[LLVMdev] newbie question for type comparison
Hi John, Thank you a lot. That clarifies some my confusions. What I want to do is to use both methods, get ALL struct allocation and a SPECIFIC struct allocation, at different situations. Here, I've got a couple of more questions. 1. For getting ALL struct allocation, when I use if( (AI = dyn_cast<AllocaInst>(&*i)))
2008 Apr 21
2
[LLVMdev] newbie question for type comparison
Hi, I want to extract all instruction of the form "alloca %struct.S", where $struct.S is defined as a struct %struct.S = type { i32, i32 } I'm using the following loop: for(inst_iterator i = inst_begin(F), e = inst_end(F); i!= e; i++) { AllocaInst* ai; if( (ai = dyn_cast<AllocaInst>(&*i))){ if(ai->getOperand(0)->getType()->getTypeID() ==
2010 May 28
2
[LLVMdev] Retrieving Underlying Type from AllocaInst
Is there a recommended way to retrieve the original type from an AllocaInst object? For example, I am creating alloca instructions using the IRBuilder interface like: alloca = builder.CreateAlloca( Type::getDoubleTy( context ), 0, variableName.c_str() ); and I place the alloca into a symbol table. Later when I am generating instructions for an assignment operation, I want to check the type of
2008 Apr 21
0
[LLVMdev] newbie question for type comparison
Lu Zhao wrote: > Hi, > > I want to extract all instruction of the form "alloca %struct.S", where > $struct.S is defined as a struct > > %struct.S = type { i32, i32 } > > I'm using the following loop: > > for(inst_iterator i = inst_begin(F), e = inst_end(F); i!= e; i++) > { > AllocaInst* ai; > if( (ai =
2008 Apr 21
2
[LLVMdev] newbie question for type comparison
On Apr 21, 2008, at 15:07, John Criswell wrote: >> 1. For getting ALL struct allocation, when I use >> >> if( (AI = dyn_cast<AllocaInst>(&*i))) >> if(AI->getOperand(0)->getType()->getTypeID() == >> Type::StructTyID) { >> >> to get all alloca instructions allocating a structure, it does not >> work. In my gdb
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
On Jan 16, 2010, at 11:15 AM, Talin wrote: > OK here's the patch for real this time :) > > On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test > "union.ll" does not work, so you probably don't want to check this > in as is. However, I'd be interested in any