summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/PassRegistry.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-09-061-2/+6
| | | | | | other minor fixes (NFC). llvm-svn: 312679
* [LegacyPassManager] Remove TargetMachine constructorsFrancis Visoiu Mistrih2017-05-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a new way to access the TargetMachine through TargetPassConfig, as a dependency. The patterns replaced here are: * Passes handling a null TargetMachine call `getAnalysisIfAvailable<TargetPassConfig>`. * Passes not handling a null TargetMachine `addRequired<TargetPassConfig>` and call `getAnalysis<TargetPassConfig>`. * MachineFunctionPasses now use MF.getTarget(). * Remove all the TargetMachine constructors. * Remove INITIALIZE_TM_PASS. This fixes a crash when running `llc -start-before prologepilog`. PEI needs StackProtector, which gets constructed without a TargetMachine by the pass manager. The StackProtector pass doesn't handle the case where there is no TargetMachine, so it segfaults. Related to PR30324. Differential Revision: https://reviews.llvm.org/D33222 llvm-svn: 303360
* Use the range variant of find instead of unpacking begin/endDavid Majnemer2016-08-111-1/+2
| | | | | | | | | If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278433
* [NFC] Header cleanupMehdi Amini2016-04-181-4/+0
| | | | | | | | | | | | | | Removed some unused headers, replaced some headers with forward class declarations. Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap' Patch by Eugene Kosov <claprix@yandex.ru> Differential Revision: http://reviews.llvm.org/D19219 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
* Revert r231276 (including r231277): Add a lock() function in PassRegistry to ↵Erik Eckstein2015-03-051-18/+2
| | | | | | speed up multi-thread synchronization. llvm-svn: 231385
* Add a lock() function in PassRegistry to speed up multi-thread synchronization.Erik Eckstein2015-03-041-2/+18
| | | | | | | | | | When calling lock() after all passes are registered, the PassRegistry doesn't need a mutex anymore to look up passes. This speeds up multithreaded llvm execution by ~5% (tested with 4 threads). In an asserts build of llvm this has an even bigger impact. Note that it's not required to use the lock function. llvm-svn: 231276
* [PM] Remove an unused and rather expensive mapping from an analysisChandler Carruth2014-10-061-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
* [PM] Remove the (deeply misguided) 'unregister' functionality from theChandler Carruth2014-10-061-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
* [cleanup] Switch to using range-based for loops in two very obviousChandler Carruth2014-10-061-6/+4
| | | | | | places. llvm-svn: 219095
* [cleanup] Fix up trailing whitespace and formatting in the pass regitsryChandler Carruth2014-10-051-21/+21
| | | | | | code prior to hacking on it more significantly. llvm-svn: 219094
* Remove pimpl class from PassRegistry.Zachary Turner2014-06-121-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
* Don't acquire the mutex during the destructor of PassRegistry.Zachary Turner2014-06-111-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
* Use unique_ptr to manage PassInfo instances in the PassRegistryDavid Blaikie2014-04-151-8/+4
| | | | llvm-svn: 206297
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-151-1/+1
| | | | | | instead of comparing to nullptr. llvm-svn: 206252
* [C++11] More 'nullptr' conversion or in some cases just using a boolean ↵Craig Topper2014-04-091-4/+4
| | | | | | check instead of comparing to nullptr. llvm-svn: 205831
* [opt][PassInfo] Allow opt to run passes that need target machine.Quentin Colombet2014-01-161-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
* Use an RWMutex instead of a Mutex in PassRegistry.Chad Rosier2013-07-031-10/+11
| | | | | | Patch by Alex Crichton <alex@crichton.co>. Approved by Chris Lattner. llvm-svn: 185566
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-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
* Rename VMCore directory to IR.Chandler Carruth2013-01-021-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
OpenPOWER on IntegriCloud