aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/PassRegistry.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-10-06[PM] Remove an unused and rather expensive mapping from an analysisChandler Carruth1-4/+0
group's interface to all of the implementations of that analysis group. The groups themselves can and do manage this anyways, the pass registry needn't involve itself. llvm-svn: 219097
2014-10-06[PM] Remove the (deeply misguided) 'unregister' functionality from theChandler Carruth1-10/+0
pass registry. This style of registry is somewhat questionable, but it being non-monotonic is crazy. No one is (or should be) unloading DSOs with passes and unregistering them here. I've checked with a few folks and I don't know of anyone using this functionality or any important use case where it is necessary. llvm-svn: 219096
2014-10-06[cleanup] Switch to using range-based for loops in two very obviousChandler Carruth1-6/+4
places. llvm-svn: 219095
2014-10-05[cleanup] Fix up trailing whitespace and formatting in the pass regitsryChandler Carruth1-21/+21
code prior to hacking on it more significantly. llvm-svn: 219094
2014-06-12Remove pimpl class from PassRegistry.Zachary Turner1-91/+26
Since removeRegistrationListener is no longer called during static destruction, we can get rid of the pimpl in PassRegistry. This should clean up the code somewhat, increase clarity, and also allows us to put the Lock as a member of the class, instead of as a ManagedStatic. As part of this change, the PassInfo class is moved from PassSupport.h to its own file, to eliminate the otherwise circular header dependency between PassRegistry.h and PassSupport.h Reviewed by: rnk, dblaikie Differential Revision: http://reviews.llvm.org/D4107 llvm-svn: 210793
2014-06-11Don't acquire the mutex during the destructor of PassRegistry.Zachary Turner1-1/+4
This destructor is run as part of static program termination, and so all ManagedStatics (including this lock) will have been destroyed by llvm_shutdown. Furthermore, if there is actually a race condition during static program termination, then we are just hiding a bug somewhere else, because other threads should not be running at this point. llvm-svn: 210717
2014-04-15Use unique_ptr to manage PassInfo instances in the PassRegistryDavid Blaikie1-8/+4
llvm-svn: 206297
2014-04-15[C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper1-1/+1
instead of comparing to nullptr. llvm-svn: 206252
2014-04-09[C++11] More 'nullptr' conversion or in some cases just using a boolean ↵Craig Topper1-4/+4
check instead of comparing to nullptr. llvm-svn: 205831
2014-01-16[opt][PassInfo] Allow opt to run passes that need target machine.Quentin Colombet1-0/+2
When registering a pass, a pass can now specify a second construct that takes as argument a pointer to TargetMachine. The PassInfo class has been updated to reflect that possibility. If such a constructor exists opt will use it instead of the default constructor when instantiating the pass. Since such IR passes are supposed to be rare, no specific support has been added to this commit to allow an easy registration of such a pass. In other words, for such pass, the initialization function has to be hand-written (see CodeGenPrepare for instance). Now, codegenprepare can be tested using opt: opt -codegenprepare -mtriple=mytriple input.ll llvm-svn: 199430
2013-07-03Use an RWMutex instead of a Mutex in PassRegistry.Chad Rosier1-10/+11
Patch by Alex Crichton <alex@crichton.co>. Approved by Chris Lattner. llvm-svn: 185566
2013-01-02Move all of the header files which are involved in modelling the LLVM IRChandler Carruth1-1/+1
into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
2013-01-02Rename VMCore directory to IR.Chandler Carruth1-0/+209
Aside from moving the actual files, this patch only updates the build system and the source file comments under lib/... that are relevant. I'll be updating other docs and other files in smaller subsequnet commits. While I've tried to test this, but it is entirely possible that there will still be some build system fallout. Also, note that I've not changed the library name itself: libLLVMCore.a is still the library name. I'd be interested in others' opinions about whether we should rename this as well (I think we should, just not sure what it might break) llvm-svn: 171359