Commit d398999d by Martin Liska Committed by Martin Liska

Add dbgcnt for gimple_match and generic_match.

2019-07-03  Martin Liska  <mliska@suse.cz>

	* dbgcnt.def (DEBUG_COUNTER): Add match debug counter.
	* genmatch.c (dt_simplify::gen_1): Generate dbgcnt
	condition.
	* generic-match-head.c: Include dbgcnt.h.
	* gimple-match-head.c: Likewise.

From-SVN: r273006
parent 596341c7
2019-07-03 Martin Liska <mliska@suse.cz>
* dbgcnt.def (DEBUG_COUNTER): Add match debug counter.
* genmatch.c (dt_simplify::gen_1): Generate dbgcnt
condition.
* generic-match-head.c: Include dbgcnt.h.
* gimple-match-head.c: Likewise.
2019-07-03 Martin Liska <mliska@suse.cz>
* gcov-counter.def (GCOV_COUNTER_V_SINGLE): Remove.
(GCOV_COUNTER_V_TOPN): New.
(GCOV_COUNTER_V_INDIR): Use _topn.
......
......@@ -195,3 +195,4 @@ DEBUG_COUNTER (tree_sra)
DEBUG_COUNTER (vect_loop)
DEBUG_COUNTER (vect_slp)
DEBUG_COUNTER (dom_unreachable_edges)
DEBUG_COUNTER (match)
......@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "case-cfn-macros.h"
#include "gimplify.h"
#include "optabs-tree.h"
#include "dbgcnt.h"
/* Routine to determine if the types T1 and T2 are effectively
the same for GENERIC. If T1 or T2 is not a type, the test
......
......@@ -3310,6 +3310,10 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result)
}
}
if (s->kind == simplify::SIMPLIFY)
fprintf_indent (f, indent, "if (__builtin_expect (!dbg_cnt (match), 0)) return %s;\n",
gimple ? "false" : "NULL_TREE");
fprintf_indent (f, indent, "if (__builtin_expect (dump_file && (dump_flags & TDF_FOLDING), 0)) "
"fprintf (dump_file, \"%s ",
s->kind == simplify::SIMPLIFY
......
......@@ -42,7 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimplify.h"
#include "optabs-tree.h"
#include "tree-eh.h"
#include "dbgcnt.h"
/* Forward declarations of the private auto-generated matchers.
They expect valueized operands in canonical order and do not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment