summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-07-20 08:26:15 +0000
committerOwen Anderson <resistor@mac.com>2010-07-20 08:26:15 +0000
commit8be3291f5942e3ae4a5d66c480e7aabe2f771031 (patch)
treec8c82d984f9dc21c27426099f79bd412a2ff95c9 /lib
parent29e9daa75019e6ee7b3305f7ef11a2cd85b96b55 (diff)
downloadllvm-8be3291f5942e3ae4a5d66c480e7aabe2f771031.tar.gz
llvm-8be3291f5942e3ae4a5d66c480e7aabe2f771031.tar.bz2
llvm-8be3291f5942e3ae4a5d66c480e7aabe2f771031.tar.xz
Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
would cause them to fail the way they are, but none of the other intervening patches seem likely either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/AliasAnalysisCounter.cpp2
-rw-r--r--lib/Analysis/AliasDebugger.cpp2
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp4
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp2
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp2
-rw-r--r--lib/Analysis/ProfileEstimatorPass.cpp2
-rw-r--r--lib/Analysis/ProfileInfo.cpp2
-rw-r--r--lib/Analysis/ProfileInfoLoaderPass.cpp2
-rw-r--r--lib/Analysis/ScalarEvolutionAliasAnalysis.cpp2
-rw-r--r--lib/VMCore/Pass.cpp42
-rw-r--r--lib/VMCore/PassManager.cpp19
11 files changed, 39 insertions, 42 deletions
diff --git a/lib/Analysis/AliasAnalysisCounter.cpp b/lib/Analysis/AliasAnalysisCounter.cpp
index 7d90860448..1053955ea2 100644
--- a/lib/Analysis/AliasAnalysisCounter.cpp
+++ b/lib/Analysis/AliasAnalysisCounter.cpp
@@ -87,7 +87,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&AliasAnalysis::ID))
return (AliasAnalysis*)this;
return this;
diff --git a/lib/Analysis/AliasDebugger.cpp b/lib/Analysis/AliasDebugger.cpp
index 578bc68bd3..bc2d9c55d1 100644
--- a/lib/Analysis/AliasDebugger.cpp
+++ b/lib/Analysis/AliasDebugger.cpp
@@ -83,7 +83,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&AliasAnalysis::ID))
return (AliasAnalysis*)this;
return this;
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index 91a17e5106..4f53a6d625 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -172,7 +172,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it should
/// override this to adjust the this pointer as needed for the specified pass
/// info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&AliasAnalysis::ID))
return (AliasAnalysis*)this;
return this;
@@ -243,7 +243,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it should
/// override this to adjust the this pointer as needed for the specified pass
/// info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&AliasAnalysis::ID))
return (AliasAnalysis*)this;
return this;
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index fc0d33d5dc..65c7c6efd8 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -86,7 +86,7 @@ public:
/// an analysis interface through multiple inheritance. If needed, it should
/// override this to adjust the this pointer as needed for the specified pass
/// info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&CallGraph::ID))
return (CallGraph*)this;
return this;
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index 7e328ef85e..f13deea41d 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -149,7 +149,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&AliasAnalysis::ID))
return (AliasAnalysis*)this;
return this;
diff --git a/lib/Analysis/ProfileEstimatorPass.cpp b/lib/Analysis/ProfileEstimatorPass.cpp
index a06d0fc8b3..da4ce47692 100644
--- a/lib/Analysis/ProfileEstimatorPass.cpp
+++ b/lib/Analysis/ProfileEstimatorPass.cpp
@@ -59,7 +59,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&ProfileInfo::ID))
return (ProfileInfo*)this;
return this;
diff --git a/lib/Analysis/ProfileInfo.cpp b/lib/Analysis/ProfileInfo.cpp
index d08ecf72b3..8d2712fd6e 100644
--- a/lib/Analysis/ProfileInfo.cpp
+++ b/lib/Analysis/ProfileInfo.cpp
@@ -1082,7 +1082,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&ProfileInfo::ID))
return (ProfileInfo*)this;
return this;
diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp
index 90f40406a6..8ea4ecf54f 100644
--- a/lib/Analysis/ProfileInfoLoaderPass.cpp
+++ b/lib/Analysis/ProfileInfoLoaderPass.cpp
@@ -67,7 +67,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&ProfileInfo::ID))
return (ProfileInfo*)this;
return this;
diff --git a/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp b/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
index 11885b2b1a..58711b8be5 100644
--- a/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
+++ b/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
@@ -40,7 +40,7 @@ namespace {
/// an analysis interface through multiple inheritance. If needed, it
/// should override this to adjust the this pointer as needed for the
/// specified pass info.
- virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *PI) {
+ virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) {
if (PI->isPassID(&AliasAnalysis::ID))
return (AliasAnalysis*)this;
return this;
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp
index f78e85596b..efd98af0f4 100644
--- a/lib/VMCore/Pass.cpp
+++ b/lib/VMCore/Pass.cpp
@@ -75,7 +75,7 @@ void Pass::dumpPassStructure(unsigned Offset) {
/// Registration templates, but can be overloaded directly.
///
const char *Pass::getPassName() const {
- if (const StaticPassInfo *PI = getPassInfo())
+ if (const PassInfo *PI = getPassInfo())
return PI->getPassName();
return "Unnamed pass: implement Pass::getPassName()";
}
@@ -101,7 +101,7 @@ void Pass::verifyAnalysis() const {
// By default, don't do anything.
}
-void *Pass::getAdjustedAnalysisPointer(const StaticPassInfo *) {
+void *Pass::getAdjustedAnalysisPointer(const PassInfo *) {
return this;
}
@@ -243,35 +243,35 @@ class PassRegistrar {
/// PassInfoMap - Keep track of the passinfo object for each registered llvm
/// pass.
- typedef std::map<intptr_t, const StaticPassInfo*> MapType;
+ typedef std::map<intptr_t, const PassInfo*> MapType;
MapType PassInfoMap;
- typedef StringMap<const StaticPassInfo*> StringMapType;
+ typedef StringMap<const PassInfo*> StringMapType;
StringMapType PassInfoStringMap;
/// AnalysisGroupInfo - Keep track of information for each analysis group.
struct AnalysisGroupInfo {
- std::set<const StaticPassInfo *> Implementations;
+ std::set<const PassInfo *> Implementations;
};
/// AnalysisGroupInfoMap - Information for each analysis group.
- std::map<const StaticPassInfo *, AnalysisGroupInfo> AnalysisGroupInfoMap;
+ std::map<const PassInfo *, AnalysisGroupInfo> AnalysisGroupInfoMap;
public:
- const StaticPassInfo *GetPassInfo(intptr_t TI) const {
+ const PassInfo *GetPassInfo(intptr_t TI) const {
sys::SmartScopedLock<true> Guard(Lock);
MapType::const_iterator I = PassInfoMap.find(TI);
return I != PassInfoMap.end() ? I->second : 0;
}
- const StaticPassInfo *GetPassInfo(StringRef Arg) const {
+ const PassInfo *GetPassInfo(StringRef Arg) const {
sys::SmartScopedLock<true> Guard(Lock);
StringMapType::const_iterator I = PassInfoStringMap.find(Arg);
return I != PassInfoStringMap.end() ? I->second : 0;
}
- void RegisterPass(const StaticPassInfo &PI) {
+ void RegisterPass(const PassInfo &PI) {
sys::SmartScopedLock<true> Guard(Lock);
bool Inserted =
PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second;
@@ -279,7 +279,7 @@ public:
PassInfoStringMap[PI.getPassArgument()] = &PI;
}
- void UnregisterPass(const StaticPassInfo &PI) {
+ void UnregisterPass(const PassInfo &PI) {
sys::SmartScopedLock<true> Guard(Lock);
MapType::iterator I = PassInfoMap.find(PI.getTypeInfo());
assert(I != PassInfoMap.end() && "Pass registered but not in map!");
@@ -298,8 +298,8 @@ public:
/// Analysis Group Mechanisms.
- void RegisterAnalysisGroup(StaticPassInfo *InterfaceInfo,
- const StaticPassInfo *ImplementationInfo,
+ void RegisterAnalysisGroup(PassInfo *InterfaceInfo,
+ const PassInfo *ImplementationInfo,
bool isDefault) {
sys::SmartScopedLock<true> Guard(Lock);
AnalysisGroupInfo &AGI = AnalysisGroupInfoMap[InterfaceInfo];
@@ -363,15 +363,15 @@ ManagedCleanup<&cleanupPassRegistrar> registrarCleanup ATTRIBUTE_USED;
// getPassInfo - Return the PassInfo data structure that corresponds to this
// pass...
-const StaticPassInfo *Pass::getPassInfo() const {
+const PassInfo *Pass::getPassInfo() const {
return lookupPassInfo(PassID);
}
-const StaticPassInfo *Pass::lookupPassInfo(intptr_t TI) {
+const PassInfo *Pass::lookupPassInfo(intptr_t TI) {
return getPassRegistrar()->GetPassInfo(TI);
}
-const StaticPassInfo *Pass::lookupPassInfo(StringRef Arg) {
+const PassInfo *Pass::lookupPassInfo(StringRef Arg) {
return getPassRegistrar()->GetPassInfo(Arg);
}
@@ -390,7 +390,7 @@ void PassInfo::unregisterPass() {
getPassRegistrar()->UnregisterPass(*this);
}
-Pass *StaticPassInfo::createPass() const {
+Pass *PassInfo::createPass() const {
assert((!isAnalysisGroup() || NormalCtor) &&
"No default implementation found for analysis group!");
assert(NormalCtor &&
@@ -408,8 +408,8 @@ RegisterAGBase::RegisterAGBase(const char *Name, intptr_t InterfaceID,
intptr_t PassID, bool isDefault)
: PassInfo(Name, InterfaceID) {
- StaticPassInfo *InterfaceInfo =
- const_cast<StaticPassInfo*>(Pass::lookupPassInfo(InterfaceID));
+ PassInfo *InterfaceInfo =
+ const_cast<PassInfo*>(Pass::lookupPassInfo(InterfaceID));
if (InterfaceInfo == 0) {
// First reference to Interface, register it now.
registerPass();
@@ -419,13 +419,13 @@ RegisterAGBase::RegisterAGBase(const char *Name, intptr_t InterfaceID,
"Trying to join an analysis group that is a normal pass!");
if (PassID) {
- const StaticPassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID);
+ const PassInfo *ImplementationInfo = Pass::lookupPassInfo(PassID);
assert(ImplementationInfo &&
"Must register pass before adding to AnalysisGroup!");
// Make sure we keep track of the fact that the implementation implements
// the interface.
- StaticPassInfo *IIPI = const_cast<StaticPassInfo*>(ImplementationInfo);
+ PassInfo *IIPI = const_cast<PassInfo*>(ImplementationInfo);
IIPI->addInterfaceImplemented(InterfaceInfo);
getPassRegistrar()->RegisterAnalysisGroup(InterfaceInfo, IIPI, isDefault);
@@ -479,7 +479,7 @@ namespace {
VectorType &CFGOnlyList;
GetCFGOnlyPasses(VectorType &L) : CFGOnlyList(L) {}
- void passEnumerate(const StaticPassInfo *P) {
+ void passEnumerate(const PassInfo *P) {
if (P->isCFGOnlyPass())
CFGOnlyList.push_back(P);
}
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index 9e0be3b968..4cf5501379 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -332,8 +332,7 @@ public:
/// Return function pass corresponding to PassInfo PI, that is
/// required by module pass MP. Instantiate analysis pass, by using
/// its runOnFunction() for function F.
- virtual Pass* getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI,
- Function &F);
+ virtual Pass* getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F);
virtual const char *getPassName() const {
return "Module Pass Manager";
@@ -633,7 +632,7 @@ Pass *PMTopLevelManager::findAnalysisPass(AnalysisID AID) {
for (SmallVector<ImmutablePass *, 8>::iterator I = ImmutablePasses.begin(),
E = ImmutablePasses.end(); P == NULL && I != E; ++I) {
- const StaticPassInfo *PI = (*I)->getPassInfo();
+ const PassInfo *PI = (*I)->getPassInfo();
if (PI == AID)
P = *I;
@@ -729,7 +728,7 @@ PMTopLevelManager::~PMTopLevelManager() {
/// Augement AvailableAnalysis by adding analysis made available by pass P.
void PMDataManager::recordAvailableAnalysis(Pass *P) {
- const StaticPassInfo *PI = P->getPassInfo();
+ const PassInfo *PI = P->getPassInfo();
if (PI == 0) return;
AvailableAnalysis[PI] = P;
@@ -868,7 +867,7 @@ void PMDataManager::freePass(Pass *P, StringRef Msg,
P->releaseMemory();
}
- if (const StaticPassInfo *PI = P->getPassInfo()) {
+ if (const PassInfo *PI = P->getPassInfo()) {
// Remove the pass itself (if it is not already removed).
AvailableAnalysis.erase(PI);
@@ -1052,7 +1051,7 @@ void PMDataManager::dumpPassArguments() const {
if (PMDataManager *PMD = (*I)->getAsPMDataManager())
PMD->dumpPassArguments();
else
- if (const StaticPassInfo *PI = (*I)->getPassInfo())
+ if (const PassInfo *PI = (*I)->getPassInfo())
if (!PI->isAnalysisGroup())
dbgs() << " -" << PI->getPassArgument();
}
@@ -1155,8 +1154,7 @@ void PMDataManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) {
llvm_unreachable("Unable to schedule pass");
}
-Pass *PMDataManager::getOnTheFlyPass(Pass *P, const StaticPassInfo *PI,
- Function &F) {
+Pass *PMDataManager::getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) {
assert(0 && "Unable to find on the fly pass");
return NULL;
}
@@ -1175,7 +1173,7 @@ Pass *AnalysisResolver::getAnalysisIfAvailable(AnalysisID ID, bool dir) const {
return PM.findAnalysisPass(ID, dir);
}
-Pass *AnalysisResolver::findImplPass(Pass *P, const StaticPassInfo *AnalysisPI,
+Pass *AnalysisResolver::findImplPass(Pass *P, const PassInfo *AnalysisPI,
Function &F) {
return PM.getOnTheFlyPass(P, AnalysisPI, F);
}
@@ -1570,8 +1568,7 @@ void MPPassManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) {
/// Return function pass corresponding to PassInfo PI, that is
/// required by module pass MP. Instantiate analysis pass, by using
/// its runOnFunction() for function F.
-Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const StaticPassInfo *PI,
- Function &F){
+Pass* MPPassManager::getOnTheFlyPass(Pass *MP, const PassInfo *PI, Function &F){
FunctionPassManagerImpl *FPP = OnTheFlyManagers[MP];
assert(FPP && "Unable to find on the fly pass");