similar to: [LLVMdev] The best way to cope with AllocationInst type in old code?

Displaying 20 results from an estimated 1100 matches similar to: "[LLVMdev] The best way to cope with AllocationInst type in old code?"

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
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 >>
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
2009 Sep 22
5
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
Hi Victor, this code from the verifier broke the Ada front-end build: const Module* M = CI.getParent()->getParent()->getParent(); Constant *MallocFunc = M->getFunction("malloc"); if (CI.getOperand(0) == MallocFunc) { const PointerType *PTy = PointerType::getUnqual(Type::getInt8Ty(CI.getParent()->getContext())); Assert1(CI.getType() == PTy, "Malloc
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());
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:
2009 Sep 22
0
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
Duncan, Thanks for brining the Ada issue to my attention. On Sep 22, 2009, at 6:11 AM, Duncan Sands wrote: > Hi Victor, this code from the verifier broke the Ada front-end build: > > const Module* M = CI.getParent()->getParent()->getParent(); > Constant *MallocFunc = M->getFunction("malloc"); > > if (CI.getOperand(0) == MallocFunc) { > const
2011 May 31
2
[LLVMdev] multiple function return values in LLVM
Hi all, How can I implement a multiple function return values scheme in a performance efficient way, just like what be done in Matlab or Octave? Thanks in advance, Yabin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110531/5813e7a6/attachment.html>
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 =
2011 May 31
0
[LLVMdev] multiple function return values in LLVM
Hi Yabin, Octave uses an octave_value_list object to return multiple values so I don't think it has anything to do with the compiler. A sample function that can be dynamically linked with Octave and called from octave interpreter: #include <octave/oct.h> DEFUN_DLD (divmult, args, nargout, "") { octave_value_list retval; // do some computation to compute r0 and r1
2004 Mar 22
0
[LLVMdev] Threading support
Johan, You are correct that today LLVM doesn't handle multi-threaded programs. However, I believe Misha is working on this now (correct me if I'm wrong Misha). To file a bugzilla on this would be a little redundant. Its a well-known issue and one that is being worked on. Reid. Johan Walles wrote: > Hi! > > I've read in the mailing list archives that LLVM isn't able
2004 Mar 22
6
[LLVMdev] Threading support
Hi! I've read in the mailing list archives that LLVM isn't able to run threaded programs: http://mail.cs.uiuc.edu/pipermail/llvmdev/2003-December/000758.html Is there a Bugzilla about this that I could CC myself to? Or should I file one? Cheers //Johan
2008 Sep 24
2
[LLVMdev] Memory Altering/Accessing Instructions
Hi all, Would it be correct to say that the only instructions in LLVM IR that modify/access memory potentially are the following: (1) LoadInst : Ref (2) StoreInst : Mod (3) VAArgInst : Ref (?) (4) AllocaInst : Mod (5) MallocInst : Mod (6) FreeInst : Mod (7) CallInst : Mod/Ref ? Also, my earlier impression was that the GEP instruction only computes the effective address and does not
2010 Jan 03
1
[LLVMdev] safe to speculatively execute load of malloc?
I've just noticed this, in Instruction::isSafeToSpeculativelyExecute(): http://llvm.org/doxygen/Instruction_8cpp-source.html#l00408 00430 case Load: { 00431 if (cast<LoadInst>(this)->isVolatile()) 00432 return false; 00433 if (isa<AllocaInst>(getOperand(0)) || isMalloc(getOperand(0))) 00434 return true; This says that it's safe to speculatively
2009 Sep 22
1
[LLVMdev] Verifier should not make any assumptions about calls to "malloc"
Hi Victor, > What does the Ada front-end declare malloc as? I don't really want to tell you because a correct solution should work no matter what malloc is defined to be :) What I mean by "work" is that if malloc has the standard prototype then you perform transforms on it, and otherwise you should probably just ignore it. That said, Ada outputs malloc as: i32 @malloc(i32)
2004 Jan 28
5
Julian dates
Hi all, I have problems with years of dates using "chron" package. I don't understand why R by this istruction: > dates("01/02/29",out.format="d/m/year") [1] 02/Jan/2029 > dates("01/02/30",out.format="d/m/year") [1] 02/Jan/1930 reads "29" as 2029 and "30" as 1930. How could I change to read "00" to
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
2006 Mar 15
0
[LLVMdev] Re: Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
Chris Lattner wrote: > Here's a new snapshot of the front-end: > http://nondot.org/sabre/2006-03-14-llvm-gcc-4.tar.gz > > This: > > 1. Fixes the inline asm problem you have above. > 2. Includes patches to make it better on Alpha's (thanks to patches by > Andrew Lenharth). > 3. Sync's it up with debug info changes in LLVM CVS (by Jim Laskey). > 4.
2008 Dec 01
3
exclude a vector value from another vector
Dear All, I am trying to build a program which will take repeated samples (w/o replacement) from a population of values. The interesting catch is that I would like the sample values to be removed from the population, after each sample is taken. For example: pop<-c(1,5,14,7,9,12,18,19,65,54) sample(pop, 2) = lets say, (5,54) ## This is where I would like values (5, 54) to be removed from