aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-05-03 14:50:20 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-05-03 14:50:20 -0400
commit8108ea30e6c0d5d7e267d3ddab3dba126b99f918 (patch)
treee8b5d72d3b10aff193bdaec8b388dd093accc12c
parent8135a004c26a0695b216f56de85cb05fc940796a (diff)
downloadgcc-8108ea30e6c0d5d7e267d3ddab3dba126b99f918.zip
gcc-8108ea30e6c0d5d7e267d3ddab3dba126b99f918.tar.gz
gcc-8108ea30e6c0d5d7e267d3ddab3dba126b99f918.tar.bz2
timevar.def: Add TV_CONSTEXPR.
* timevar.def: Add TV_CONSTEXPR. * constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR. From-SVN: r247563
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/constexpr.c3
-rw-r--r--gcc/timevar.def1
4 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index af5c6bf..6cf1215 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 56f9c20..7f395b4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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,
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 366d562..34d25ba 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<tree,tree> map;
diff --git a/gcc/timevar.def b/gcc/timevar.def
index 51ec035..9ceda8a 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")