https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14840

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:5c021f17e7d09a0eae2d6fb875c9a5484bd4e043

commit r13-4170-g5c021f17e7d09a0eae2d6fb875c9a5484bd4e043
Author: Andrew Pinski <apin...@marvell.com>
Date:   Fri Nov 18 05:05:03 2022 +0000

    constexprify some tree variables

    Since we use C++11 by default now, we can
    use constexpr for some const decls in tree-core.h.

    This patch does that and it allows for better optimizations
    of GCC code with checking enabled and without LTO.

    For an example generic-match.cc compiling is speed up due
    to the less number of basic blocks and less debugging info
    produced. I did not check the speed of compiling the same source
    but rather the speed of compiling the old vs new sources here
    (but with the same compiler base).

    The small slow down in the parsing of the arrays in each TU
    is migrated by a speed up in how much code/debugging info
    is produced in the end.

    Note I looked at generic-match.cc since it is one of the
    compiling sources which causes parallel building to stall and
    I wanted to speed it up.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

    gcc/ChangeLog:

            PR middle-end/14840
            * tree-core.h (tree_code_type): Constexprify
            by including all-tree.def.
            (tree_code_length): Likewise.
            * tree.cc (tree_code_type): Remove.
            (tree_code_length): Remove.

Reply via email to