@@ -300,7 +300,7 @@ void DebugInfoPass::EmitDebugInfo(bool finalize, DbgDecoder* decodedDbg,
300
300
301
301
302
302
// Mark privateBase aka ImplicitArg::PRIVATE_BASE as Output for debugging
303
- void DebugInfoData::markOutputPrivateBase (CShader* pShader, IDebugEmitter* pDebugEmitter )
303
+ void DebugInfoData::markOutputPrivateBase (CShader* pShader)
304
304
{
305
305
IGC_ASSERT_MESSAGE (IGC_IS_FLAG_ENABLED (UseOffsetInLocation), " UseOffsetInLocation not enabled" );
306
306
@@ -309,9 +309,6 @@ void DebugInfoData::markOutputPrivateBase(CShader* pShader, IDebugEmitter* pDebu
309
309
CVariable* pVar = pShader->GetPrivateBase ();
310
310
if (pVar)
311
311
{
312
- // cache privateBase as it may be destroyed if subroutine
313
- // is emitted.
314
- pDebugEmitter->getCurrentVISA ()->setPrivateBaseReg (pVar);
315
312
pShader->GetEncoder ().GetVISAKernel ()->AddAttributeToVar (pVar->visaGenVariable [0 ], " Output" , 0 , nullptr );
316
313
if (pShader->m_dispatchSize == SIMDMode::SIMD32 && pVar->visaGenVariable [1 ])
317
314
{
@@ -380,14 +377,7 @@ void DebugInfoData::markOutput(llvm::Function& F, CShader* pShader, IDebugEmitte
380
377
// Per Thread Offset non-debug instruction must have 'Output' attribute
381
378
// added in the function to be called.
382
379
markOutputVar (pShader, pDebugEmitter, &pInst, " perThreadOffset" );
383
- if (F.getCallingConv () == CallingConv::SPIR_KERNEL)
384
- {
385
- markOutputPrivateBase (pShader, pDebugEmitter); // Mark privateBase aka ImplicitArg::PRIVATE_BASE as Output for debugging
386
- }
387
- else
388
- {
389
- // TODO: Apply privateBase of kernel to SPIR_FUNC if its a subroutine
390
- }
380
+ markOutputPrivateBase (pShader); // Mark privateBase aka ImplicitArg::PRIVATE_BASE as Output for debugging
391
381
ScalarVisaModule* scVISAModule = (ScalarVisaModule*)visaModule;
392
382
IGC_ASSERT_MESSAGE (scVISAModule->getPerThreadOffset ()==nullptr , " setPerThreadOffset was set earlier" );
393
383
scVISAModule->setPerThreadOffset (&pInst);
0 commit comments