tilegx.c (tilegx_expand_builtin): Set PREFETCH_SCHEDULE_BARRIER_P to true for prefetches.
authorWalter Lee <walt@tilera.com>
Sat, 25 Jan 2014 20:23:42 +0000 (20:23 +0000)
committerWalter Lee <walt@gcc.gnu.org>
Sat, 25 Jan 2014 20:23:42 +0000 (20:23 +0000)
2014-01-25  Walter Lee  <walt@tilera.com>

            * config/tilegx/tilegx.c (tilegx_expand_builtin): Set
            PREFETCH_SCHEDULE_BARRIER_P to true for prefetches.
            * config/tilepro/tilepro.c (tilepro_expand_builtin): Ditto.

From-SVN: r207080

gcc/ChangeLog
gcc/config/tilegx/tilegx.c
gcc/config/tilepro/tilepro.c

index 921b0ce..a4f5fd5 100644 (file)
@@ -1,5 +1,11 @@
-2014-01-25  Richard Sandiford  <rdsandiford@googlemail.com>
+2014-01-25  Walter Lee  <walt@tilera.com>
 
+       * config/tilegx/tilegx.c (tilegx_expand_builtin): Set
+       PREFETCH_SCHEDULE_BARRIER_P to true for prefetches.
+       * config/tilepro/tilepro.c (tilepro_expand_builtin): Ditto.
+
+2014-01-25  Richard Sandiford  <rdsandiford@googlemail.com>
+       
        * config/mips/constraints.md (kl): Delete.
        * config/mips/mips.md (divmod<mode>4, udivmod<mode>4): Turn into
        define expands, using...
index 85a46f7..c168621 100644 (file)
@@ -3570,6 +3570,12 @@ tilegx_expand_builtin (tree exp,
     }
   if (!pat)
     return NULL_RTX;
+
+  /* If we are generating a prefetch, tell the scheduler not to move
+     it around.  */
+  if (GET_CODE (pat) == PREFETCH)
+    PREFETCH_SCHEDULE_BARRIER_P (pat) = true;
+
   emit_insn (pat);
 
   if (nonvoid)
index 615d490..74f8800 100644 (file)
@@ -3184,6 +3184,12 @@ tilepro_expand_builtin (tree exp,
     }
   if (!pat)
     return NULL_RTX;
+
+  /* If we are generating a prefetch, tell the scheduler not to move
+     it around.  */
+  if (GET_CODE (pat) == PREFETCH)
+    PREFETCH_SCHEDULE_BARRIER_P (pat) = true;
+
   emit_insn (pat);
 
   if (nonvoid)