mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
Set up ground work to verify preserved analysis info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b97819852a
commit
9750b5d577
@ -161,6 +161,10 @@ public:
|
|||||||
///
|
///
|
||||||
virtual void releaseMemory() {}
|
virtual void releaseMemory() {}
|
||||||
|
|
||||||
|
/// verifyAnalysis() - This member can be implemented by a analysis pass to
|
||||||
|
/// check state of analysis information.
|
||||||
|
virtual void verifyAnalysis() {}
|
||||||
|
|
||||||
// dumpPassStructure - Implement the -debug-passes=PassStructure option
|
// dumpPassStructure - Implement the -debug-passes=PassStructure option
|
||||||
virtual void dumpPassStructure(unsigned Offset = 0);
|
virtual void dumpPassStructure(unsigned Offset = 0);
|
||||||
|
|
||||||
|
@ -598,11 +598,18 @@ bool PMDataManager::preserveHigherLevelAnalysis(Pass *P) {
|
|||||||
void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
|
void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
|
||||||
AnalysisUsage AnUsage;
|
AnalysisUsage AnUsage;
|
||||||
P->getAnalysisUsage(AnUsage);
|
P->getAnalysisUsage(AnUsage);
|
||||||
|
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
||||||
|
|
||||||
|
// Verify preserved analysis
|
||||||
|
for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(),
|
||||||
|
E = AvailableAnalysis.end(); I != E; ++I) {
|
||||||
|
Pass *AP = I->second;
|
||||||
|
AP->verifyAnalysis();
|
||||||
|
}
|
||||||
|
|
||||||
if (AnUsage.getPreservesAll())
|
if (AnUsage.getPreservesAll())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
|
||||||
for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(),
|
for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(),
|
||||||
E = AvailableAnalysis.end(); I != E; ) {
|
E = AvailableAnalysis.end(); I != E; ) {
|
||||||
std::map<AnalysisID, Pass*>::iterator Info = I++;
|
std::map<AnalysisID, Pass*>::iterator Info = I++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user