Index: llvm/include/llvm/CodeGen/SelectionDAG.h =================================================================== --- llvm/include/llvm/CodeGen/SelectionDAG.h +++ llvm/include/llvm/CodeGen/SelectionDAG.h @@ -276,7 +276,10 @@ DenseMap SDCallSiteDbgInfo; +#ifndef NDEBUG + // Used for debug printing. uint16_t NextPersistentId = 0; +#endif public: /// Clients of various APIs that cause global effects on Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h =================================================================== --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h @@ -613,9 +613,11 @@ SDNodeFlags Flags; public: +#ifndef NDEBUG /// Unique and persistent id per SDNode in the DAG. /// Used for debug printing. uint16_t PersistentId; +#endif //===--------------------------------------------------------------------===// // Accessors @@ -1216,9 +1218,11 @@ public: explicit HandleSDNode(SDValue X) : SDNode(ISD::HANDLENODE, 0, DebugLoc(), getSDVTList(MVT::Other)) { +#ifndef NDEBUG // HandleSDNodes are never inserted into the DAG, so they won't be // auto-numbered. Use ID 65535 as a sentinel. PersistentId = 0xffff; +#endif // Manually set up the operand list. This node type is special in that it's // always stack allocated and SelectionDAG does not manage its operands.