[llvm] r313701 - Revert "[GVNSink] Remove dependency on SmallPtrSet iteration order."
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 17:07:26 PDT 2017
Author: dannyb
Date: Tue Sep 19 17:07:25 2017
New Revision: 313701
URL: http://llvm.org/viewvc/llvm-project?rev=313701&view=rev
Log:
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 :(.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp?rev=313701&r1=313700&r2=313701&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVNSink.cpp Tue Sep 19 17:07:25 2017
@@ -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));
}
More information about the llvm-commits
mailing list