[llvm-commits] [llvm] r124380 - in /llvm/trunk/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp SelectionDAG.cpp
Devang Patel
dpatel at apple.com
Thu Jan 27 09:43:54 PST 2011
Author: dpatel
Date: Thu Jan 27 11:43:53 2011
New Revision: 124380
URL: http://llvm.org/viewvc/llvm-project?rev=124380&view=rev
Log:
While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
Take 2. This includes fix for dragonegg crash.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=124380&r1=124379&r2=124380&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Jan 27 11:43:53 2011
@@ -87,6 +87,9 @@
// If someone requests legalization of the new node, return itself.
if (From != To)
LegalizedNodes.insert(std::make_pair(To, To));
+
+ // Transfer SDDbgValues.
+ DAG.TransferDbgValues(From, To);
}
public:
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=124380&r1=124379&r2=124380&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jan 27 11:43:53 2011
@@ -5474,7 +5474,6 @@
SDNode *FromNode = From.getNode();
SDNode *ToNode = To.getNode();
SmallVector<SDDbgValue*,2> &DVs = GetDbgValues(FromNode);
- DbgInfo->removeSDDbgValues(FromNode);
for (SmallVector<SDDbgValue *, 2>::iterator I = DVs.begin(), E = DVs.end();
I != E; ++I) {
if ((*I)->getKind() == SDDbgValue::SDNODE) {
@@ -5482,6 +5481,7 @@
(*I)->setSDNode(ToNode, To.getResNo());
}
}
+ DbgInfo->removeSDDbgValues(FromNode);
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list