mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-02 17:09:05 +00:00
Add verification that deleted instruction isn't hiding in the PHI map.
llvm-svn: 61350
This commit is contained in:
parent
ac1c0d7f13
commit
e42e5a263b
@ -1581,6 +1581,7 @@ bool GVN::performPRE(Function& F) {
|
||||
// are not value numbered precisely.
|
||||
if (!success) {
|
||||
delete PREInstr;
|
||||
DEBUG(verifyRemoved(PREInstr));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1659,4 +1660,16 @@ void GVN::cleanupGlobalSets() {
|
||||
/// internal data structures.
|
||||
void GVN::verifyRemoved(const Instruction *I) const {
|
||||
VN.verifyRemoved(I);
|
||||
|
||||
// Walk through the PHI map to make sure the instruction isn't hiding in there
|
||||
// somewhere.
|
||||
for (PhiMapType::iterator
|
||||
II = phiMap.begin(), IE = phiMap.end(); II != IE; ++II) {
|
||||
assert(II->first != I && "Inst is still a key in PHI map!");
|
||||
|
||||
for (SmallPtrSet<Instruction*, 4>::iterator
|
||||
SI = II->second.begin(), SE = II->second.end(); SI != SE; ++SI) {
|
||||
assert(*SI != I && "Inst is still a value in PHI map!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user