search for: allocationinst

Displaying 20 results from an estimated 24 matches for "allocationinst".

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. How can I recode...
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 (AllocationInst) has been > removed from llvm instructi...
2006 Mar 14
2
[LLVMdev] Port to Solaris' Sun Studio 8
...t;...>(iter), or isa<...>(iter) results in the error messages mentioned below. ________________________________ When compiling LoadValueNumbering.cpp, I get the following errors: "~/bin/../src/include/llvm/Support/Casting.h", line 51: Error: Could not find a match for llvm::AllocationInst::classof(const llvm::ilist_iterator<llvm::Instruction>*). "~/bin/../src/include/llvm/Support/Casting.h", line 68: Where: While instantiating "llvm::isa_impl<llvm::AllocationInst, llvm::ilist_iterator<llvm::Instruction>>(const llvm::ilist_iterator<llvm::Instr...
2006 Mar 15
0
[LLVMdev] RE: Port to Solaris' Sun Studio 8
...n_cast<...>(iter), or isa<...>(iter) results in the error messages > mentioned below. .... > When compiling LoadValueNumbering.cpp, I get the following errors: > > "~/bin/../src/include/llvm/Support/Casting.h", line 51: Error: Could not > find a match for llvm::AllocationInst::classof(const > llvm::ilist_iterator<llvm::Instruction>*). > > "~/bin/../src/include/llvm/Support/Casting.h", line 68: Where: While > instantiating "llvm::isa_impl<llvm::AllocationInst, > llvm::ilist_iterator<llvm::Instruction>>(const > llvm:...
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 >> uses this instruction. >> If I got it correctly, this istruction (AllocationInst) has been >> removed...
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()); (*I)->replaceAllUsesWith(AI); // (*I)->dropAllReferences(); // (*I)->getParent()->getInstList().erase(*I); // delete (*I); // delete(AI); } break; running the code will report: Leaked ob...
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 = BB->...
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 in a basic block } BasicBlock::iter...
2002 Sep 28
0
[LLVMdev] Re: an error
dyn_cast<> will return NULL if i is not an AllocationInst object. --Vikram http://www.cs.uiuc.edu/~vadve > From: Jianzhong Liu <jliu7 at uiuc.edu> > Sender: jliu7 at cs.uiuc.edu > Date: Sat, 28 Sep 2002 17:00:04 -0500 > Subject: an error > > I keep getting a core dump error for: > > ... > const Type *opType = (dyn_cas...
2004 Mar 23
1
[LLVMdev] malloc instruction
Hi, I'm currently implementing some optimization passes for LLVM and I came across a problem. I'm new to LLVM so if this question has been asked before please kindly tell me where can I find the answer. There are 2 types of AllocationInst - Alloca and Malloc. But most of the time from the compiled byte code I can only find the Alloca statement (actually I never come across a single Malloc statement). the function "malloc" is called tho. Does anybody know when will a "MallocInst" be generated? Thanks heaps. B...
2006 Mar 14
0
[LLVMdev] Port to Solaris' Sun Studio 8
...ng into a problem I believe is with template resolution, and I'm looking for any input on where the problem might be. When compiling LoadValueNumbering.cpp, I get the following errors: "~/bin/../src/include/llvm/Support/Casting.h", line 51: Error: Could not find a match for llvm::AllocationInst::classof(const llvm::ilist_iterator<llvm::Instruction>*). "~/bin/../src/include/llvm/Support/Casting.h", line 68: Where: While instantiating "llvm::isa_impl<llvm::AllocationInst, llvm::ilist_iterator<llvm::Instruction>>(const llvm::ilist_iterator<llvm::Instr...
2008 Jun 11
2
[LLVMdev] 32 bit array size to malloc
In the C documentation on linux, malloc is defined to take a size parameter of type size_t. On my 64-bit linux machine, size_t turns out to be a 64-bit type. In LLVM, AllocationInst's require the array size passed to them to be a 32-bit type. Is there a reason that LLVM's intermediate representation restricts the array size to be a 32-bit type? Regards, Ryan
2010 Aug 17
0
[LLVMdev] Ocaml bindings in 2.8
Hello Jianzhou, On Sat, Aug 14, 2010 at 8:25 PM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote: > Hi, > > Does 2.8 release plan to change anything in Ocaml bindings? > http://llvm.org/docs/ReleaseNotes.html#whatsnew does not list any > relevant features. I usually wait until around nowish before a release to sync llvm-c and the ocaml bindings. I'll start the process.
2006 Mar 15
0
[LLVMdev] Re: Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
...lude -I../../2006-03-14-llvm-gcc-4/gcc/../libcpp/include -I/space/p2/ghost/build/llvm-cvs/include -DL_fixunsxfdi -fvisibility=hidden -DHIDE_EXPORTS -c ../../2006-03-14-llvm-gcc-4/gcc/libgcc2.c -o libgcc/./_fixunsxfdi.o cc1: /space/p2/ghost/build/llvm-cvs/include/llvm/Instructions.h:72: void llvm::AllocationInst::setAlignment(unsigned int): Assertion `(Align & (Align-1)) == 0 && "Alignment is not a power of 2!"' failed. ../../2006-03-14-llvm-gcc-4/gcc/libgcc2.c: In function '__fixunsxfdi': ../../2006-03-14-llvm-gcc-4/gcc/libgcc2.c:1205: internal compiler error: Aborted Ple...
2006 Mar 15
2
[LLVMdev] Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
>> Sorry for the delay, please try this tarball: >> http://nondot.org/sabre/2006-03-02-llvm-gcc-4.tar.gz > > There's some confusion with --enable-llvm configure parameter. I've built > LLVM to a separate build dir. The source is ~ghost/Work/llvm-cvs and build > dir is /space/p2/ghost/build/llvm-cvs ... > So, it seems like, at the same time: > > 1. buildir
2010 Aug 15
4
[LLVMdev] Ocaml bindings in 2.8
Hi, Does 2.8 release plan to change anything in Ocaml bindings? http://llvm.org/docs/ReleaseNotes.html#whatsnew does not list any relevant features. 2.7 added 'operand' that can access each operand from a value. external operand : llvalue -> int -> llvalue = "llvm_operand" Does this binding also expose a primitive to return how many operands a given value has? I need
2006 Mar 15
2
[LLVMdev] Re: Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
...ks any better for you! > > Here we go: Wow, you are good at finding problems! Thanks! > -fvisibility=hidden -DHIDE_EXPORTS > -c ../../2006-03-14-llvm-gcc-4/gcc/libgcc2.c -o libgcc/./_fixunsxfdi.o > cc1: /space/p2/ghost/build/llvm-cvs/include/llvm/Instructions.h:72: void > llvm::AllocationInst::setAlignment(unsigned int): Assertion `(Align & > (Align-1)) == 0 && "Alignment is not a power of 2!"' failed. > ../../2006-03-14-llvm-gcc-4/gcc/libgcc2.c: In function '__fixunsxfdi': > ../../2006-03-14-llvm-gcc-4/gcc/libgcc2.c:1205: internal compiler err...
2010 Aug 21
0
[LLVMdev] OCaml bindings patch
...into 2.6. What this patch does are 1) bindings to define an LLVM IR pretty printer in OCaml, which traverses a LLVM AST and prints each node. To do so, it allows to access more properties of prmitive Classes: get Opcode of each instruction, get ValueID of a subclass of Value. For example, given an AllocationInst, it can return the allocation size, and other accessing methods for different kinds of Instructions. To generate names for unnamed values, the patch also makes SlotTracker visibly from ./lib/VMCore/AsmWriter.cpp to ./include/llm/Assembly/Writer.h. Such bindings are defined at ./binding/OCaml/l...
2008 Jun 12
0
[LLVMdev] 32 bit array size to malloc
On Jun 11, 2008, at 2:38 PM, Ryan M. Lefever wrote: > In the C documentation on linux, malloc is defined to take a size > parameter of type size_t. On my 64-bit linux machine, size_t turns > out > to be a 64-bit type. In LLVM, AllocationInst's require the array size > passed to them to be a 32-bit type. Is there a reason that LLVM's > intermediate representation restricts the array size to be a 32-bit > type? No, there is no good reason. Like GEP, malloc and alloca should allow the size to be either i32 or i64....
2002 Sep 16
2
[LLVMdev] Setting the Type in the Alloca Inst
Previously the Constructor for the Alloca Instruction took the type of the returned value. But now it has been updated to take the type of the Pointer Operand. My question is: how do I set the type of the return value of Alloca ? My code uses the old form of the constructor, and when the pointer is passed to "replaceAllUsesWith()" of an Instruction Pointer, an assert fails saying that