aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-prefetch.c
diff options
context:
space:
mode:
authorZdenek Dvorak <ook@ucw.cz>2007-08-01 12:57:03 +0200
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-08-01 10:57:03 +0000
commit46cb04410da4ba4fa10070a0eec7a037ff6152a7 (patch)
tree369e177f440720774bed96e048c8818f953265a1 /gcc/tree-ssa-loop-prefetch.c
parent0ea339ea4d9c3e04ae17da6bf389617eb0251e57 (diff)
downloadgcc-46cb04410da4ba4fa10070a0eec7a037ff6152a7.zip
gcc-46cb04410da4ba4fa10070a0eec7a037ff6152a7.tar.gz
gcc-46cb04410da4ba4fa10070a0eec7a037ff6152a7.tar.bz2
invoke.texi (l1-cache-size): Update documentation.
* doc/invoke.texi (l1-cache-size): Update documentation. (l2-cache-size): Document. * params.h (L2_CACHE_SIZE): New macro. * tree-ssa-loop-prefetch.c (L1_CACHE_SIZE_BYTES): Reflect that L1_CACHE_SIZE is in kB now. (L2_CACHE_SIZE_BYTES): New macro. (tree_ssa_prefetch_arrays): Show size in kB. * config/i386/i386.h (struct processor_costs): Add l1_cache_size and l2_cache_size fields. * config/i386/driver-i386.c (describe_cache): Detect cache size in kB. * config/i386/i386.c (size_cost, i386_cost, i486_cost,pentium_cost, pentiumpro_cost, geode_cost, k6_cost, athlon_cost, k8_cost, amdfam10_cost, pentium4_cost, nocona_cost, core2_cost, generic64_cost, generic32_cost): Add l1_cache_size and l2_cache_size. (override_options): Set l1-cache-size and l2-cache-size to default values if not specified otherwise. * params.def (PARAM_L1_CACHE_SIZE): Change to set in kB. (PARAM_L2_CACHE_SIZE): New. From-SVN: r127117
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r--gcc/tree-ssa-loop-prefetch.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 0fada55..28cd322 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -166,9 +166,8 @@ along with GCC; see the file COPYING3. If not see
#define HAVE_prefetch 0
#endif
-#define L1_CACHE_SIZE_BYTES ((unsigned) (L1_CACHE_SIZE * L1_CACHE_LINE_SIZE))
-/* TODO: Add parameter to specify L2 cache size. */
-#define L2_CACHE_SIZE_BYTES (8 * L1_CACHE_SIZE_BYTES)
+#define L1_CACHE_SIZE_BYTES ((unsigned) (L1_CACHE_SIZE * 1024))
+#define L2_CACHE_SIZE_BYTES ((unsigned) (L2_CACHE_SIZE * 1024))
/* We consider a memory access nontemporal if it is not reused sooner than
after L2_CACHE_SIZE_BYTES of memory are accessed. However, we ignore
@@ -1549,10 +1548,10 @@ tree_ssa_prefetch_arrays (void)
SIMULTANEOUS_PREFETCHES);
fprintf (dump_file, " prefetch latency: %d\n", PREFETCH_LATENCY);
fprintf (dump_file, " prefetch block size: %d\n", PREFETCH_BLOCK);
- fprintf (dump_file, " L1 cache size: %d lines, %d bytes\n",
- L1_CACHE_SIZE, L1_CACHE_SIZE_BYTES);
+ fprintf (dump_file, " L1 cache size: %d lines, %d kB\n",
+ L1_CACHE_SIZE_BYTES / L1_CACHE_LINE_SIZE, L1_CACHE_SIZE);
fprintf (dump_file, " L1 cache line size: %d\n", L1_CACHE_LINE_SIZE);
- fprintf (dump_file, " L2 cache size: %d bytes\n", L2_CACHE_SIZE_BYTES);
+ fprintf (dump_file, " L2 cache size: %d kB\n", L2_CACHE_SIZE);
fprintf (dump_file, "\n");
}