search for: cfgsimplif

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

Did you mean: cfgsimplify
2006 Nov 03
2
[LLVMdev] is createCFGSimplificationPass unused?
...generator to the point where running > the code generator doesn't modify from the input LLVM IR. Running > llvm->llvm passes breaks this property. I see that this is a desired property. If I recall correctly, you need this to remove the remaining annotations. Maybe llvm-gcc should run CFGSimplification. It would then compile "if (a) return 0; else return 1" into %tmp = seteq int %a, 0 %tmp1 = select bool %tmp, int 0, int 1 ret int %tmp1 Thanks, Rafael
2006 Nov 03
0
[LLVMdev] is createCFGSimplificationPass unused?
...wever, it is needed to do a credible job of reoptimization in a JIT context, is needed if you want to codegen to multiple target variants at once, etc. These are all things that LLVM can and should do, but I personally don't have a short term driver for them. > Maybe llvm-gcc should run CFGSimplification. It would then compile "if > (a) return 0; else return 1" into > > %tmp = seteq int %a, 0 > %tmp1 = select bool %tmp, int 0, int 1 > ret int %tmp1 Yep, it definitely does. Make sure you're using llvm-gcc4 and passing -O2 or higher. -Chris -- http://nondot.o...
2008 Apr 18
1
[LLVMdev] llvm-ld optimization options
...hould be no difference between using llvm-gcc at some -O > level, and running it at -O0 and using opt to run the passes on > the unoptimized bitcode. However, you wrote earlier: > Finally, llvm-gcc runs the following passes on each function > immediately after it is created: > > CFGSimplification, PromoteMemoryToRegister, > ScalarReplAggregates, InstructionCombining. AFAIK this isn't something that opt can do. Or are these passes run always by llvm-gcc, even with -O0 ?
2008 May 20
4
[LLVMdev] Optimization passes organization and tradeoffs
...e constants passManager->add(createInstructionCombiningPass()); // Peephole optimization passManager->add(createDeadStoreEliminationPass()); // Dead store elimination passManager->add(createAggressiveDCEPass()); // Aggressive dead code elimination passManager->add(createCFGSimplificationPass()); // Control-flow optimization I have several questions about this: 1) Does ScalarReplAggregates totally superscede PromoteMemoryToRegister? I think I need it to optimize small arrays, but what is the expected added complexity? 2) Does SCCP also eliminate multiplying/divi...
2008 May 20
0
[LLVMdev] Optimization passes organization and tradeoffs
...ill necessary when we have AggressiveDCE? Probably, but I'll let others give the definitive answer. > 5) What are the tradeoffs between the different dead code elimination > variants (why not always use the aggressive one)? Others can speak to this. > 6) Is there a better place for CFGSimplification? Should I perform it at > multiple points? I think once is probably enough. Earlier would probably be better as it will simplify later passes and potentially help them run faster. > Also, my code will frequently have vectors, that are either initialized to > all 0.0 or 1.0. This...
2008 May 20
4
[LLVMdev] Optimization passes organization and tradeoffs
...e one)? > > Others can speak to this. ADCE is actually quite expensive from the compile-time perspective, because it requires building post dominance information. I'd stick with a combination of "-dce -simplifycfg" instead of -adce. >> 6) Is there a better place for CFGSimplification? Should I perform >> it at >> multiple points? > > I think once is probably enough. Earlier would probably be better > as it will > simplify later passes and potentially help them run faster. I'd suggest running it earlier as you suggest, but then also late...
2011 Mar 03
0
[LLVMdev] How to write optimizer loop
....add(createSCCPPass()); lpm.add(createAggressiveDCEPass()); lpm.add(createGlobalOptimizerPass()); lpm.add(createGlobalDCEPass()); lpm.add(createDeadStoreEliminationPass()); lpm.add(createLoopDeletionPass()); lpm.add(createInstructionCombiningPass()); lpm.add(createCFGSimplificationPass()); const int maxit = 100; int it = 0; bool changed = true; while (changed && it < maxit) { changed = lpm.run(*myModule); it++; } Aside from the possibility that the optimizations don...
2008 Apr 14
2
[LLVMdev] standard passes
> If you're running opt on the command line directly, then use the > "-p" option. See "-help" for more information on that. > > -bw > I have a couple of more questions. 1. Does -std-compile-opts of opt do the same optimization with llvm-gcc with -O[1-3] options? If I want to debug into passes through llvm-gcc, how do I set a breakpoint right before pass
2008 May 21
0
[LLVMdev] Optimization passes organization and tradeoffs
...e one)? > > Others can speak to this. ADCE is actually quite expensive from the compile-time perspective, because it requires building post dominance information. I'd stick with a combination of "-dce -simplifycfg" instead of -adce. >> 6) Is there a better place for CFGSimplification? Should I perform >> it at >> multiple points? > > I think once is probably enough. Earlier would probably be better > as it will > simplify later passes and potentially help them run faster. I'd suggest running it earlier as you suggest, but then also late...
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 &g...
2008 Apr 18
0
[LLVMdev] llvm-ld optimization options
Hi Kenneth, On Thursday 17 April 2008 20:50:24 Kenneth Hoste wrote: > On 17 Apr 2008, at 20:39, Chris Lattner wrote: > > On Thu, 17 Apr 2008, HyperQuantum wrote: > >> I have been wondering why llvm-ld generates the same code with or > > without the option "-O5" so I looked at its source (llvm 2.2). And > > apparently, the options "-On" are
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...
2008 Apr 17
3
[LLVMdev] llvm-ld optimization options
On 17 Apr 2008, at 20:39, Chris Lattner wrote: > On Thu, 17 Apr 2008, HyperQuantum wrote: >> I have been wondering why llvm-ld generates the same code with or > without the option "-O5" so I looked at its source (llvm 2.2). And > apparently, the options "-On" are accepted but never used! The program > runs a fixed set of optimization passes, unless
2008 May 21
2
[LLVMdev] Optimization passes organization and tradeoffs
...s can speak to this. > > ADCE is actually quite expensive from the compile-time perspective, > because it requires building post dominance information. I'd stick > with a combination of "-dce -simplifycfg" instead of -adce. > >>> 6) Is there a better place for CFGSimplification? Should I perform >>> it at >>> multiple points? >> >> I think once is probably enough. Earlier would probably be better >> as it will >> simplify later passes and potentially help them run faster. > > I'd suggest running it earlier as you...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
...s-manager-add fpm (llvm-sys:create-promote-memory-to-register-pass)) > (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-reassociate-pass)) > (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-gvnpass nil)) > (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-cfgsimplification-pass -1)) > (llvm-sys:do-initialization fpm) > fpm)) > > I set things up to add the “uwtable” function attribute to every function that I generate - a current module looks like this: https://gist.github.com/drmeister/107a84d3d5023ebf13a8 > On line 617 is the function...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
...sys:create-promote-memory-to-register-pass)) >>> (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-reassociate-pass)) >>> (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-gvnpass nil)) >>> (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-cfgsimplification-pass -1)) >>> (llvm-sys:do-initialization fpm) >>> fpm)) >>> >>> I set things up to add the “uwtable” function attribute to every function that I generate - a current module looks like this: https://gist.github.com/drmeister/107a84d3d5023ebf13a8...
2013 Sep 25
0
[LLVMdev] [Polly] Move Polly's execution later
...t28" 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 unfortun...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
...romote-memory-to-register-pass)) >>>> (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-reassociate-pass)) >>>> (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-gvnpass nil)) >>>> (llvm-sys:function-pass-manager-add fpm (llvm-sys:create-cfgsimplification-pass -1)) >>>> (llvm-sys:do-initialization fpm) >>>> fpm)) >>>> >>>> I set things up to add the “uwtable” function attribute to every function that I generate - a current module looks like this: https://gist.github.com/drmeister/107a8...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
Hi Christian, Thanks for your explanation. I know your situation now. I would suggest you to check the optimization pass used by the JIT compiler, especially IPO/PruneEH.cpp. It will try to add nounwind attribute to functions which will result in the problem you have mentioned earlier. Alternatively, as a workaround, try to add uwtable (function attribute) to the functions that are generated
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, >>