search for: bugspi

Displaying 15 results from an estimated 15 matches for "bugspi".

Did you mean: bugspy
2010 Mar 18
2
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Hello I have the following scenario, and I am not sure why the performance is so bad (take 30 minutes to complete with very simple generated functions): 1. Create module 2. Do something like EE = EngineBuilder(theModule).setEngineKind(EngineKind::JIT).create(); 3. Create a function in the module: theModule->getOrInsertFunction(..) 4. Execute 1000 times the function using
2010 Mar 26
1
[LLVMdev] Using GetElementPtr to traverse large arrays
Hi all, This question was probably asked million times before, but I wasted few hours and didn't find the solution.. What is the best way to traverse a large array (say size of million) with GetElementPtr The problem with the following code, is that it forces you to create million constant index values: intVars = new AllocaInst(Type::getInt32Ty(ctx), allocaSize, "intVars",
2010 Mar 19
2
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Reid, Thanks! You were right! Changing the code to: float (*theF)(float) = (float (*)(float)) EE -> getPointerToFunction(f); float retVal = theF(arg1); made the difference. Now it is dozens of times faster! I don't really understand the cause though.. Why doesn't ExecutionEngine cope well with "define float @someFunc(float %x)" and needs this trick ? (but copes well with
2010 Mar 18
0
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Hi Gabi, I have no idea why your performances is not as expected with such low level of informations. But, I know that the binary code is cached by the JIT. You can find the code in JIT.cpp to convince yourself : runFunction -> getPointerToFunction ->getPointerToGlobalIfAvailable which returns the native address of the jitted function. You can even try to measure time needed by each
2010 Mar 23
3
[LLVMdev] How to avoid memory leaks
Hi I get huge memory leaks using LLVM IRBuilder (trunk version) Basically I recreate a function over and over again, and pretty sure that my code doesn't cause the leak while(true) { Function *fn = module->getFunction(name); if (fn) fn->eraseFromParent(); fn = cast<Function>(module->getOrInsertFunction(name, fnType)); fillFunction(fn); //Fill function with
2010 Mar 18
0
[LLVMdev] Does it cache the compiled code of executed functions upon runFunction(..)?
I think I found the cause. It appears that FP operations and functions (I used combinations of CreateFMulL CreateFAdd and CreateFSub ) is MUCH slower than their integer equivalents. I mean really slower (20x slower or even more) Can It be the cause ? Does the FP binary ops are so slow ? -- Regards, Gabi http://bugspy.net
2010 Mar 23
0
[LLVMdev] How to avoid memory leaks
Are you calling llvm_shutdown() at the end of your program? You should. valgrind reports "possible" leaks when it finds a pointer pointing inside a memory block (as opposed to at the first byte), and LLVM uses those a lot. llvm_shutdown() will free a lot of that memory, including the LLVMContext, which should remove any false leaks you might be seeing. On the other hand, the
2010 Apr 06
1
[LLVMdev] PrintModule: How to make it show floats in decimal instead of hex?
Is there a way to make the printer to display float values in decimal form instead of the cryptic 0x... ? -- Regards, Gabi http://bugspy.net
2010 Apr 06
2
[LLVMdev] PrintModule: How to make it show floats in decimal instead of hex?
> PS: Maybe not for x86 long double though. Right, so how to make x86 double displayed in decimal ? -- Regards, Gabi http://bugspy.net
2010 Apr 14
1
[LLVMdev] Most efficient way to count # of intrcutions in a module ?
I need to count the total number of instructions in a given module. The only way I found is using the obvious double iteration as seen below. Is there any more efficient way to achieve this ? I don't like the fact that simple calculation like that has performance of o(F*B) (# of functions * # of blocks per function) unsigned int calcSize(Module* mod) { unsigned int size = 0; for
2010 Apr 24
1
[LLVMdev] LLVM ERROR: Cannot yet select: 0x2625340: f64 = ConstantFP<3.540000e+02> :What is it?
I get this message once in a while and llvm exits the program. What might be the cause ? llvm version: svn host: Linux x86_64 -- Regards, Gabi http://bugspy.net
2010 Apr 25
2
[LLVMdev] LLVM ERROR: Cannot yet select: 0x2625340: f64 = ConstantFP<3.540000e+02> :What is it?
Hi Christoph I am compiling for x86-64. This error happens randomly (at least it appears that way) and rarely. About every few thousand runs -- Regards, Gabi http://bugspy.net
2010 Mar 19
0
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Probably because the integer version of the prototype is special-cased. The problem is that the JIT has a C function pointer of an arbitrary type that it only finds out about at runtime. Normally, if you call a function pointer with a known type, your compiler will generate the proper calling code and allocate the arguments in registers or on the stack. However, doing that inside the JIT would
2010 Apr 04
1
[LLVMdev] Code generators (both llvmc and Jit) get stuck when dealing circular CFG
Hi, The following arbitrary example makes the code generators to get stuck (llvmc won't return from command line, Jit won't return from function call) Basically it is a CFG with circles, (the function will return by comparing a branch counter to a threshold on runtime - see the "Brancher" blocks below) Any idea what goes wrong? Is it a bug in llvm ? ; ModuleID =
2010 Mar 23
2
[LLVMdev] How to avoid memory leaks
Hi Jeffrey, Listed below the Full valgrind report (using latest revision r99309) The program creates many thousands of instructions and values as you can see from the report below ==20504== Memcheck, a memory error detector ==20504== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==20504== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info ==20504==