From: Walter Lee Date: Sat, 25 Jan 2014 22:43:56 +0000 (+0000) Subject: backport: tilegx.c (tilegx_expand_builtin): Set PREFETCH_SCHEDULE_BARRIER_P to true... X-Git-Tag: releases/gcc-4.7.4~294 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9116ed526d5004ec4361e18a199fbe4987e1d5b;p=thirdparty%2Fgcc.git backport: tilegx.c (tilegx_expand_builtin): Set PREFETCH_SCHEDULE_BARRIER_P to true for prefetches. 2014-01-25 Walter Lee Backport from mainline 2014-01-25 Walter Lee * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 66487d2f4c44..651068ff871f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2014-01-25 Walter Lee + + Backport from mainline + 2014-01-25 Walter Lee + + * 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 Backport from mainline diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c index 6514363c17f5..e7ab94881f09 100644 --- a/gcc/config/tilegx/tilegx.c +++ b/gcc/config/tilegx/tilegx.c @@ -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) diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c index c2507c2aea82..e5a19f02aca9 100644 --- a/gcc/config/tilepro/tilepro.c +++ b/gcc/config/tilepro/tilepro.c @@ -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)