search for: disableunrollloop

Displaying 20 results from an estimated 20 matches for "disableunrollloop".

Did you mean: disableunrollloops
2020 Apr 04
2
Running opt O1 outside of llvm
...-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); FPM.doFinalization(); MPM.run(llvm_module); legacy::FunctionPassManager FPM(&llvm_module); FPM.add(createDemoteRegisterToMemoryPass()); FPM.doI...
2018 Aug 09
3
Legacy Loop Pass Manager question
...for this code snippet PM.add(createIndVarSimplifyPass()); // Canonicalize indvars MPM.add(createLoopIdiomPass()); // Recognize idioms like memset. addExtensionsToPM(EP_LateLoopOptimizations, MPM); MPM.add(createLoopDeletionPass()); // Delete dead loops .. if (!DisableUnrollLoops) MPM.add(createSimpleLoopUnrollPass(OptLevel)); // Unroll small loops I see -debug-pass=Structure output: Scalar Evolution Analysis Loop Pass Manager Induction Variable Simplification Recognize loop idioms Delete dead loops Unroll loo...
2017 Dec 21
2
Pass ordering - GVN vs. loop optimizations
.../ Recognize idioms like memset. addExtensionsToPM(EP_LateLoopOptimizations, MPM); MPM.add(createLoopDeletionPass()); // Delete dead loops if (EnableLoopInterchange) { MPM.add(createLoopInterchangePass()); // Interchange loops MPM.add(createCFGSimplificationPass()); } if (!DisableUnrollLoops) MPM.add(createSimpleLoopUnrollPass()); // Unroll small loops addExtensionsToPM(EP_LoopOptimizerEnd, MPM); // <GVN is now immediately after loop optimizatons if (OptLevel > 1) { MPM.add(createMergedLoadStoreMotionPass()); // Merge ld/st in diamonds MPM.add(NewGVN ? cre...
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
...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 = createFunctionInliningPass(Opt == CodeGenOpt::Aggressive ? 250 : 200); } pFPasses = new FunctionPassManager(pMod); pFPasses->ad...
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 Nov 06
0
[LLVMdev] loop vectorizer: Unexpected extract/insertelement
...he 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 ; ++i ) > for (int...
2018 Sep 12
2
How to make LLVM go faster?
...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; // Leaving NewGVN as default (off) because when on it caused issue #673 //PMBuilder->NewGVN = !is_debug; PMBuilder->DisableGVNLoadPRE =...
2013 Nov 06
2
[LLVMdev] loop vectorizer: Unexpected extract/insertelement
...eanup 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 = s...
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
...+ 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(createInstructionCombiningPass()); + PM.add(crea...
2013 Nov 06
0
[LLVMdev] loop vectorizer: Unexpected extract/insertelement
...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: &gt...
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
2015 Jun 05
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Jun 4, 2015 at 5:17 PM, Teresa Johnson <tejohnson at google.com> wrote: >> >> Agreed. Although I assume you mean invoke the new pass under a >> ThinLTO-only option so that avail extern are not dropped in the >> compile pass before the LTO link? > > > No, this pass
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...n 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. However, it does not seem to be 100% clean. I wonder if we could follow the other flags here and set Vectorize = false in the constructor and add the flags which enable this to the tools...
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > Personally, I think the right approach is to add a bool to > createGlobalDCEPass defaulting to true named something like > IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after > inlining for obvious reasons, so the default makes sense. The special case > is
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...=================================================================== --- lib/CodeGen/BackendUtil.cpp (revision 237590) +++ lib/CodeGen/BackendUtil.cpp (working copy) @@ -287,6 +287,7 @@ void EmitAssemblyHelper::CreatePasses() { PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime; PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops; PMBuilder.MergeFunctions = CodeGenOpts.MergeFunctions; + PMBuilder.LTO = CodeGenOpts.LTO; PMBuilder.RerollLoops = CodeGenOpts.RerollLoops; PMBuilder.addExtension(PassManagerBuilder::EP_EarlyAsPossible, Index: lib/Driver/Tools.cpp ============================...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...; + > > 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. However, it > does not seem to be 100% clean. I wonder if we could follow the other > flags here and set Vectorize = false in the constructor and add the > flags...
2011 Nov 16
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, et al., Attached is the my autovectorization pass. I've fixed a bug that appears when using -bb-vectorize-aligned-only, fixed some 80-col violations, etc., and at least on x86_64, all test cases pass except for a few; and all of these failures look like instruction-selection bugs. For example: MultiSource/Applications/ClamAV - fails to compile shared_sha256.c with an error: error in
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, I've attached the latest version of my autovectorization patch. I was able to add support for using the ScalarEvolution analysis for load/store pairing (thanks for your help!). This led to a modest performance increase and a modest compile-time increase. This version also has a cutoff as you suggested (although the default value is set high (4000 instructions between pairs) because