similar to: [LLVMdev] LLVM Loop Vectorizer is enabled by default???

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] LLVM Loop Vectorizer is enabled by default???"

2013 May 23
2
[LLVMdev] LLVM Loop Vectorizer puzzle
Hi, I have the llvm loop vectorizer to complie the following sample: //================= int test(int *a, int n) { for(int i = 0; i < n; i++) { a[i] += i; } return 0; } //================ The corresponded .ll file has a loop preheader: //================ for.body.lr.ph: ; preds = %entry
2013 May 23
0
[LLVMdev] LLVM Loop Vectorizer puzzle
Hi, The TinyTripCountVectorThreshold only applies to loops with a known (constant) trip count. If a loop has a trip count below this value we don’t attempt to vectorize the loop. The loop below has an unknown trip count. Once we decide to vectorize a loop, we emit code to check whether we can execute one iteration of the vectorized body. This is the code quoted below. On May 22, 2013, at 10:23
2013 May 23
2
[LLVMdev] LLVM Loop Vectorizer puzzle
Hi, Just from personal interest, is there a canonical way in IR+metadata to express "This small constant trip-count loop is desired to be converted into a sequence of vector operations directly"? Ie, mapping a 4 element i32 loop into a linear sequence of <4 x i32> operations. Obviously this may not always be a win, but I'm just wondering if there's a way to communicate
2017 Apr 14
2
Separate LoopVectorize LLVM pass
Hello. I am trying to create my own LoopVectorize.cpp pass as a separate pass from the LLVM trunk, as described in http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project. Did anybody try something like this? I added close to the end of the .cpp file: /* this line seems to be required - it allows to run this pass as an embedded pass by giving opt -my-loop-vectorize
2013 Apr 11
2
[LLVMdev] Decouple LoopVectorizer from O3
Hi Nadav, I tried your suggestion by changing the condition to : 189 if (LoopVectorize && OptLevel >= 0) 190 MPM.add(createLoopVectorizePass()); and compiled. Then I used the following command: opt -mtriple=x86_64-linux-gnu -vectorize-loops -vectorizer-min-trip-count=6 -debug-only=loop-vectorize -O1-S -o example1_vect.s example1.s where example1.s is IR generated by clang -S
2014 May 24
2
[LLVMdev] How to count the number of **LLVM** instructions executed dynamically
Hi, I wanted to count the number of "*LLVM*" instruction executed dynamically in any program. Have already tried "lli -stats -force-interpreter filename.bc", but it's not giving any information related to instruction count. lli --version output:- LLVM version 3.4svn DEBUG build with assertions. Default target: x86_64-unknown-linux-gnu Host CPU: corei7 -- View
2013 Apr 11
2
[LLVMdev] Decouple LoopVectorizer from O3
Done. Best, Anadi. On Thu, Apr 11, 2013 at 7:01 AM, Nadav Rotem <nrotem at apple.com> wrote: > Hi Anadi, > > Yes, this is a bug in the loop vectorizer. The loop vectorizer expects only > one loop counter (integer with step=1). There is no reason why we should > not handle the case below, and it should be easy to fix. Interestingly > enough if you reverse the order of
2013 Nov 07
1
[LLVMdev] SLP vectorizer turned on in commit r190916 which says nothing about it - how to turn it off?
Revision 190916 Commit message: "Lift alignment restrictions for load/store folding on VINSERTF128/VEXTRACTF128. Fixes PR17268." Actual contents of the commit includes Index: tools/opt/opt.cpp =================================================================== --- tools/opt/opt.cpp (revision 190915) +++ tools/opt/opt.cpp (revision 190916) @@ -462,6 +462,7 @@
2013 May 10
0
[LLVMdev] Simple Loop Vectorize Question
Hi Josh, This line works for me: opt file.ll -loop-vectorize -S -o - -mtriple=x86_64 -mcpu=corei7-avx -debug You need to specify the triple on the command line if it is not inside the module. Thanks, Nadav On May 9, 2013, at 5:53 PM, Joshua Klontz <josh.klontz at gmail.com> wrote: > Nadav, > > Please forgive my ignorance, but 'opt -mcpu=corei7 -loop-vectorize -S
2016 Feb 18
3
[LLVMdev] LLVM loop vectorizer
Hi Alex, I'm not aware of efforts on loop coalescing in LLVM, but probably polly can do something like this. Also, one related thought: it might be worth making it a separate pass, not a part of loop vectorizer. LLVM already has several 'utility' passes (e.g. loop rotation), which primarily aims at enabling other passes. Thanks, Michael > On Feb 15, 2016, at 6:44 AM, RCU
2013 Oct 12
2
[LLVMdev] Building for a specific target, corei7
Hi Andrew, I think I diluted my question. My question was not related to MCJIT. I ran the following 4 scenarios: (1)gcc -mcpu=corei7 tetris.c -o tetris (2)gcc -mcpu=athlon64 tetris.c -o tetris (3)clang -march=corei7 tetris.c -o tetris (4)clang -march=athlon64 tetris.c -o tetris In (1) and (2), I see difference in order of instructions in the output binaries, which I expected because every CPU
2013 Oct 14
0
[LLVMdev] Building for a specific target, corei7
Hi Varun, I see the point of your question, but I'm not the best person to answer from that perspective. Nadav Rotem is the owner of the x86 backend, and he can probably give you a more complete answer than I could. Thanks, Andy From: Varun Agrawal [mailto:vagrawal at cs.stonybrook.edu] Sent: Friday, October 11, 2013 8:48 PM To: Kaylor, Andrew; llvmdev at cs.uiuc.edu Subject: RE: Building
2013 Oct 11
0
[LLVMdev] Building for a specific target, corei7
Hi Varun, Have you tried your experiment with icc by any chance? The MCJIT component does not assume that you will be executing the generated code on the host system because it can be used to generate code for external targets. However, you can specify the CPU by calling setCPU() on the EngineBuilder object before creating your execution engine. (You can use sys::getHostCPUName() to figure out
2013 Apr 11
4
[LLVMdev] Decouple LoopVectorizer from O3
Hello, I am trying out the LoopVectorizer(LV) pass and would like to decouple it from O3 which is currently required to run LV. I want to do this because I want to understand the behaviour of LV by trying simple loops but the O3 mostly optimises away the loop body. Any ideas would be appreciated. Best, Anadi. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Apr 11
0
[LLVMdev] Decouple LoopVectorizer from O3
Hi Anadi, Yes, this is a bug in the loop vectorizer. The loop vectorizer expects only one loop counter (integer with step=1). There is no reason why we should not handle the case below, and it should be easy to fix. Interestingly enough if you reverse the order of iterations and count from SIZE to zero, the loop vectorizer would vectorize it. If you open a bugzilla report and assign it to me
2013 Apr 11
0
[LLVMdev] Decouple LoopVectorizer from O3
Hi Anadi, In the file PassManagerBuilder.cpp you can change the lines below to get rid of the O3 restriction. 189 if (LoopVectorize && OptLevel > 2) 190 MPM.add(createLoopVectorizePass()); Nadav On Apr 10, 2013, at 5:39 PM, Anadi Mishra <reachanadi at gmail.com> wrote: > Hello, > > I am trying out the LoopVectorizer(LV) pass and would like to decouple
2013 Oct 11
2
[LLVMdev] Building for a specific target, corei7
Hi, I am using the LLVM JIT infrastructure (MCJIT). I wanted to see if there are any performance gains as the compiler can detect the target CPU at runtime. But, I didn't see any improvement (I compile with -no-mmx and -no-sse). I then tried an experiment, where I compiled the program with clang-3.3, with and without specifying the target cpu as "corei7". I was shocked to see that
2013 May 10
2
[LLVMdev] Simple Loop Vectorize Question
Nadav, Please forgive my ignorance, but 'opt -mcpu=corei7 -loop-vectorize -S -debug double.ll' doesn't appear to make a difference. In fact it seems to be ignored as garbage values for -mcpu don't raise an error. Am I overlooking something else also? Many Thanks, Josh On Thu, May 9, 2013 at 6:06 PM, Nadav Rotem <nrotem at apple.com> wrote: > Hi Josh, > > Your
2013 Apr 15
0
[LLVMdev] Decouple LoopVectorizer from O3
Just an FYI: it's often handy to mention the PR number when a thread is concluded by filing a bug. That way other people reading (now, or more importantly, later) can follow the issue through to the bug and its resolution On Apr 11, 2013 4:24 PM, "Anadi Mishra" <reachanadi at gmail.com> wrote: > Done. > > Best, > Anadi. > > > On Thu, Apr 11, 2013 at 7:01
2013 Apr 03
2
[LLVMdev] Packed instructions generaetd by LoopVectorize?
Hi, I have a question about LoopVectorize. I wrote a simple test case, a dot product loop and found that packed instructions are generated when input arrays are integer, but not when they are float or double. If I modify the float example in http://llvm.org/docs/Vectorizers.html by adding restrict to the input arrays packed instructions are generated. Although it should not be required I tried