similar to: [LLVMdev] Fwd: Vectorization of pointer PHI nodes

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Fwd: Vectorization of pointer PHI nodes"

2013 Oct 14
0
[LLVMdev] Vectorization of pointer PHI nodes
Hi Renato, Thanks for working on this. As you said, we don't support pointer reductions. Handling pointer reductions should be straightforward. You can copy the logic for handling RK_IntegerAdd and create a new enum entry for RK_PointerAdd. You will need to detect the relevant patterns (GEP probably) and implement the cost model and vectorization parts. You will need to generate
2013 Oct 14
0
[LLVMdev] Vectorization of pointer PHI nodes
Renato, can you post the c code for the function and the assembly that gcc produces? Your initial example could be well handled by vectorization of strided loops (and the mentioning of VLD3(.8?)/VST3(.8?) lead me to assume that this is what happened). But the LLVM-IR you sent has a store of 0 in there ;) and strides by 4. Thanks, Arnold Vectorization of strided loops: I am using float as the
2013 Oct 14
4
[LLVMdev] Vectorization of pointer PHI nodes
This is almost ideal for SLP vectorization, except for two problems: 1. We have 4 stores to consecutive locations, but the last element is the constant zero, and not an additional SUB. At the moment we don’t have support for idempotence operations, but this is something that we should add. 2. The values that we are subtracting come from 3 loads. We usually load 4 elements from memory, or
2013 Oct 14
1
[LLVMdev] Vectorization of pointer PHI nodes
On 14 October 2013 19:31, Arnold Schwaighofer <aschwaighofer at apple.com>wrote: > Renato, can you post the c code for the function and the assembly that gcc > produces? > Attached. Your initial example could be well handled by vectorization of strided > loops (and the mentioning of VLD3(.8?)/VST3(.8?) lead me to assume that > this is what happened). But the LLVM-IR you
2013 Oct 14
0
[LLVMdev] Vectorization of pointer PHI nodes
On 14 October 2013 18:15, Nadav Rotem <nrotem at apple.com> wrote: > 1. We have 4 stores to consecutive locations, but the last element is the > constant zero, and not an additional SUB. At the moment we don’t have > support for idempotence operations, but this is something that we should > add. > The fourth write is not necessary for GCC to vectorize it (nor was in the
2013 Oct 14
0
[LLVMdev] Fwd: Vectorization of pointer PHI nodes
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Renato Golin > Subject: [LLVMdev] Fwd: Vectorization of pointer PHI nodes > My code looks like this: >  a = *read; >  b = *read; >  c = *read; Should we presume you intended to have post-increment operators on the references to read? - Chuck
2013 Feb 19
1
[LLVMdev] Auto-vectorization and phi nodes
On Feb 19, 2013, at 10:09 AM, Vesa Norilo <vnorilo at siba.fi> wrote: > Hi Nadav and Hal and thanks for the help! > > To the best of my understanding, indvars doesn't complain and an induction variable is detected. However, the loop vectorizer says: > > LV: Checking a loop in "add_vector" > LV: Found a loop: Loop > LV: Found an induction variable. >
2013 Feb 19
0
[LLVMdev] Auto-vectorization and phi nodes
Hi Nadav and Hal and thanks for the help! To the best of my understanding, indvars doesn't complain and an induction variable is detected. However, the loop vectorizer says: LV: Checking a loop in "add_vector" LV: Found a loop: Loop LV: Found an induction variable. LV: Found an unidentified PHI. %a.ptr = phi float* [ %a, %Top ], [ %a.next, %Loop ] LV: Can't vectorize the
2013 Feb 19
0
[LLVMdev] Auto-vectorization and phi nodes
----- Original Message ----- > From: "Vesa Norilo" <vnorilo at siba.fi> > To: llvmdev at cs.uiuc.edu > Sent: Tuesday, February 19, 2013 4:40:26 AM > Subject: [LLVMdev] Auto-vectorization and phi nodes > > Hi all, > > Sorry if this is a dumb or FAQ or the wrong list! > > I'm currently investigating LLVM vectorization of my generated code. > My
2013 Feb 19
2
[LLVMdev] Auto-vectorization and phi nodes
Hi all, Sorry if this is a dumb or FAQ or the wrong list! I'm currently investigating LLVM vectorization of my generated code. My codegen emits a lot of recursions that step through arrays via pointers. The recursions are nicely optimized into loops, but the loop vectorization can't seem to work on them because of phi nodes that point to gep nodes. Some simple IR to demonstrate; it
2013 Feb 19
2
[LLVMdev] Auto-vectorization and phi nodes
Hi Vesa, The pass IndVars changes the induction variables to allow SCEV to analyze them and enable other optimizations. This is the canonicalization phase. Later on, LSR lowers the canonicalized induction variables to induction variables that map nicely to the target's addressing modes. In many cases it can remove some of the induction variables. I suspect that the loop vectorizer does
2015 Jun 02
3
[LLVMdev] BasicAA unable to analyze recursive PHI nodes
Hi all, I came across the following limitation in our BasicAliasAnalysis. This happens with the following IR pattern: %x = phi [ %incptr, ... ] [ %var, ... ] %incptr = getelementptr %x, 1 We will basically always return MayAlias for %x and any other value because aliasPHI recurses on the first value and gives up. There are, however, many cases where this is too conservative. Take the
2011 Mar 12
0
[LLVMdev] problems when the llvm::ExtractCodeRegion updates the Phi nodes in successors ... is there a method to eliminate phi nodes ?
Hi, I use the llvm::ExtractCodeRegion to extract each loop into a separate function, but I have a problem when I run this on the SPEC CPU 2006 on the 401.bzip2 benchmark. First I use clang -O3 to generate optimized llvm code and then I extract some loops from the module built from blocksort.c source file. The problem is that the PHI nodes contained in the successors of the codeRepl
2004 Jul 09
0
[LLVMdev] PHI nodes in machine code
On Fri, 9 Jul 2004, Vladimir Prus wrote: > Misha Brukman wrote: > > > LLVM Machine code is in SSA. > > This explains quite a lot. I though it's possible to just reduce convert phis > into copy instructions in predecessors -- all of which will have the same > destination register. There are algorithms for eliminating PHI nodes, but they aren't quite so simple.
2007 Mar 28
0
[LLVMdev] Phi nodes
Hello. > Thanks for your answers so far. I am currently stumbling into new questions. > Naive as i am, i thought that the llvm-bytecode is allways in SSA form. But > this doesn't seem to be the case. At least there are no phi instructions > embedded if the bytecode drops out of llvm-gcc? Yes. llvm-gcc generates just memory references. PHI nodes are constructed later via mem2reg
2008 Jan 05
1
[LLVMdev] How to deal with phi-nodes
Hi, LLVMers. I am trying to restore the original HL code from LLVM IR (kinda reverse engineering). However, I have no good idea about how to handle PHI nodes. It is quite tricky for me to deal with the PHI nodes in LLVM IR in order to restore the original-like code. I read some reverse engineering thesis but they are a little bit old so don't handle SSA form. Could you shed some lights on
2009 Aug 23
1
[LLVMdev] Basic question concerning phi nodes and SSA variable labelling.
I have a basic question concerning how LLVM assigns labels to the LHS of an SSA assignment. My impression from the interface is you can pick a string which becomes the label for the result. However if you multiple labels which share the same name in a function a number gets added to the end of the label (is this correct?). In cases where you need to know what these resulting labels are is it
2010 Apr 19
2
[LLVMdev] PHI nodes
Hello, I am trying to write a LLVM backend for a school project using only custom code (as with the CBackend) and I'm having difficulties handling the PHI nodes from LLVM asm code. Is there any pass we can do before my custom Module Pass to remove the PHI nodes?
2010 Apr 19
0
[LLVMdev] PHI nodes
Pedro Ferreira wrote: > Hello, > > I am trying to write a LLVM backend for a school project using only > custom code (as with the CBackend) and I'm having difficulties > handling the PHI nodes from LLVM asm code. Is there any pass we can do > before my custom Module Pass to remove the PHI nodes? Try the Reg2Mem pass. http://llvm.org/docs/Passes.html#reg2mem Nick
2010 Apr 20
1
[LLVMdev] PHI nodes
Nick Lewycky <nicholas <at> mxc.ca> writes: > > Pedro Ferreira wrote: > > Hello, > > > > I am trying to write a LLVM backend for a school project using only > > custom code (as with the CBackend) and I'm having difficulties > > handling the PHI nodes from LLVM asm code. Is there any pass we can do > > before my custom Module Pass to