[llvm] r248182 - SelectionDAG: Use InsertNode for EntryNode

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 10:41:05 PDT 2015


Author: matze
Date: Mon Sep 21 12:41:05 2015
New Revision: 248182

URL: http://llvm.org/viewvc/llvm-project?rev=248182&view=rev
Log:
SelectionDAG: Use InsertNode for EntryNode

This fixes problems where two nodes have persistent debug id 0 assigned.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=248182&r1=248181&r2=248182&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Sep 21 12:41:05 2015
@@ -927,7 +927,7 @@ SelectionDAG::SelectionDAG(const TargetM
       EntryNode(ISD::EntryToken, 0, DebugLoc(), getVTList(MVT::Other)),
       Root(getEntryNode()), NewNodesMustHaveLegalTypes(false),
       UpdateListeners(nullptr) {
-  AllNodes.push_back(&EntryNode);
+  InsertNode(&EntryNode);
   DbgInfo = new SDDbgInfo();
 }
 
@@ -1024,7 +1024,7 @@ void SelectionDAG::clear() {
             static_cast<SDNode*>(nullptr));
 
   EntryNode.UseList = nullptr;
-  AllNodes.push_back(&EntryNode);
+  InsertNode(&EntryNode);
   Root = getEntryNode();
   DbgInfo->clear();
 }




More information about the llvm-commits mailing list