Add new shorter predicates for testing machine operands for various types:
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on
switching everything over, so new clients should just start using the
shorter names.
Remove old long accessors, switching everything over to use the short
accessor: getMachineBasicBlock() -> getMBB(),
getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45464 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp
index d59cec1..a018c49 100644
--- a/lib/Target/IA64/IA64AsmPrinter.cpp
+++ b/lib/Target/IA64/IA64AsmPrinter.cpp
@@ -175,12 +175,11 @@
O << MO.getImm();
return;
case MachineOperand::MO_MachineBasicBlock:
- printBasicBlockLabel(MO.getMachineBasicBlock());
+ printBasicBlockLabel(MO.getMBB());
return;
case MachineOperand::MO_ConstantPoolIndex: {
O << "@gprel(" << TAI->getPrivateGlobalPrefix()
- << "CPI" << getFunctionNumber() << "_"
- << MO.getConstantPoolIndex() << ")";
+ << "CPI" << getFunctionNumber() << "_" << MO.getIndex() << ")";
return;
}
diff --git a/lib/Target/IA64/IA64RegisterInfo.cpp b/lib/Target/IA64/IA64RegisterInfo.cpp
index 333711b..e00625c 100644
--- a/lib/Target/IA64/IA64RegisterInfo.cpp
+++ b/lib/Target/IA64/IA64RegisterInfo.cpp
@@ -86,7 +86,7 @@
else if (MO.isImmediate())
MIB.addImm(MO.getImm());
else
- MIB.addFrameIndex(MO.getFrameIndex());
+ MIB.addFrameIndex(MO.getIndex());
}
MIB.addReg(SrcReg, false, false, isKill);
NewMIs.push_back(MIB);
@@ -138,7 +138,7 @@
else if (MO.isImmediate())
MIB.addImm(MO.getImm());
else
- MIB.addFrameIndex(MO.getFrameIndex());
+ MIB.addFrameIndex(MO.getIndex());
}
NewMIs.push_back(MIB);
return;
@@ -262,7 +262,7 @@
assert(i < MI.getNumOperands() && "Instr doesn't have FrameIndex operand!");
}
- int FrameIndex = MI.getOperand(i).getFrameIndex();
+ int FrameIndex = MI.getOperand(i).getIndex();
// choose a base register: ( hasFP? framepointer : stack pointer )
unsigned BaseRegister = FP ? IA64::r5 : IA64::r12;