From: Jason Merrill Date: Wed, 3 May 2017 18:50:20 +0000 (-0400) Subject: timevar.def: Add TV_CONSTEXPR. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8108ea30e6c0d5d7e267d3ddab3dba126b99f918;p=gcc.git timevar.def: Add TV_CONSTEXPR. * timevar.def: Add TV_CONSTEXPR. * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR. From-SVN: r247563 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af5c6bf179f..6cf12153848 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-03 Jason Merrill + + * timevar.def: Add TV_CONSTEXPR. + 2017-05-03 David Malcolm * common.opt (fdiagnostics-parseable-fixits): Fix typo. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 56f9c2081a5..7f395b461a4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2017-05-03 Jason Merrill + + * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR. + 2017-05-03 Nathan Sidwell * cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier, diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 366d562a8a6..34d25ba6509 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-inline.h" #include "ubsan.h" #include "gimple-fold.h" +#include "timevar.h" static bool verify_constant (tree, bool, bool *, bool *); #define VERIFY_CONSTANT(X) \ @@ -4606,6 +4607,8 @@ static tree cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, bool strict = true, tree object = NULL_TREE) { + auto_timevar time (TV_CONSTEXPR); + bool non_constant_p = false; bool overflow_p = false; hash_map map; diff --git a/gcc/timevar.def b/gcc/timevar.def index 51ec0357656..9ceda8a3268 100644 --- a/gcc/timevar.def +++ b/gcc/timevar.def @@ -137,6 +137,7 @@ DEFTIMEVAR (TV_PARSE_FUNC , "parser function body") DEFTIMEVAR (TV_PARSE_INLINE , "parser inl. func. body") DEFTIMEVAR (TV_PARSE_INMETH , "parser inl. meth. body") DEFTIMEVAR (TV_TEMPLATE_INST , "template instantiation") +DEFTIMEVAR (TV_CONSTEXPR , "constant expression evaluation") DEFTIMEVAR (TV_CONSTRAINT_SAT , "constraint satisfaction") DEFTIMEVAR (TV_CONSTRAINT_SUB , "constraint subsumption") DEFTIMEVAR (TV_FLATTEN_INLINING , "flatten inlining")