Skip to content

Commit 73301ca

Browse files
tbujewsksys_zuul
authored andcommitted
Skip tagging SLM.
Change-Id: If5a8387de964a70d38cd71933922a59ad4efa951
1 parent ba8198d commit 73301ca

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ namespace IGC
373373
return true;
374374
}
375375

376+
bool supportSLMTagging() const
377+
{
378+
return true;
379+
}
376380
// ***** Below go accessor methods for testing WA data from WA_TABLE *****
377381

378382
bool WaDoNotPushConstantsForAllPulledGSTopologies() const

IGC/Compiler/Optimizer/OpenCLPasses/LocalBuffers/InlineLocalsResolution.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ bool InlineLocalsResolution::runOnModule(Module& M)
120120
computeOffsetList(M, sizeMap);
121121

122122
LLVMContext& C = M.getContext();
123+
const auto pCtx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
123124

124125
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
125126
{
@@ -167,7 +168,7 @@ bool InlineLocalsResolution::runOnModule(Module& M)
167168

168169
bool UseAsPointerOnly = useAsPointerOnly(arg);
169170
unsigned Offset = totalSize;
170-
if (!UseAsPointerOnly)
171+
if (!UseAsPointerOnly && pCtx->platform.supportSLMTagging())
171172
Offset |= VALID_LOCAL_HIGH_BITS;
172173

173174
if (IsFirstSLMArgument) {
@@ -383,6 +384,8 @@ void InlineLocalsResolution::computeOffsetList(Module& M, std::map<Function*, un
383384
return;
384385
}
385386

387+
const auto pCtx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
388+
386389
// let's travese the CallGraph to calculate the local
387390
// variables of kernel from all user functions.
388391
m_chkSet.clear();
@@ -454,7 +457,7 @@ void InlineLocalsResolution::computeOffsetList(Module& M, std::map<Function*, un
454457
for (auto offsetIter = offsetMap[iter->first].begin(), offsetEnd = offsetMap[iter->first].end(); offsetIter != offsetEnd; ++offsetIter)
455458
{
456459
unsigned Offset = offsetIter->second;
457-
if (!useAsPointerOnly(offsetIter->first))
460+
if (!useAsPointerOnly(offsetIter->first) && pCtx->platform.supportSLMTagging())
458461
Offset |= VALID_LOCAL_HIGH_BITS;
459462

460463
LocalOffsetMD localOffset;

0 commit comments

Comments
 (0)