[llvm-commits] [llvm] r45841 - /llvm/trunk/lib/CodeGen/MachineSink.cpp
Chris Lattner
sabre at nondot.org
Thu Jan 10 14:35:15 PST 2008
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;
More information about the llvm-commits
mailing list