@@ -120,6 +120,7 @@ bool InlineLocalsResolution::runOnModule(Module& M)
120
120
computeOffsetList (M, sizeMap);
121
121
122
122
LLVMContext& C = M.getContext ();
123
+ const auto pCtx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext ();
123
124
124
125
for (Module::iterator I = M.begin (), E = M.end (); I != E; ++I)
125
126
{
@@ -167,7 +168,7 @@ bool InlineLocalsResolution::runOnModule(Module& M)
167
168
168
169
bool UseAsPointerOnly = useAsPointerOnly (arg);
169
170
unsigned Offset = totalSize;
170
- if (!UseAsPointerOnly)
171
+ if (!UseAsPointerOnly && pCtx-> platform . supportSLMTagging () )
171
172
Offset |= VALID_LOCAL_HIGH_BITS;
172
173
173
174
if (IsFirstSLMArgument) {
@@ -383,6 +384,8 @@ void InlineLocalsResolution::computeOffsetList(Module& M, std::map<Function*, un
383
384
return ;
384
385
}
385
386
387
+ const auto pCtx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext ();
388
+
386
389
// let's travese the CallGraph to calculate the local
387
390
// variables of kernel from all user functions.
388
391
m_chkSet.clear ();
@@ -454,7 +457,7 @@ void InlineLocalsResolution::computeOffsetList(Module& M, std::map<Function*, un
454
457
for (auto offsetIter = offsetMap[iter->first ].begin (), offsetEnd = offsetMap[iter->first ].end (); offsetIter != offsetEnd; ++offsetIter)
455
458
{
456
459
unsigned Offset = offsetIter->second ;
457
- if (!useAsPointerOnly (offsetIter->first ))
460
+ if (!useAsPointerOnly (offsetIter->first ) && pCtx-> platform . supportSLMTagging () )
458
461
Offset |= VALID_LOCAL_HIGH_BITS;
459
462
460
463
LocalOffsetMD localOffset;
0 commit comments