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(); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits