From: Dan Gohman Date: Fri, 15 Feb 2008 20:50:13 +0000 (+0000) Subject: Use the TargetInstrDescr to determine the number of operands X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3b66555c53eb8921b2dd50335e0b278ddf80d220;p=oota-llvm.git Use the TargetInstrDescr to determine the number of operands that should be checked for the TIED_TO attribute instead of using CountOperands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47176 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index eae19b95396..2cda59758ce 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -149,7 +149,7 @@ void ScheduleDAGRRList::CommuteNodesToReducePressure() { unsigned Opc = SU->Node->getTargetOpcode(); const TargetInstrDesc &TID = TII->get(Opc); unsigned NumRes = TID.getNumDefs(); - unsigned NumOps = CountOperands(SU->Node); + unsigned NumOps = TID.getNumOperands() - NumRes; for (unsigned j = 0; j != NumOps; ++j) { if (TID.getOperandConstraint(j+NumRes, TOI::TIED_TO) == -1) continue; @@ -1289,7 +1289,7 @@ bool BURegReductionPriorityQueue::canClobber(SUnit *SU, SUnit *Op) { unsigned Opc = SU->Node->getTargetOpcode(); const TargetInstrDesc &TID = TII->get(Opc); unsigned NumRes = TID.getNumDefs(); - unsigned NumOps = ScheduleDAG::CountOperands(SU->Node); + unsigned NumOps = TID.getNumOperands() - NumRes; for (unsigned i = 0; i != NumOps; ++i) { if (TID.getOperandConstraint(i+NumRes, TOI::TIED_TO) != -1) { SDNode *DU = SU->Node->getOperand(i).Val; @@ -1365,7 +1365,7 @@ void BURegReductionPriorityQueue::AddPseudoTwoAddrDeps() { unsigned Opc = Node->getTargetOpcode(); const TargetInstrDesc &TID = TII->get(Opc); unsigned NumRes = TID.getNumDefs(); - unsigned NumOps = ScheduleDAG::CountOperands(Node); + unsigned NumOps = TID.getNumOperands() - NumRes; for (unsigned j = 0; j != NumOps; ++j) { if (TID.getOperandConstraint(j+NumRes, TOI::TIED_TO) != -1) { SDNode *DU = SU->Node->getOperand(j).Val;