diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-02-18 04:58:10 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-02-18 04:58:10 +0000 |
commit | 1646953538d5faf7baf49e16bd0590f822c231de (patch) | |
tree | 314293b4d7b56f57f31cbd9b078ea58d2d5e1a04 /lib/CodeGen | |
parent | 78f7a25f9826ba66610b5bca83ebea71793abf59 (diff) | |
download | external_llvm-1646953538d5faf7baf49e16bd0590f822c231de.zip external_llvm-1646953538d5faf7baf49e16bd0590f822c231de.tar.gz external_llvm-1646953538d5faf7baf49e16bd0590f822c231de.tar.bz2 |
Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SDNodeDbgValue.h | 8 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 10 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 |
4 files changed, 13 insertions, 10 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 49c862c..def0c69 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -87,9 +87,6 @@ class SelectionDAGLegalize { // 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: diff --git a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h index 2dcb229..e5cd23a 100644 --- a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h +++ b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h @@ -83,6 +83,14 @@ public: // Returns the SDNode* for a register ref SDNode *getSDNode() { assert (kind==SDNODE); return u.s.Node; } + // setSDNode - If underlying SDNode is replaced by another node then + // SelectionDAG can use this to transfer DbgValue. + void setSDNode(SDNode *N, unsigned R) { + assert (kind==SDNODE); + u.s.Node = N; + u.s.ResNo = R; + } + // Returns the ResNo for a register ref unsigned getResNo() { assert (kind==SDNODE); return u.s.ResNo; } diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index d03f676..c0aa56b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -5508,14 +5508,12 @@ void SelectionDAG::TransferDbgValues(SDValue From, SDValue To) { 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) { - SDDbgValue *Dbg = *I; - if (Dbg->getKind() == SDDbgValue::SDNODE) { - SDDbgValue *Clone = getDbgValue(Dbg->getMDPtr(), ToNode, To.getResNo(), - Dbg->getOffset(), Dbg->getDebugLoc(), - Dbg->getOrder()); - AddDbgValue(Clone, ToNode, false); + if ((*I)->getKind() == SDDbgValue::SDNODE) { + AddDbgValue(*I, ToNode, false); + (*I)->setSDNode(ToNode, To.getResNo()); } } } diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 452f561..fc283a3 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4287,7 +4287,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) { N.getResNo(), Offset, dl, SDNodeOrder); DAG.AddDbgValue(SDV, N.getNode(), false); } - } else if (!V->use_empty() ) { + } else if (isa<PHINode>(V) && !V->use_empty() ) { // Do not call getValue(V) yet, as we don't want to generate code. // Remember it for later. DanglingDebugInfo DDI(&DI, dl, SDNodeOrder); |