summaryrefslogtreecommitdiff
path: root/include/llvm/PassManager.h
AgeCommit message (Collapse)AuthorFilesLines
2013-11-09Move the old pass manager infrastructure into a legacy namespace andChandler Carruth1-86/+18
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
2013-09-19Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."Andrew Trick1-5/+0
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
2013-09-18Encapsulate PassManager debug flags to avoid static init and cxa_exit.Andrew Trick1-0/+5
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
2013-05-01This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo1-0/+4
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
2012-11-29One more step towards making doInitialization and doFinalization useful forPedro Artigas1-8/+0
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
2012-11-27Revert r168635 "Step towards implementation of pass manager with ↵Owen Anderson1-0/+8
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
2012-11-26Step towards implementation of pass manager with doInitialization and ↵Owen Anderson1-8/+0
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
2012-11-15Add doInitialization and doFinalization methods to ModulePass's, to allow ↵Owen Anderson1-0/+8
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
2012-02-01Add pass printer passes in the right place.Andrew Trick1-9/+1
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
2012-02-01whitespaceAndrew Trick1-6/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07Tidy some #includes and forward-declarations, and move the C binding codeDan Gohman1-1/+0
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
2010-05-10Fix PR6875:David Greene1-0/+7
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
2010-01-27Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin1-10/+3
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
2009-11-01Reverting 85714, 85715, 85716, which are breaking the buildDouglas Gregor1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-01Remove the #include of Pass.h from PassManager.h. This breaks a significantDan Gohman1-2/+1
#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
2008-06-26allow updating the MPM, so that you can use one FunctionPAssManager withChris Lattner1-0/+6
multiple ModuleProviders, e.g. with the JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52796 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-11Give PassManager and FunctionPassManager a common base class, withDan Gohman1-2/+16
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
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner1-2/+2
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
2007-10-25remove unimplemented ctor, add some comments.Chris Lattner1-4/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43328 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30Fix pastos in comments for doFinalization functions.Dan Gohman1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40588 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-11Remove forward-declarations for classes that don't exist.Dan Gohman1-1/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-23Add the 'explicit' keyword to several constructors that accept oneDan Gohman1-1/+1
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
2007-01-05Remove old pass manager.Devang Patel1-68/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32927 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19s/BasicBlockPassManager/BBPassManager/gDevang Patel1-4/+4
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
2006-12-13Add #ifdef switch toggle between old and new pass manager. However,Devang Patel1-11/+17
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
2006-12-13FunctionPassManager does not support runOnModule().Devang Patel1-5/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32519 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13Implement PassManager_New destructors.Devang Patel1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)Devang Patel1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15Add run(Function &F) support in FunctionPassManager_NewDevang Patel1-0/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15Add doInitialization and doFinalization support in FunctionManager_New.Devang Patel1-1/+8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31747 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11Move CommonPassManagerImpl from PassManager.h to PassManager.cppDevang Patel1-41/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11Keep track if analysis made available by the pass.Devang Patel1-1/+8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11Keep track of analysis required by the passes. Force use of new passDevang Patel1-2/+2
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
2006-11-10s/PassManagerAnalysisHelper/CommonPassManagerImplDevang Patel1-6/+4
Inherit CommonPassManagerImpl from Pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08Split FunctionPassManager_New into FunctionPassManager_New and ↵Devang Patel1-0/+28
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
2006-11-08Split PassManager_New into PassManager_New and PassManagerImpl_New.Devang Patel1-14/+6
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
2006-11-08Move BasicBlockPassManager_New, FunctionPassManager_New andDevang Patel1-81/+2
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
2006-11-08Beautify.Devang Patel1-16/+17
Clarify comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31529 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07Derive new pass managers from PassManagerAnalysisHelper.Devang Patel1-4/+8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31525 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07Introduce PassManagerAnalysisHelper.Devang Patel1-0/+30
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07Add PassManager_New.Devang Patel1-0/+34
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07Fix comment.Devang Patel1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31518 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07Add ModulePassManager_New.Devang Patel1-0/+23
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07Add FunctionPassManager_New.Devang Patel1-0/+35
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31515 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07Add BasicBlockPassManager_New.Devang Patel1-0/+23
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31513 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04Add explicit doInitialization/doFinalization methods instead of makingChris Lattner1-0/+8
the FunctionPassManager redo this for each function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30079 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04Patch #6's in Saem's refactor-the-passmanager patch series. From him:Chris Lattner1-3/+5
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
2005-04-21Remove trailing whitespaceMisha Brukman1-3/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner1-0/+1
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
2003-11-11Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke1-0/+4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8