diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-03 18:50:20 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-03 18:50:20 +0000 |
commit | c300fe285abc2f6423bf896cfbefa3dcf2f23e6d (patch) | |
tree | e8b5d72d3b10aff193bdaec8b388dd093accc12c | |
parent | d00ce6b998455a18bbca8fb30a83889e4a34c5df (diff) | |
download | gcc-c300fe285abc2f6423bf896cfbefa3dcf2f23e6d.tar.gz |
* timevar.def: Add TV_CONSTEXPR.
* constexpr.c (cxx_eval_outermost_constant_expr): Use TV_CONSTEXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247563 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/constexpr.c | 3 | ||||
-rw-r--r-- | gcc/timevar.def | 1 |
4 files changed, 12 insertions, 0 deletions
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 <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 56f9c2081a5..7f395b461a4 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 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<tree,tree> 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") |