This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch 2/4] Add debug information if prefetches are not issued
- From: Christian Borntraeger <borntraeger at de dot ibm dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Guenther <rguenther at suse dot de>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>, Changpeng Fang <Changpeng dot Fang at amd dot com>
- Date: Wed, 05 May 2010 12:09:18 +0200
- Subject: [patch 2/4] Add debug information if prefetches are not issued
- References: <20100505100916.707088000@de.ibm.com>
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: b/gcc/tree-ssa-loop-prefetch.c
===================================================================
*** a/gcc/tree-ssa-loop-prefetch.c
--- b/gcc/tree-ssa-loop-prefetch.c
*************** should_issue_prefetch_p (struct mem_ref
*** 848,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;
}
--- 848,863 ----
{
/* For now do not issue prefetches for only first few of the
iterations. */
! if (ref->prefetch_before != PREFETCH_ALL) {
! fprintf (dump_file, "Ignoring %p due to prefetch_before\n", (void *) ref);
return false;
+ }
/* Do not prefetch nontemporal stores. */
! if (ref->storent_p) {
! fprintf (dump_file, "Ignoring nontemporal store %p\n", (void *) ref);
return false;
+ }
return true;
}