similar to: [LLVMdev] LLVM GCC and Malloc

Displaying 20 results from an estimated 40000 matches similar to: "[LLVMdev] LLVM GCC and Malloc"

2007 Oct 27
3
[LLVMdev] malloc() vs. MallocInst
Hi, I recently looked quite some time for why poolalloc wouldn't transform calls to malloc() in my program, until I noticed that it handles calls to malloc() (eg, stdlib pass) -- but only transforms MallocInst's. Is there a general policy on how passes should behave? Should they handle both representations, is doing -raiseallocs the preferred way, or do we explicitely not want any
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
2007 Oct 29
0
[LLVMdev] malloc() vs. MallocInst
Torvald, For what are you interested in poolalloc? I'm asking because we are trying to decide how to prioritize work on it. Thanks, --Vikram http://www.cs.uiuc.edu/~vadve http://llvm.org On Oct 27, 2007, at 11:10 AM, Torvald Riegel wrote: > Hi, > > I recently looked quite some time for why poolalloc wouldn't > transform calls > to malloc() in my program, until I
2007 Oct 29
1
[LLVMdev] malloc() vs. MallocInst
Hi Vikram, I want to use poolalloc as a means for partitioning memory in Software Transactional Memory. We will have a paper about tuning parameters in word-based STMs in PPoPP 08, but there we use one configuration for the complete TM, which obviously has limitations in heterogenous workloads. Partitioning with poolalloc should give me (1) hopefully meaningful partitions (ie,
2007 Jul 15
3
[LLVMdev] Floating point constants (bug?)
>From the language guide: "The one non-intuitive notation for constants is the optional hexadecimal form of floating point constants. For example, the form 'double 0x432ff973cafa8000' is equivalent to (but harder to read than) 'double 4.5e+15'. The only time hexadecimal floating point constants are required (and the only time that they are generated by the disassembler) is
2008 Jun 20
1
[LLVMdev] libc malloc vs. llvm::MallocInst
Hello, have a short look at the following simple c-prog: #include <stdlib.h> int main(int argc, char* argv[]) { void* buf = malloc(10 * sizeof(char*)); /* do sth with buf, so that it is not "optimized away" */ return 0; } When you compile this using a plain llvm-gcc, the call to libc-malloc is left inside.But compiling it with -O2 alters the call to llvm::MallocInst. Now
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
2005 Mar 12
1
[LLVMdev] GCC 3.4.1 and conflicting types for 'malloc'
Hi These are: ======================== llvm[2]: Linking Release Object Library LLVMbzip2.o gmake[2]: Leaving directory `/homes/myuser/LLVM/llvmobj/lib/Support/bzip2' gmake[1]: Leaving directory `/homes/myuser/LLVM/llvmobj/lib/Support' gmake[1]: Entering directory `/homes/myuser/LLVM/llvmobj/utils' gmake[2]: Entering directory `/homes/myuser/LLVM/llvmobj/utils/Burg' llvm[2]:
2005 Mar 12
1
[LLVMdev] GCC 3.4.1 and conflicting types for 'malloc' (2)
I commented this line and it is compiling now: extern void *malloc ARGS((unsigned)); I hope that will not cause a different kind of problem. What it is zalloc used for? Thanks --- Chris Lattner <sabre at nondot.org> wrote: > On Sat, 12 Mar 2005, xavier wrote: > > > It seems that this happened before but I do not know the details: > >
2005 Mar 12
1
[LLVMdev] GCC 3.4.1 and conflicting types for 'malloc' (2)
It seems that this happened before but I do not know the details: http://llvm.cs.uiuc.edu/testresults/SparcV9/2004-12-07.html Thanks --- Chris Lattner <sabre at nondot.org> wrote: > On Sat, 12 Mar 2005, xavier wrote: > > llvm[2]: Compiling zalloc.c for Release build > > /homes/myuser/LLVM/llvmobj/../llvmsrc/utils/Burg/zalloc.c:9: error: conflictin > > g types for
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
2005 Mar 12
1
[LLVMdev] GCC 3.4.1 and conflicting types for 'malloc'
Hi I am trying to build the llvm tools following the instructions here: http://llvm.cs.uiuc.edu/docs/CFEBuildInstrs.html But I get this error: /zalloc.c:9: error: conflicting types for 'malloc' I am using gcc 3.4.1 What can be the problem? __________________________________ Do you Yahoo!? Yahoo! Sports - Sign up for Fantasy Baseball. http://baseball.fantasysports.yahoo.com/
2004 Feb 08
2
Syslinux malloc
I mentioned in a private email recently that it would be useful if syslinux had a malloc implementation. I have one now if anyone's interested. -- Hebe 2004-02-08 14:26:08.183 UTC (JD 2453044.101484) X = -1.159504592, Y = 2.015990327, Z = 0.638260245 X' = -0.010415779, Y' = -0.003652077, Z' = 0.001024628
2008 Dec 23
2
[LLVMdev] malloc vs malloc
I discovered that LLVM's malloc only allows a 32-bit size argument, so you cannot use it to allocate huge blocks on 64-bit machines. So I considered replacing all of my uses of LLVM's malloc instruction with calls to the libc malloc function instead. That got me wondering why LLVM even has its own malloc intrinsic anyway... Am I correct in assuming that LLVM's malloc intrinsic
2008 Dec 23
0
[LLVMdev] malloc vs malloc
On Dec 23, 2008, at 9:14 AM, Jon Harrop wrote: > I discovered that LLVM's malloc only allows a 32-bit size argument, > so you > cannot use it to allocate huge blocks on 64-bit machines. So I > considered > replacing all of my uses of LLVM's malloc instruction with calls to > the libc > malloc function instead. That got me wondering why LLVM even has its >
2008 May 01
3
[LLVMdev] optimization assumes malloc return is non-null
On Wednesday 30 April 2008 21:21, Chris Lattner wrote: > If LLVM is able to eliminate all users of the malloc assuming the > malloc succeeded (as in this case), then it is safe to assume the malloc > returned success. Ah, I missed this bit. I didn't see that the result of malloc was not used outside the if test. But is the if test considered a "use?" If so, it's a
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)
2009 Jan 11
2
[LLVMdev] malloc vs malloc
Chris Lattner wrote: > On Dec 23, 2008, at 9:14 AM, Jon Harrop wrote: >> I discovered that LLVM's malloc only allows a 32-bit size argument, >> so you >> cannot use it to allocate huge blocks on 64-bit machines. So I >> considered >> replacing all of my uses of LLVM's malloc instruction with calls to >> the libc >> malloc function instead.
2008 May 01
0
[LLVMdev] optimization assumes malloc return is non-null
On Wed, 30 Apr 2008, Ryan M. Lefever wrote: > Consider the following c code: > #include <stdlib.h> > int main(int argc, char** argv){ > if(malloc(sizeof(int)) == NULL){ return 0; } > else{ return 1; } > } > > > When I compile it with -O3, it produces the following bytecode: > > define i32 @main(i32 %argc, i8** %argv) { > entry: > ret i32 1
2006 Mar 08
1
malloc: vm_allocate(size=381886464) failed (error code=3)
Hi all, I am having memory allocation problem with my R 2.2.1 for Mac OS. The following is the error message that I get. I do not get this message if I break down the large dataset in to sub datasets. I think breaking up the dataset is not a sustainable solution in the long run. The data that I am analysing is essentially big, and it would be reasonable to do the analyis on the whole dataset