------- Comment #21 from spop at gcc dot gnu dot org 2010-07-09 23:09 ------- Subject: Bug 44576
Author: spop Date: Fri Jul 9 23:08:55 2010 New Revision: 162023 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162023 Log: pr44576 Avoid un-necessary prefetch analysis by distributing the cost models 2010-07-09 Changpeng Fang <changpeng.f...@amd.com> PR tree-optimization/44576 * tree-ssa-loop-prefetch.c (trip_count_to_ahead_ratio_too_small_p): New. Pull out from is_loop_prefetching_profitable to implement the trip count to ahead ratio heuristic. (mem_ref_count_reasonable_p): New. Pull out from is_loop_prefetching_profitable to implement the instruction to memory reference ratio heuristic. Also consider not reasonable if the memory reference count is above a threshold (to avoid explosive compilation time. (insn_to_prefetch_ratio_too_small_p): New. Pull out from is_loop_prefetching_profitable to implement the instruction to prefetch ratio heuristic. (is_loop_prefetching_profitable): Removed. (loop_prefetch_arrays): Distribute the cost analysis across the function to allow early exit of the prefetch analysis. is_loop_prefetching_profitable is splitted into three functions, with each one called as early as possible. (PREFETCH_MAX_MEM_REFS_PER_LOOP): New. Threshold above which the number of memory references in a loop is considered too many. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-loop-prefetch.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44576