Revert "Make NumMicroOps a variable in the subtarget's instruction itinerary."
This reverts commit r159406. I noticed a performance regression so I'll back out for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159411 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp
index b3fef29..3a180df 100644
--- a/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -2176,9 +2176,9 @@
const MCInstrDesc &Desc = MI->getDesc();
unsigned Class = Desc.getSchedClass();
- int ItinUOps = ItinData->Itineraries[Class].NumMicroOps;
- if (ItinUOps >= 0)
- return ItinUOps;
+ unsigned UOps = ItinData->Itineraries[Class].NumMicroOps;
+ if (UOps)
+ return UOps;
unsigned Opc = MI->getOpcode();
switch (Opc) {
@@ -2252,19 +2252,19 @@
return 2;
// 4 registers would be issued: 2, 2.
// 5 registers would be issued: 2, 2, 1.
- int A8UOps = (NumRegs / 2);
+ UOps = (NumRegs / 2);
if (NumRegs % 2)
- ++A8UOps;
- return A8UOps;
+ ++UOps;
+ return UOps;
} else if (Subtarget.isCortexA9()) {
- int A9UOps = (NumRegs / 2);
+ UOps = (NumRegs / 2);
// If there are odd number of registers or if it's not 64-bit aligned,
// then it takes an extra AGU (Address Generation Unit) cycle.
if ((NumRegs % 2) ||
!MI->hasOneMemOperand() ||
(*MI->memoperands_begin())->getAlignment() < 8)
- ++A9UOps;
- return A9UOps;
+ ++UOps;
+ return UOps;
} else {
// Assume the worst.
return NumRegs;