summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/PassManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move several non-performance-critical member functinos out of line.Dan Gohman2010-06-211-0/+5
| | | | llvm-svn: 106444
* Revert r103493, materializing functions in the regular PassManager.Dan Gohman2010-05-111-9/+1
| | | | | | It works in simple cases, but it isn't a general solution. llvm-svn: 103499
* Teach the regular pass manager how to materialize functions as needed.Dan Gohman2010-05-111-1/+9
| | | | llvm-svn: 103493
* Fix PR6875:David Greene2010-05-101-15/+31
| | | | | | | | | | | | | | | 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
* Use twines to simplify calls to report_fatal_error. For code size and ↵Benjamin Kramer2010-04-081-1/+1
| | | | | | readability. llvm-svn: 100756
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100709
* minor tidying upChris Lattner2010-04-071-2/+1
| | | | llvm-svn: 100702
* Ok, third time's the charm. No changes from last time except the CMakeDavid Greene2010-04-021-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-83/+0
| | | | | | are run during codegen. llvm-svn: 100207
* Let's try this again. Re-apply 100143 including an apparent missingDavid Greene2010-04-021-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <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-83/+0
| | | | llvm-svn: 100146
* Add some switches helpful for debugging:David Greene2010-04-011-0/+83
| | | | | | | | | | | | | | | | | | | | | | | -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
* reapply my timer rewrite with a change for PassManager to store Chris Lattner2010-03-301-33/+21
| | | | | | timers by pointer instead of by-value. llvm-svn: 99871
* revert r99862 which is causing FNT failures.Chris Lattner2010-03-301-17/+31
| | | | llvm-svn: 99870
* fairly major rewrite of various timing related stuff.Chris Lattner2010-03-301-31/+17
| | | | llvm-svn: 99862
* Add Module functions in place of module providers.Erick Tryzelaar2010-03-021-1/+6
| | | | llvm-svn: 97608
* Don't print "Modified" for passes which haven't modified anything.Dan Gohman2010-03-011-6/+12
| | | | llvm-svn: 97446
* Don't try to materialize a function that isn't materializable anyways. ThisNick Lewycky2010-02-151-3/+5
| | | | | | fixes a crash using FPM on a Function that isn't owned by a Module. llvm-svn: 96273
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-7/+4
| | | | | | | | | | | | | | | | | | | | | 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
* elimiante the dynamic_cast's from opt.Chris Lattner2010-01-221-3/+4
| | | | llvm-svn: 94160
* eliminate a bunch more unneeded dynamic_cast's.Chris Lattner2010-01-221-13/+14
| | | | llvm-svn: 94156
* eliminate a bunch of dynamic_cast's.Chris Lattner2010-01-221-7/+20
| | | | llvm-svn: 94155
* eliminate a bunch of dynamic_cast's.Chris Lattner2010-01-221-9/+6
| | | | llvm-svn: 94154
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-091-4/+4
| | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! llvm-svn: 93079
* Change errs() to dbgs().David Greene2010-01-051-29/+30
| | | | llvm-svn: 92660
* Avoid assigning to Changed when it won't be used after the return.Bill Wendling2009-12-251-2/+2
| | | | llvm-svn: 92160
* Remove useless calls to c_str().Benjamin Kramer2009-12-081-4/+3
| | | | llvm-svn: 90855
* Added debug output for inherited passes that are invalidated.Andreas Neustifter2009-12-041-1/+7
| | | | llvm-svn: 90553
* Move FunctionPassManagerImpl's dumpArguments and dumpPasses callsDan Gohman2009-11-231-3/+3
| | | | | | | out of its run function and into its doInitialization method, so that it does the dump once instead of once per function. llvm-svn: 89660
* Pass StringRef by value.Daniel Dunbar2009-11-061-4/+4
| | | | llvm-svn: 86251
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-3/+2
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Move the dominator verification code out of special code embedded withinDan Gohman2009-09-281-54/+7
| | | | | | | | | | | | the PassManager code into a regular verifyAnalysis method. Also, reorganize loop verification. Make the LoopPass infrastructure call verifyLoop as needed instead of having LoopInfo::verifyAnalysis check every loop in the function after each looop pass. Add a new command-line argument, -verify-loop-info, to enable the expensive full checking. llvm-svn: 82952
* Extend the StartPassTimer and StopPassTimer functions so that theDan Gohman2009-09-281-26/+20
| | | | | | | | code that stops the timer doesn't have to search to find the timer object before it stops the timer. This avoids a lock acquisition and a few other things done with the timer running. llvm-svn: 82949
* Extract the code for releasing a pass into a separate function, andDan Gohman2009-09-271-24/+25
| | | | | | tidy it up a little. llvm-svn: 82944
* make -debug-pass=Executions show information about what call graph nodesChris Lattner2009-09-151-4/+13
| | | | | | are in the SCC for each execution of a CGSCC pass. llvm-svn: 81838
* add some missing quotes in debug outputChris Lattner2009-09-151-2/+2
| | | | llvm-svn: 81836
* Kill off more cerr/cout uses and prune includes a bit.Benjamin Kramer2009-08-231-1/+0
| | | | llvm-svn: 79852
* Fix a bunch of namespace pollution.Dan Gohman2009-08-071-2/+2
| | | | llvm-svn: 78363
* Eliminate some uses of DOUT, cerr, and getNameStart().Daniel Dunbar2009-07-261-44/+44
| | | | llvm-svn: 77145
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-4/+4
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-4/+4
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Start converting to new error handling API.Torok Edwin2009-07-081-2/+2
| | | | | | | cerr+abort -> llvm_report_error assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included) llvm-svn: 75018
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-2/+2
| | | | llvm-svn: 74931
* Use find instead of operator[] to test whether an element is in a std::map.Dan Gohman2009-07-011-2/+4
| | | | | | This fixes a bug that caused -debug-pass=Details to abort. llvm-svn: 74654
* Set wasRun to false here on Dan's suggestion.Torok Edwin2009-06-291-0/+1
| | | | llvm-svn: 74455
* Call doInitialization(), releaseMemory(), and doFinalization() for ↵Torok Edwin2009-06-291-1/+39
| | | | | | | | | | on-the-fly passes as well. Also don't call finalizers for LoopPass if initialization was not called. Add a unittest that tests that these methods are called, in the proper order, and the correct number of times. llvm-svn: 74438
* Add a SmartScopedLock, and use it to simplify code.Owen Anderson2009-06-181-5/+4
| | | | llvm-svn: 73722
* Move Threading.[h|cpp] from Support to System.Owen Anderson2009-06-181-1/+1
| | | | llvm-svn: 73707
* Guard mutation of the timing info global.Owen Anderson2009-06-171-0/+9
| | | | llvm-svn: 73639
* Always verify dominfo if expensive checking is enabled.Duncan Sands2009-05-221-0/+5
| | | | llvm-svn: 72253
OpenPOWER on IntegriCloud