search for: createindvarsimplifypass

Displaying 20 results from an estimated 25 matches for "createindvarsimplifypass".

2013 Aug 06
2
[LLVMdev] [Polly] Question about Polly's speed up on huffbench.c without optimization and code generation
...clang LLVMPolly.so -mllvm -polly -mllvm -polly-optimizer=none -mllvm -polly-code-generator=none", the execution time of huffbench would reduced to 15 secs from the original 19 secs without Polly. By investigating Polly's canonicalication passes, I find the speedup mainly comes from "createIndVarSimplifyPass()", which is controlled by the variable SCEVCodegen: if (!SCEVCodegen) PM.add(polly::createIndVarSimplifyPass()); If we remove this canonicalication pass, then there would be no performance improvement. Could anyone give me some hints why Polly needs this canonicalication pass...
2013 Aug 06
0
[LLVMdev] [Polly] Question about Polly's speed up on huffbench.c without optimization and code generation
...ly.so -mllvm -polly -mllvm -polly-optimizer=none -mllvm -polly-code-generator=none", the execution time of huffbench would reduced to 15 secs from the original 19 secs without Polly. > > > By investigating Polly's canonicalication passes, I find the speedup mainly comes from "createIndVarSimplifyPass()", which is controlled by the variable SCEVCodegen: > > > if (!SCEVCodegen) > PM.add(polly::createIndVarSimplifyPass()); > > > If we remove this canonicalication pass, then there would be no performance improvement. > > > Could anyone give me some hi...
2018 Aug 09
3
Legacy Loop Pass Manager question
Hi, If we add multiple loop passes to the pass manager in PassManagerBuilder.cpp consecutively without any func/module pass in between, I used to think they would belong to the same loop pass manager. But it does not seem to be the case. For example 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(createSimpleLoopUnrollPa...
2011 May 30
1
[LLVMdev] Segfault when trying to schedule custom ImmutablePass
...ndled. Should I submit this as a bug? Also, even if I'm just using this wrong, maybe there should be an assert. I've searched the mailing list archives, but didn't find anything related. Here's the code that segfaults: llvm::PassManager canonicalize; canonicalize.add(llvm::createIndVarSimplifyPass()); canonicalize.add(gla_llvm::createCanonicalizeCFGPass()); canonicalize.add(gla_llvm::createBackEndPointerPass(backEnd)); canonicalize.add(gla_llvm::createCanonicalizeInstsPass()); canonicalize.run(*module); where BackEndPointer is the Immutable Pass. This segfaults when ScalarEv...
2016 Oct 12
2
Loop Unrolling Fail in Simple Vectorized loop
...+ 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 anybody explain what is need to get the outer loop unrolled by 2? It would be a great...
2013 Apr 17
3
[LLVMdev] [polly] pass ordering
...::createCFGSimplificationPass()); PM.add(llvm::createTailCallEliminationPass()); PM.add(llvm::createCFGSimplificationPass()); PM.add(llvm::createReassociatePass()); PM.add(llvm::createLoopRotatePass()); PM.add(llvm::createInstructionCombiningPass()); if (!SCEVCodegen) PM.add(polly::createIndVarSimplifyPass()); PM.add(polly::createCodePreparationPass()); PM.add(polly::createRegionSimplifyPass()); Sergei was saying that on some benchmarks PromoteMemoryToRegister was causing performance regressions when it is run with and without Polly and scheduled that early. Another remark is that these passe...
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
...ounts. 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 anybody explain what is need to get the outer loop...
2013 Apr 17
0
[LLVMdev] [polly] pass ordering
...dd(llvm::createTailCallEliminationPass()); > PM.add(llvm::createCFGSimplificationPass()); > PM.add(llvm::createReassociatePass()); > PM.add(llvm::createLoopRotatePass()); > PM.add(llvm::createInstructionCombiningPass()); > > if (!SCEVCodegen) > PM.add(polly::createIndVarSimplifyPass()); > > PM.add(polly::createCodePreparationPass()); > PM.add(polly::createRegionSimplifyPass()); Right. > Sergei was saying that on some benchmarks PromoteMemoryToRegister was causing > performance regressions when it is run with and without Polly and scheduled that > earl...
2013 Apr 17
1
[LLVMdev] [polly] pass ordering
...ass()); > > PM.add(llvm::createCFGSimplificationPass()); > > PM.add(llvm::createReassociatePass()); > > PM.add(llvm::createLoopRotatePass()); > > PM.add(llvm::createInstructionCombiningPass()); > > > > if (!SCEVCodegen) > > PM.add(polly::createIndVarSimplifyPass()); > > > > PM.add(polly::createCodePreparationPass()); > > PM.add(polly::createRegionSimplifyPass()); > > Right. > > > Sergei was saying that on some benchmarks PromoteMemoryToRegister > > was causing > > performance regressions when it is run w...
2017 Dec 21
2
Pass ordering - GVN vs. loop optimizations
...// Hoist loop invariants if (EnableSimpleLoopUnswitch) MPM.add(createSimpleLoopUnswitchLegacyPass()); else MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3, DivergentTarget)); MPM.add(createCFGSimplificationPass()); addInstructionCombiningPass(MPM); MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars // <I probably want to add some SimplifyCfg pass here, but // that's a separate issue> MPM.add(createLoopIdiomPass()); // Recognize idioms like memset. addExtensionsToPM(EP_LateLoopOptimizations, MPM); MPM.add(createLoopDeletionPass...
2016 Oct 13
2
Loop Unrolling Fail in Simple Vectorized loop
...); >>> >>> 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. >>> &gt...
2013 Sep 08
2
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...extra compile-time). They also lead to some execution-time regressions and improvements. The only difference between SCEV canonicalization and default canonicalization is the "IndVarSimplify" pass as shown in the code RegisterPasses.cpp:212: if (!SCEVCodegen) PM.add(polly::createIndVarSimplifyPass()); However, I find it is interesting to look into the comparison between SCEV canonicalization and default canonicalization (http://188.40.87.11:8000/db_default/v4/nts/32?compare_to=33&baseline=33): First of all, we can expect SCEV canonicalization has better compile-time performance since i...
2013 Apr 17
2
[LLVMdev] [polly] pass ordering
...ationPass()); > > PM.add(llvm::createCFGSimplificationPass()); > > PM.add(llvm::createReassociatePass()); > > PM.add(llvm::createLoopRotatePass()); > > PM.add(llvm::createInstructionCombiningPass()); > > > > if (!SCEVCodegen) > > PM.add(polly::createIndVarSimplifyPass()); > > > > PM.add(polly::createCodePreparationPass()); > > PM.add(polly::createRegionSimplifyPass()); > > Right. > > >Sergei was saying that on some benchmarks PromoteMemoryToRegister was causing > >performance regressions when it is run with and withou...
2013 Sep 08
0
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...also lead to some execution-time regressions and improvements. > > > The only difference between SCEV canonicalization and default canonicalization is the "IndVarSimplify" pass as shown in the code RegisterPasses.cpp:212: > if (!SCEVCodegen) > PM.add(polly::createIndVarSimplifyPass()); There are actually more differences (see grep -R SCEVCodegen polly/), but the other differences will mainly be code generation differences. > However, I find it is interesting to look into the comparison between SCEV canonicalization and default canonicalization (http://188.40.87.11:8000/...
2006 Sep 03
0
[LLVMdev] llvm-gcc4: Enable various optimizations at -O1/-O2
...PerModulePasses->add(createLICMPass()); // Hoist loop invariants + PerModulePasses->add(createLoopUnswitchPass()); // Unswitch loops. + PerModulePasses->add(createInstructionCombiningPass()); // Clean up after LICM/reassoc + PerModulePasses->add(createIndVarSimplifyPass()); // Canonicalize indvars + PerModulePasses->add(createLoopUnrollPass()); // Unroll small loops + PerModulePasses->add(createInstructionCombiningPass()); // Clean up after the unroller + + if (optimize > 2) + PerModulePasses->add(createLoadValueNumb...
2013 Sep 13
2
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...m::createCFGSimplificationPass()); PM.add(llvm::createTailCallEliminationPass()); PM.add(llvm::createCFGSimplificationPass()); PM.add(llvm::createReassociatePass()); PM.add(llvm::createLoopRotatePass()); PM.add(llvm::createInstructionCombiningPass()); if (!SCEVCodegen) PM.add(polly::createIndVarSimplifyPass()); PM.add(polly::createCodePreparationPass()); } If we remove the first "InstructionCombining" pass, then the compile-time is reduced by more than 10% . The results reported by -ftime-report become very similar to the case without Polly canonicalization: ---User Time--- --System T...
2013 Apr 17
0
[LLVMdev] [polly] pass ordering
...PM.add(llvm::createCFGSimplificationPass()); >>> PM.add(llvm::createReassociatePass()); >>> PM.add(llvm::createLoopRotatePass()); >>> PM.add(llvm::createInstructionCombiningPass()); >>> >>> if (!SCEVCodegen) >>> PM.add(polly::createIndVarSimplifyPass()); >>> >>> PM.add(polly::createCodePreparationPass()); >>> PM.add(polly::createRegionSimplifyPass()); >> >> Right. >> >>> Sergei was saying that on some benchmarks PromoteMemoryToRegister was causing >>> performance regressions w...
2013 Sep 09
4
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...xecution-time regressions and improvements. >> >> >> The only difference between SCEV canonicalization and default canonicalization is the "IndVarSimplify" pass as shown in the code RegisterPasses.cpp:212: >> if (!SCEVCodegen) >> PM.add(polly::createIndVarSimplifyPass()); > >There are actually more differences (see grep -R SCEVCodegen polly/), >but the other differences will mainly be code generation differences. Thanks for your reminder. Since we are currently focusing on canonicalization passes, the other differences for code generation do not matter...
2013 Sep 14
0
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...m::createCFGSimplificationPass()); PM.add(llvm::createTailCallEliminationPass()); PM.add(llvm::createCFGSimplificationPass()); PM.add(llvm::createReassociatePass()); PM.add(llvm::createLoopRotatePass()); PM.add(llvm::createInstructionCombiningPass()); if (!SCEVCodegen) PM.add(polly::createIndVarSimplifyPass()); PM.add(polly::createCodePreparationPass()); } If we remove the first "InstructionCombining" pass, then the compile-time is reduced by more than 10% . The results reported by -ftime-report become very similar to the case without Polly canonicalization: ---User Time--- --System T...
2013 Sep 09
0
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
On 09/09/2013 05:18 AM, Star Tan wrote: > > At 2013-09-09 05:52:35,"Tobias Grosser" <tobias at grosser.es> wrote: > >> On 09/08/2013 08:03 PM, Star Tan wrote: >> Also, I wonder if your runs include the dependence analysis. If this is >> the case, the numbers are very good. Otherwise, 30% overhead seems still >> to be a little bit much. > I think