mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
move MemoryDependenceAnalysis::verifyRemoved to the end of the file,
no functionality/code change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60254 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
86b29ef64a
commit
729b23758a
@ -37,38 +37,6 @@ char MemoryDependenceAnalysis::ID = 0;
|
|||||||
static RegisterPass<MemoryDependenceAnalysis> X("memdep",
|
static RegisterPass<MemoryDependenceAnalysis> X("memdep",
|
||||||
"Memory Dependence Analysis", false, true);
|
"Memory Dependence Analysis", false, true);
|
||||||
|
|
||||||
/// verifyRemoved - Verify that the specified instruction does not occur
|
|
||||||
/// in our internal data structures.
|
|
||||||
void MemoryDependenceAnalysis::verifyRemoved(Instruction *D) const {
|
|
||||||
for (LocalDepMapType::const_iterator I = LocalDeps.begin(),
|
|
||||||
E = LocalDeps.end(); I != E; ++I) {
|
|
||||||
assert(I->first != D && "Inst occurs in data structures");
|
|
||||||
assert(I->second.getPointer() != D &&
|
|
||||||
"Inst occurs in data structures");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (NonLocalDepMapType::const_iterator I = NonLocalDeps.begin(),
|
|
||||||
E = NonLocalDeps.end(); I != E; ++I) {
|
|
||||||
assert(I->first != D && "Inst occurs in data structures");
|
|
||||||
for (DenseMap<BasicBlock*, DepResultTy>::iterator II = I->second.begin(),
|
|
||||||
EE = I->second.end(); II != EE; ++II)
|
|
||||||
assert(II->second.getPointer() != D && "Inst occurs in data structures");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ReverseDepMapType::const_iterator I = ReverseLocalDeps.begin(),
|
|
||||||
E = ReverseLocalDeps.end(); I != E; ++I)
|
|
||||||
for (SmallPtrSet<Instruction*, 4>::const_iterator II = I->second.begin(),
|
|
||||||
EE = I->second.end(); II != EE; ++II)
|
|
||||||
assert(*II != D && "Inst occurs in data structures");
|
|
||||||
|
|
||||||
for (ReverseDepMapType::const_iterator I = ReverseNonLocalDeps.begin(),
|
|
||||||
E = ReverseNonLocalDeps.end();
|
|
||||||
I != E; ++I)
|
|
||||||
for (SmallPtrSet<Instruction*, 4>::const_iterator II = I->second.begin(),
|
|
||||||
EE = I->second.end(); II != EE; ++II)
|
|
||||||
assert(*II != D && "Inst occurs in data structures");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// getAnalysisUsage - Does not modify anything. It uses Alias Analysis.
|
/// getAnalysisUsage - Does not modify anything. It uses Alias Analysis.
|
||||||
///
|
///
|
||||||
void MemoryDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
|
void MemoryDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
@ -484,3 +452,35 @@ void MemoryDependenceAnalysis::removeInstruction(Instruction *RemInst) {
|
|||||||
|
|
||||||
DEBUG(verifyRemoved(RemInst));
|
DEBUG(verifyRemoved(RemInst));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// verifyRemoved - Verify that the specified instruction does not occur
|
||||||
|
/// in our internal data structures.
|
||||||
|
void MemoryDependenceAnalysis::verifyRemoved(Instruction *D) const {
|
||||||
|
for (LocalDepMapType::const_iterator I = LocalDeps.begin(),
|
||||||
|
E = LocalDeps.end(); I != E; ++I) {
|
||||||
|
assert(I->first != D && "Inst occurs in data structures");
|
||||||
|
assert(I->second.getPointer() != D &&
|
||||||
|
"Inst occurs in data structures");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (NonLocalDepMapType::const_iterator I = NonLocalDeps.begin(),
|
||||||
|
E = NonLocalDeps.end(); I != E; ++I) {
|
||||||
|
assert(I->first != D && "Inst occurs in data structures");
|
||||||
|
for (DenseMap<BasicBlock*, DepResultTy>::iterator II = I->second.begin(),
|
||||||
|
EE = I->second.end(); II != EE; ++II)
|
||||||
|
assert(II->second.getPointer() != D && "Inst occurs in data structures");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ReverseDepMapType::const_iterator I = ReverseLocalDeps.begin(),
|
||||||
|
E = ReverseLocalDeps.end(); I != E; ++I)
|
||||||
|
for (SmallPtrSet<Instruction*, 4>::const_iterator II = I->second.begin(),
|
||||||
|
EE = I->second.end(); II != EE; ++II)
|
||||||
|
assert(*II != D && "Inst occurs in data structures");
|
||||||
|
|
||||||
|
for (ReverseDepMapType::const_iterator I = ReverseNonLocalDeps.begin(),
|
||||||
|
E = ReverseNonLocalDeps.end();
|
||||||
|
I != E; ++I)
|
||||||
|
for (SmallPtrSet<Instruction*, 4>::const_iterator II = I->second.begin(),
|
||||||
|
EE = I->second.end(); II != EE; ++II)
|
||||||
|
assert(*II != D && "Inst occurs in data structures");
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user