1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Shrinkify the machine operand creation method names.

llvm-svn: 45433
This commit is contained in:
Chris Lattner 2007-12-30 00:45:46 +00:00
parent 19dd6c4eac
commit 4d0361fbf2
3 changed files with 20 additions and 20 deletions

View File

@ -298,42 +298,42 @@ public:
Op.auxInfo.subReg = SubReg; Op.auxInfo.subReg = SubReg;
return Op; return Op;
} }
static MachineOperand CreateBasicBlock(MachineBasicBlock *MBB) { static MachineOperand CreateMBB(MachineBasicBlock *MBB) {
MachineOperand Op; MachineOperand Op;
Op.opType = MachineOperand::MO_MachineBasicBlock; Op.opType = MachineOperand::MO_MachineBasicBlock;
Op.contents.MBB = MBB; Op.contents.MBB = MBB;
Op.auxInfo.offset = 0; Op.auxInfo.offset = 0;
return Op; return Op;
} }
static MachineOperand CreateFrameIndex(unsigned Idx) { static MachineOperand CreateFI(unsigned Idx) {
MachineOperand Op; MachineOperand Op;
Op.opType = MachineOperand::MO_FrameIndex; Op.opType = MachineOperand::MO_FrameIndex;
Op.contents.immedVal = Idx; Op.contents.immedVal = Idx;
Op.auxInfo.offset = 0; Op.auxInfo.offset = 0;
return Op; return Op;
} }
static MachineOperand CreateConstantPoolIndex(unsigned Idx, int Offset) { static MachineOperand CreateCPI(unsigned Idx, int Offset) {
MachineOperand Op; MachineOperand Op;
Op.opType = MachineOperand::MO_ConstantPoolIndex; Op.opType = MachineOperand::MO_ConstantPoolIndex;
Op.contents.immedVal = Idx; Op.contents.immedVal = Idx;
Op.auxInfo.offset = Offset; Op.auxInfo.offset = Offset;
return Op; return Op;
} }
static MachineOperand CreateJumpTableIndex(unsigned Idx) { static MachineOperand CreateJTI(unsigned Idx) {
MachineOperand Op; MachineOperand Op;
Op.opType = MachineOperand::MO_JumpTableIndex; Op.opType = MachineOperand::MO_JumpTableIndex;
Op.contents.immedVal = Idx; Op.contents.immedVal = Idx;
Op.auxInfo.offset = 0; Op.auxInfo.offset = 0;
return Op; return Op;
} }
static MachineOperand CreateGlobalAddress(GlobalValue *GV, int Offset) { static MachineOperand CreateGA(GlobalValue *GV, int Offset) {
MachineOperand Op; MachineOperand Op;
Op.opType = MachineOperand::MO_GlobalAddress; Op.opType = MachineOperand::MO_GlobalAddress;
Op.contents.GV = GV; Op.contents.GV = GV;
Op.auxInfo.offset = Offset; Op.auxInfo.offset = Offset;
return Op; return Op;
} }
static MachineOperand CreateExternalSymbol(const char *SymName, int Offset) { static MachineOperand CreateES(const char *SymName, int Offset) {
MachineOperand Op; MachineOperand Op;
Op.opType = MachineOperand::MO_ExternalSymbol; Op.opType = MachineOperand::MO_ExternalSymbol;
Op.contents.SymbolName = SymName; Op.contents.SymbolName = SymName;
@ -524,39 +524,39 @@ public:
} }
void addMachineBasicBlockOperand(MachineBasicBlock *MBB) { void addMachineBasicBlockOperand(MachineBasicBlock *MBB) {
addOperand(MachineOperand::CreateBasicBlock(MBB)); addOperand(MachineOperand::CreateMBB(MBB));
} }
/// addFrameIndexOperand - Add an abstract frame index to the instruction /// addFrameIndexOperand - Add an abstract frame index to the instruction
/// ///
void addFrameIndexOperand(unsigned Idx) { void addFrameIndexOperand(unsigned Idx) {
addOperand(MachineOperand::CreateFrameIndex(Idx)); addOperand(MachineOperand::CreateFI(Idx));
} }
/// addConstantPoolndexOperand - Add a constant pool object index to the /// addConstantPoolndexOperand - Add a constant pool object index to the
/// instruction. /// instruction.
/// ///
void addConstantPoolIndexOperand(unsigned Idx, int Offset) { void addConstantPoolIndexOperand(unsigned Idx, int Offset) {
addOperand(MachineOperand::CreateConstantPoolIndex(Idx, Offset)); addOperand(MachineOperand::CreateCPI(Idx, Offset));
} }
/// addJumpTableIndexOperand - Add a jump table object index to the /// addJumpTableIndexOperand - Add a jump table object index to the
/// instruction. /// instruction.
/// ///
void addJumpTableIndexOperand(unsigned Idx) { void addJumpTableIndexOperand(unsigned Idx) {
addOperand(MachineOperand::CreateJumpTableIndex(Idx)); addOperand(MachineOperand::CreateJTI(Idx));
} }
void addGlobalAddressOperand(GlobalValue *GV, int Offset) { void addGlobalAddressOperand(GlobalValue *GV, int Offset) {
addOperand(MachineOperand::CreateGlobalAddress(GV, Offset)); addOperand(MachineOperand::CreateGA(GV, Offset));
} }
/// addExternalSymbolOperand - Add an external symbol operand to this instr /// addExternalSymbolOperand - Add an external symbol operand to this instr
/// ///
void addExternalSymbolOperand(const char *SymName, int Offset = 0) { void addExternalSymbolOperand(const char *SymName, int Offset = 0) {
addOperand(MachineOperand::CreateExternalSymbol(SymName, Offset)); addOperand(MachineOperand::CreateES(SymName, Offset));
} }
//===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===//
// Accessors used to modify instructions in place. // Accessors used to modify instructions in place.
// //

