1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[MemorySSA] Verify Phi incoming blocks are block predecessors.

Summary: Make the MemorySSA verify also check that all Phi incoming blocks are block predecessors.

Reviewers: george.burgess.iv

Subscribers: sanjoy, jlebar, Prazek, llvm-commits

Differential Revision: https://reviews.llvm.org/D48333

llvm-svn: 335174
This commit is contained in:
Alina Sbirlea 2018-06-20 21:06:13 +00:00
parent 9533769289
commit 8c71322022

View File

@ -1746,8 +1746,12 @@ void MemorySSA::verifyDefUses(Function &F) const {
assert(Phi->getNumOperands() == static_cast<unsigned>(std::distance(
pred_begin(&B), pred_end(&B))) &&
"Incomplete MemoryPhi Node");
for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I)
for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I) {
verifyUseInDefs(Phi->getIncomingValue(I), Phi);
assert(find(predecessors(&B), Phi->getIncomingBlock(I)) !=
pred_end(&B) &&
"Incoming phi block not a block predecessor");
}
}
for (Instruction &I : B) {