similar to: [LLVMdev] Using GetElementPtr to traverse large arrays

Displaying 20 results from an estimated 300 matches similar to: "[LLVMdev] Using GetElementPtr to traverse large arrays"

2010 May 05
2
[LLVMdev] How to cast an integer array to an integer pointer? (user question)
I am new to LLVM and couldn't find any llvm-user list, so I am posting my user question here, sorry. I am trying to create a simple "puts" call accepting the static string, with the code below. The last line (CallInst::Create) fails with an assert: "Calling a function with a bad signature!" Because the type of function is void(u8*) and the argument supplied is:
2013 Sep 26
3
[LLVMdev] Request for comments: TBAA on call
Hi all, TBAA on loads and stores is super useful for conveying high-level type knowledge to LLVM transformations. But often translating a high-level language into LLVM IR will result in runtime calls that are known at the high level to only affect (either by reading or by writing) some restricted subset of the heap. These aren't read-only calls; that is often too strong of a guarantee. A
2013 Oct 07
0
[LLVMdev] Request for comments: TBAA on call
On Wed, Sep 25, 2013 at 5:50 PM, Filip Pizlo <fpizlo at apple.com> wrote: > Hi all, > > TBAA on loads and stores is super useful for conveying high-level type > knowledge to LLVM transformations. But often translating a high-level > language into LLVM IR will result in runtime calls that are known at the > high level to only affect (either by reading or by writing) some
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
2013 Aug 19
4
[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically
Hello LLVMDev List, It's my first time sending a message to the List - I have been working on a tool for my research project using LLVM. Thanks for your awesome work! I have come across some bytecode like the following with an GetElementPtr instruction in brackets: Bytecode:%3 = call i32 @_Z4funcPKc(i8* getelementptr inbounds ([5 x i8]* @.str2, i32 0, i32 0)) C++ code:func("bleh");
2013 Oct 07
2
[LLVMdev] Request for comments: TBAA on call
On Oct 7, 2013, at 3:49 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > > > On Wed, Sep 25, 2013 at 5:50 PM, Filip Pizlo <fpizlo at apple.com> wrote: > Hi all, > > TBAA on loads and stores is super useful for conveying high-level type knowledge to LLVM transformations. But often translating a high-level language into LLVM IR will result in runtime calls
2013 Oct 07
0
[LLVMdev] Request for comments: TBAA on call
On Mon, Oct 7, 2013 at 4:22 PM, Filip Pizlo <fpizlo at apple.com> wrote: > > > On Oct 7, 2013, at 3:49 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > > > > On Wed, Sep 25, 2013 at 5:50 PM, Filip Pizlo <fpizlo at apple.com> wrote: >> >> Hi all, >> >> TBAA on loads and stores is super useful for conveying high-level type
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 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 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
2007 Sep 28
2
[LLVMdev] Vector troubles
Hola LLVMers, I'm working on engaging SSE via the LLVM vector ops on x86. I had some questions a while back that you all helped out on, but I'm seeing similar issues and was hoping you'd have some ideas. Below is the dump of the LLVM IR of a program which is designed to take a vector stored in a float*, build an LLVM vector from it, copy it to another vector, and then take it
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
2013 Oct 08
3
[LLVMdev] Request for comments: TBAA on call
I think we’re talking cross-purposes at this point. Let me try to step back and concisely restate what I’m trying to do: - I am writing a frontend for a high-level language and I emit LLVM IR. - I control the TBAA tree. I don’t use it to express the high-level language’s types, since that would make absolutely no sense. JavaScript doesn’t have types. But by the time my compiler is generating
2013 Oct 08
2
[LLVMdev] Request for comments: TBAA on call
TBAA MDNodes should describe the type hierarchy (with struct-path aware TBAA, it is a type DAG). It sounds okay to me to add !tbaa.call to function calls to describe which fields of the type system the call is touching. One example can be !tbaa.call {read a list of tag nodes, write a list of tag nodes}. Thanks, Manman On Mon, Oct 7, 2013 at 11:49 PM, Daniel Berlin <dberlin at dberlin.org>
2013 Oct 08
0
[LLVMdev] Request for comments: TBAA on call
On Mon, Oct 7, 2013 at 7:34 PM, Filip Pizlo <fpizlo at apple.com> wrote: > I think we’re talking cross-purposes at this point. Let me try to step > back and concisely restate what I’m trying to do: > > - I am writing a frontend for a high-level language and I emit LLVM IR. > - I control the TBAA tree. I don’t use it to express the high-level > language’s types, since
2013 Oct 08
0
[LLVMdev] Request for comments: TBAA on call
On Tue, Oct 8, 2013 at 12:45 PM, Manman Ren <manman.ren at gmail.com> wrote: > > TBAA MDNodes should describe the type hierarchy (with struct-path aware > TBAA, it is a type DAG). > It sounds okay to me to add !tbaa.call to function calls to describe which > fields of the type system the call is touching. > I agree wholeheartedly :). However, that's not what is being
2013 Aug 19
0
[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically
On Aug 19, 2013, at 14:26 , chentommy <baiypwup at hotmail.com> wrote: > Hello LLVMDev List, > > > It's my first time sending a message to the List - I have been working on a tool for my research project using LLVM. Thanks for your awesome work! > > I have come across some bytecode like the following with an GetElementPtr instruction in brackets: > >
2013 Aug 02
1
[LLVMdev] replacing GetElementPtrConstantExpr with GetElementPtrInst ... sometimes
Hi During a pass, the XCore target lowers thread local global variables by turning them into global variable arrays indexed by the (max 8) thread ID. (see XCoreLowerThreadLocal.cpp) This works fine for instructions e.g. GetElementPtrInst But can't be done for constants e.g. GetElementPtrConstantExpr Thus I would like to replace GetElementPtrConstantExpr with GetElementPtrInst when it is
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 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