mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Introduce PassManagerAnalysisHelper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31522 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b30803bc17
commit
889739c4d1
@ -88,6 +88,36 @@ public:
|
|||||||
bool doFinalization();
|
bool doFinalization();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// PassManagerAnalysisHelper helpes pass manager analysis required by
|
||||||
|
/// the managed passes.
|
||||||
|
class PassManagerAnalysisHelper {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/// Return TRUE IFF pass P's required analysis set does not required new
|
||||||
|
/// manager.
|
||||||
|
bool manageablePass(Pass *P);
|
||||||
|
|
||||||
|
/// Return TRUE iff AnalysisID AID is currently available.
|
||||||
|
bool analysisCurrentlyAvailable(AnalysisID AID);
|
||||||
|
|
||||||
|
/// Augment RequiredSet by adding analysis required by pass P.
|
||||||
|
void noteDownRequiredAnalysis(Pass *P);
|
||||||
|
|
||||||
|
/// Remove AnalysisID from the RequiredSet
|
||||||
|
void removeAnalysis(AnalysisID AID);
|
||||||
|
|
||||||
|
/// Remove Analysis that is not preserved by the pass
|
||||||
|
void removeNotPreservedAnalysis(Pass *P);
|
||||||
|
|
||||||
|
/// Remove dead passes
|
||||||
|
void removeDeadPasses() { /* TODO : Implement */ }
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Required set of analysis for the passes managed by this manager
|
||||||
|
std::vector<AnalysisID> RequiredSet;
|
||||||
|
};
|
||||||
|
|
||||||
/// BasicBlockpassManager_New manages BasicBlockPass. It batches all the
|
/// BasicBlockpassManager_New manages BasicBlockPass. It batches all the
|
||||||
/// pass together and sequence them to process one basic block before
|
/// pass together and sequence them to process one basic block before
|
||||||
/// processing next basic block.
|
/// processing next basic block.
|
||||||
|
@ -18,6 +18,46 @@
|
|||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
// PassManagerAnalysisHelper implementation
|
||||||
|
|
||||||
|
/// Return TRUE IFF pass P's required analysis set does not required new
|
||||||
|
/// manager.
|
||||||
|
bool PassManagerAnalysisHelper::manageablePass(Pass *P) {
|
||||||
|
|
||||||
|
AnalysisUsage AnUsage;
|
||||||
|
P->getAnalysisUsage(AnUsage);
|
||||||
|
|
||||||
|
// If this pass is not preserving information that is required by the other passes
|
||||||
|
// managed by this manager then use new manager
|
||||||
|
// TODO
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return TRUE iff AnalysisID AID is currently available.
|
||||||
|
bool PassManagerAnalysisHelper::analysisCurrentlyAvailable(AnalysisID AID) {
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Augment RequiredSet by adding analysis required by pass P.
|
||||||
|
void PassManagerAnalysisHelper::noteDownRequiredAnalysis(Pass *P) {
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Remove AnalysisID from the RequiredSet
|
||||||
|
void PassManagerAnalysisHelper::removeAnalysis(AnalysisID AID) {
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Remove Analyss not preserved by Pass P
|
||||||
|
void PassManagerAnalysisHelper::removeNotPreservedAnalysis(Pass *P) {
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
/// BasicBlockPassManager implementation
|
/// BasicBlockPassManager implementation
|
||||||
|
|
||||||
/// Add pass P into PassVector and return TRUE. If this pass is not
|
/// Add pass P into PassVector and return TRUE. If this pass is not
|
||||||
|
Loading…
x
Reference in New Issue
Block a user