search for: fvector

Displaying 20 results from an estimated 36 matches for "fvector".

Did you mean: vector
2016 Aug 11
2
Invoke clang options in clang-cl.
Hi there, I'm trying to invoke options in clang-cl. Clang-cl -xclang -fvectorize test.cpp But it shows unknown argument: -fvectorize. I checked options.td and -xclang and -fvectorize options are there. Is there anyway we can change clang to support vector options? Thanks, Xiaochu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://l...
2016 Mar 16
2
generate vectorized code
...e the following test: #define N 16 int main () { int a[N], b[N]; int c[N]; for (int i = 0; i < N; ++i) c[i] = a[i] + b[i]; int sum=0; for (int i = 0; i < N; ++i) sum += c[i]; return sum; } Here are the command lines I tried: clang -S test.c --target=esencia -fvectorize -o test.esencia.s clang -S test.c --target=esencia -fvectorize -fslp-vectorize-aggressive -o test.esencia.s -fslp-vectorize clang -S test.c --target=esencia -fvectorize -fslp-vectorize-aggressive -o test.esencia.s -fslp-vectorize -fno-lax-vector-conversions Unfortunately nothing worked. Can s...
2016 Mar 16
3
vectorization for X86
...in X86.td as well as other X86 related options (such as -mtune). Below are the command and the code that I'm trying to vectorize. The code compiles but I don't see any vectors. What am I doing wrong? Any help is appreciated. clang -S x.c --target=x86_64-pc-gnu -mtune=core-avx2 -o x.x86.s -fvectorize -fno-lax-vector-conversions -fslp-vectorize-aggressive -fslp-vectorize #define N 32 int main () { int a[N], b[N]; int c[N]; for (int i = 0; i < N; ++i) c[i] = a[i] + b[i]; int sum=0; for (int i = 0; i < N; ++i) sum += c[i]; return sum; } -- Rail Shafigu...
2013 Apr 03
2
[LLVMdev] Packed instructions generaetd by LoopVectorize?
...he loop vectorizer supposed to generate packed float and double instructions? Is this a bug, or am I doing something wrong? Tyler float dotproduct(float *A, float *B, int n) { float sum = 0; for(int i = 0; i < n; ++i) { sum += A[i] * B[i]; } return sum; } clang dotproduct.cpp -O3 -fvectorize -march=atom -S -o - <loop body> .LBB1_1: movss (%rdi), %xmm1 addq $4, %rdi mulss (%rsi), %xmm1 addq $4, %rsi decl %edx addss %xmm1, %xmm0 jne .LBB1_1 -------------- next part -------------- An HTML attachment was s...
2018 Jun 11
2
LoopVectorize fails to vectorize code with condition on reduction
...void Func(int N) { int numSol = 0; for (int c = 0; c < N; c++) { if (colOccupied[c] == 0) numSol++; } return numSol; } The compiler command I used was: clang -O3 -emit-llvm -S -mllvm -debug -ffast-math A.cpp -fvectorize -mllvm -force-vector-width=16 Following is the output of LLVM's opt explaining why it fails to vectorize: LV: Checking a loop in "_Z6Queensi" from A_DFS_last_level_wo_rec.cpp LV: Loop hints: force=? width=16 unroll=0 LV: Found a loop: for.body...
2018 Jun 05
2
How to get optimization remarks while testing with lnt in llvm
...loop-vectorize I've tried running it like this: lnt runtest test-suite --sandbox SANDBOX --cc /usr/local/bin/clang --test-suite ~/llvm_tests/llvm-test-suite/ --only-test SingleSource/UnitTests/Vectorizer/ --only-compile --use-lit ~/llvm/utils/lit/lit.py --cflag '-O3' --cflag '-fvectorize' --cflag '-Rpass-missed=loop-vectorize' --cflag '-Rpass-analysis=loop-vectorize' -j 70 This isn't causing any compilation fails, but I haven't been able to get the optimization remarks (either to terminal or to the logs). I've gone through all files generated in...
2016 Mar 12
4
clang triple and clang target
...ome reason clang would generate an error saying that a given target does not exist. Here is the command line I used: clang -S test.c -o test.sse2.x86-64.s --target=x86-unknown-linux-eabi -mfloat-abi=hard -mcpu=x86-64 -mfpu=SSE2 -fslp-vectorize-aggressive -fslp-vectorize-aggressive -fslp-vectorize -fvectorize -fno-lax-vector-conversions Here is the response I got: clang: warning: argument unused during compilation: '-mfloat-abi=hard' clang: warning: argument unused during compilation: '-mcpu=x86-64' clang: warning: argument unused during compilation: '-mfpu=SSE2' error: unkno...
2013 Jun 14
1
[LLVMdev] Enabling the vectorizer for -Os -- ping
Hi Nadav, No noticeable difference between "-Os" and "-Os -fvectorize" in code size or compilation times in my tests, and only minimal performance improvements (small enough to be ignored). cheers, --renato On 14 June 2013 09:29, Renato Golin <renato.golin at linaro.org> wrote: > On 14 June 2013 05:37, Nadav Rotem <nrotem at apple.com> wrot...
2013 Apr 03
0
[LLVMdev] Packed instructions generaetd by LoopVectorize?
...instructions? Is this a bug, or am I doing something wrong? > > Tyler > > float dotproduct(float *A, float *B, int n) { > float sum = 0; > for(int i = 0; i < n; ++i) { > sum += A[i] * B[i]; > } > return sum; > } > > clang dotproduct.cpp -O3 -fvectorize -march=atom -S -o - > > <loop body> > .LBB1_1: > movss (%rdi), %xmm1 > addq $4, %rdi > mulss (%rsi), %xmm1 > addq $4, %rsi > decl %edx > addss %xmm1, %xmm0 > jne .LBB1_1 ------------...
2013 Apr 04
1
[LLVMdev] Packed instructions generaetd by LoopVectorize?
...he loop vectorizer supposed to generate packed float and double instructions? Is this a bug, or am I doing something wrong? Tyler float dotproduct(float *A, float *B, int n) { float sum = 0; for(int i = 0; i < n; ++i) { sum += A[i] * B[i]; } return sum; } clang dotproduct.cpp -O3 -fvectorize -march=atom -S -o - <loop body> .LBB1_1: movss (%rdi), %xmm1 addq $4, %rdi mulss (%rsi), %xmm1 addq $4, %rsi decl %edx addss %xmm1, %xmm0 jne .LBB1_1 -------------- next part -------------- An HTML attachment was...
2013 Dec 11
2
[LLVMdev] AVX code gen
...have an environment where icc generates these instructions (vmulps %ymm1, %ymm3, %ymm2 for example) but I can not get clang/llvm to generate such instructions (using the 3.3 release or either 3.4 rc1 or 3.4 rc2). I am new to clang / llvm so I may not be invoking the tools correctly but given that –fvectorize and –fslp-vectorize are on by default at 3.4 I would have thought that if the code is AVX-able by icc that clang / llvm would be able to do the same… The code is basic matrix multiplication written a number of ways (with and without transposition and such) as a performance measurement exercise....
2016 Feb 18
3
[LLVMdev] LLVM loop vectorizer
...;> >>>> Hello. >>>> I am trying to vectorize a CSR SpMV (sparse matrix vector multiplication) procedure >>>> but the LLVM loop vectorizer is not able to handle such code. >>>> I am using cland and llvm version 3.4 (on Ubuntu 12.10). I use the -fvectorize option >>>> with clang and -loop-vectorize with opt-3.4 . >>>> The CSR SpMV function is inspired from >>>> http://stackoverflow.com/questions/13636464/slow-sparse-matrix-vector-product-csr-using-open-mp <http://stackoverflow.com/questions/13636464/slow-sp...
2016 Jun 04
4
[LLVMdev] LLVM loop vectorizer
...he resulting .ll file which runs LoopVectorize, we lose the C source file debug info (DebugLoc class, etc) and obtain the debug info from the .ll file. An example: > clang -O3 3better.c -arch=mips -ffast-math -Rpass=debug -Rpass=loop-vectorize -Rpass-analysis=loop-vectorize -S -emit-llvm -fvectorize -mllvm -debug -mllvm -force-vector-width=16 -save-temps > > Thank you, > Alex > > > > On 2/18/2016 2:17 AM, Mikhail Zolotukhin wrote: >> Hi Alex, >> >> I'm not aware of efforts on loop coalescing in LLVM, but probably polly can do >> some...
2014 Apr 24
2
[LLVMdev] How to get debug dump of candidate pairs selected in BBVectorizer?
Hi All, I'm trying to understand BB Vectorizer and gone through http://llvm.org/devmtg/2012-04-12/Slides/Hal_Finkel.pdf Wanted to know how to use bb-vectorize-debug-candidate-selection and bb-vectorize-debug-pair-selection command arguments. I tried the command with debug build clang - clang -O2 test.c -mllvm -vectorize \ -mllvm -debug-only=bb-vectorize \ -mllvm
2016 Jun 07
2
[LLVMdev] LLVM loop vectorizer
...he resulting .ll file which runs LoopVectorize, we lose the C source file debug info (DebugLoc class, etc) and obtain the debug info from the .ll file. An example: > clang -O3 3better.c -arch=mips -ffast-math -Rpass=debug -Rpass=loop-vectorize -Rpass-analysis=loop-vectorize -S -emit-llvm -fvectorize -mllvm -debug -mllvm -force-vector-width=16 -save-temps > > Thank you, > Alex > > > > On 2/18/2016 2:17 AM, Mikhail Zolotukhin wrote: >> Hi Alex, >> >> I'm not aware of efforts on loop coalescing in LLVM, but probably polly can do >> some...
2015 Jul 08
7
[LLVMdev] LLVM loop vectorizer
Hello. I am trying to vectorize a CSR SpMV (sparse matrix vector multiplication) procedure but the LLVM loop vectorizer is not able to handle such code. I am using cland and llvm version 3.4 (on Ubuntu 12.10). I use the -fvectorize option with clang and -loop-vectorize with opt-3.4 . The CSR SpMV function is inspired from http://stackoverflow.com/questions/13636464/slow-sparse-matrix-vector-product-csr-using-open-mp (I can provide the exact code samples used). Basically the problem is the loop vectorizer does...
2013 Dec 12
0
[LLVMdev] AVX code gen
...have an environment where icc generates these instructions (vmulps %ymm1, %ymm3, %ymm2 for example) but I can not get clang/llvm to generate such instructions (using the 3.3 release or either 3.4 rc1 or 3.4 rc2). I am new to clang / llvm so I may not be invoking the tools correctly but given that –fvectorize and –fslp-vectorize are on by default at 3.4 I would have thought that if the code is AVX-able by icc that clang / llvm would be able to do the same… The code is basic matrix multiplication written a number of ways (with and without transposition and such) as a performance measurement exercise....
2014 Sep 14
2
[LLVMdev] Testing the new CFL alias analysis
...00.ref.254_gap 1.19% > spec.cpu2000.ref.197_parser 1.15% > spec.cpu2000.ref.253_perlbmk 1.11% > spec.cpu2000.ref.300_twolf -1.04% > > So we can see almost all got worse performance. > > The command line option I'm using is "-O3 -std=gnu89 -ffast-math -fslp-vectorize -fvectorize -mcpu=cortex-a57 -mllvm -use-cfl-aa -mllvm -use-cfl-aa-in-codegen" > > I didn't try compile-time, and I think your test on POWER7 native build should already meant something for other hosts. Also I don't have a good benchmark suit for compile time testing. My past experiences...
2016 Mar 14
3
clang triple and clang target
...ong, but I don't know what exactly. I would really appreciate your help in this. Here is the command line I'm using clang -S test.c -o test.sse2.x86_64.s --target=x86_64-pc-linux-gnu -mfloat-abi=hard -mcpu=k8 -mfpu=SSE2 -fslp-vectorize-aggressive -fslp-vectorize-aggressive -fslp-vectorize -fvectorize -fno-lax-vector-conversions -O3 Here is the response that I get: clang-3.5: warning: argument unused during compilation: '-mfloat-abi=hard' clang-3.5: warning: argument unused during compilation: '-mcpu=k8' clang-3.5: warning: argument unused during compilation: '-mfpu=SSE2...
2014 Sep 03
2
[LLVMdev] Testing the new CFL alias analysis
Hello everyone, One of Google's summer interns, George Burgess IV, created an implementation of the CFL pointer-aliasing analysis algorithm, and this has now been added to LLVM trunk. Now we should determine whether it is worthwhile adding this to the default optimization pipeline. For ease of testing, I've added the command line option -use-cfl-aa which will cause the CFL analysis to be