aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LegacyPassManager.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-12-12Document that PassManager::add() may delete the pass right away.Matthias Braun1-17/+2
Also remove redundant documentation: - doxygen will copy documentation to overriden methods. - Use \copydoc on PIMPL classes instead of replicating the text. llvm-svn: 224089
2014-11-01Remove redundant calls to isMaterializable.Rafael Espindola1-4/+2
This removes calls to isMaterializable in the following cases: * It was redundant with a call to isDeclaration now that isDeclaration returns the correct answer for materializable functions. * It was followed by a call to Materialize. Just call Materialize and check EC. llvm-svn: 221050
2014-10-24Modernize the error handling of the Materialize function.Rafael Espindola1-3/+2
llvm-svn: 220600
2014-08-24Use range based for loops to avoid needing to re-mention SmallPtrSet size.Craig Topper1-3/+2
llvm-svn: 216351
2014-08-11Fix typos:Sylvestre Ledru1-1/+1
* libaries => libraries * avaiable => available llvm-svn: 215366
2014-05-16Add C API for thread yielding callback.Juergen Ributzka1-2/+7
Sometimes a LLVM compilation may take more time then a client would like to wait for. The problem is that it is not possible to safely suspend the LLVM thread from the outside. When the timing is bad it might be possible that the LLVM thread holds a global mutex and this would block any progress in any other thread. This commit adds a new yield callback function that can be registered with a context. LLVM will try to yield by calling this callback function, but there is no guaranteed frequency. LLVM will only do so if it can guarantee that suspending the thread won't block any forward progress in other LLVM contexts in the same process. Once the client receives the call back it can suspend the thread safely and resume it at another time. Related to <rdar://problem/16728690> llvm-svn: 208945
2014-05-15Revert "[PM] Add pass run listeners to the pass manager."Juergen Ributzka1-7/+0
Revert the current implementation and C API. New implementation and C APIs are in the works. llvm-svn: 208904
2014-04-28[PM] Add pass run listeners to the pass manager.Juergen Ributzka1-0/+7
This commit provides the necessary C/C++ APIs and infastructure to enable fine- grain progress report and safe suspension points after each pass in the pass manager. Clients can provide a callback function to the pass manager to call after each pass. This can be used in a variety of ways (progress report, dumping of IR between passes, safe suspension of threads, etc). The run listener list is maintained in the LLVMContext, which allows a multi- threaded client to be only informed for it's own thread. This of course assumes that the client created a LLVMContext for each thread. This fixes <rdar://problem/16728690> llvm-svn: 207430
2014-04-27Teach the pass manager's execution dump to print the current time beforeChandler Carruth1-1/+3
each line. This is particularly nice for tracking which run of a particular pass over a particular function was slow. This also required making the TimeValue string much more useful. First, there is a standard format for writing out a date and time. Let's use that rather than strings that would have to be parsed. Second, actually output the nanosecond resolution that timevalue claims to have. This is proving useful working on PR19499, so I figured it would be generally useful to commit. llvm-svn: 207385
2014-04-09[C++11] More 'nullptr' conversion or in some cases just using a boolean ↵Craig Topper1-16/+16
check instead of comparing to nullptr. llvm-svn: 205831
2014-04-08Fix a (legacy) PassManager crash that occurs when a ModulePassAndrew Trick1-6/+18
indirectly requires a function analysis. This bug was reported by Jason Kim. He included a test case here: http://reviews.llvm.org/D3312 llvm-svn: 205753
2014-03-05[C++11] Add 'override' keyword to IR library.Craig Topper1-30/+33
llvm-svn: 202939
2014-03-04[Modules] Move the PassNameParser to the IR library as it deals in theChandler Carruth1-1/+1
PassInfo structures of the legacy pass manager. Also give it the Legacy prefix as it is not a particularly widely used header. llvm-svn: 202839
2014-02-26Remove unnecessary llvm:: qualification.Eric Christopher1-3/+3
llvm-svn: 202316
2014-01-12[PM] Simplify the interface exposed for IR printing passes.Chandler Carruth1-3/+3
Nothing was using the ability of the pass to delete the raw_ostream it printed to, and nothing was trying to pass it a pointer to the raw_ostream. Also, the function variant had a different order of arguments from all of the others which was just really confusing. Now the interface accepts a reference, doesn't offer to delete it, and uses a consistent order. The implementation of the printing passes haven't been updated with this simplification, this is just the API switch. llvm-svn: 199044
2014-01-12[PM] Rename the IR printing pass header to a more generic and correctChandler Carruth1-1/+1
name to match the source file which I got earlier. Update the include sites. Also modernize the comments in the header to use the more recommended doxygen style. llvm-svn: 199041
2014-01-09Put the functionality for printing a value to a raw_ostream as anChandler Carruth1-2/+1
operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users. This removes the 'Writer.h' header which contained only a single function declaration. llvm-svn: 198836
2014-01-07Move the LLVM IR asm writer header files into the IR directory, as theyChandler Carruth1-2/+2
are part of the core IR library in order to support dumping and other basic functionality. Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time. Update all of the #includes to match. All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure. llvm-svn: 198688
2014-01-07Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth1-1/+1
subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
2013-12-05Correct word hyphenationsAlp Toker1-2/+2
This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. llvm-svn: 196471
2013-11-09Move the old pass manager infrastructure into a legacy namespace andChandler Carruth1-0/+1920
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. llvm-svn: 194324