Skip to content

Commit 568d268

Browse files
lwesiersigcbot
authored andcommitted
Mark loads/stores for private variables
Mark loads/stores which are created for fill/spill of user private variables. Adding this mark because, during compilation the orginal addrspace is changed (for ex. from PRIVATE to GLOBAL) and is not visible on end stages of compilation. This will help to identify - which load/store is related for the private variables of user. In llvm-IR load/stores it has mark "user_addrspace_priv". In asm dumps it has mark "address space: private;"
1 parent ad00127 commit 568d268

File tree

6 files changed

+214
-48
lines changed

6 files changed

+214
-48
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8138,7 +8138,8 @@ namespace IGC
81388138
LSC_ADDR_SIZE addr_size,
81398139
LSC_DATA_ORDER data_order,
81408140
int immOffset,
8141-
LSC_CACHE_OPTS cacheOpts)
8141+
LSC_CACHE_OPTS cacheOpts,
8142+
LSC_DOC_ADDR_SPACE addrSpace)
81428143
{
81438144
LSC_SFID lscSfid =
81448145
resource && resource->m_surfaceType == ESURFACE_SLM ?
@@ -8152,8 +8153,7 @@ namespace IGC
81528153
addr.immScale = 1;
81538154
addr.immOffset = immOffset;
81548155
addr.size = addr_size;
8155-
// TODO: update this accordingly
8156-
addr.addrSpace = LSC_DOC_ADDR_SPACE::INVALID;
8156+
addr.addrSpace = addrSpace;
81578157

81588158
if (resource)
81598159
{
@@ -8288,7 +8288,8 @@ namespace IGC
82888288
LSC_ADDR_SIZE addr_size,
82898289
LSC_DATA_ORDER data_order,
82908290
int immOffset,
8291-
LSC_CACHE_OPTS cacheOpts)
8291+
LSC_CACHE_OPTS cacheOpts,
8292+
LSC_DOC_ADDR_SPACE addrSpace)
82928293
{
82938294
LSC_SFID lscSfid =
82948295
resource && resource->m_surfaceType == ESURFACE_SLM ?
@@ -8303,7 +8304,8 @@ namespace IGC
83038304
addr.immScale = 1;
83048305
addr.immOffset = immOffset;
83058306
addr.size = addr_size;
8306-
addr.addrSpace = LSC_DOC_ADDR_SPACE::INVALID;
8307+
addr.addrSpace = addrSpace;
8308+
83078309
if (resource)
83088310
{
83098311
addr.type = getLSCAddrType(resource);

IGC/Compiler/CISACodeGen/CISABuilder.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,17 @@ namespace IGC
260260
LSC_DATA_ELEMS numElems, unsigned blockOffset,
261261
ResourceDescriptor *resource,
262262
LSC_ADDR_SIZE addr_size, LSC_DATA_ORDER data_order,
263-
int immOffset, LSC_CACHE_OPTS cacheOpts);
263+
int immOffset, LSC_CACHE_OPTS cacheOpts,
264+
LSC_DOC_ADDR_SPACE addrSpace);
264265
void LSC_StoreScatter(LSC_OP subOp,
265266
CVariable *src, CVariable *offset,
266267
LSC_DATA_SIZE elemSize, LSC_DATA_ELEMS numElems,
267268
unsigned blockOffset,
268269
ResourceDescriptor *resource,
269270
LSC_ADDR_SIZE addr_size,
270271
LSC_DATA_ORDER data_order, int immOffset,
271-
LSC_CACHE_OPTS cacheOpts);
272+
LSC_CACHE_OPTS cacheOpts,
273+
LSC_DOC_ADDR_SPACE addrSpace);
272274
void LSC_LoadBlock1D(
273275
CVariable* dst, CVariable* offset,
274276
LSC_DATA_SIZE elemSize, LSC_DATA_ELEMS numElems,

0 commit comments

Comments
 (0)