summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Coroutines
diff options
context:
space:
mode:
authorGor Nishanov <GorNishanov@gmail.com>2017-04-08 00:49:46 +0000
committerGor Nishanov <GorNishanov@gmail.com>2017-04-08 00:49:46 +0000
commitbfb2a9db31c026f123e3cd0d0a4884caa4671ae3 (patch)
treeb1677fa5fda0f91f55283544cb8010bede55a704 /llvm/lib/Transforms/Coroutines
parenta67901299428e63fe55d67cdd61d391d7f4f2027 (diff)
downloadbcm5719-llvm-bfb2a9db31c026f123e3cd0d0a4884caa4671ae3.tar.gz
bcm5719-llvm-bfb2a9db31c026f123e3cd0d0a4884caa4671ae3.zip
[coroutines] Make CoroSplit pass deterministic
coro-split-after-phi.ll test was flaky due to non-determinism in the coroutine frame construction that was sorting the spill vector using a pointer to a def as a part of the key. The sorting was intended to make sure that spills for the same def are kept together, however, we populate the vector by processing defs in order, so the spill entires will end up together anyways. This change removes spill sorting and restores the determinism in the test. llvm-svn: 299809
Diffstat (limited to 'llvm/lib/Transforms/Coroutines')
-rw-r--r--llvm/lib/Transforms/Coroutines/CoroFrame.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
index c95291e9346..19e6789dfa7 100644
--- a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
@@ -705,7 +705,6 @@ void coro::buildCoroutineFrame(Function &F, Shape &Shape) {
Spills.emplace_back(&I, U);
// Rewrite materializable instructions to be materialized at the use point.
- std::sort(Spills.begin(), Spills.end());
DEBUG(dump("Materializations", Spills));
rewriteMaterializableInstructions(Builder, Spills);
@@ -737,7 +736,6 @@ void coro::buildCoroutineFrame(Function &F, Shape &Shape) {
Spills.emplace_back(&I, U);
}
}
- std::sort(Spills.begin(), Spills.end());
DEBUG(dump("Spills", Spills));
moveSpillUsesAfterCoroBegin(F, Spills, Shape.CoroBegin);
Shape.FrameTy = buildFrameType(F, Shape, Spills);
OpenPOWER on IntegriCloud