aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/PassRegistry.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
commit5ca98fd98791947eba83a1ed3f2c8191ef7afa6c (patch)
treef5944309621cee4fe0976be6f9ac619b7ebfc4c2 /include/llvm/PassRegistry.h
parent68bcb7db193e4bc81430063148253d30a791023e (diff)
downloadsrc-5ca98fd98791947eba83a1ed3f2c8191ef7afa6c.tar.gz
src-5ca98fd98791947eba83a1ed3f2c8191ef7afa6c.zip
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):vendor/llvm/llvm-release_350-r216957
Notes
Notes: svn path=/vendor/llvm/dist/; revision=274955 svn path=/vendor/llvm/llvm-release_35-r216957/; revision=274956; tag=vendor/llvm/llvm-release_350-r216957
Diffstat (limited to 'include/llvm/PassRegistry.h')
-rw-r--r--include/llvm/PassRegistry.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/include/llvm/PassRegistry.h b/include/llvm/PassRegistry.h
index f49c953e44f2..1558c51bde48 100644
--- a/include/llvm/PassRegistry.h
+++ b/include/llvm/PassRegistry.h
@@ -17,9 +17,15 @@
#ifndef LLVM_PASSREGISTRY_H
#define LLVM_PASSREGISTRY_H
+#include "llvm-c/Core.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/PassInfo.h"
#include "llvm/Support/CBindingWrapping.h"
-#include "llvm-c/Core.h"
+#include "llvm/Support/RWMutex.h"
+#include <vector>
namespace llvm {
@@ -33,11 +39,26 @@ struct PassRegistrationListener;
/// threads simultaneously, you will need to use a separate PassRegistry on
/// each thread.
class PassRegistry {
- mutable void *pImpl;
- void *getImpl() const;
+ mutable sys::SmartRWMutex<true> Lock;
+
+ /// PassInfoMap - Keep track of the PassInfo object for each registered pass.
+ typedef DenseMap<const void*, const PassInfo*> MapType;
+ MapType PassInfoMap;
+
+ typedef StringMap<const PassInfo*> StringMapType;
+ StringMapType PassInfoStringMap;
+
+ /// AnalysisGroupInfo - Keep track of information for each analysis group.
+ struct AnalysisGroupInfo {
+ SmallPtrSet<const PassInfo *, 8> Implementations;
+ };
+ DenseMap<const PassInfo*, AnalysisGroupInfo> AnalysisGroupInfoMap;
+
+ std::vector<std::unique_ptr<const PassInfo>> ToFree;
+ std::vector<PassRegistrationListener*> Listeners;
public:
- PassRegistry() : pImpl(0) { }
+ PassRegistry() { }
~PassRegistry();
/// getPassRegistry - Access the global registry object, which is