diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h --- a/llvm/include/llvm/CodeGen/SelectionDAG.h +++ b/llvm/include/llvm/CodeGen/SelectionDAG.h @@ -280,6 +280,11 @@ DenseMap SDCallSiteDbgInfo; + /// PersistentId counter to be used when inserting the next + /// SDNode to this SelectionDAG. We do not place that under + /// `#if LLVM_ENABLE_ABI_BREAKING_CHECKS` intentionally because + /// it adds unneeded complexity without noticeable + /// benefits (see discussion with @thakis in D120714). uint16_t NextPersistentId = 0; /// Are instruction referencing variable locations desired for this function? diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h --- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h @@ -615,8 +615,10 @@ SDNodeFlags Flags; public: - /// Unique and persistent id per SDNode in the DAG. - /// Used for debug printing. + /// Unique and persistent id per SDNode in the DAG. Used for debug printing. + /// We do not place that under `#if LLVM_ENABLE_ABI_BREAKING_CHECKS` + /// intentionally because it adds unneeded complexity without noticeable + /// benefits (see discussion with @thakis in D120714). uint16_t PersistentId; //===--------------------------------------------------------------------===//