mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Use SmallVectorImpl in a bunch of places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b2b9b768ef
commit
ebb1834e86
@ -184,10 +184,10 @@ public:
|
||||
void schedulePass(Pass *P);
|
||||
|
||||
/// Set pass P as the last user of the given analysis passes.
|
||||
void setLastUser(SmallVector<Pass *, 12> &AnalysisPasses, Pass *P);
|
||||
void setLastUser(SmallVectorImpl<Pass *> &AnalysisPasses, Pass *P);
|
||||
|
||||
/// Collect passes whose last user is P
|
||||
void collectLastUses(SmallVector<Pass *, 12> &LastUses, Pass *P);
|
||||
void collectLastUses(SmallVectorImpl<Pass *> &LastUses, Pass *P);
|
||||
|
||||
/// Find the pass that implements Analysis AID. Search immutable
|
||||
/// passes and all pass managers. If desired pass is not found
|
||||
@ -205,7 +205,7 @@ public:
|
||||
ImmutablePasses.push_back(P);
|
||||
}
|
||||
|
||||
inline SmallVector<ImmutablePass *, 8>& getImmutablePasses() {
|
||||
inline SmallVectorImpl<ImmutablePass *>& getImmutablePasses() {
|
||||
return ImmutablePasses;
|
||||
}
|
||||
|
||||
@ -313,8 +313,8 @@ public:
|
||||
/// Populate RequiredPasses with analysis pass that are required by
|
||||
/// pass P and are available. Populate ReqPassNotAvailable with analysis
|
||||
/// pass that are required by pass P but are not available.
|
||||
void collectRequiredAnalysis(SmallVector<Pass *, 8> &RequiredPasses,
|
||||
SmallVector<AnalysisID, 8> &ReqPassNotAvailable,
|
||||
void collectRequiredAnalysis(SmallVectorImpl<Pass *> &RequiredPasses,
|
||||
SmallVectorImpl<AnalysisID> &ReqPassNotAvailable,
|
||||
Pass *P);
|
||||
|
||||
/// All Required analyses should be available to the pass as it runs! Here
|
||||
|
@ -497,9 +497,9 @@ PMTopLevelManager::PMTopLevelManager(PMDataManager *PMDM) {
|
||||
}
|
||||
|
||||
/// Set pass P as the last user of the given analysis passes.
|
||||
void PMTopLevelManager::setLastUser(SmallVector<Pass *, 12> &AnalysisPasses,
|
||||
void PMTopLevelManager::setLastUser(SmallVectorImpl<Pass *> &AnalysisPasses,
|
||||
Pass *P) {
|
||||
for (SmallVector<Pass *, 12>::iterator I = AnalysisPasses.begin(),
|
||||
for (SmallVectorImpl<Pass *>::iterator I = AnalysisPasses.begin(),
|
||||
E = AnalysisPasses.end(); I != E; ++I) {
|
||||
Pass *AP = *I;
|
||||
LastUser[AP] = P;
|
||||
@ -520,7 +520,7 @@ void PMTopLevelManager::setLastUser(SmallVector<Pass *, 12> &AnalysisPasses,
|
||||
}
|
||||
|
||||
/// Collect passes whose last user is P
|
||||
void PMTopLevelManager::collectLastUses(SmallVector<Pass *, 12> &LastUses,
|
||||
void PMTopLevelManager::collectLastUses(SmallVectorImpl<Pass *> &LastUses,
|
||||
Pass *P) {
|
||||
DenseMap<Pass *, SmallPtrSet<Pass *, 8> >::iterator DMI =
|
||||
InversedLastUser.find(P);
|
||||
@ -613,7 +613,7 @@ void PMTopLevelManager::schedulePass(Pass *P) {
|
||||
Pass *PMTopLevelManager::findAnalysisPass(AnalysisID AID) {
|
||||
|
||||
// Check pass managers
|
||||
for (SmallVector<PMDataManager *, 8>::iterator I = PassManagers.begin(),
|
||||
for (SmallVectorImpl<PMDataManager *>::iterator I = PassManagers.begin(),
|
||||
E = PassManagers.end(); I != E; ++I)
|
||||
if (Pass *P = (*I)->findAnalysisPass(AID, false))
|
||||
return P;
|
||||
@ -964,8 +964,8 @@ void PMDataManager::add(Pass *P, bool ProcessAnalysis) {
|
||||
/// Populate RP with analysis pass that are required by
|
||||
/// pass P and are available. Populate RP_NotAvail with analysis
|
||||
/// pass that are required by pass P but are not available.
|
||||
void PMDataManager::collectRequiredAnalysis(SmallVector<Pass *, 8>&RP,
|
||||
SmallVector<AnalysisID, 8> &RP_NotAvail,
|
||||
void PMDataManager::collectRequiredAnalysis(SmallVectorImpl<Pass *> &RP,
|
||||
SmallVectorImpl<AnalysisID> &RP_NotAvail,
|
||||
Pass *P) {
|
||||
AnalysisUsage *AnUsage = TPM->findAnalysisUsage(P);
|
||||
const AnalysisUsage::VectorType &RequiredSet = AnUsage->getRequiredSet();
|
||||
@ -1037,7 +1037,7 @@ void PMDataManager::dumpLastUses(Pass *P, unsigned Offset) const{
|
||||
|
||||
TPM->collectLastUses(LUses, P);
|
||||
|
||||
for (SmallVector<Pass *, 12>::iterator I = LUses.begin(),
|
||||
for (SmallVectorImpl<Pass *>::iterator I = LUses.begin(),
|
||||
E = LUses.end(); I != E; ++I) {
|
||||
llvm::dbgs() << "--" << std::string(Offset*2, ' ');
|
||||
(*I)->dumpPassStructure(0);
|
||||
@ -1045,7 +1045,7 @@ void PMDataManager::dumpLastUses(Pass *P, unsigned Offset) const{
|
||||
}
|
||||
|
||||
void PMDataManager::dumpPassArguments() const {
|
||||
for (SmallVector<Pass *, 8>::const_iterator I = PassVector.begin(),
|
||||
for (SmallVectorImpl<Pass *>::const_iterator I = PassVector.begin(),
|
||||
E = PassVector.end(); I != E; ++I) {
|
||||
if (PMDataManager *PMD = (*I)->getAsPMDataManager())
|
||||
PMD->dumpPassArguments();
|
||||
@ -1162,7 +1162,7 @@ Pass *PMDataManager::getOnTheFlyPass(Pass *P, AnalysisID PI, Function &F) {
|
||||
|
||||
// Destructor
|
||||
PMDataManager::~PMDataManager() {
|
||||
for (SmallVector<Pass *, 8>::iterator I = PassVector.begin(),
|
||||
for (SmallVectorImpl<Pass *>::iterator I = PassVector.begin(),
|
||||
E = PassVector.end(); I != E; ++I)
|
||||
delete *I;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user