[llvm-commits] [llvm] r45617 - /llvm/trunk/lib/CodeGen/MachineSink.cpp

Chris Lattner sabre at nondot.org
Fri Jan 4 18:33:22 PST 2008


Author: lattner
Date: Fri Jan  4 20:33:22 2008
New Revision: 45617

URL: http://llvm.org/viewvc/llvm-project?rev=45617&view=rev
Log:
don't sink anything with side effects, this makes lots of stuff work, but sinks almost nothing.

Modified:
    llvm/trunk/lib/CodeGen/MachineSink.cpp

Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=45617&r1=45616&r2=45617&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineSink.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineSink.cpp Fri Jan  4 20:33:22 2008
@@ -130,6 +130,10 @@
 /// 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();





More information about the llvm-commits mailing list