mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 01:34:32 +00:00
While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
Take 2. This includes fix for dragonegg crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
54b0f4f2a4
commit
bfae5f312c
@ -87,6 +87,9 @@ class SelectionDAGLegalize {
|
|||||||
// If someone requests legalization of the new node, return itself.
|
// If someone requests legalization of the new node, return itself.
|
||||||
if (From != To)
|
if (From != To)
|
||||||
LegalizedNodes.insert(std::make_pair(To, To));
|
LegalizedNodes.insert(std::make_pair(To, To));
|
||||||
|
|
||||||
|
// Transfer SDDbgValues.
|
||||||
|
DAG.TransferDbgValues(From, To);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -5474,7 +5474,6 @@ void SelectionDAG::TransferDbgValues(SDValue From, SDValue To) {
|
|||||||
SDNode *FromNode = From.getNode();
|
SDNode *FromNode = From.getNode();
|
||||||
SDNode *ToNode = To.getNode();
|
SDNode *ToNode = To.getNode();
|
||||||
SmallVector<SDDbgValue*,2> &DVs = GetDbgValues(FromNode);
|
SmallVector<SDDbgValue*,2> &DVs = GetDbgValues(FromNode);
|
||||||
DbgInfo->removeSDDbgValues(FromNode);
|
|
||||||
for (SmallVector<SDDbgValue *, 2>::iterator I = DVs.begin(), E = DVs.end();
|
for (SmallVector<SDDbgValue *, 2>::iterator I = DVs.begin(), E = DVs.end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
if ((*I)->getKind() == SDDbgValue::SDNODE) {
|
if ((*I)->getKind() == SDDbgValue::SDNODE) {
|
||||||
@ -5482,6 +5481,7 @@ void SelectionDAG::TransferDbgValues(SDValue From, SDValue To) {
|
|||||||
(*I)->setSDNode(ToNode, To.getResNo());
|
(*I)->setSDNode(ToNode, To.getResNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DbgInfo->removeSDDbgValues(FromNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
Loading…
Reference in New Issue
Block a user