mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
s/noteDownAvailableAnalysis/recordAvailableAnalysis
While recording available analysis, include interfaces implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32315 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3f5d2b58b8
commit
f32b4dd13e
@ -184,7 +184,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Augment AvailableAnalysis by adding analysis made available by pass P.
|
/// Augment AvailableAnalysis by adding analysis made available by pass P.
|
||||||
void noteDownAvailableAnalysis(Pass *P);
|
void recordAvailableAnalysis(Pass *P);
|
||||||
|
|
||||||
/// Remove Analysis that is not preserved by the pass
|
/// Remove Analysis that is not preserved by the pass
|
||||||
void removeNotPreservedAnalysis(Pass *P);
|
void removeNotPreservedAnalysis(Pass *P);
|
||||||
@ -384,17 +384,16 @@ bool PMDataManager::manageablePass(Pass *P) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Augement AvailableAnalysis by adding analysis made available by pass P.
|
/// Augement AvailableAnalysis by adding analysis made available by pass P.
|
||||||
void PMDataManager::noteDownAvailableAnalysis(Pass *P) {
|
void PMDataManager::recordAvailableAnalysis(Pass *P) {
|
||||||
|
|
||||||
if (const PassInfo *PI = P->getPassInfo()) {
|
if (const PassInfo *PI = P->getPassInfo()) {
|
||||||
AvailableAnalysis[PI] = P;
|
AvailableAnalysis[PI] = P;
|
||||||
|
|
||||||
//TODO This pass is the current implementation of all of the interfaces it
|
//This pass is the current implementation of all of the interfaces it
|
||||||
//TODO implements as well.
|
//implements as well.
|
||||||
//TODO
|
const std::vector<const PassInfo*> &II = PI->getInterfacesImplemented();
|
||||||
//TODO const std::vector<const PassInfo*> &II = PI->getInterfacesImplemented();
|
for (unsigned i = 0, e = II.size(); i != e; ++i)
|
||||||
//TODO for (unsigned i = 0, e = II.size(); i != e; ++i)
|
AvailableAnalysis[II[i]] = P;
|
||||||
//TODO CurrentAnalyses[II[i]] = P;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,7 +441,7 @@ void PMDataManager::addPassToManager (Pass *P,
|
|||||||
if (ProcessAnalysis) {
|
if (ProcessAnalysis) {
|
||||||
// Take a note of analysis required and made available by this pass
|
// Take a note of analysis required and made available by this pass
|
||||||
initializeAnalysisImpl(P);
|
initializeAnalysisImpl(P);
|
||||||
noteDownAvailableAnalysis(P);
|
recordAvailableAnalysis(P);
|
||||||
|
|
||||||
// Remove the analysis not preserved by this pass
|
// Remove the analysis not preserved by this pass
|
||||||
removeNotPreservedAnalysis(P);
|
removeNotPreservedAnalysis(P);
|
||||||
@ -506,7 +505,7 @@ BasicBlockPassManager_New::runOnFunction(Function &F) {
|
|||||||
e = passVectorEnd(); itr != e; ++itr) {
|
e = passVectorEnd(); itr != e; ++itr) {
|
||||||
Pass *P = *itr;
|
Pass *P = *itr;
|
||||||
|
|
||||||
noteDownAvailableAnalysis(P);
|
recordAvailableAnalysis(P);
|
||||||
BasicBlockPass *BP = dynamic_cast<BasicBlockPass*>(P);
|
BasicBlockPass *BP = dynamic_cast<BasicBlockPass*>(P);
|
||||||
Changed |= BP->runOnBasicBlock(*I);
|
Changed |= BP->runOnBasicBlock(*I);
|
||||||
removeNotPreservedAnalysis(P);
|
removeNotPreservedAnalysis(P);
|
||||||
@ -619,7 +618,7 @@ bool FunctionPassManagerImpl_New::runOnModule(Module &M) {
|
|||||||
e = passVectorEnd(); itr != e; ++itr) {
|
e = passVectorEnd(); itr != e; ++itr) {
|
||||||
Pass *P = *itr;
|
Pass *P = *itr;
|
||||||
|
|
||||||
noteDownAvailableAnalysis(P);
|
recordAvailableAnalysis(P);
|
||||||
FunctionPass *FP = dynamic_cast<FunctionPass*>(P);
|
FunctionPass *FP = dynamic_cast<FunctionPass*>(P);
|
||||||
Changed |= FP->runOnFunction(*I);
|
Changed |= FP->runOnFunction(*I);
|
||||||
removeNotPreservedAnalysis(P);
|
removeNotPreservedAnalysis(P);
|
||||||
@ -640,7 +639,7 @@ bool FunctionPassManagerImpl_New::runOnFunction(Function &F) {
|
|||||||
e = passVectorEnd(); itr != e; ++itr) {
|
e = passVectorEnd(); itr != e; ++itr) {
|
||||||
Pass *P = *itr;
|
Pass *P = *itr;
|
||||||
|
|
||||||
noteDownAvailableAnalysis(P);
|
recordAvailableAnalysis(P);
|
||||||
FunctionPass *FP = dynamic_cast<FunctionPass*>(P);
|
FunctionPass *FP = dynamic_cast<FunctionPass*>(P);
|
||||||
Changed |= FP->runOnFunction(F);
|
Changed |= FP->runOnFunction(F);
|
||||||
removeNotPreservedAnalysis(P);
|
removeNotPreservedAnalysis(P);
|
||||||
@ -746,7 +745,7 @@ ModulePassManager_New::runOnModule(Module &M) {
|
|||||||
e = passVectorEnd(); itr != e; ++itr) {
|
e = passVectorEnd(); itr != e; ++itr) {
|
||||||
Pass *P = *itr;
|
Pass *P = *itr;
|
||||||
|
|
||||||
noteDownAvailableAnalysis(P);
|
recordAvailableAnalysis(P);
|
||||||
ModulePass *MP = dynamic_cast<ModulePass*>(P);
|
ModulePass *MP = dynamic_cast<ModulePass*>(P);
|
||||||
Changed |= MP->runOnModule(M);
|
Changed |= MP->runOnModule(M);
|
||||||
removeNotPreservedAnalysis(P);
|
removeNotPreservedAnalysis(P);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user