1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

Revert "[GVNSink] Remove dependency on SmallPtrSet iteration order."

This reverts commit r312156, because now the op and block arrays are not in the same order :(.

llvm-svn: 313701
This commit is contained in:
Daniel Berlin 2017-09-20 00:07:25 +00:00
parent f1e316ecf3
commit 4f04848c69

View File

@ -229,14 +229,12 @@ public:
ModelledPHI(const VArray &V, const BArray &B) {
std::copy(V.begin(), V.end(), std::back_inserter(Values));
std::copy(B.begin(), B.end(), std::back_inserter(Blocks));
std::sort(Blocks.begin(), Blocks.end());
}
/// Create a PHI from [I[OpNum] for I in Insts].
template <typename BArray>
ModelledPHI(ArrayRef<Instruction *> Insts, unsigned OpNum, const BArray &B) {
std::copy(B.begin(), B.end(), std::back_inserter(Blocks));
std::sort(Blocks.begin(), Blocks.end());
for (auto *I : Insts)
Values.push_back(I->getOperand(OpNum));
}