* dbgcnt.def (prefetch): New debug counter.
* tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
(schedule_prefetches): Stop issueing prefetches if debug counter
tripped.
Change-Id: Ia6160364735a889fb6d2370be21d98f87c0fe962
From-SVN: r248924
+2017-06-06 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
+
+ * dbgcnt.def (prefetch): New debug counter.
+ * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
+ (schedule_prefetches): Stop issueing prefetches if debug counter
+ tripped.
+
2017-06-06 Tom de Vries <tom@codesourcery.com>
* doc/sourcebuild.texi (Testsuites, C Language Testsuites,
DEBUG_COUNTER (postreload_cse)
DEBUG_COUNTER (pre)
DEBUG_COUNTER (pre_insn)
+DEBUG_COUNTER (prefetch)
DEBUG_COUNTER (registered_jump_thread)
DEBUG_COUNTER (sched2_func)
DEBUG_COUNTER (sched_block)
#include "tree-inline.h"
#include "tree-data-ref.h"
#include "diagnostic-core.h"
+#include "dbgcnt.h"
/* This pass inserts prefetch instructions to optimize cache usage during
accesses to arrays in loops. It processes loops sequentially and:
if (2 * remaining_prefetch_slots < prefetch_slots)
continue;
+ /* Stop prefetching if debug counter is activated. */
+ if (!dbg_cnt (prefetch))
+ continue;
+
ref->issue_prefetch_p = true;
if (remaining_prefetch_slots <= prefetch_slots)