Propagate address spaces to builtins.
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 21 Sep 2018 11:25:39 +0000 (11:25 +0000)
committerAndrew Stubbs <ams@gcc.gnu.org>
Fri, 21 Sep 2018 11:25:39 +0000 (11:25 +0000)
commitb6895597cd59f77077ccdecdacfdd34bf77b5a07
tree740793b57e11715479275df79c102045b79d2820
parent518196cb3fce647789ff4c9f4679bb7087030158
Propagate address spaces to builtins.

At present, pointers passed to builtin functions, including atomic operators,
are stripped of their address space properties.  This doesn't seem to be
deliberate, it just omits to copy them.

Not only that, but it forces pointer sizes to Pmode, which isn't appropriate
for all address spaces.

This patch attempts to correct both issues.  It works for GCN atomics and
GCN OpenACC gang-private variables.

2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
    Julian Brown  <julian@codesourcery.com>

gcc/
* builtins.c (get_builtin_sync_mem): Handle address spaces.

Co-Authored-By: Julian Brown <julian@codesourcery.com>
From-SVN: r264467
gcc/ChangeLog
gcc/builtins.c