projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7ae70b
)
It's safe to sink some instructions which are not safe to speculatively
author
Dan Gohman
<gohman@apple.com>
Thu, 11 Nov 2010 16:20:28 +0000
(16:20 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 11 Nov 2010 16:20:28 +0000
(16:20 +0000)
execute. Make Sink's predicate more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118787
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/Sink.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/Sink.cpp
b/lib/Transforms/Scalar/Sink.cpp
index 1aca908267b46d55d66a15a2b79deeb3158a91b2..d6f1e93a812d02b48f4ac1ed0fc005d919682111 100644
(file)
--- a/
lib/Transforms/Scalar/Sink.cpp
+++ b/
lib/Transforms/Scalar/Sink.cpp
@@
-169,7
+169,10
@@
static bool isSafeToMove(Instruction *Inst, AliasAnalysis *AA,
return false;
}
- return Inst->isSafeToSpeculativelyExecute();
+ if (isa<TerminatorInst>(Inst) || isa<PHINode>(Inst))
+ return false;
+
+ return true;
}
/// SinkInstruction - Determine whether it is safe to sink the specified machine