diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-06 17:43:24 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-06 17:43:24 +0000 |
commit | 770bcc7b15adbc978800db70dbb1c3c22913b52c (patch) | |
tree | e317f90aef4028cdfe21d50f117245426cb2b4e0 /lib/CodeGen/SelectionDAG | |
parent | 84fbac580941548a6ab1121ed3b0ffdc4e2bc080 (diff) |
Move getPointerRegClass from TargetInstrInfo to TargetRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp index 54bfc44fd1..aa29d3efa7 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp @@ -32,14 +32,13 @@ using namespace llvm; /// instruction of the specified TargetInstrDesc. static const TargetRegisterClass* getInstrOperandRegClass(const TargetRegisterInfo *TRI, - const TargetInstrInfo *TII, const TargetInstrDesc &II, - unsigned Op) { + const TargetInstrDesc &II, unsigned Op) { if (Op >= II.getNumOperands()) { assert(II.isVariadic() && "Invalid operand # of instruction"); return NULL; } if (II.OpInfo[Op].isLookupPtrRegClass()) - return TII->getPointerRegClass(); + return TRI->getPointerRegClass(); return TRI->getRegClass(II.OpInfo[Op].RegClass); } @@ -91,7 +90,7 @@ void ScheduleDAGSDNodes::EmitCopyFromReg(SDNode *Node, unsigned ResNo, if (User->isMachineOpcode()) { const TargetInstrDesc &II = TII->get(User->getMachineOpcode()); const TargetRegisterClass *RC = - getInstrOperandRegClass(TRI,TII,II,i+II.getNumDefs()); + getInstrOperandRegClass(TRI, II, i+II.getNumDefs()); if (!UseRC) UseRC = RC; else if (RC) @@ -190,7 +189,7 @@ void ScheduleDAGSDNodes::CreateVirtualRegisters(SDNode *Node, MachineInstr *MI, // Create the result registers for this node and add the result regs to // the machine instruction. if (VRBase == 0) { - const TargetRegisterClass *RC = getInstrOperandRegClass(TRI, TII, II, i); + const TargetRegisterClass *RC = getInstrOperandRegClass(TRI, II, i); assert(RC && "Isn't a register operand!"); VRBase = MRI.createVirtualRegister(RC); MI->addOperand(MachineOperand::CreateReg(VRBase, true)); @@ -258,8 +257,7 @@ void ScheduleDAGSDNodes::AddOperand(MachineInstr *MI, SDValue Op, // There may be no register class for this operand if it is a variadic // argument (RC will be NULL in this case). In this case, we just assume // the regclass is ok. - const TargetRegisterClass *RC = - getInstrOperandRegClass(TRI, TII, *II, IIOpNum); + const TargetRegisterClass *RC= getInstrOperandRegClass(TRI, *II, IIOpNum); assert((RC || II->isVariadic()) && "Expected reg class info!"); const TargetRegisterClass *VRC = MRI.getRegClass(VReg); if (RC && VRC != RC) { @@ -327,7 +325,7 @@ void ScheduleDAGSDNodes::AddOperand(MachineInstr *MI, SDValue Op, // an FP vreg on x86. assert(TargetRegisterInfo::isVirtualRegister(VReg) && "Not a vreg?"); if (II && !II->isVariadic()) { - assert(getInstrOperandRegClass(TRI, TII, *II, IIOpNum) && + assert(getInstrOperandRegClass(TRI, *II, IIOpNum) && "Don't have operand info for this instruction!"); } } |