search for: createloopvectorizepass

Displaying 19 results from an estimated 19 matches for "createloopvectorizepass".

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 -emit-llvm example1.c example1.c contains the following l...
2013 Apr 11
2
[LLVMdev] Decouple LoopVectorizer from O3
...le > induction variables into a > > > On Apr 10, 2013, at 7:52 PM, Anadi Mishra <reachanadi at gmail.com> wrote: > > 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 -emit-llvm e...
2013 Apr 11
0
[LLVMdev] Decouple LoopVectorizer from O3
...for merging multiple induction variables into a On Apr 10, 2013, at 7:52 PM, Anadi Mishra <reachanadi at gmail.com> wrote: > 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 -emit-ll...
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 it from O3 which is currently required to run LV. I want to do this because I want to understand the behavi...
2013 Apr 15
0
[LLVMdev] Decouple LoopVectorizer from O3
...> > > On Apr 10, 2013, at 7:52 PM, Anadi Mishra <reachanadi at gmail.com> wrote: > > > > 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 gene...
2019 May 13
2
Is it possible to reproduce the result of opt -O3 manually?
...have in a different manner. eg: Pass *llvm::createLICMPass() { return new LegacyLICMPass(); } Pass *llvm::createLICMPass(unsigned LicmMssaOptCap, unsigned LicmMssaNoAccForPromotionCap) { return new LegacyLICMPass(LicmMssaOptCap, LicmMssaNoAccForPromotionCap); } or Pass *createLoopVectorizePass() { return new LoopVectorize(); } Pass *createLoopVectorizePass(bool InterleaveOnlyWhenForced, bool VectorizeOnlyWhenForced) { return new LoopVectorize(InterleaveOnlyWhenForced, VectorizeOnlyWhenForced); } When we give pass names, opt calls the default constructor (e...
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:
2019 May 09
2
Is it possible to reproduce the result of opt -O3 manually?
Dear developers, I am trying to reproduce the results of applying opt -O3 to a source file in the form of LLVM IR. I want to get the same IR by manually ordering the passes used by O3 and passing them to opt. To illustrate what I am doing on an example, as an input I use linpack benchmark from the LLVM test suite[1]: 1. First I produce the intermediate representation using clang: clang -O3
2013 Nov 01
2
[LLVMdev] loop vectorizer: this loop is not worth vectorizing
...; and 'div' in the index calculation. I am using these passes: functionPassManager->add(llvm::createBasicAliasAnalysisPass()); functionPassManager->add(llvm::createLICMPass()); functionPassManager->add(llvm::createGVNPass()); functionPassManager->add(llvm::createLoopVectorizePass()); functionPassManager->add(llvm::createInstructionCombiningPass()); functionPassManager->add(llvm::createEarlyCSEPass()); functionPassManager->add(llvm::createCFGSimplificationPass()); I am wondering, whether there might be pass I could issue before the loop vectorizer that tran...
2013 Nov 01
0
[LLVMdev] loop vectorizer: this loop is not worth vectorizing
...ex > calculation. > > I am using these passes: > > functionPassManager->add(llvm::createBasicAliasAnalysisPass()); > functionPassManager->add(llvm::createLICMPass()); > functionPassManager->add(llvm::createGVNPass()); > functionPassManager->add(llvm::createLoopVectorizePass()); > functionPassManager->add(llvm::createInstructionCombiningPass()); > functionPassManager->add(llvm::createEarlyCSEPass()); > functionPassManager->add(llvm::createCFGSimplificationPass()); > > I am wondering, whether there might be pass I could issue before the &g...
2013 Apr 17
1
[LLVMdev] [polly] pass ordering
----- Original Message ----- > From: "Tobias Grosser" <tobias at grosser.es> > To: "Sebastian Pop" <spop at codeaurora.org> > Cc: llvmdev at cs.uiuc.edu > Sent: Wednesday, April 17, 2013 12:45:26 PM > Subject: Re: [LLVMdev] [polly] pass ordering > > On 04/17/2013 05:53 PM, Sebastian Pop wrote: > > Hi, > > > > polly is run very
2013 Nov 06
0
[LLVMdev] loop vectorizer: Unexpected extract/insertelement
The loop vectorizer relies on cleanup passes to be run after it: from Transforms/IPO/PassManagerBuilder.cpp: // Add the various vectorization passes and relevant cleanup passes for // them since we are no longer in the middle of the main scalar pipeline. MPM.add(createLoopVectorizePass(DisableUnrollLoops)); MPM.add(createInstructionCombiningPass()); MPM.add(createCFGSimplificationPass()); On Nov 6, 2013, at 8:15 AM, Frank Winter <fwinter at jlab.org> wrote: > The following IR implements the following nested loop: > > for (int i = start ; i < end ; ++...
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
2013 Nov 06
2
[LLVMdev] loop vectorizer: Unexpected extract/insertelement
...vectorizer relies on cleanup passes to be run after it: > > from Transforms/IPO/PassManagerBuilder.cpp: > > // Add the various vectorization passes and relevant cleanup passes for > // them since we are no longer in the middle of the main scalar pipeline. > MPM.add(createLoopVectorizePass(DisableUnrollLoops)); > MPM.add(createInstructionCombiningPass()); > MPM.add(createCFGSimplificationPass()); > > > On Nov 6, 2013, at 8:15 AM, Frank Winter <fwinter at jlab.org> wrote: > >> The following IR implements the following nested loop: >> >&...
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 Nov 06
2
[LLVMdev] loop vectorizer: Unexpected extract/insertelement
The following IR implements the following nested loop: for (int i = start ; i < end ; ++i ) for (int p = 0 ; p < 4 ; ++p ) a[i*4+p] = b[i*4+p] + c[i*4+p]; define void @main(i64 %arg0, i64 %arg1, i1 %arg2, i64 %arg3, float* noalias %arg4, float* noalias %arg5, float* noalias %arg6) { entrypoint: br i1 %arg2, label %L0, label %L1 L0:
2013 Jul 28
0
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
...ifyPass()); // Canonicalize indvars + PM.add(createLoopIdiomPass()); // Recognize idioms like memset. + PM.add(createLoopDeletionPass()); // Delete dead loops + + if (/*LoopVectorize &&*/ OptLevel > 1 && SizeLevel < 2) + PM.add(createLoopVectorizePass()); + + if (!DisableUnrollLoops) + PM.add(createLoopUnrollPass()); // Unroll small loops + + addExtensionsToPM(EP_LoopOptimizerEnd, PM); + + if (OptLevel > 1) + PM.add(createGVNPass()); // Remove redundancies + + PM.add(createInstruction...
2013 Nov 06
0
[LLVMdev] loop vectorizer: Unexpected extract/insertelement
...leanup passes to be run after it: >> >> from Transforms/IPO/PassManagerBuilder.cpp: >> >> // Add the various vectorization passes and relevant cleanup passes for >> // them since we are no longer in the middle of the main scalar pipeline. >> MPM.add(createLoopVectorizePass(DisableUnrollLoops)); >> MPM.add(createInstructionCombiningPass()); >> MPM.add(createCFGSimplificationPass()); >> >> >> On Nov 6, 2013, at 8:15 AM, Frank Winter <fwinter at jlab.org> wrote: >> >>> The following IR implements the followin...
2013 Jul 18
3
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
Andy and I briefly discussed this the other day, we have not yet got chance to list a detailed pass order for the pre- and post- IPO scalar optimizations. This is wish-list in our mind: pre-IPO: based on the ordering he propose, get rid of the inlining (or just inline tiny func), get rid of all loop xforms... post-IPO: get rid of inlining, or maybe we still need it, only