similar to: [LLVMdev] scalar evolution to determine access functions in arays

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] scalar evolution to determine access functions in arays"

2011 Aug 03
0
[LLVMdev] scalar evolution to determine access functions in arays
On 07/27/2011 03:11 PM, Jimborean Alexandra wrote: > Hello, > > How can I compute the functions on the loop iterators used as array > indices? > > For example: > > for i = 0, N > for j = 0, M > A[2*i + j - 10] = ... > > Can I obtain that this instruction A[2*i + j - 10]= .. always accesses > memory using a function f(i,j) = 2*i + j - 10 + base_address_of_A
2011 Aug 03
2
[LLVMdev] scalar evolution to determine access functions in arays
Hello Tobi, You are right, we need to run some other passes before running the scalar evolution pass. The sequence that I run for this example is -O3 -loop-simplify -reg2mem.  This is why I did not obtain the expressions depending on the loop indices. So I removed the reg2mem pass and scalar evolution computes the correct functions. However, I need to run the reg2mem pass (or any other that
2011 Aug 03
0
[LLVMdev] scalar evolution to determine access functions in arays
On 08/03/2011 08:35 AM, Jimborean Alexandra wrote: > Hello Tobi, > > You are right, we need to run some other passes before running the > scalar evolution pass. The sequence that I run for this example is -O3 > -loop-simplify -reg2mem. This is why I did not obtain the expressions > depending on the loop indices. So I removed the reg2mem pass and scalar > evolution computes the
2011 Aug 03
2
[LLVMdev] scalar evolution to determine access functions in arays
Only because in my next passes I change the CFG significantly and it is very hard to maintain the values of the Phi nodes. Alexandra ________________________________ From: Tobias Grosser <tobias at grosser.es> To: Jimborean Alexandra <xinfinity_a at yahoo.com> Cc: "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu>; "luismastrangelo at gmail.com"
2011 Aug 03
0
[LLVMdev] scalar evolution to determine access functions in arays
On 08/03/2011 10:22 AM, Jimborean Alexandra wrote: > Only because in my next passes I change the CFG significantly and it is > very hard to maintain the values of the Phi nodes. OK. In Polly we developed a pass called, 'independent-blocks-pass'. It basically creates basic blocks, that can easily be rescheduled without stopping the scalar evolution analysis to work. Maybe something
2011 Aug 03
1
[LLVMdev] scalar evolution to determine access functions in arays
Ok, thank you, I will have a look and reply with questions if necessary. Does it take into consideration the existing phi nodes? Alexandra ________________________________ From: Tobias Grosser <tobias at grosser.es> To: Jimborean Alexandra <xinfinity_a at yahoo.com> Cc: "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu>; "luismastrangelo at gmail.com"
2011 May 09
2
[LLVMdev] get LPPassManager to use it in llvm::CloneLoop
Hi, I try to write a FunctionPass that, among other tasks, has to clone some loops from the current function. How can I obtain the LPPassManager in order to use the CloneLoop function. In a LoopPass this is a parameter for the runOnLoop, but how can I obtain it in a FunctionPass? I tried simply by creating a new instance : ValueMap<const Value *, Value* > VMap;
2011 Jul 20
3
[LLVMdev] print the memory address computed by getelementptr
Hi, I want to print the memory locations computed by getelementptr. As I understood, getelementptr does not access the memory, but it contains the address it computes. I want to print these addresses at runtime (or process them). So, I try to build a function that takes as argument a pointer and prints its value. And to call this function, by sending the gep instruction as a parameter.
2008 Dec 09
1
[LLVMdev] scalar-evolution + indvars fail to get the loop trip count?
Hi, Seems pass scalar-evolution+indvars fail to get the loop trip count of the following case: int foo(int x, int y, int lam[256], int alp[256]) { int i; int z = y; for (i = 255; i >= 0; i--) { z += x; lam[i] = alp[i]; } return z; } The final optimized ll code is : define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind { entry: br label %bb bb:
2011 Jul 20
0
[LLVMdev] print the memory address computed by getelementptr
On 7/20/11 10:02 AM, Jimborean Alexandra wrote: > Hi, > > I want to print the memory locations computed by getelementptr. As I > understood, getelementptr does not access the memory, but it contains > the address it computes. I want to print these addresses at runtime > (or process them). So, I try to build a function that takes as > argument a pointer and prints its
2011 May 09
0
[LLVMdev] get LPPassManager to use it in llvm::CloneLoop
On Mon, May 9, 2011 at 1:06 AM, Jimborean Alexandra <xinfinity_a at yahoo.com> wrote: > Hi, > > I try to write a FunctionPass that, among other tasks, has to clone some > loops from the current function. > How can I obtain the LPPassManager in order to use the CloneLoop function. > In a LoopPass this is a parameter for the runOnLoop, but how can I obtain it > in a
2011 May 17
1
[LLVMdev] eliminate phi nodes, reduce unnecessary loads / stores , reg2mem, mem2reg
Hi, I work on a pass that requires as input LLVM code without any phi nodes. For this, I use the reg2mem pass which produces suitable code, the pass runs correctly, but I obtain a significant performance decrease. I expect that this is because there are more reads / writes to memory after running the reg2mem pass. How can I optimize the code, without inserting any phi nodes? Or is there a
2011 Jul 19
3
[LLVMdev] speculative parallelization in LLVM
Hi Renato, No, I cannot, but in case it is, I want to take advantage of this. In case it is not, the instrumentation code will detect this at runtime and simply roll back to the original version. I will always keep an original version available, in addition to the ones I modify with Polly. However, initially I will speculate that it is allocated contiguously. Thanks, Alexandra
2013 Apr 10
2
[LLVMdev] How to call the llvm.prefetch intrinsic ?
Hello, Can anyone please guide me how can I replace a load instruction with a prefetch. I was looking at the intrinsic creation methods of the IRBuilder, but I can only find functions corresponding to memset, memcpy and memmove intrinsics, not for prefetching. Also, I target x86-64 architectures. Is it sufficient to insert a call to the intrinsic in the LLVM IR to have the corresponding prefetch
2011 Jul 19
4
[LLVMdev] speculative parallelization in LLVM
Hi Tobi, Thank you for your reply :). I know that array accesses are handled as pointers in LLVM, but as I understood Polly is focused on statically analysable code. As you mentioned: proving that pointer accesses actually represent virtual array accesses. In the case of a linked list for example, parsed with a pointer p = p->next, I expect that Polly will not handle this code. So I
2013 Apr 10
0
[LLVMdev] How to call the llvm.prefetch intrinsic ?
Alexandra, I'm not sure what you mean by "replace", but I have code that does this to insert prefetches: Type *I8Ptr = Type::getInt8PtrTy((*I)->getContext(), PtrAddrSpace); Value *PrefPtrValue = ... IRBuilder<> Builder(MemI); Module *M = (*I)->getParent()->getParent(); Type *I32 = Type::getInt32Ty((*I)->getContext()); Value
2012 Nov 22
2
[LLVMdev] Set the minimum number of allocated bits for a variable
Hi, I would like to force the minimum number of bits allocated for a variable in memory to be 16. From what I have seen, i1 is already represented on 8 bits. So, the only change would be to represent i1 and i8 on 16 bits, as all other types already fulfill this condition. TargetData can help by setting a higher alignment, thus although the type is i1 or i8, the number of allocated bits is 16.
2011 Jul 19
0
[LLVMdev] speculative parallelization in LLVM
On 19 July 2011 10:12, Jimborean Alexandra <xinfinity_a at yahoo.com> wrote: > %curr_array = alloca [10 x %struct.linked], align 8 > > while.. >  %tmp16 = getelementptr inbounds [10 x %struct.linked]* %curr_array, i32 0, > i32 1 Hi Alexandra, Can you guarantee that the linked list will be allocated in contiguous memory? cheers, --renato
2019 Feb 21
2
If there are some passes in LLVM do the opposite of the SROA(Scalar Replacement of Aggregates) pass
Hi LLVM developers, We tried to find if there are some passes in LLVM do the opposite of the SROA(Scalar Replacement of Aggregates) pass, but did not find one. Do we have this kind of pass to bring back the structure type? Or this is done separately in any transformation passes? Thanks, Lin-Ya -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Jul 25
1
[LLVMdev] print the memory address computed by getelementptr
Hi again, Thank you, your suggestion worked well. I was looking for a pointer to void actually. But it seems that I do not get the memory address when passing the value of the GEP instruction.  For instance, when I print the address accessed by the second operandof the store instruction store %struct.linked* %tmp23.reload8, %struct.linked** %curr.037.reg2mem I obtain a memory address of the