[Libclc-dev] [PATCH 7/9] r600: Use optimized addrspace(0) vload for private vload

Aaron Watry awatry at gmail.com
Tue Jul 22 18:46:48 PDT 2014


Now all address spaces have their loads treated identically and we
get cleaner code in r600 as a result.

Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 r600/lib/shared/vload.cl | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/r600/lib/shared/vload.cl b/r600/lib/shared/vload.cl
index 1d72460..18b5128 100644
--- a/r600/lib/shared/vload.cl
+++ b/r600/lib/shared/vload.cl
@@ -45,10 +45,6 @@ VLOAD_TYPES()
 
 //Assembly overrides start here
 
-VLOAD_VECTORIZE(int, __private)
-VLOAD_VECTORIZE(uint, __private)
-VLOAD_VECTORIZE(float, __private)
-
 //We only define functions for typeN vloadN(), and then just bitcast the result for unsigned types
 #define _CLC_VLOAD_ASM_DECL(PRIM_TYPE,LLVM_SCALAR_TYPE,ADDR_SPACE,ADDR_SPACE_ID) \
 _CLC_DECL PRIM_TYPE##2 __clc_vload2_##LLVM_SCALAR_TYPE##__addr##ADDR_SPACE_ID (const ADDR_SPACE PRIM_TYPE *); \
@@ -70,11 +66,13 @@ _CLC_DECL PRIM_TYPE##16 __clc_vload16_##LLVM_SCALAR_TYPE##__addr##ADDR_SPACE_ID
   _CLC_VLOAD_ASM_DEFINE(PRIM_TYPE, S_PRIM_TYPE, LLVM_TYPE, 16, ADDR_SPACE, ADDR_SPACE_ID) \
 
 #define _CLC_VLOAD_ASM_OVERLOAD_ADDR_SPACES(PRIM_TYPE,S_PRIM_TYPE,LLVM_TYPE) \
+  _CLC_VLOAD_ASM_OVERLOAD_SIZES(PRIM_TYPE, S_PRIM_TYPE, LLVM_TYPE, private, 0) \
   _CLC_VLOAD_ASM_OVERLOAD_SIZES(PRIM_TYPE, S_PRIM_TYPE, LLVM_TYPE, global, 1) \
   _CLC_VLOAD_ASM_OVERLOAD_SIZES(PRIM_TYPE, S_PRIM_TYPE, LLVM_TYPE, constant, 2) \
   _CLC_VLOAD_ASM_OVERLOAD_SIZES(PRIM_TYPE, S_PRIM_TYPE, LLVM_TYPE, local, 3) \
 
 #define _CLC_VLOAD_ASM_OVERLOADS() \
+  _CLC_VLOAD_ASM_DECL(int,i32,__private,0) \
   _CLC_VLOAD_ASM_DECL(int,i32,__global,1) \
   _CLC_VLOAD_ASM_DECL(int,i32,__constant,2) \
   _CLC_VLOAD_ASM_DECL(int,i32,__local,3) \
-- 
1.9.1





More information about the Libclc-dev mailing list