search for: createpromotememorytoregisterpass

Displaying 20 results from an estimated 41 matches for "createpromotememorytoregisterpass".

2013 Sep 14
0
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...alization passes (actually only keep "createCodePreparationPass") when generate LLVMPolly.so Fist. let's see the results of removing the first "InstructionCombining" 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::createReassoci...
2013 Sep 13
2
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...ine redundant instructions". > >OK. By investigating the flop benchmark, I find the key is the first "InstructionCombining" pass in a serial of canonicalization 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::createReassociat...
2009 Mar 14
0
[LLVMdev] Strange LLVM Crash
...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 can disable it, or what flag I can set on my C++ function ob...
2009 Mar 14
2
[LLVMdev] Strange LLVM Crash
...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 can disable it, or what flag I...
2013 Sep 17
4
[LLVMdev] [Polly] Compile-time and Execution-time analysis for the SCEV canonicalization
...alization passes (actually only keep "createCodePreparationPass") when generate LLVMPolly.so Fist. let's see the results of removing the first "InstructionCombining" 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::createReassoci...
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
...xist so you can create InitializeEverything, which doesn't get used. Do I need to do something along the lines of: static void registerPollyPasses(const llvm::PassManagerBuilder &Builder, llvm::PassManagerBase &PM) { PM.add(llvm::createPromoteMemoryToRegisterPass()); // create my own createHelloPass() method? } static llvm::RegisterStandardPasses PassRegister(llvm::PassManagerBuilder::EP_EarlyAsPossible, registerPollyPasses); I'm not sure how to code a possible createHelloPass, as the constructor f...
2015 Oct 05
2
Adding mem2reg pass to pass manager
Hi, I want to add "mem2reg" pass similar to this: PassManager PM; PM.add(new LoopInfo()); PM.add(new Mem2Reg()); // What's the class name for this pass I couldn't find the name of corresponding class and header file of mem2reg pass except "mem2reg.cpp". So how can I add mem2reg pass into my pass manager? Thanks, Riyad -------------- next part -------------- An
2009 Mar 16
0
[LLVMdev] Strange LLVM Crash
This is what I have so far: // Add optimization passes to the function passes s_pFunctionPasses->add(new llvm::TargetData(s_pModule)); s_pFunctionPasses->add(llvm::createCFGSimplificationPass()); s_pFunctionPasses->add(llvm::createPromoteMemoryToRegisterPass()); s_pFunctionPasses->add(llvm::createConstantPropagationPass()); s_pFunctionPasses->add(llvm::createDeadCodeEliminationPass()); s_pFunctionPasses->add(llvm::createInstructionCombiningPass()); Where s_pFunctionPasses is a FunctionPassManager I create when initializing my program and d...
2013 Sep 25
0
[LLVMdev] [Polly] Move Polly's execution later
...move it immediately after the loop rotate pass (the first loop optimization pass), but unfortunately Polly would generate incorrect code in that case (http://llvm.org/bugs/show_bug.cgi?id=17323). By investigating those Polly canonicalization passes (polly/lib/RegisterPasses.cpp):     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.ad...
2009 Mar 14
5
[LLVMdev] Strange LLVM Crash
I'm implementing a JIT and getting some strange crashes. I'm unsure exactly what's causing them, but it seems to occur when I call the getReturnType() method on some LLVM function objects. More precisely, I'm registering some native C++ functions as LLVM functions through the addGlobalMapping method of an execution engine object. I then keep a pointer to those LLVM function
2009 Mar 16
2
[LLVMdev] Strange LLVM Crash
On Mar 15, 2009, at 7:55 AM, Nyx wrote: > > Is there a webpage documenting these function passes? Here's some: http://llvm.org/docs/WritingAnLLVMPass.html#FunctionPass You can also look in llvm/lib/Transforms/Scalar for runOnFunction () > Which ones should I run > to maximize performance? There's no right way to determine this. It depends on what you need/ want from your
2008 Mar 28
0
[LLVMdev] Python bindings?
...ngs do not. We use the lowercase/underscore format traditionally used in ocaml projects. We don't need to bind all of the helper functions and methods so the api can be kept a little smaller. They also might be named differently and the semantics can be changed. For instance, the function "createPromoteMemoryToRegisterPass" creates a Pass object that we can add to a PassManager, but in ocaml we have "add_memory_to_register_promotion" which takes a PassManager as an argument and adds it inside the binding. This makes memory management a bit simpler.
2013 Apr 17
3
[LLVMdev] [polly] pass ordering
...onical form that simplifies the analysis and optimization passes /// of Polly. The set of optimization 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::create...
2009 Mar 14
0
[LLVMdev] Strange LLVM Crash
...9;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...
2008 Oct 16
2
[LLVMdev] Requiring a pass to run before/after a pass? (Adding PHIs and updating uses)
Is there a simple way to require a pass, e.g., Reg2Mem/Mem2Reg, to run before/after my transformation pass? Or do I do something like: struct myOpt { myOpt() { mBefore = createDemoteRegisterToMemoryPass(); mAfter = createPromoteMemoryToRegisterPass(); } getAnalysisUsage(AU) { AU.addRequired(my stuff); mBefore.getAnalysisUsage(AU); mAfter.getAnalysisUsage(AU); } runOnFunction(aF) { changed = mBefore(F); do my stuff; changed |= mAfter(F); } } I'm trying to transform a CFG where A flows into B and C, and...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...itializeEverything, which doesn't get used. > > Do I need to do something along the lines of: > static void registerPollyPasses(const llvm::PassManagerBuilder&Builder, > llvm::PassManagerBase&PM) { > PM.add(llvm::createPromoteMemoryToRegisterPass()); > // create my own createHelloPass() method? > } > > static llvm::RegisterStandardPasses > PassRegister(llvm::PassManagerBuilder::EP_EarlyAsPossible, > registerPollyPasses); > > I'm not sure how to code a pos...
2008 Mar 28
2
[LLVMdev] Python bindings?
> Note that C bindings have been introduced since 2005, so there may be > a different route available than was taken then. Look in include/llvm- > c. The intent of the C bindings is to enable high-level language > bindings. The current focus is on enabling front-end compilers. Ocaml > and Haskell bindings have been developed atop them, the former being > in the LLVM source
2013 Sep 25
3
[LLVMdev] [Polly] Move Polly's execution later
...ately after the loop rotate pass (the first loop optimization pass), but unfortunately Polly would generate incorrect code in that case (http://llvm.org/bugs/show_bug.cgi?id=17323). > > By investigating those Polly canonicalization passes (polly/lib/RegisterPasses.cpp): > 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...
2013 Mar 30
2
[LLVMdev] Missed optimisation opportunities?
...ast2 ll_last2=ll_last ll_last=ll_ret ll_i++ loop return ll_ret end function With the following function passes; FunctionPasses->add(new DataLayout(*JITEngine->getDataLayout())); FunctionPasses->add(createBasicAliasAnalysisPass()); FunctionPasses->add(createPromoteMemoryToRegisterPass()); FunctionPasses->add(createInstructionCombiningPass()); FunctionPasses->add(createReassociatePass()); FunctionPasses->add(createGVNPass()); FunctionPasses->add(createCFGSimplificationPass()); Which does a pretty good job of cleaning up most of the mes...
2011 Jul 01
0
[LLVMdev] How to prevent generation of wide integers in LLVM IR?
...PassManagerBuilder.h) to see what passes are normally used. If you're looking at the opt output, beware that some of those passes are analysis passes that get added automatically and shouldn't be added manually. To avoid -scalarrepl, just pretend it says -mem2reg instead of -scalarrepl (or createPromoteMemoryToRegisterPass() instead of createScalarReplAggregatesPass(...), if you're reading the header). Alternatively, you could volunteer to rewrite the C backend to use the common backend infrastructure used by most of the other backends (as has been proposed on this list before). That would enable it to handle w...