Dan Gohman
1d48a4b1d7
Tidy some #includes and forward-declarations, and move the C binding code
...
out of PassManager.cpp and into Core.cpp with the rest of the C binding code.
llvm-svn: 110494
2010-08-07 00:43:20 +00:00
David Greene
dec8f8b802
Fix PR6875:
...
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.
llvm-svn: 103425
2010-05-10 20:24:27 +00:00
Jeffrey Yasskin
fb10587e50
Kill ModuleProvider and ghost linkage by inverting the relationship between
...
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 .
llvm-svn: 94686
2010-01-27 20:34:15 +00:00
Douglas Gregor
16c6819959
Reverting 85714, 85715, 85716, which are breaking the build
...
llvm-svn: 85717
2009-11-01 16:42:53 +00:00
Dan Gohman
1d0b06c139
Remove the #include of Pass.h from PassManager.h. This breaks a significant
...
#include dependency, as frontends commonly pull in PassManager.h.
llvm-svn: 85714
2009-11-01 15:20:19 +00:00
Chris Lattner
865a98fba9
allow updating the MPM, so that you can use one FunctionPAssManager with
...
multiple ModuleProviders, e.g. with the JIT.
llvm-svn: 52796
2008-06-26 22:26:45 +00:00
Dan Gohman
2b0112a65a
Give PassManager and FunctionPassManager a common base class, with
...
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.
llvm-svn: 48226
2008-03-11 16:41:42 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
09c4d1b720
remove unimplemented ctor, add some comments.
...
llvm-svn: 43328
2007-10-25 05:19:24 +00:00
Dan Gohman
b757cdd2e6
Fix pastos in comments for doFinalization functions.
...
llvm-svn: 40588
2007-07-30 14:51:13 +00:00
Dan Gohman
19d23d8595
Remove forward-declarations for classes that don't exist.
...
llvm-svn: 36993
2007-05-11 21:05:57 +00:00
Dan Gohman
42a3f4e16e
Add the 'explicit' keyword to several constructors that accept one
...
argument that don't appear intended as implicit-conversion operators.
llvm-svn: 35280
2007-03-23 18:44:11 +00:00
Devang Patel
fcddd83bfc
Remove old pass manager.
...
llvm-svn: 32927
2007-01-05 20:16:23 +00:00
Devang Patel
328930d725
s/BasicBlockPassManager/BBPassManager/g
...
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.
llvm-svn: 32679
2006-12-19 19:46:59 +00:00
Devang Patel
3c8836df17
Add #ifdef switch toggle between old and new pass manager. However,
...
continue to use old pass manager at the moment. To use new manager
remove #define USE_OLD_PASSMANAGER 1 from Pass.h
llvm-svn: 32525
2006-12-13 02:36:01 +00:00
Devang Patel
ad1c3bba52
FunctionPassManager does not support runOnModule().
...
llvm-svn: 32519
2006-12-13 00:34:32 +00:00
Devang Patel
ae0e0cdff7
Implement PassManager_New destructors.
...
llvm-svn: 32517
2006-12-13 00:09:23 +00:00
Devang Patel
4833df8e9e
Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)
...
llvm-svn: 32368
2006-12-08 18:57:16 +00:00
Devang Patel
6060a1e3dc
Add run(Function &F) support in FunctionPassManager_New
...
llvm-svn: 31756
2006-11-15 19:39:54 +00:00
Devang Patel
cb9cd60f59
Add doInitialization and doFinalization support in FunctionManager_New.
...
llvm-svn: 31747
2006-11-15 02:07:25 +00:00
Devang Patel
785d727d1c
Move CommonPassManagerImpl from PassManager.h to PassManager.cpp
...
llvm-svn: 31666
2006-11-11 01:31:05 +00:00
Devang Patel
124cfa3f26
Keep track if analysis made available by the pass.
...
llvm-svn: 31664
2006-11-11 01:10:19 +00:00
Devang Patel
1bff0f0174
Keep track of analysis required by the passes. Force use of new pass
...
manager if a pass does not preserve analysis that is used by other
passes.
llvm-svn: 31659
2006-11-11 00:42:16 +00:00
Devang Patel
a9504181aa
s/PassManagerAnalysisHelper/CommonPassManagerImpl
...
Inherit CommonPassManagerImpl from Pass.
llvm-svn: 31642
2006-11-10 21:33:13 +00:00
Devang Patel
0aa28c8146
Split FunctionPassManager_New into FunctionPassManager_New and FunctionPassManagerImpl_New.
...
FunctionPassManagerImpl_New implements the pass manager.
FunctionPassManager_New is the public interface.
llvm-svn: 31547
2006-11-08 10:44:40 +00:00
Devang Patel
12982590fa
Split PassManager_New into PassManager_New and PassManagerImpl_New.
...
PassManagerImpl_New implements the pass manager.
PassManager_New is the public interface.
llvm-svn: 31546
2006-11-08 10:29:57 +00:00
Devang Patel
03dc236bdd
Move BasicBlockPassManager_New, FunctionPassManager_New and
...
ModulePassManager_New class declarations from PassManager.h
to PassManager.cpp
llvm-svn: 31545
2006-11-08 10:05:38 +00:00
Devang Patel
d3961139f4
Beautify.
...
Clarify comments.
llvm-svn: 31529
2006-11-08 00:19:31 +00:00
Devang Patel
283833c127
Derive new pass managers from PassManagerAnalysisHelper.
...
llvm-svn: 31525
2006-11-07 22:44:55 +00:00
Devang Patel
fece2777c4
Introduce PassManagerAnalysisHelper.
...
llvm-svn: 31522
2006-11-07 22:35:17 +00:00
Devang Patel
6d4ef98c03
Add PassManager_New.
...
llvm-svn: 31521
2006-11-07 22:23:34 +00:00
Devang Patel
1082a50ecf
Fix comment.
...
llvm-svn: 31518
2006-11-07 22:04:53 +00:00
Devang Patel
cacc940858
Add ModulePassManager_New.
...
llvm-svn: 31517
2006-11-07 22:03:15 +00:00
Devang Patel
9a2c6538dd
Add FunctionPassManager_New.
...
llvm-svn: 31515
2006-11-07 21:49:50 +00:00
Devang Patel
b7d2cd5ec2
Add BasicBlockPassManager_New.
...
llvm-svn: 31513
2006-11-07 21:31:57 +00:00
Chris Lattner
50f76d4c5d
Add explicit doInitialization/doFinalization methods instead of making
...
the FunctionPassManager redo this for each function.
llvm-svn: 30079
2006-09-04 04:07:39 +00:00
Chris Lattner
064e45054a
Patch #6 's in Saem's refactor-the-passmanager patch series. From him:
...
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.
llvm-svn: 25085
2006-01-04 07:47:13 +00:00
Misha Brukman
3f0aa3dbf8
Remove trailing whitespace
...
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Chris Lattner
43c0372c0b
'Pass' should now not be derived from by clients. Instead, they should derive
...
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
16c6cda9d5
Added LLVM copyright header (for lack of a better term).
...
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Misha Brukman
6e81243ff7
Enabling incremental bytecode loading in the JIT:
...
* Add ModuleProvider as a parameter to FunctionPassManager
llvm-svn: 9122
2003-10-14 21:34:56 +00:00
Misha Brukman
2d53099507
Use 'F' for Function instead of 'M'.
...
llvm-svn: 9019
2003-10-10 17:38:31 +00:00
Chris Lattner
4e4c763dfc
Standardize header file comments
...
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Brian Gaeke
4d260a9317
Add new method to FunctionPassManager to add ImmutablePasses.
...
llvm-svn: 7838
2003-08-14 06:07:57 +00:00
Brian Gaeke
4243c7aa6a
Add FunctionPassManager - it's like a PassManager, but it only deals in
...
FunctionPasses.
llvm-svn: 7778
2003-08-12 17:22:39 +00:00
Misha Brukman
ecdaad27d6
The plural of `Pass' is Passes, not Pass's.
...
llvm-svn: 6247
2003-05-20 18:39:06 +00:00
Chris Lattner
69f833618d
Convert comments to Doxygen style
...
llvm-svn: 3507
2002-08-25 22:54:55 +00:00
Chris Lattner
cee706572b
*** empty log message ***
...
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
c64ef6740a
* Add a stub to FunctionPass so that subclasses can declare that they do not
...
modify the CFG. It currently does nothing, but will in the future.
* Changes to make the public PassManager.h be MUCH smaller, and devoid of
implementation details. Now PassManager is just a Pimpl class that wraps
PassManagerT<Module>, but lib/VMCore/Pass.cpp is now the only class that
has to #include PassManagerT.h
llvm-svn: 2383
2002-04-28 20:46:05 +00:00