search for: slpvector

Displaying 20 results from an estimated 58 matches for "slpvector".

Did you mean: stepvector
2014 Apr 17
2
[LLVMdev] Extend SLPVectorizer to struct operations that are isomorphic to vector operations?
While playing with SLPVectorizer, I notice that it will happily vectorize cases involving extractelement/insertelement, but won't vectorize isomorphic cases involving extractvalue/insertvalue (such as the attached example). Is that something that could be straightforward to add to SLPVectorizer, or are there some hard iss...
2013 Jul 27
2
[LLVMdev] [llvm] r187267 - SLP Vectorier: Don't vectorize really short chains because they are already handled by the SelectionDAG store-vectorizer, which does a better job in deciding when to vectorize.
...m-project?rev=187267&view=rev > Log: > SLP Vectorier: Don't vectorize really short chains because they are > already handled by the SelectionDAG store-vectorizer, which does a better > job in deciding when to vectorize. > > Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=187267&r1=187266&r2=187267&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Vectorize...
2014 Mar 17
2
[LLVMdev] Improving SLPVectorizer for Julia
I'm working on some small improvements to SLPVectorizer.cpp so that it can deal with some tuple operations arising from Julia code. Being fairly new to LLVM, I could use some advice, particular from those familiar with the internals of SLPVectorizer. The motivation can be found in the Julia discussion https://github.com/JuliaLang/julia/issues/58...
2013 Jul 27
0
[LLVMdev] [llvm] r187267 - SLP Vectorier: Don't vectorize really short chains because they are already handled by the SelectionDAG store-vectorizer, which does a better job in deciding when to vectorize.
...ev=187267&view=rev >> Log: >> SLP Vectorier: Don't vectorize really short chains because they are already handled by the SelectionDAG store-vectorizer, which does a better job in deciding when to vectorize. > >> >> Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=187267&r1=187266&r2=187267&view=diff >> ============================================================================== >> --- llvm/trunk/lib/Transforms/Vectori...
2013 Jul 27
1
[LLVMdev] [llvm] r187267 - SLP Vectorier: Don't vectorize really short chains because they are already handled by the SelectionDAG store-vectorizer, which does a better job in deciding when to vectorize.
...t;> Log: >> SLP Vectorier: Don't vectorize really short chains because they are >> already handled by the SelectionDAG store-vectorizer, which does a >> better job in deciding when to vectorize. > > > >> >> Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=187267&r1=187266&r2=187267&view=diff >> >> ============================================================================== >> --- llvm/trunk/lib/...
2015 Oct 14
4
Extending SLP Vectorizer to deal with aggregates?
...d I'd like to make SLP Vectorizer vectorize idioms involving aggregates. A sample of the idiom is at https://gist.github.com/ArchRobison/e762cd55b8cfc0e019a3 . 1. Identify stores of arrays. E.g. "store [4 x float]". 2. Walk chains backwards from the array stores, similar to the way SLPVectorizer already walks chains. 3. If vectorization is applicable, replace array construction/load/store with vector construction/load/store. Vector load/stores will be unaligned. Does this sound like a reasonable approach? If it sounds too Julia-specific, I could do it as a custom Julia pass. - Arch...
2015 Dec 04
2
GlobalsAA from GVN
>You could, in the LTO pipeline, reinsert GlobalsAA after the SLPVectorizer (not saying you should). I didn't realise that adding GlobalsAA* after* SLPVectorizer could help. Thanks for this tip. >There is something fishy. Do you have a test case that reproduce with llvm-lto? I'm currently looking at a proprietary benchmark. I'll try to extract out a sim...
2013 Oct 24
4
[LLVMdev] Vectorizing alloca instructions
Hi, I've been playing around with the SLPVectorizer trying to get it to vectorize this simple program: define void @vector(i32 addrspace(1)* %out, i32 %index) { entry: %0 = alloca [4 x i32] %x = getelementptr [4 x i32]* %0, i32 0, i32 0 %y = getelementptr [4 x i32]* %0, i32 0, i32 1 %z = getelementptr [4 x i32]* %0, i32 0, i32 2 %w =...
2015 Dec 03
2
GlobalsAA from GVN
Hi Mehdi, Thank you for the response. I'm actually on an LTO setup and was referring to PassManagerBuilder::addLTOOptimizationPasses. Here, GlobalsAA is scheduled to run well ahead of SLPVectorizer. However since GlobalsAA is a module pass, it runs once and a bunch of passes, including SLPVectorizer is run for each function. When one of them invalidates the analysis, rest of the functions do not have it available. Both LICM and GVN face the same issue. Surprisingly I didn't see this...
2013 Oct 24
0
[LLVMdev] Vectorizing alloca instructions
On Thu, Oct 24, 2013 at 2:04 PM, Tom Stellard <tom at stellard.net> wrote: > Hi, > > I've been playing around with the SLPVectorizer trying to get it to > vectorize this simple program: > > define void @vector(i32 addrspace(1)* %out, i32 %index) { > entry: > %0 = alloca [4 x i32] > %x = getelementptr [4 x i32]* %0, i32 0, i32 0 > %y = getelementptr [4 x i32]* %0, i32 0, i32 1 > %z = getelement...
2015 Sep 11
6
Optimizer issues on Windows
....com/CausalityLtd/ponyc/tree/llvm37> (llvm37 branch) project is facing an issue on Windows: When optimizations are turned on (llvm 3.7.0-final and more specifically<https://github.com/CausalityLtd/ponyc/blob/llvm37/src/libponyc/codegen/genopt.cc>, opt-level 3, BBVectorize, LoopVectorize, SLPVectorize, RerollLoops, LoadCombine + a custom heap to stack pass) writing an object file aborts (on Windows only) with the following fatal error: “Starting a function before ending the previous one!” at MCStreamer.cpp:407 during LLVMTargetMachineEmitToFile. Verifying the IR with llc raises no errors. W...
2017 Aug 21
2
Vectorization in LLVM x86 backend
...I compiled the attached .c file using Clang with "-mavx2 -mfma -m32 -O3" optimization flags. First I used -emit-llvm and inspected the LLVM IR and there are no vector instructions. Then I got the assembly output of the file in it I can clearly see vector instructions in it. Neither the SLPVectorizer or the LoopVectorizer is however doing any vectorization (also checked it using -debug-only flag) as witnessed by the LLVM IR dump. Therefore, the vectorization should happen in the backend(?). Can I know whether the x86 backend does additional vectorization of scalar code and if so in which...
2013 Oct 24
0
[LLVMdev] Vectorizing alloca instructions
...rations (which is a bad idea). We need to figure out why AA thinks that X and Y may alias. Maybe there is a problem with the code that uses AA. Thanks, Nadav On Oct 24, 2013, at 2:04 PM, Tom Stellard <tom at stellard.net> wrote: > Hi, > > I've been playing around with the SLPVectorizer trying to get it to > vectorize this simple program: > > define void @vector(i32 addrspace(1)* %out, i32 %index) { > entry: > %0 = alloca [4 x i32] > %x = getelementptr [4 x i32]* %0, i32 0, i32 0 > %y = getelementptr [4 x i32]* %0, i32 0, i32 1 > %z = getelementptr...
2017 Feb 23
4
llvm-lit: 2>&1 and FileCheck
...we are often saved by the fact that standard output is written only at the end of the program and stderr is unbuffered, i.e. always written before stdout. A lot of tests disable stdout using either "-o /dev/null" or "-disable-output", but not all. For instance, test/Transforms/SLPVectorizer/X86/reduction_unrolled.ll does not. It checks for output from stdout and stderr using the same FileCheck. The stderr it is checking even comes from -debug, which has an additional buffering layer (circular_raw_ostream). The testing guide [1] does not mention how to test stderr. My questions:...
2013 Nov 07
1
[LLVMdev] SLP vectorizer turned on in commit r190916 which says nothing about it - how to turn it off?
...======================================= --- tools/opt/opt.cpp (revision 190915) +++ tools/opt/opt.cpp (revision 190916) @@ -462,6 +462,7 @@ DisableLoopUnrolling : OptLevel == 0; Builder.LoopVectorize = OptLevel > 1 && SizeLevel < 2; + Builder.SLPVectorize = true; Builder.populateFunctionPassManager(FPM); Builder.populateModulePassManager(MPM); I think that should not be there? There should at least be a way to turn the SLP optimizer off? It breaks things on our architecture(TCE) which I'm now porting to use llvm 3.4
2017 Aug 21
2
Vectorization in LLVM x86 backend
...2 -mfma >> -m32 -O3" optimization flags. >> >> First I used -emit-llvm and inspected the LLVM IR and there are no vector >> instructions. Then I got the assembly output of the file in it I can >> clearly see vector instructions in it. >> >> Neither the SLPVectorizer or the LoopVectorizer is however doing any >> vectorization (also checked it using -debug-only flag) as witnessed by the >> LLVM IR dump. >> >> Therefore, the vectorization should happen in the backend(?). >> >> Can I know whether the x86 backend does additio...
2013 Oct 24
1
[LLVMdev] Vectorizing alloca instructions
...r Carruth <chandlerc at google.com> wrote: > Just a note, I don't think you should or need to vectorize the actual alloca stuff. If you can simply transform the dynamically indexed load: > > Then running SROA and InstCombine will mop up the rest. So its mostly about getting the SLPVectorizer to handle the dynamic GEP. As soon as it does that, everything else will fall away. > I don’t think that Tom wants the SLP-vectorizer to handle dynamic GEPS. What he wants is for the SLP-vectorizer to convert the first part of the code: >> define void @vector(i32 addrspace(1)* %ou...
2017 Sep 12
3
RFC phantom memory intrinsic
...pplied. I added phatom_mem(llvm_anyptr_ty, llvm_i64_ty) intrinsic for that, indicating that for particular pointer let's call it %ptr we observed maximum possible offset at which there was reference by its type in a function. After InstCombine deleted the load operation, it could be restored in SLPVectorizer and we could restore chains of GEPs, Loads and Inserts in case we encounter phatom_mem intrinsic. Here is two part review: https://reviews.llvm.org/D37579 - InstCombine part. https://reviews.llvm.org/D37648 - SLP part. Also, there might be different approaches in describi...
2015 Sep 12
3
Optimizer issues on Windows
....com/CausalityLtd/ponyc/tree/llvm37> (llvm37 branch) project is facing an issue on Windows: When optimizations are turned on (llvm 3.7.0-final and more specifically<https://github.com/CausalityLtd/ponyc/blob/llvm37/src/libponyc/codegen/genopt.cc>, opt-level 3, BBVectorize, LoopVectorize, SLPVectorize, RerollLoops, LoadCombine + a custom heap to stack pass) writing an object file aborts (on Windows only) with the following fatal error: “Starting a function before ending the previous one!” at MCStreamer.cpp:407 during LLVMTargetMachineEmitToFile. Verifying the IR with llc raises no errors. W...
2020 Sep 01
2
Vector evolution?
On Tue, Sep 1, 2020 at 5:10 PM Florian Hahn <florian_hahn at apple.com> wrote: > The loop vectorizer does not really handle loops that already operate on vectors, so that is why the loop using v4f32 does not get widened. > > Arguably the user explicitly asked for 4xfloat vectors in the v4f32 version, so that is what gets generated. In my case I have tons of legacy code written for