summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-02-15 20:50:13 +0000
committerDan Gohman <gohman@apple.com>2008-02-15 20:50:13 +0000
commit0340d1e2cd74c2f8e419c7950f835b868f593bd4 (patch)
tree6920ef9c3fc004c53d1409e05868eaa5b2143742 /llvm/lib
parent5c9490924c3e4fd944d49fc47d6a90333d2185bd (diff)
downloadbcm5719-llvm-0340d1e2cd74c2f8e419c7950f835b868f593bd4.tar.gz
bcm5719-llvm-0340d1e2cd74c2f8e419c7950f835b868f593bd4.zip
Use the TargetInstrDescr to determine the number of operands
that should be checked for the TIED_TO attribute instead of using CountOperands. llvm-svn: 47176
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index eae19b95396..2cda59758ce 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/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<SF>::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<SF>::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;
OpenPOWER on IntegriCloud