summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineSink.cpp
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
commitd11ca169e716e639ace4a293e52f07b8e6a47f93 (patch)
treee5d92aaaa240f2b04aaedb70b6abd0d7ea34b68a /llvm/lib/CodeGen/MachineSink.cpp
parent880b080887e59879a45bf24f852f44b2976d8e52 (diff)
downloadbcm5719-llvm-d11ca169e716e639ace4a293e52f07b8e6a47f93.tar.gz
bcm5719-llvm-d11ca169e716e639ace4a293e52f07b8e6a47f93.zip
don't sink anything with side effects, this makes lots of stuff work, but sinks almost nothing.
llvm-svn: 45617
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineSink.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index dff60f6d395..31aeea5724a 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud