diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-07-05 07:50:31 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-07-05 07:50:31 +0000 |
commit | 134b044daf0999cee9f85203be3fa35c48051da1 (patch) | |
tree | 2ead129b539b876961452bf5f3dd621395a14b87 /gcc/tree-ssa-loop-prefetch.c | |
parent | 43c7dca8816e84a7b2d6caa10bed3c0a3c0c7e8e (diff) | |
download | gcc-134b044daf0999cee9f85203be3fa35c48051da1.zip gcc-134b044daf0999cee9f85203be3fa35c48051da1.tar.gz gcc-134b044daf0999cee9f85203be3fa35c48051da1.tar.bz2 |
target-insns.def (prefetch): New targetm instruction pattern.
gcc/
* target-insns.def (prefetch): New targetm instruction pattern.
* tree-ssa-loop-prefetch.c: Include targeth.
(tree_ssa_prefetch_arrays): Use prefetch targetm pattern instead
of HAVE_*/gen_* interface.
* builtins.c (expand_builtin_prefetch): Likewise.
* toplev.c (process_options): Likewise.
From-SVN: r225424
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r-- | gcc/tree-ssa-loop-prefetch.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index 6996845..441e4a9 100644 --- a/gcc/tree-ssa-loop-prefetch.c +++ b/gcc/tree-ssa-loop-prefetch.c @@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "tree-inline.h" #include "tree-data-ref.h" +#include "target.h" /* FIXME: Needed for optabs, but this should all be moved to a TBD interface @@ -216,10 +217,6 @@ along with GCC; see the file COPYING3. If not see #define ACCEPTABLE_MISS_RATE 50 #endif -#ifndef HAVE_prefetch -#define HAVE_prefetch 0 -#endif - #define L1_CACHE_SIZE_BYTES ((unsigned) (L1_CACHE_SIZE * 1024)) #define L2_CACHE_SIZE_BYTES ((unsigned) (L2_CACHE_SIZE * 1024)) @@ -1954,11 +1951,11 @@ tree_ssa_prefetch_arrays (void) bool unrolled = false; int todo_flags = 0; - if (!HAVE_prefetch + if (!targetm.have_prefetch () /* It is possible to ask compiler for say -mtune=i486 -march=pentium4. -mtune=i486 causes us having PREFETCH_BLOCK 0, since this is part of processor costs and i486 does not have prefetch, but - -march=pentium4 causes HAVE_prefetch to be true. Ugh. */ + -march=pentium4 causes targetm.have_prefetch to be true. Ugh. */ || PREFETCH_BLOCK == 0) return 0; |