[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Evan Cheng
evan.cheng at apple.com
Wed Aug 2 15:01:47 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86ISelDAGToDAG.cpp updated: 1.87 -> 1.88
---
Log message:
Reflect change to AssignTopologicalOrder().
---
Diffs of the changes: (+8 -5)
X86ISelDAGToDAG.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.87 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.88
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.87 Wed Aug 2 04:18:33 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Aug 2 17:01:32 2006
@@ -271,12 +271,15 @@
if (N->getNumOperands() == 0)
continue;
- for (unsigned i2 = Orderf; ; ++i2) {
+ for (unsigned i2 = Range; ; ++i2) {
SDNode *M = TopOrder[i2];
if (isReachable(M, N)) {
// Update reachability from M to N's operands.
- for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E;++I)
- setReachable(M, I->Val);
+ for (SDNode::op_iterator I = N->op_begin(),E = N->op_end(); I != E;++I){
+ SDNode *P = I->Val;
+ if (P->getNodeId() >= 0)
+ setReachable(M, P);
+ }
}
if (M == N) break;
}
@@ -291,8 +294,7 @@
DEBUG(BB->dump());
MachineFunction::iterator FirstMBB = BB;
- TopOrder = DAG.AssignTopologicalOrder();
- DAGSize = TopOrder.size();
+ DAGSize = DAG.AssignTopologicalOrder(TopOrder);
unsigned RMSize = (DAGSize * DAGSize + 7) / 8;
ReachabilityMatrix = new unsigned char[RMSize];
memset(ReachabilityMatrix, 0, RMSize);
@@ -318,6 +320,7 @@
ReachabilityMatrix = NULL;
ReachMatrixRange = NULL;
UnfoldableSet = NULL;
+ TopOrder.clear();
CodeGenMap.clear();
HandleMap.clear();
ReplaceMap.clear();
More information about the llvm-commits
mailing list