View File

@ -53,34 +53,34 @@ public:
} }
const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB) const { const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB) const {
MI->addOperand(MachineOperand::CreateBasicBlock(MBB)); MI->addOperand(MachineOperand::CreateMBB(MBB));
return *this; return *this;
} }
const MachineInstrBuilder &addFrameIndex(unsigned Idx) const { const MachineInstrBuilder &addFrameIndex(unsigned Idx) const {
MI->addOperand(MachineOperand::CreateFrameIndex(Idx)); MI->addOperand(MachineOperand::CreateFI(Idx));
return *this; return *this;
} }
const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx, const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx,
int Offset = 0) const { int Offset = 0) const {
MI->addOperand(MachineOperand::CreateConstantPoolIndex(Idx, Offset)); MI->addOperand(MachineOperand::CreateCPI(Idx, Offset));
return *this; return *this;
} }
const MachineInstrBuilder &addJumpTableIndex(unsigned Idx) const { const MachineInstrBuilder &addJumpTableIndex(unsigned Idx) const {
MI->addOperand(MachineOperand::CreateJumpTableIndex(Idx)); MI->addOperand(MachineOperand::CreateJTI(Idx));
return *this; return *this;
} }
const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV, const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
int Offset = 0) const { int Offset = 0) const {
MI->addOperand(MachineOperand::CreateGlobalAddress(GV, Offset)); MI->addOperand(MachineOperand::CreateGA(GV, Offset));
return *this; return *this;
} }
const MachineInstrBuilder &addExternalSymbol(const char *FnName) const{ const MachineInstrBuilder &addExternalSymbol(const char *FnName) const{
MI->addOperand(MachineOperand::CreateExternalSymbol(FnName, 0)); MI->addOperand(MachineOperand::CreateES(FnName, 0));
return *this; return *this;
} }
}; };

View File

@ -1166,7 +1166,7 @@ MachineInstr* X86RegisterInfo::foldMemoryOperand(MachineInstr *MI,
return NULL; return NULL;
SmallVector<MachineOperand,4> MOs; SmallVector<MachineOperand,4> MOs;
MOs.push_back(MachineOperand::CreateFrameIndex(FrameIndex)); MOs.push_back(MachineOperand::CreateFI(FrameIndex));
return foldMemoryOperand(MI, Ops[0], MOs); return foldMemoryOperand(MI, Ops[0], MOs);
} }