summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-09-22 08:21:56 +0000
committerTim Northover <tnorthover@apple.com>2013-09-22 08:21:56 +0000
commit3e84ad28d4d3ceee25771b1e30315c20b7608c39 (patch)
tree8c7736799f6055bce7c663d2865140c69015356e /lib/Target/MSP430
parent7d052f272d3f9ad0acdebf6811e29d529f70c1e1 (diff)
downloadllvm-3e84ad28d4d3ceee25771b1e30315c20b7608c39.tar.gz
llvm-3e84ad28d4d3ceee25771b1e30315c20b7608c39.tar.bz2
llvm-3e84ad28d4d3ceee25771b1e30315c20b7608c39.tar.xz
ISelDAG: spot chain cycles involving MachineNodes
Previously, the DAGISel function WalkChainUsers was spotting that it had entered already-selected territory by whether a node was a MachineNode (amongst other things). Since it's fairly common practice to insert MachineNodes during ISelLowering, this was not the correct check. Looking around, it seems that other nodes get their NodeId set to -1 upon selection, so this makes sure the same thing happens to all MachineNodes and uses that characteristic to determine whether we should stop looking for a loop during selection. This should fix PR15840. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430')
-rw-r--r--lib/Target/MSP430/MSP430ISelDAGToDAG.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp b/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
index 543f54c9c1..4152829b60 100644
--- a/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
+++ b/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
@@ -395,6 +395,7 @@ SDNode *MSP430DAGToDAGISel::Select(SDNode *Node) {
DEBUG(errs() << "== ";
Node->dump(CurDAG);
errs() << "\n");
+ Node->setNodeId(-1);
return NULL;
}