Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp =================================================================== --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1036,8 +1036,8 @@ /// verification and other common operations when a new node is allocated. void SelectionDAG::InsertNode(SDNode *N) { AllNodes.push_back(N); -#ifndef NDEBUG N->PersistentId = NextPersistentId++; +#ifndef NDEBUG VerifySDNode(N); #endif for (DAGUpdateListener *DUL = UpdateListeners; DUL; DUL = DUL->Next) @@ -1241,9 +1241,7 @@ AllNodes.remove(AllNodes.begin()); while (!AllNodes.empty()) DeallocateNode(&AllNodes.front()); -#ifndef NDEBUG NextPersistentId = 0; -#endif } SDNode *SelectionDAG::FindNodeOrInsertPos(const FoldingSetNodeID &ID, Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp =================================================================== --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -505,11 +505,7 @@ static Printable PrintNodeId(const SDNode &Node) { return Printable([&Node](raw_ostream &OS) { -#ifndef NDEBUG OS << 't' << Node.PersistentId; -#else - OS << (const void*)&Node; -#endif }); } Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp =================================================================== --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -81,11 +81,7 @@ const SelectionDAG *Graph) { std::string R; raw_string_ostream OS(R); -#ifndef NDEBUG OS << 't' << Node->PersistentId; -#else - OS << static_cast(Node); -#endif return R; }