diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-25 18:25:00 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-25 18:25:00 +0000 |
commit | cd459e62b04311c582ab885d30ded5d062842c42 (patch) | |
tree | 30ce2860b1afc7397546e4427a13dcdcc2f04f2b /gcc/tree-ssa-loop.c | |
parent | 123fe3ea5ed1103ab4731c6881ee8014138ae127 (diff) | |
download | gcc-cd459e62b04311c582ab885d30ded5d062842c42.tar.gz |
Enable prefetching at -O3 for AMD cpus.
2010-06-25 Changpeng Fang <changpeng.fang@amd.com>
* common.opt (fprefetch-loop-arrays): Re-define
-fprefetch-loop-arrays as a tri-state option with the initial
value of -1.
* tree-ssa-loop.c (gate_tree_ssa_loop_prefetch): Invoke prefetch
pass only when flag_prefetch_loop_arrays > 0.
* toplev.c (process_options): Note that, with tri-states,
flag_prefetch_loop_arrays>0 means prefetching is enabled.
* config/i386/i386.c (override_options): Enable prefetching at -O3
for a set of CPUs that sw prefetching is helpful.
(software_prefetching_beneficial_p): New. Return TRUE if software
prefetching is beneficial for the given CPU.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161391 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop.c')
-rw-r--r-- | gcc/tree-ssa-loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 344cfa8acbe..c9c5bbd0f0c 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -600,7 +600,7 @@ tree_ssa_loop_prefetch (void) static bool gate_tree_ssa_loop_prefetch (void) { - return flag_prefetch_loop_arrays != 0; + return flag_prefetch_loop_arrays > 0; } struct gimple_opt_pass pass_loop_prefetch = |