[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 21 11:49:40 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAG.cpp updated: 1.9 -> 1.10
---
Log message:
Add support for basic blocks, fix a bug in result # computation
---
Diffs of the changes: (+7 -2)
ScheduleDAG.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.9 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.10
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.9 Sat Aug 20 13:07:27 2005
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Sun Aug 21 13:49:29 2005
@@ -80,7 +80,7 @@
// nodes. Check that the DAG matches the TD files's expectation of #
// operands.
unsigned NumResults = Op.Val->getNumValues();
- if (NumResults && Op.getOperand(NumResults-1).getValueType() == MVT::Other)
+ if (NumResults && Op.Val->getValueType(NumResults-1) == MVT::Other)
--NumResults;
#ifndef _NDEBUG
unsigned Operands = Op.getNumOperands();
@@ -118,6 +118,9 @@
} else if (GlobalAddressSDNode *TGA =
dyn_cast<GlobalAddressSDNode>(Op.getOperand(i))) {
MI->addGlobalAddressOperand(TGA->getGlobal(), false, 0);
+ } else if (BasicBlockSDNode *BB =
+ dyn_cast<BasicBlockSDNode>(Op.getOperand(i))) {
+ MI->addMachineBasicBlockOperand(BB->getBasicBlock());
} else {
unsigned R = Emit(Op.getOperand(i));
// Add an operand, unless this corresponds to a chain node.
@@ -133,7 +136,9 @@
default:
Op.Val->dump();
assert(0 && "This target-independent node should have been selected!");
- case ISD::EntryToken: break;
+ case ISD::EntryToken:
+ case ISD::BasicBlock:
+ break;
case ISD::TokenFactor:
for (unsigned i = 0, e = Op.getNumOperands(); i != e; ++i)
Emit(Op.getOperand(i));
More information about the llvm-commits
mailing list