summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-07 10:30:32 +0000
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-07 10:30:32 +0000
commit6540132cfbeac557386a8b50d64fa8d5e8e71116 (patch)
tree179ca9694e2adeee4f8201d3c4d57be345602003 /gcc
parentcbc7195ae7c6c430ac214fd8c4935f946365c67d (diff)
downloadgcc-6540132cfbeac557386a8b50d64fa8d5e8e71116.tar.gz
2009-09-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro. * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier when volatile flag is set. * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151475 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/doc/rtl.texi11
-rw-r--r--gcc/rtl.h8
-rw-r--r--gcc/sched-deps.c5
4 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e3445d1eb34..8527d0b42e3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
+ * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
+ when volatile flag is set.
+ * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
+
2009-09-06 Eric Botcazou <ebotcazou@adacore.com>
PR bootstrap/41241
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 79baa10e25d..ba72b48096b 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -882,6 +882,14 @@ Stored in the @code{volatil} field and printed as @samp{/v}.
Most uses of @code{SYMBOL_REF_FLAG} are historic and may be subsumed
by @code{SYMBOL_REF_FLAGS}. Certainly use of @code{SYMBOL_REF_FLAGS}
is mandatory if the target requires more than one bit of storage.
+
+@findex PREFETCH_SCHEDULE_BARRIER_P
+@cindex @code{prefetch} and @samp{/v}
+@cindex @code{volatile}, in @code{prefetch}
+@item PREFETCH_SCHEDULE_BARRIER_P (@var{x})
+In a @code{prefetch}, indicates that the prefetch is a scheduling barrier.
+No other INSNs will be moved over it.
+Stored in the @code{volatil} field and printed as @samp{/v}.
@end table
These are the fields to which the above macros refer:
@@ -1034,6 +1042,9 @@ In an @code{insn}, 1 means the insn has been deleted.
In @code{label_ref} and @code{reg_label} expressions, 1 means a reference
to a non-local label.
+In @code{prefetch} expressions, 1 means that the containing insn is a
+scheduling barrier.
+
In an RTL dump, this flag is represented as @samp{/v}.
@end table
diff --git a/gcc/rtl.h b/gcc/rtl.h
index c5839df4ecb..88b93f19fb0 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -271,7 +271,9 @@ struct GTY((chain_next ("RTX_NEXT (&%h)"),
1 in a SUBREG with a negative value.
1 in a LABEL_REF, REG_LABEL_TARGET or REG_LABEL_OPERAND note for a
non-local label.
- In a SYMBOL_REF, this flag is used for machine-specific purposes. */
+ In a SYMBOL_REF, this flag is used for machine-specific purposes.
+ In a PREFETCH, this flag indicates that it should be considered a scheduling
+ barrier. */
unsigned int volatil : 1;
/* 1 in a MEM referring to a field of an aggregate.
0 if the MEM was a variable or the result of a * operator in C;
@@ -1423,6 +1425,10 @@ do { \
offset within that block. */
#define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset)
+/* True if RTX is flagged to be a scheduling barrier. */
+#define PREFETCH_SCHEDULE_BARRIER_P(RTX) \
+ (RTL_FLAG_CHECK1("PREFETCH_SCHEDULE_BARRIER_P", (RTX), PREFETCH)->volatil)
+
/* Indicate whether the machine has any sort of auto increment addressing.
If not, we can avoid checking for REG_INC notes. */
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 25f03d26b57..e9dac316e9a 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -2487,6 +2487,11 @@ sched_analyze_2 (struct deps *deps, rtx x, rtx insn)
flush_pending_lists (deps, insn, true, false);
break;
+ case PREFETCH:
+ if (PREFETCH_SCHEDULE_BARRIER_P (x))
+ reg_pending_barrier = TRUE_BARRIER;
+ break;
+
case UNSPEC_VOLATILE:
flush_pending_lists (deps, insn, true, true);
/* FALLTHRU */