summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Pass.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Another step towards getting rid of static ctors for pass registration: have ↵Owen Anderson2010-10-051-1/+0
| | | | | | | | | | INITIALIZE_PASS AND INITIALIZE_AG_PASS expand to an initializeMyPass() function (in additional to the extant static ctors). Eventually, these will be called from a big InitializeAllPasses() function, and the PassInfo's they create (which would be leaked if this code were used at the moment) will be handed off to a PassRegistry for ownership. llvm-svn: 115703
* Revert r111199; it breaks -debug-pass=Structure output.Dan Gohman2010-08-191-2/+2
| | | | llvm-svn: 111500
* Make dumpPassStructure be a PMDataManager abstraction, rather thanDan Gohman2010-08-161-2/+2
| | | | | | | | | | a Pass abstraction, since that's the level it's actually used at. Rename Pass' dumpPassStructure to dumpPass. This eliminates an awkward use of getAsPass() to convert a PMDataManager* into a Pass* just to permit a dumpPassStructure call. llvm-svn: 111199
* Trim #includes.Dan Gohman2010-08-121-6/+0
| | | | llvm-svn: 110983
* Remove BasicBlockPass::runOnFunction, which was unused.Dan Gohman2010-08-111-10/+0
| | | | llvm-svn: 110847
* Delete FunctionPass::run, which is unused.Dan Gohman2010-08-111-11/+0
| | | | llvm-svn: 110843
* Delete FunctionPass::runOnModule, which is unused.Dan Gohman2010-08-111-13/+0
| | | | llvm-svn: 110842
* Tidy some #includes and forward-declarations, and move the C binding codeDan Gohman2010-08-071-5/+0
| | | | | | out of PassManager.cpp and into Core.cpp with the rest of the C binding code. llvm-svn: 110494
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-28/+27
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-27/+28
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-28/+27
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Move the smarts of AnalysisGroup registration into PassRegistry.Owen Anderson2010-07-211-24/+3
| | | | llvm-svn: 109019
* Move the handling of PassRegistrationListener's to PassRegistry.Owen Anderson2010-07-201-37/+3
| | | | llvm-svn: 108966
* Move more functionality from Pass.cpp to PassRegistry.cpp. This global will ↵Owen Anderson2010-07-201-47/+6
| | | | | | go away eventually, but for now we still need it around. llvm-svn: 108932
* Convert the internal PassRegistrar class into a new, external PassRegistry ↵Owen Anderson2010-07-201-99/+20
| | | | | | class. No intended functionality change at this point. llvm-svn: 108877
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-201-21/+21
| | | | | | | | working again. I don't see why this patch would cause them to fail the way they are, but none of the other intervening patches seem likely either. llvm-svn: 108818
* Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-201-21/+21
| | | | llvm-svn: 108813
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-201-21/+21
| | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. llvm-svn: 108805
* Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-201-21/+21
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). llvm-svn: 108794
* Move several non-performance-critical member functinos out of line.Dan Gohman2010-06-211-0/+45
| | | | llvm-svn: 106444
* Silence an unused variable warning.Eric Christopher2010-04-161-1/+1
| | | | llvm-svn: 101438
* Fix namespace polution.Dan Gohman2010-04-151-0/+4
| | | | llvm-svn: 101375
* Use a ManagedCleanup to prevent leaking the PassRegistrar map. In breaks theOwen Anderson2010-04-061-6/+14
| | | | | | | use case where someone wants to resurrect LLVM after calling llvm_shutdown, but I'm not aware of any clients that are affected by this. llvm-svn: 100519
* Ok, third time's the charm. No changes from last time except the CMakeDavid Greene2010-04-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | source addition. Apparently the buildbots were wrong about failures. --- Add some switches helpful for debugging: -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. llvm-svn: 100249
* Revert 100204. It broke a bunch of tests and apparently changed what passes ↵Evan Cheng2010-04-021-18/+0
| | | | | | are run during codegen. llvm-svn: 100207
* Let's try this again. Re-apply 100143 including an apparent missingDavid Greene2010-04-021-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <string> include. For some reason the buildbot choked on this while my builds did not. It's probably due to a difference in system headers. --- Add some switches helpful for debugging: -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. llvm-svn: 100204
* Revert r100143.Eric Christopher2010-04-011-18/+0
| | | | llvm-svn: 100146
* Add some switches helpful for debugging:David Greene2010-04-011-0/+18
| | | | | | | | | | | | | | | | | | | | | | | -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. llvm-svn: 100143
* Make PassRegistrar thread-safe since it can be modified by code running inJeffrey Yasskin2010-02-131-0/+9
| | | | | | separate LLVMContexts. llvm-svn: 96051
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-1/+0
| | | | | | | | | | | | | | | | | | | | | 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
* give PassNameParser a home.Chris Lattner2010-01-221-0/+3
| | | | llvm-svn: 94162
* Change errs() to dbgs().David Greene2010-01-051-2/+3
| | | | llvm-svn: 92661
* Move several function bodies which are rarely inlined out of line.Dan Gohman2009-12-141-0/+67
| | | | llvm-svn: 91319
* Pass StringRef by value.Daniel Dunbar2009-11-061-2/+2
| | | | llvm-svn: 86251
* Hide MetadataContext implementation details.Devang Patel2009-10-221-0/+1
| | | | llvm-svn: 84886
* Add a form of addPreserved which takes a string argument, to allow passesDan Gohman2009-10-081-0/+14
| | | | | | | | to declare that they preserve other passes without needing to pull in additional header file or library dependencies. Convert MachineFunctionPass and CodeGenLICM to make use of this. llvm-svn: 83555
* Remove some unused fields.Dan Gohman2009-08-291-8/+5
| | | | llvm-svn: 80450
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-3/+4
| | | | | | update all code that this affects. llvm-svn: 79830
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-3/+3
| | | | llvm-svn: 74931
* Guard the listeners list. Unfortunately, this requires a real static ratherOwen Anderson2009-06-241-0/+5
| | | | | | | than a managed static because other managed statics can (and do) access this list in their destructors. Yes, I know it's horrible. llvm-svn: 74029
* Move the memory fences out of the path for single-threaded mode.Owen Anderson2009-06-191-5/+6
| | | | llvm-svn: 73775
* Move Threading.[h|cpp] from Support to System.Owen Anderson2009-06-181-1/+1
| | | | llvm-svn: 73707
* As pointed out by Duncan, I accidentally dropped the first MemoryFence of theOwen Anderson2009-06-181-4/+8
| | | | | | double-checked locking pattern here. llvm-svn: 73701
* Add braces to clarify if/else structure and remove warning.Nick Lewycky2009-06-181-1/+2
| | | | llvm-svn: 73673
* We need to use double-checked locking for lazy initialization in this case ↵Owen Anderson2009-06-171-1/+15
| | | | | | when running multithreaded. llvm-svn: 73636
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-1/+1
| | | | llvm-svn: 63198
* Speed up the passmgr by avoiding heap thrashing on vectors.Chris Lattner2008-08-081-2/+3
| | | | llvm-svn: 54515
* fix some warnings when assertions are disabled.Chris Lattner2008-06-211-1/+1
| | | | llvm-svn: 52587
* Add #includes to make some dependencies explicit.Dan Gohman2008-05-231-0/+1
| | | | llvm-svn: 51496
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-131-21/+16
| | | | | | | | | | | address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. llvm-svn: 51022
OpenPOWER on IntegriCloud