]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: tilegx.c (tilegx_expand_builtin): Set PREFETCH_SCHEDULE_BARRIER_P to true...
authorWalter Lee <walt@tilera.com>
Sat, 25 Jan 2014 22:43:56 +0000 (22:43 +0000)
committerWalter Lee <walt@gcc.gnu.org>
Sat, 25 Jan 2014 22:43:56 +0000 (22:43 +0000)
2014-01-25  Walter Lee  <walt@tilera.com>

            Backport from mainline
            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: r207101

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

index 66487d2f4c4482a88c8fa82695cc9461e5fcbe65..651068ff871ff32aadd2035bed8bd090a11290a6 100644 (file)
@@ -1,3 +1,12 @@
+2014-01-25  Walter Lee  <walt@tilera.com>
+
+       Backport from mainline
+       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  Walter Lee  <walt@tilera.com>
 
        Backport from mainline
index 6514363c17f523f07a6a2fa0c12797f2972f47e6..e7ab94881f09d18e84ab0f6c948768083c0c294d 100644 (file)
@@ -3500,6 +3500,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 c2507c2aea82b7ac0649db07436a714f4b9548e2..e5a19f02aca9d0a74b0374143cbafecf929bff91 100644 (file)
@@ -3167,6 +3167,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)