From 47811d7dbe38c4e47c83426aa29ae41d7db055c1 Mon Sep 17 00:00:00 2001 From: Luis Machado Date: Mon, 7 May 2018 15:47:14 +0000 Subject: re PR bootstrap/85681 (r259995 breaks bootstrap on x86_64-*-freebsd) 2018-05-07 Luis Machado PR bootstrap/85681 Revert: 2018-05-07 Luis Machado * config/aarch64/aarch64-protos.h (cpu_prefetch_tune) : New const bool field. * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include prefetch_dynamic_strides. (exynosm1_prefetch_tune): Likewise. (thunderxt88_prefetch_tune): Likewise. (thunderx_prefetch_tune): Likewise. (thunderx2t99_prefetch_tune): Likewise. (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false. (aarch64_override_options_internal): Update to set PARAM_PREFETCH_DYNAMIC_STRIDES. * doc/invoke.texi (prefetch-dynamic-strides): Document new option. * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New. * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define. * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for prefetch-dynamic-strides setting. 2018-05-07 Luis Machado * config/aarch64/aarch64-protos.h (cpu_prefetch_tune) : New const int field. * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include minimum_stride field. (exynosm1_prefetch_tune): Likewise. (thunderxt88_prefetch_tune): Likewise. (thunderx_prefetch_tune): Likewise. (thunderx2t99_prefetch_tune): Likewise. (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048. (aarch64_override_options_internal): Update to set PARAM_PREFETCH_MINIMUM_STRIDE. * doc/invoke.texi (prefetch-minimum-stride): Document new option. * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New. * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define. * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if stride is constant and is below the minimum stride threshold. From-SVN: r260000 --- gcc/tree-ssa-loop-prefetch.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'gcc/tree-ssa-loop-prefetch.c') diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index af89d70..2f10db1 100644 --- a/gcc/tree-ssa-loop-prefetch.c +++ b/gcc/tree-ssa-loop-prefetch.c @@ -992,32 +992,6 @@ prune_by_reuse (struct mem_ref_group *groups) static bool should_issue_prefetch_p (struct mem_ref *ref) { - /* Do we want to issue prefetches for non-constant strides? */ - if (!cst_and_fits_in_hwi (ref->group->step) && PREFETCH_DYNAMIC_STRIDES == 0) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, - "Skipping non-constant step for reference %u:%u\n", - ref->group->uid, ref->uid); - return false; - } - - /* Some processors may have a hardware prefetcher that may conflict with - prefetch hints for a range of strides. Make sure we don't issue - prefetches for such cases if the stride is within this particular - range. */ - if (cst_and_fits_in_hwi (ref->group->step) - && absu_hwi (int_cst_value (ref->group->step)) < PREFETCH_MINIMUM_STRIDE) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, - "Step for reference %u:%u (%d) is less than the mininum " - "required stride of %d\n", - ref->group->uid, ref->uid, int_cst_value (ref->group->step), - PREFETCH_MINIMUM_STRIDE); - return false; - } - /* For now do not issue prefetches for only first few of the iterations. */ if (ref->prefetch_before != PREFETCH_ALL) -- cgit v1.1