summaryrefslogtreecommitdiff
path: root/include/llvm/PassManager.h
Commit message (Collapse)AuthorAge
* Move the old pass manager infrastructure into a legacy namespace andChandler Carruth2013-11-09
| | | | | | | | | | | | | | | | | | | give the files a legacy prefix in the right directory. Use forwarding headers in the old locations to paper over the name change for most clients during the transitional period. No functionality changed here! This is just clearing some space to reduce renaming churn later on with a new system. Even when the new stuff starts to go in, it is going to be hidden behind a flag and off-by-default as it is still WIP and under development. This patch is specifically designed so that very little out-of-tree code has to change. I'm going to work as hard as I can to keep that the case. Only direct forward declarations of the PassManager class are impacted by this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194324 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."Andrew Trick2013-09-19
| | | | | | | | Working on a better solution to this. This reverts commit 7d4e9934e7ca83094c5cf41346966c8350179ff2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190990 91177308-0d34-0410-b5e6-96231b3b80d8
* Encapsulate PassManager debug flags to avoid static init and cxa_exit.Andrew Trick2013-09-18
| | | | | | | | | | | | | | This puts all the global PassManager debugging flags, like -print-after-all and -time-passes, behind a managed static. This eliminates their static initializers and, more importantly, exit-time destructors. The only behavioral change I anticipate is that tools need to initialize the PassManager before parsing the command line in order to export these options, which makes sense. Tools that already initialize the standard passes (opt/llc) don't need to do anything new. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190974 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo2013-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180881 91177308-0d34-0410-b5e6-96231b3b80d8
* One more step towards making doInitialization and doFinalization useful forPedro Artigas2012-11-29
| | | | | | | | | start up and clean up module passes, now that ASAN and TSAN are fixed the tests pass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168905 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r168635 "Step towards implementation of pass manager with ↵Owen Anderson2012-11-27
| | | | | | | | | doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model". It appears to have broken at least one buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168654 91177308-0d34-0410-b5e6-96231b3b80d8
* Step towards implementation of pass manager with doInitialization and ↵Owen Anderson2012-11-26
| | | | | | | | | doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model Patch by Pedro Artigas, with feedback from by Chandler Carruth. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168635 91177308-0d34-0410-b5e6-96231b3b80d8
* Add doInitialization and doFinalization methods to ModulePass's, to allow ↵Owen Anderson2012-11-15
| | | | | | | | | them to be re-initialized and reused on multiple Module's. Patch by Pedro Artigas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168008 91177308-0d34-0410-b5e6-96231b3b80d8
* Add pass printer passes in the right place.Andrew Trick2012-02-01
| | | | | | | | | | | | The pass pointer should never be referenced after sending it to schedulePass(), which may delete the pass. To fix this bug I had to clean up the design leading to more goodness. You may notice now that any non-analysis pass is printed. So things like loop-simplify and lcssa show up, while target lib, target data, alias analysis do not show up. Normally, analysis don't mutate the IR, but you can now check this by using both -print-after and -print-before. The effects of analysis will now show up in between the two. The llc path is still in bad shape. But I'll be improving it in my next checkin. Meanwhile, print-machineinstrs still works the same way. With print-before/after, many llc passes that were not printed before now are, some of these should be converted to analysis. A few very important passes, isel and scheduler, are not properly initialized, so not printed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149480 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespaceAndrew Trick2012-02-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149479 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy some #includes and forward-declarations, and move the C binding codeDan Gohman2010-08-07
| | | | | | | out of PassManager.cpp and into Core.cpp with the rest of the C binding code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110494 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6875:David Greene2010-05-10
| | | | | | | | | | | | | | | | This includes a patch by Roman Divacky to fix the initial crash. Move the actual addition of passes from *PassManager::add to *PassManager::addImpl. That way, when adding printer passes we won't recurse infinitely. Finally, check to make sure that we are actually adding a FunctionPass to a FunctionPassManager before doing a print before or after it. Immutable passes are strange in this way because they aren't FunctionPasses yet they can be and are added to the FunctionPassManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103425 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-27
| | | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 85714, 85715, 85716, which are breaking the buildDouglas Gregor2009-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85717 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the #include of Pass.h from PassManager.h. This breaks a significantDan Gohman2009-11-01
| | | | | | | #include dependency, as frontends commonly pull in PassManager.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85714 91177308-0d34-0410-b5e6-96231b3b80d8
* allow updating the MPM, so that you can use one FunctionPAssManager withChris Lattner2008-06-26
| | | | | | | multiple ModuleProviders, e.g. with the JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52796 91177308-0d34-0410-b5e6-96231b3b80d8
* Give PassManager and FunctionPassManager a common base class, withDan Gohman2008-03-11
| | | | | | | | | add(Pass *) as a pure virtual member function. This will allow all the various addPassesTo* functions in LLVM to avoid hard-coding what type of PassManager is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48226 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-29
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* remove unimplemented ctor, add some comments.Chris Lattner2007-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43328 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pastos in comments for doFinalization functions.Dan Gohman2007-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40588 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove forward-declarations for classes that don't exist.Dan Gohman2007-05-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36993 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the 'explicit' keyword to several constructors that accept oneDan Gohman2007-03-23
| | | | | | | argument that don't appear intended as implicit-conversion operators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35280 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove old pass manager.Devang Patel2007-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32927 91177308-0d34-0410-b5e6-96231b3b80d8
* s/BasicBlockPassManager/BBPassManager/gDevang Patel2006-12-19
| | | | | | | | | | | | | | | | | | | s/ModulePassManager/MPPassManager/g s/FunctionPassManagerImpl_New/FunctionPassManagerImpl/g s/PassManagerImpl_New/PassManagerImpl/g Introduce FPPassManager to manage function passes and BBPassManagers. Now FunctionPassManagerImpl is an implementation class used by externally visible FunctionPassManager to manage FPPassManagers. Module pass manager (MPPassManager) now manages FPPassManagers and ModulePasses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32679 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #ifdef switch toggle between old and new pass manager. However,Devang Patel2006-12-13
| | | | | | | | continue to use old pass manager at the moment. To use new manager remove #define USE_OLD_PASSMANAGER 1 from Pass.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32525 91177308-0d34-0410-b5e6-96231b3b80d8
* FunctionPassManager does not support runOnModule().Devang Patel2006-12-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32519 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PassManager_New destructors.Devang Patel2006-12-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32517 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)Devang Patel2006-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32368 91177308-0d34-0410-b5e6-96231b3b80d8
* Add run(Function &F) support in FunctionPassManager_NewDevang Patel2006-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31756 91177308-0d34-0410-b5e6-96231b3b80d8
* Add doInitialization and doFinalization support in FunctionManager_New.Devang Patel2006-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31747 91177308-0d34-0410-b5e6-96231b3b80d8
* Move CommonPassManagerImpl from PassManager.h to PassManager.cppDevang Patel2006-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31666 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track if analysis made available by the pass.Devang Patel2006-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31664 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of analysis required by the passes. Force use of new passDevang Patel2006-11-11
| | | | | | | | manager if a pass does not preserve analysis that is used by other passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31659 91177308-0d34-0410-b5e6-96231b3b80d8
* s/PassManagerAnalysisHelper/CommonPassManagerImplDevang Patel2006-11-10
| | | | | | | Inherit CommonPassManagerImpl from Pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31642 91177308-0d34-0410-b5e6-96231b3b80d8
* Split FunctionPassManager_New into FunctionPassManager_New and ↵Devang Patel2006-11-08
| | | | | | | | | | FunctionPassManagerImpl_New. FunctionPassManagerImpl_New implements the pass manager. FunctionPassManager_New is the public interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31547 91177308-0d34-0410-b5e6-96231b3b80d8
* Split PassManager_New into PassManager_New and PassManagerImpl_New.Devang Patel2006-11-08
| | | | | | | | PassManagerImpl_New implements the pass manager. PassManager_New is the public interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31546 91177308-0d34-0410-b5e6-96231b3b80d8
* Move BasicBlockPassManager_New, FunctionPassManager_New andDevang Patel2006-11-08
| | | | | | | | ModulePassManager_New class declarations from PassManager.h to PassManager.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31545 91177308-0d34-0410-b5e6-96231b3b80d8
* Beautify.Devang Patel2006-11-08
| | | | | | | Clarify comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31529 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive new pass managers from PassManagerAnalysisHelper.Devang Patel2006-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31525 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce PassManagerAnalysisHelper.Devang Patel2006-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31522 91177308-0d34-0410-b5e6-96231b3b80d8
* Add PassManager_New.Devang Patel2006-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31521 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Devang Patel2006-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31518 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ModulePassManager_New.Devang Patel2006-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31517 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FunctionPassManager_New.Devang Patel2006-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31515 91177308-0d34-0410-b5e6-96231b3b80d8
* Add BasicBlockPassManager_New.Devang Patel2006-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31513 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit doInitialization/doFinalization methods instead of makingChris Lattner2006-09-04
| | | | | | | the FunctionPassManager redo this for each function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30079 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch #6's in Saem's refactor-the-passmanager patch series. From him:Chris Lattner2006-01-04
| | | | | | | | This sanitises the world, blows away the specialisations and adds traits per passmanager type -- seemed most natural. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25085 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
* 'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner2004-09-20
| | | | | | | | from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8