if (candidate->isImplicitDef() || candidate->isKill())
return true;
+ MCInstrDesc MCID = candidate->getDesc();
// Loads or stores cannot be moved past a store to the delay slot
// and stores cannot be moved past a load.
- if (candidate->getDesc().mayLoad()) {
+ if (MCID.mayLoad()) {
if (sawStore)
return true;
sawLoad = true;
}
- if (candidate->getDesc().mayStore()) {
+ if (MCID.mayStore()) {
if (sawStore)
return true;
sawStore = true;
return true;
}
- assert(!candidate->getDesc().isCall() && "Cannot put calls in delay slot.");
+ assert((!MCID.isCall() && !MCID.isReturn()) &&
+ "Cannot put calls in delay slot.");
for (unsigned i = 0, e = candidate->getNumOperands(); i!= e; ++i) {
const MachineOperand &MO = candidate->getOperand(i);