search for: createcfgsimplificationpass

Displaying 20 results from an estimated 89 matches for "createcfgsimplificationpass".

2006 Nov 03
4
[LLVMdev] is createCFGSimplificationPass unused?
It looks like createCFGSimplificationPass was disabled on 2006/09/04. This causes some problems for architectures that use conditional moves to implement select (alpha and ARM). For example, on 2006/09/03 a "if (a) return 0; else return 1;" compiled to ---------------------------------------- zapnot $17,15,$1 zapn...
2013 Sep 25
0
[LLVMdev] [Polly] Move Polly's execution later
...op_exit28" into an infinity loop: polly.loop_exit28:                                ; preds = %polly.stmt.for.body.i, %polly.loop_if25   br label polly.loop_exit28 Actually, I have no idea why this happens, but experiments show that this problem can be addressed by adding a pass "MPM.add(createCFGSimplificationPass())" after Polly. It seems it is necessary to run this pass after Polly code generation. 2. Where should we  move Polly to? There are many choices to move Polly later. Tobias suggests to move it immediately after the loop rotate pass (the first loop optimization pass), but unfortunately Polly...
2006 Nov 03
0
[LLVMdev] is createCFGSimplificationPass unused?
On 11/2/06, Rafael Espíndola <rafael.espindola at gmail.com> wrote: > It looks like createCFGSimplificationPass was disabled on 2006/09/04. > This causes some problems for architectures that use conditional moves > to implement select (alpha and ARM). For example, on 2006/09/03 a "if > (a) return 0; else return 1;" compiled to This is not because of how it handles select. For example: i...
2006 Nov 03
0
[LLVMdev] is createCFGSimplificationPass unused?
On Thu, 2 Nov 2006, [UTF-8] Rafael Esp?ndola wrote: > It looks like createCFGSimplificationPass was disabled on 2006/09/04. > This causes some problems for architectures that use conditional moves > to implement select (alpha and ARM). For example, on 2006/09/03 a "if > (a) return 0; else return 1;" compiled to > I have added createCFGSimplificationPass in > ARMTarge...
2013 Sep 25
3
[LLVMdev] [Polly] Move Polly's execution later
...an infinity loop: > polly.loop_exit28: ; preds = %polly.stmt.for.body.i, %polly.loop_if25 > br label polly.loop_exit28 > > Actually, I have no idea why this happens, but experiments show that this problem can be addressed by adding a pass "MPM.add(createCFGSimplificationPass())" after Polly. It seems it is necessary to run this pass after Polly code generation. Any pass order should yield correct code. If this is not the case there is either a bug in Polly or we expose a bug in LLVM. We should track this down. Our path ordering decisions should not be driven b...
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, >>
2006 Sep 03
0
[LLVMdev] llvm-gcc4: Enable various optimizations at -O1/-O2
...foo_optimized.bc $ llc foo_optimized.bc -o foo.o One can directly use $ llvm-gcc4 -O2 foo.c -o foo.o to get optimized foo.o - Devang + + if (optimize > 0) { + + + PerModulePasses->add(createRaiseAllocationsPass()); // call % malloc -> malloc inst + PerModulePasses->add(createCFGSimplificationPass()); // Clean up disgusting code + PerModulePasses->add(createPromoteMemoryToRegisterPass());// Kill useless allocas + PerModulePasses->add(createGlobalOptimizerPass()); // Optimize out global vars + PerModulePasses->add(createGlobalDCEPass()); // Remove...
2006 Nov 03
0
[LLVMdev] is createCFGSimplificationPass unused?
On Thu, 2 Nov 2006, [UTF-8] Rafael Esp?ndola wrote: >> If there are specific cases like this where simplify cfg produces better >> code than branch folding (with the hooks implemented) please file >> bugzilla bugs to track them. > The branch folding works after instruction selection, right? It looks > strange to me that it will be able to convert a branch sequence into a
2006 Nov 03
2
[LLVMdev] is createCFGSimplificationPass unused?
> Please don't do that. Instead, please implement the TargetInstrInfo > branch analysis hooks so that the branch folding pass can do this. > Given info about branches, the pass already does various things to > optimize away many of the things that simplify cfg does. > > I'm planning several extensions to the pass, in particular to support > limited forms of
2013 Sep 14
0
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...nCombining" pass like this: static void registerCanonicalicationPasses(llvm::PassManagerBase &PM) { PM.add(llvm::createPromoteMemoryToRegisterPass()); // PM.add(llvm::createInstructionCombiningPass()); //this is the most expensive canonicalization pass for flop benchmark PM.add(llvm::createCFGSimplificationPass()); PM.add(llvm::createTailCallEliminationPass()); PM.add(llvm::createCFGSimplificationPass()); PM.add(llvm::createReassociatePass()); PM.add(llvm::createLoopRotatePass()); PM.add(llvm::createInstructionCombiningPass()); PM.add(polly::createCodePreparationPass()); } Results are shown on...
2013 Sep 13
2
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...lization passes listed as follows: static void registerCanonicalicationPasses(llvm::PassManagerBase &PM) { PM.add(llvm::createPromoteMemoryToRegisterPass()); PM.add(llvm::createInstructionCombiningPass()); //this is the most expensive canonicalization pass for flop benchmark PM.add(llvm::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());...
2013 Apr 17
0
[LLVMdev] [polly] pass ordering
...lease rename > s/EP_LoopOptimizerStart/EP_Polly_LNO/ or anything other than LoopOptimizerStart? It is in the middle? The passes executed before are: MPM.add(createJumpThreadingPass()); // Thread jumps. MPM.add(createCorrelatedValuePropagationPass()); // Propagate conditionals MPM.add(createCFGSimplificationPass()); // Merge & remove BBs MPM.add(createInstructionCombiningPass()); // Combine silly seq's MPM.add(createTailCallEliminationPass()); // Eliminate tail calls MPM.add(createCFGSimplificationPass()); // Merge &...
2013 Apr 17
3
[LLVMdev] [polly] pass ordering
...passes scheduled here is probably not yet /// optimal. TODO: Optimize the set of canonicalization passes. static void registerCanonicalicationPasses(llvm::PassManagerBase &PM) { PM.add(llvm::createPromoteMemoryToRegisterPass()); PM.add(llvm::createInstructionCombiningPass()); PM.add(llvm::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());...
2013 Apr 17
2
[LLVMdev] [polly] pass ordering
Tobias Grosser wrote: > As said before, we could probably add it in between those two passes: > > MPM.add(createReassociatePass()); // Reassociate expressions > + addExtensionsToPM(EP_LoopOptimizerStart, MPM); > MPM.add(createLoopRotatePass()); // Rotate Loop As this is in the middle of other LNO passes, can you please rename s/EP_LoopOptimizerStart/EP_Polly_LNO/ or
2008 Dec 19
2
[LLVMdev] strange behaviour after extracting optimization pass code
...rbitrary valid modulepointer; llvm::ExistingModuleProvider mp(mod); llvm::FunctionPassManager fpm(&mp); fpm.add(new llvm::TargetData(mod)); fpm.add(llvm::createInstructionCombiningPass()); fpm.add(llvm::createReassociatePass()); fpm.add(llvm::createGVNPass()); fpm.add(llvm::createCFGSimplificationPass()); fpm.run(*f); //...get execution engine //... call execEngine->getPointerToFunction() //... execute function ----------------------------- Now if I extract exactly this code and put it into a different method like follows, it produces a giant pile of data garbage in the console...
2012 Sep 10
2
[LLVMdev] Dead Store Elimination
Hi, Here is the result of optimization using the following passes: llvm::createBasicAliasAnalysisPass() llvm::createInstructionCombiningPass() llvm::createReassociatePass() llvm::createGVNPass() llvm::createCFGSimplificationPass() The optimized IR seems to contain what look like dead stores on %8 and %9 in basic blocks 7 and haveData. How can I get rid of them? Thanks, Vinayak define internal void @block0() { entry: %0 = call i8* @RNI_File_new() %1 = call i64 @RNI_File_open(i8* %0, i8* getelementptr inbounds ([6...
2013 Apr 17
0
[LLVMdev] [polly] pass ordering
...bably not yet > /// optimal. TODO: Optimize the set of canonicalization passes. > static void registerCanonicalicationPasses(llvm::PassManagerBase &PM) { > PM.add(llvm::createPromoteMemoryToRegisterPass()); > PM.add(llvm::createInstructionCombiningPass()); > PM.add(llvm::createCFGSimplificationPass()); > PM.add(llvm::createTailCallEliminationPass()); > PM.add(llvm::createCFGSimplificationPass()); > PM.add(llvm::createReassociatePass()); > PM.add(llvm::createLoopRotatePass()); > PM.add(llvm::createInstructionCombiningPass()); > > if (!SCEVCodegen) >...
2010 Nov 15
6
[LLVMdev] Optimization of calls to functions without side effects (from Kaleidoscope example)
...s and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. OurFPM.add(createReassociatePass()); // Eliminate Common SubExpressions. OurFPM.add(createGVNPass()); // Simplify the control flow graph (deleting unreachable blocks, etc). OurFPM.add(createCFGSimplificationPass()); It does simplify _some_ things. For example: ready> def simplifyThis(x) (x*2)+(2*x); Read function definition: define double @simplifyThis(double %x) readonly { entry: %multmp = fmul double %x, 2.000000e+00 %addtmp = fadd double %multmp, %multmp ret double %addtmp } > -----Origi...
2017 Dec 21
2
Pass ordering - GVN vs. loop optimizations
...ateLoopRotatePass(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()); 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. addExte...
2009 Mar 14
0
[LLVMdev] Strange LLVM Crash
...s so that all the native functions I register will stay in the module. Here are the optimization passes I'm running: passManager.add(new llvm::TargetData(s_pModule)); passManager.add(llvm::createLowerSetJmpPass()); passManager.add(llvm::createRaiseAllocationsPass()); passManager.add(llvm::createCFGSimplificationPass()); passManager.add(llvm::createPromoteMemoryToRegisterPass()); passManager.add(llvm::createGlobalOptimizerPass()); passManager.add(llvm::createGlobalDCEPass()); passManager.add(llvm::createFunctionInliningPass()); I would like to know either which pass does this (global optimizer maybe?) so I...