[PATCH] D39630: [PredicateInfo] Stable sort ValueDFS to remove non-deterministic ordering
Mandeep Singh Grang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 4 11:47:39 PDT 2017
mgrang created this revision.
This fixes failure in Transforms/Util/PredicateInfo/testandor.ll uncovered by https://reviews.llvm.org/D39245.
Repository:
rL LLVM
https://reviews.llvm.org/D39630
Files:
lib/Transforms/Utils/PredicateInfo.cpp
Index: lib/Transforms/Utils/PredicateInfo.cpp
===================================================================
--- lib/Transforms/Utils/PredicateInfo.cpp
+++ lib/Transforms/Utils/PredicateInfo.cpp
@@ -611,7 +611,7 @@
}
convertUsesToDFSOrdered(Op, OrderedUses);
- llvm::sort(OrderedUses.begin(), OrderedUses.end(), Compare);
+ std::stable_sort(OrderedUses.begin(), OrderedUses.end(), Compare);
SmallVector<ValueDFS, 8> RenameStack;
// For each use, sorted into dfs order, push values and replaces uses with
// top of stack, which will represent the reaching def.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39630.121596.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171104/6562111a/attachment.bin>
More information about the llvm-commits
mailing list