similar to: [LLVMdev] Re: an error

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] Re: an error"

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
2008 Apr 21
0
[LLVMdev] newbie question for type comparison
Gordon Henriksen wrote: > 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
2008 Apr 21
0
[LLVMdev] newbie question for type comparison
Lu Zhao wrote: > 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 =
2002 Nov 27
1
[LLVMdev] Instruciton replacement
llvm is giving me some assertion errors when trying to replace an instruction, and I'm not quite sure of what to do. I have the following snippet of code: switch((*I)->getOpcode()) { case Instruction::Malloc: { AllocaInst *AI; AI = new AllocaInst(cast<AllocationInst>(*I)->getAllocatedType(), cast<AllocationInst>(*I)->getArraySize());
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)))
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
2002 Sep 28
1
[LLVMdev] array?
How should we deal with arrays in a structure? should we transform each element of this array to a scalar? Should we consider that the elements of the array are also structure? Thanks! Jianzhong
2006 Mar 15
0
[LLVMdev] RE: Port to Solaris' Sun Studio 8
Michael Smith wrote: > Well, line 364 wasn't actually what was holding me up, so it's a bad > example, but the problem's still relevant. Using cast<...>(iter), > dyn_cast<...>(iter), or isa<...>(iter) results in the error messages > mentioned below. .... > When compiling LoadValueNumbering.cpp, I get the following errors: > >
2006 Mar 14
2
[LLVMdev] Port to Solaris' Sun Studio 8
Well, line 364 wasn't actually what was holding me up, so it's a bad example, but the problem's still relevant. Using cast<...>(iter), dyn_cast<...>(iter), or isa<...>(iter) results in the error messages mentioned below. ________________________________ When compiling LoadValueNumbering.cpp, I get the following errors:
2002 Sep 16
4
[LLVMdev] another question
In the section expaining "dyn_cast" There are following lines of code: if (AllocationInst *AI = dyn_cast<AllocationInst>(Val)) { ... } I cannot understand how you take a operand, a value, and cast it into a Instruction. Can you explain it for me? Another common example is: // Loop over all of the phi nodes in a basic block BasicBlock::iterator BBI =
2002 Sep 16
0
[LLVMdev] another question
Also sprach xli3 at uiuc.edu: } In the section expaining "dyn_cast" } There are following lines of code: } if (AllocationInst *AI = dyn_cast<AllocationInst>(Val)) { } ... } } } I cannot understand how you take a operand, a value, and cast } it into a Instruction. Can you explain it for me? } } Another common example is: } } // Loop over all of the phi nodes
2006 Mar 14
0
[LLVMdev] Port to Solaris' Sun Studio 8
Hi all. A company I'm working for is interested in using LLVM as a part of a larger suite of products, and I'm in charge of porting it to Sun Studio 8, one of the compilers that our product builds on. I've made reasonable progress, and for the most part the compiler's co-operating, however I'm running into a problem I believe is with template resolution, and I'm looking for
2010 Dec 15
0
[LLVMdev] The best way to cope with AllocationInst type in old code?
Hamid 2C wrote: > Hi all, > > I am working on some old code which was compiled against llvm-2.5. > Anyway, in some places I, AllocationInst is used (e.g. to ensure the > instruction's type). Even in your current documentation > (http://llvm.org/docs/ProgrammersManual.html), I found an example that > uses this instruction. > If I got it correctly, this istruction
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
2002 Sep 27
3
[LLVMdev] setCC
what's the semantics for setCC if one of the operands is NULL pointer? %ptr=alloc int seteq int*, %pt, NULL what's the result for the second instruction? How about setne, setlt, setgt, setle, and setge? Thanks! Jianzhong
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,
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 { >
2010 Dec 15
1
[LLVMdev] The best way to cope with AllocationInst type in old code?
On 12/15/10 2:37 AM, Nick Lewycky wrote: > Hamid 2C wrote: >> Hi all, >> >> I am working on some old code which was compiled against llvm-2.5. >> Anyway, in some places I, AllocationInst is used (e.g. to ensure the >> instruction's type). Even in your current documentation >> (http://llvm.org/docs/ProgrammersManual.html), I found an example that >>
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
I've made all the suggested changes - however, I'm having a bit of problem running the tests. I started "make check" and several hours later it had only made it through about 1/3 of the tests. I'm not sure what the deal is. On Mon, Jan 18, 2010 at 1:40 PM, Chris Lattner <clattner at apple.com> wrote: > > On Jan 16, 2010, at 11:15 AM, Talin wrote: > > OK
2010 Dec 15
2
[LLVMdev] The best way to cope with AllocationInst type in old code?
Hi all, I am working on some old code which was compiled against llvm-2.5. Anyway, in some places I, AllocationInst is used (e.g. to ensure the instruction's type). Even in your current documentation (http://llvm.org/docs/ProgrammersManual.html), I found an example that uses this instruction. If I got it correctly, this istruction (AllocationInst) has been removed from llvm instruction set.