[llvm] r251209 - [CodeGen] Get rid of NDEBUG to ensure structure stability.
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 12:00:48 PST 2015
> On 2015-Oct-24, at 15:09, Davide Italiano via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: davide
> Date: Sat Oct 24 17:09:54 2015
> New Revision: 251209
>
> URL: http://llvm.org/viewvc/llvm-project?rev=251209&view=rev
> Log:
> [CodeGen] Get rid of NDEBUG to ensure structure stability.
>
> 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.
>
I wonder if adding to `SDNode` could be a problem for memory-constrained
backends that tend to only have a single function?
This could use LLVM_ENABLE_ABI_BREAKING_CHECKS (see r233310) instead
of NDEBUG, if so.
> Modified:
> llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
> llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
>
> Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=251209&r1=251208&r2=251209&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Sat Oct 24 17:09:54 2015
> @@ -215,9 +215,7 @@ class SelectionDAG {
> /// Tracks dbg_value information through SDISel.
> SDDbgInfo *DbgInfo;
>
> -#ifndef NDEBUG
> uint16_t NextPersistentId;
> -#endif
>
> public:
> /// Clients of various APIs that cause global effects on
>
> Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=251209&r1=251208&r2=251209&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Sat Oct 24 17:09:54 2015
> @@ -426,11 +426,9 @@ private:
> friend struct ilist_traits<SDNode>;
>
> public:
> -#ifndef NDEBUG
> /// Unique and persistent id per SDNode in the DAG.
> /// Used for debug printing.
> uint16_t PersistentId;
> -#endif
>
> //===--------------------------------------------------------------------===//
> // Accessors
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list