diff options
author | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-03-26 18:08:26 +0000 |
---|---|---|
committer | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-03-26 18:08:26 +0000 |
commit | 1b9ff45157193d544d91c680701c9c3f00d786e5 (patch) | |
tree | c9916451cd0eb5de3ac2fd8b92ae43a08da84be2 /llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp | |
parent | 8252892951123b0c54ce2aa71b3a6fd48bf2cfb1 (diff) | |
download | bcm5719-llvm-1b9ff45157193d544d91c680701c9c3f00d786e5.tar.gz bcm5719-llvm-1b9ff45157193d544d91c680701c9c3f00d786e5.zip |
[XCore] Change std::sort to llvm::sort in response to r327219
Summary:
r327219 added wrappers to std::sort which randomly shuffle the container before sorting.
This will help in uncovering non-determinism caused due to undefined sorting
order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort.
Refer the comments section in D44363 for a list of all the required patches.
Reviewers: dblaikie, RKSimon, robertlytton
Reviewed By: robertlytton
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44875
llvm-svn: 328564
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp')
-rw-r--r-- | llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp index 87532d11ede..666b3870fb8 100644 --- a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp +++ b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp @@ -129,7 +129,7 @@ createReplacementInstr(ConstantExpr *CE, Instruction *Instr) { static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { do { SmallVector<WeakTrackingVH, 8> WUsers(CE->user_begin(), CE->user_end()); - std::sort(WUsers.begin(), WUsers.end()); + llvm::sort(WUsers.begin(), WUsers.end()); WUsers.erase(std::unique(WUsers.begin(), WUsers.end()), WUsers.end()); while (!WUsers.empty()) if (WeakTrackingVH WU = WUsers.pop_back_val()) { |