This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 2/4] Add debug information if prefetches are not issued
Am Mittwoch 05 Mai 2010 14:31:31 schrieb Richard Guenther:
> You should guard them with
>
> if (dump_file && (dump_flags & TDF_DETAILS))
Right, thank you Richard.
Here is an updated version. I also fixed a coding style issue of if and open braces.
Would that patch be ok for the 4.5 brach as well or is it only for 4.6?
Christian
Add debug information if prefetches are not issued
These debug statements helped me to understand why a prefetch was not
issued.
Bootstrapped and tested on s390x-ibm-linux-gnu. Ok to apply?
Christian.
2010-05-05 Christian Borntraeger <borntraeger@de.ibm.com>
* tree-ssa-loop-prefetch.c: Add debug for dropped prefetches.
Index: gcc/tree-ssa-loop-prefetch.c
===================================================================
*** gcc/tree-ssa-loop-prefetch.c.orig
--- gcc/tree-ssa-loop-prefetch.c
*************** should_issue_prefetch_p (struct mem_ref
*** 849,859 ****
/* For now do not issue prefetches for only first few of the
iterations. */
if (ref->prefetch_before != PREFETCH_ALL)
! return false;
/* Do not prefetch nontemporal stores. */
if (ref->storent_p)
! return false;
return true;
}
--- 849,867 ----
/* For now do not issue prefetches for only first few of the
iterations. */
if (ref->prefetch_before != PREFETCH_ALL)
! {
! if (dump_file && (dump_flags & TDF_DETAILS))
! fprintf (dump_file, "Ignoring %p due to prefetch_before\n", (void *) ref);
! return false;
! }
/* Do not prefetch nontemporal stores. */
if (ref->storent_p)
! {
! if (dump_file && (dump_flags & TDF_DETAILS))
! fprintf (dump_file, "Ignoring nontemporal store %p\n", (void *) ref);
! return false;
! }
return true;
}