aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-05 02:33:22 +0000
committerChris Lattner <sabre@nondot.org>2008-01-05 02:33:22 +0000
commitf2706d8ef3459a99d2516d3e98185435b37fe679 (patch)
tree9155a8d29929ca885a63f5c8aa149931d0e9ef98 /lib/CodeGen
parentaf74325e5c7e4c8f473265247e97d152cec501b3 (diff)
downloadexternal_llvm-f2706d8ef3459a99d2516d3e98185435b37fe679.zip
external_llvm-f2706d8ef3459a99d2516d3e98185435b37fe679.tar.gz
external_llvm-f2706d8ef3459a99d2516d3e98185435b37fe679.tar.bz2
don't sink anything with side effects, this makes lots of stuff work, but sinks almost nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineSink.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineSink.cpp b/lib/CodeGen/MachineSink.cpp
index dff60f6..31aeea5 100644
--- a/lib/CodeGen/MachineSink.cpp
+++ b/lib/CodeGen/MachineSink.cpp
@@ -130,6 +130,10 @@ bool MachineSinking::ProcessBlock(MachineBasicBlock &MBB) {
/// SinkInstruction - Determine whether it is safe to sink the specified machine
/// instruction out of its current block into a successor.
bool MachineSinking::SinkInstruction(MachineInstr *MI) {
+ // Don't sink things with side-effects we don't understand.
+ if (TII->hasUnmodelledSideEffects(MI))
+ return false;
+
// Loop over all the operands of the specified instruction. If there is
// anything we can't handle, bail out.
MachineBasicBlock *ParentBlock = MI->getParent();