search for: sizelevel

Displaying 20 results from an estimated 22 matches for "sizelevel".

2017 Dec 21
2
Pass ordering - GVN vs. loop optimizations
...nsforms/IPO/PassManagerBuilder.cpp (the early SimplifyCfg now doesn't sink stores anymore! I can't wait until I can get to use that in rustc!) I find that the loop optimization group does not run after GVN: // Rotate Loop - disable header duplication at -Oz MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1)); MPM.add(createLICMPass()); // Hoist loop invariants if (EnableSimpleLoopUnswitch) MPM.add(createSimpleLoopUnswitchLegacyPass()); else MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3, DivergentTarget)); MPM.add(createCFGSimplificationPass...
2020 Apr 04
2
Running opt O1 outside of llvm
...code snippet to do so but in some cases, my method is also vectorising the code, which doesn't happen when running the same sequence(-S -O1 -reg2mem) through opt. Can someone please help me find what I am missing? Thanks, Akash. * PassManagerBuilder PM; PM.OptLevel = 1; PM.SizeLevel = 0; legacy::FunctionPassManager FPM(&llvm_module); legacy::PassManager MPM; PM.Inliner = createAlwaysInlinerLegacyPass(); PM.DisableUnrollLoops = true; PM.populateFunctionPassManager(FPM); PM.populateModulePassManager(MPM); FPM.doInitialization(); for (auto &F : llvm_module) FPM.run(F);...
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 por...
2016 Oct 12
2
Loop Unrolling Fail in Simple Vectorized loop
...utines and redo unrolling again. I have set partial unrolling on + have a huge threshold + allows expensive loop trip counts. Still it didn't unroll by 2. MPM.add(createLoopUnrollPass()); MPM.add(createCFGSimplificationPass()); MPM.add(createLoopSimplifyPass()); MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1)); MPM.add(createLCSSAPass()); MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars MPM.add(createLoopUnrollPass()); Digging deeper I found, that it fails in UnrollRuntimeLoopRemainder function, where it is unable to calculate the BackEdge taken amount. Can anybod...
2019 May 13
2
Is it possible to reproduce the result of opt -O3 manually?
I think this has to do with how the pass manager is populated when we give -O3 vs when we give particular pass names. Some passes have multiple createXYZPass() methods that accept arguments too. These methods call non-default pass constructors, which in turn cause the passes to behave in a different manner. eg: Pass *llvm::createLICMPass() { return new LegacyLICMPass(); } Pass
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
...t; partial unrolling on + have a huge threshold + allows expensive loop trip > counts. Still it didn't unroll by 2. > > MPM.add(createLoopUnrollPass()); > > MPM.add(createCFGSimplificationPass()); > > MPM.add(createLoopSimplifyPass()); > > MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1)); > > MPM.add(createLCSSAPass()); > > MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars > > MPM.add(createLoopUnrollPass()); > > > Digging deeper I found, that it fails in UnrollRuntimeLoopRemainder > function, where it is unable to cal...
2018 Sep 12
2
How to make LLVM go faster?
...dule_ref); PassManagerBuilder *PMBuilder = new(std::nothrow) PassManagerBuilder(); if (PMBuilder == nullptr) { *error_message = strdup("memory allocation failure"); return true; } PMBuilder->OptLevel = target_machine->getOptLevel(); PMBuilder->SizeLevel = is_small ? 2 : 0; PMBuilder->DisableTailCalls = is_debug; PMBuilder->DisableUnitAtATime = is_debug; PMBuilder->DisableUnrollLoops = is_debug; PMBuilder->SLPVectorize = !is_debug; PMBuilder->LoopVectorize = !is_debug; PMBuilder->RerollLoops = !is_debug;...
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
...trip >>> counts. Still it didn't unroll by 2. >>> >>> MPM.add(createLoopUnrollPass()); >>> >>> MPM.add(createCFGSimplificationPass()); >>> >>> MPM.add(createLoopSimplifyPass()); >>> >>> MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1)); >>> >>> MPM.add(createLCSSAPass()); >>> >>> MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars >>> >>> MPM.add(createLoopUnrollPass()); >>> >>> >>> Digging deeper I found, that it fail...
2014 Sep 11
3
[LLVMdev] patch for DragonEgg 3.3
Hi - attached is a patch to enable building DragonEgg (x86_64) for LLVM3.3 and LLVM3.4. That is, add these changes to the 3.3 release, and it becomes possible to build DragonEgg against a llvm3.4 compiler. Regards, Richard Gorton Cognitive Electronics rcgorton at cog-e.com ---------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name:
2012 Mar 23
0
[LLVMdev] Execution Engine: CodeGenOpt level
...n other to recompile a function with a new optimization > level (e.g., Default)? We set the optimization level with a PassManagerBuilder, which is initialized for each function compilation: PassManagerBuilder PMBuilder; ... PMBuilder.OptLevel = conf.value_of(CF_OPTLEVEL); PMBuilder.SizeLevel = conf.is_set(CF_OPTSIZE) ? 1 : 0; PMBuilder.DisableUnitAtATime = !conf.is_set(CF_OPTUNIT); PMBuilder.DisableUnrollLoops = !conf.is_set(CF_UNROLL); PMBuilder.DisableSimplifyLibCalls = !conf.is_set(CF_SIMPLIB); if (Opt != CodeGenOpt::None) { PMBuilder.Inliner = createFunction...
2013 Sep 25
0
[LLVMdev] [Polly] Move Polly's execution later
...;   // also called in Polly   MPM.add(createCFGSimplificationPass());     // also called in Polly   MPM.add(createReassociatePass());           // also called in Polly   MPM.add(createLoopRotatePass());            // also called in Polly   MPM.add(createLICMPass());   MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));    The initial idea is to move Polly immediately after LoopRotatePass, which will maximum the reuse of canonicalization passes and we need only keep one canonicalization pass "createPromoteMemoryToRegisterPass" in Polly. Unfortunately, it would lead to errors as show...
2013 Apr 24
3
[LLVMdev] [PROPOSAL] per-function optimization level control
...uot;-Os" and "-Oz" clang also accepts option "-O". By default "-O" has the effect of setting the optimization level to 2. Internally, clang differentiates between optimization level and "size level". Option "-Os" has the effect of setting the SizeLevel to 1, while option "-Oz" has the effect of setting the SizeLevel to 2. Pass Constraints should allow the definition of constraints on both the optimization level and the size level. The effective optimization level described in 3.1 used by the pass managers must take into account bot...
2012 Mar 22
4
[LLVMdev] Execution Engine: CodeGenOpt level
Hi, How can I dynamically change the code generation optimization level (e.g., None) of a JIT in other to recompile a function with a new optimization level (e.g., Default)? Thank you. Best regards, Nurudeen.
2013 Sep 25
3
[LLVMdev] [Polly] Move Polly's execution later
...t; MPM.add(createCFGSimplificationPass()); // also called in Polly > MPM.add(createReassociatePass()); // also called in Polly > MPM.add(createLoopRotatePass()); // also called in Polly > MPM.add(createLICMPass()); > MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3)); > > The initial idea is to move Polly immediately after LoopRotatePass, which will maximum the reuse of canonicalization passes and we need only keep one canonicalization pass "createPromoteMemoryToRegisterPass" in Polly. Unfortunately, it would lead to errors...
2013 Jul 28
0
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
...icationPass()); // Merge & remove BBs + PM.add(createReassociatePass()); // Reassociate expressions + PM.add(createLoopRotatePass()); // Rotate Loop + PM.add(createLICMPass()); // Hoist loop invariants + PM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3)); + PM.add(createIndVarSimplifyPass()); // Canonicalize indvars + PM.add(createLoopIdiomPass()); // Recognize idioms like memset. + PM.add(createLoopDeletionPass()); // Delete dead loops + + if (/*LoopVectorize &&*/ OptLeve...
2013 Sep 22
4
[LLVMdev] [Polly] Move Polly's execution later
Hi Tobias, At 2013-09-19 22:59:25,"Tobias Grosser" <tobias at grosser.es> wrote: >On 09/19/2013 04:46 PM, Star Tan wrote: >> Hi Tobias, >> >> >> I am trying to move Polly later. >> >> >> LLVM provides some predefined ExtensionPointTy: >> EP_EarlyAsPossible, >> EP_ModuleOptimizerEarly, >>
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 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
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...-------------===*/ This comment does not match the content of the file. > > +static cl::opt<bool> > +RunVectorization("vectorize", cl::desc("Run vectorization passes")); > + > PassManagerBuilder::PassManagerBuilder() { > OptLevel = 2; > SizeLevel = 0; > @@ -38,6 +43,7 @@ PassManagerBuilder::PassManagerBuilder() { > DisableSimplifyLibCalls = false; > DisableUnitAtATime = false; > DisableUnrollLoops = false; > + Vectorize = RunVectorization; Integrating vectorization like this seems to work for now. Howeve...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...t match the content of the file. > > > > > +static cl::opt<bool> > > +RunVectorization("vectorize", cl::desc("Run vectorization passes")); > > + > > PassManagerBuilder::PassManagerBuilder() { > > OptLevel = 2; > > SizeLevel = 0; > > @@ -38,6 +43,7 @@ PassManagerBuilder::PassManagerBuilder() { > > DisableSimplifyLibCalls = false; > > DisableUnitAtATime = false; > > DisableUnrollLoops = false; > > + Vectorize = RunVectorization; > > Integrating vectorization like...