[llvm-commits] [llvm] r141157 - /llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
Akira Hatanaka
ahatanaka at mips.com
Tue Oct 4 19:21:58 PDT 2011
Author: ahatanak
Date: Tue Oct 4 21:21:58 2011
New Revision: 141157
URL: http://llvm.org/viewvc/llvm-project?rev=141157&view=rev
Log:
Do not examine variadic or implicit operands if instruction is a return (jr).
Modified:
llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp?rev=141157&r1=141156&r2=141157&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp Tue Oct 4 21:21:58 2011
@@ -222,8 +222,9 @@
// no instruction that can possibly be put in a delay slot can read or
// write it.
- unsigned e = MI->getDesc().isCall() ? MI->getDesc().getNumOperands() :
- MI->getNumOperands();
+ MCInstrDesc MCID = MI->getDesc();
+ unsigned e = MCID.isCall() || MCID.isReturn() ? MCID.getNumOperands() :
+ MI->getNumOperands();
for (unsigned i = 0; i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
More information about the llvm-commits
mailing list