[CodeGen] Get rid of NDEBUG to ensure structure stability.
authorDavide Italiano <davide@freebsd.org>
Sat, 24 Oct 2015 22:09:54 +0000 (22:09 +0000)
committerDavide Italiano <davide@freebsd.org>
Sat, 24 Oct 2015 22:09:54 +0000 (22:09 +0000)
I think it's fine to keep this fields around in terms of overhead,
I wasn't able to measure any substantial regression while running the
test suite, but, in case this causes some regression I'm ready to revert
and work on an alternative solution.
This was tested building with clang/gcc both in Debug and Release mode
and passes the test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251209 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGNodes.h

index 1edf71fe30e0602a6850b2e72425b3a20e123b35..f9a760fb2e47f204b364762879e694db61da396f 100644 (file)
@@ -215,9 +215,7 @@ class SelectionDAG {
   /// Tracks dbg_value information through SDISel.
   SDDbgInfo *DbgInfo;
 
   /// Tracks dbg_value information through SDISel.
   SDDbgInfo *DbgInfo;
 
-#ifndef NDEBUG
   uint16_t NextPersistentId;
   uint16_t NextPersistentId;
-#endif
 
 public:
   /// Clients of various APIs that cause global effects on
 
 public:
   /// Clients of various APIs that cause global effects on
index 2f31f8d9b31c8b48ba889be288099d4ebfd6b7f1..e0eadfaa2b30bb05fe06e1f6356069756dbe4352 100644 (file)
@@ -426,11 +426,9 @@ private:
   friend struct ilist_traits<SDNode>;
 
 public:
   friend struct ilist_traits<SDNode>;
 
 public:
-#ifndef NDEBUG
   /// Unique and persistent id per SDNode in the DAG.
   /// Used for debug printing.
   uint16_t PersistentId;
   /// Unique and persistent id per SDNode in the DAG.
   /// Used for debug printing.
   uint16_t PersistentId;
-#endif
 
   //===--------------------------------------------------------------------===//
   //  Accessors
 
   //===--------------------------------------------------------------------===//
   //  Accessors