timevar.def: Add TV_CONSTEXPR.
authorJason Merrill <jason@redhat.com>
Wed, 3 May 2017 18:50:20 +0000 (14:50 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 3 May 2017 18:50:20 +0000 (14:50 -0400)
* timevar.def: Add TV_CONSTEXPR.

* constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR.

From-SVN: r247563

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/timevar.def

index af5c6bf..6cf1215 100644 (file)
@@ -1,3 +1,7 @@
+2017-05-03  Jason Merrill  <jason@redhat.com>
+
+       * timevar.def: Add TV_CONSTEXPR.
+
 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
 
        * common.opt (fdiagnostics-parseable-fixits): Fix typo.
index 56f9c20..7f395b4 100644 (file)
@@ -1,3 +1,7 @@
+2017-05-03  Jason Merrill  <jason@redhat.com>
+
+       * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR.
+
 2017-05-03  Nathan Sidwell  <nathan@acm.org>
 
        * cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier,
index 366d562..34d25ba 100644 (file)
@@ -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<tree,tree> map;
index 51ec035..9ceda8a 100644 (file)
@@ -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")