diff options
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; |