Author: lattner Date: Thu Jan 10 16:35:15 2008 New Revision: 45841 URL: http://llvm.org/viewvc/llvm-project?rev=45841&view=rev Log: Clamp down on sinking of lots of instructions.
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=45841&r1=45840&r2=45841&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineSink.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineSink.cpp Thu Jan 10 16:35:15 2008 @@ -130,6 +130,15 @@ /// 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) { + const TargetInstrDesc &TID = MI->getDesc(); + + // Ignore stuff that we obviously can't sink. + if (TID.mayStore() || TID.isCall() || TID.isReturn() || TID.isBranch()) + return false; + + if (TID.mayLoad()) + return false; + // Don't sink things with side-effects we don't understand. if (TII->hasUnmodelledSideEffects(MI)) return false; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits